fix(shopinbit): pop payment loading overlay on the root navigator
What changed, and why it matters
This commit fixes a UI bug in the Stack Wallet app's ShopinBit payment screen. A loading overlay that appears while refreshing or checking an invoice could get stuck (a 'soft-lock') because it was being shown on a nested navigator instead of the root one. The fix tells the overlay to display on the root navigator so it can be properly dismissed, preventing users from getting stuck on a frozen payment screen.
No immediate security action required. Treat as a routine UX/reliability fix. Verify that other `showLoading` calls in the app that may be nested in navigators also use `rootNavigator: true` where appropriate, and regression-test the payment flow to confirm the overlay dismisses correctly.
Security signals we found
UI soft-lock / denial-of-service to the user
Overlay dismissal failure due to nested navigator context
No input validation, memory safety, or cryptographic changes
Evidence from the diff
The change adds rootNavigator: true to two showLoading calls in lib/pages/shopinbit/shopinbit_payment_view.dart. The first call wraps refreshInvoice and the second wraps getPayment. By routing the loading overlay through the root navigator, the overlay is correctly popped even when the view is nested inside another navigator, avoiding a soft-lock where the loading spinner remains indefinitely and blocks interaction.
Changed components
lib/pages/shopinbit/shopinbit_payment_view.dartShopinBit payment loading overlayInspect captured patch +2 / −0
diff --git a/lib/pages/shopinbit/shopinbit_payment_view.dart b/lib/pages/shopinbit/shopinbit_payment_view.dart
index ee51597..05fd2f3 100644
--- a/lib/pages/shopinbit/shopinbit_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_payment_view.dart
@@ -199,6 +199,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView>
),
context: context,
message: "Refreshing invoice",
+ rootNavigator: true,
);
if (!mounted) return;
if (resp != null && !resp.hasError && resp.value != null) {
@@ -220,6 +221,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView>
.getPayment(widget.apiTicketId, customerKey: customerKey),
context: context,
message: "Checking for payment",
+ rootNavigator: true,
);
if (!mounted) return;
Why this scored 17/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.