feat(shopinbit): don't repetitively ask for the user's display name
What changed, and why it matters
This commit is a small user-experience improvement for the ShopinBit feature in Stack Wallet. It skips a screen that repeatedly asks the user for their display name when that name has already been saved. There is no security issue visible in the change.
No security action needed. Review as a normal UX/feature change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes two desktop ShopinBit navigation points to route to ShopInBitStep2 instead of ShopInBitStep1. The inline comment explains that the display name is already loaded from settings into the order model, so prompting again is redundant. No logic for storing, transmitting, or validating the name is modified.
Changed components
lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dartlib/pages_desktop_specific/services/shopin_bit/sub_widgets/desktop_shopin_bit_first_run.dartInspect captured patch +7 / −5
diff --git a/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart b/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
index 302794c..2004289 100644
--- a/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
+++ b/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
@@ -8,7 +8,7 @@ import 'package:flutter_svg/svg.dart';
import '../../../app_config.dart';
import '../../../models/shopinbit/shopinbit_order_model.dart';
import '../../../notifications/show_flush_bar.dart';
-import '../../../pages/shopinbit/shopinbit_step_1.dart';
+import '../../../pages/shopinbit/shopinbit_step_2.dart';
import '../../../pages/shopinbit/shopinbit_tickets_view.dart';
import '../../../providers/db/drift_provider.dart';
import '../../../providers/desktop/current_desktop_menu_item.dart';
@@ -80,12 +80,14 @@ class _DesktopServicesViewState extends ConsumerState<DesktopShopInBitView> {
),
);
} else {
- // Returning user: go directly to Step1 (skip service overview dialog).
+ // Returning user: go directly to Step2 (skip service overview dialog
+ // and the redundant display-name prompt; name is already loaded from
+ // settings into model).
await showDialog<void>(
context: context,
barrierDismissible: false,
builder: (_) => NestedNavigatorDialog(
- initialRoute: ShopInBitStep1.routeName,
+ initialRoute: ShopInBitStep2.routeName,
initialRouteArgs: model,
),
);
diff --git a/lib/pages_desktop_specific/services/shopin_bit/sub_widgets/desktop_shopin_bit_first_run.dart b/lib/pages_desktop_specific/services/shopin_bit/sub_widgets/desktop_shopin_bit_first_run.dart
index b693f5d..16e791d 100644
--- a/lib/pages_desktop_specific/services/shopin_bit/sub_widgets/desktop_shopin_bit_first_run.dart
+++ b/lib/pages_desktop_specific/services/shopin_bit/sub_widgets/desktop_shopin_bit_first_run.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import '../../../../models/shopinbit/shopinbit_order_model.dart';
-import '../../../../pages/shopinbit/shopinbit_step_1.dart';
+import '../../../../pages/shopinbit/shopinbit_step_2.dart';
import '../../../../utilities/text_styles.dart';
import '../../../../widgets/desktop/primary_button.dart';
import '../../../../widgets/desktop/secondary_button.dart';
@@ -54,7 +54,7 @@ class DesktopShopinBitFirstRun extends StatelessWidget {
buttonHeight: ButtonHeight.l,
label: "Continue",
onPressed: () => Navigator.of(context).pushReplacementNamed(
- ShopInBitStep1.routeName,
+ ShopInBitStep2.routeName,
arguments: model,
),
),
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.