fix(shopinbit): show car research payment processing errors as a dialog
What changed, and why it matters
This commit changes how error messages are shown to users when a car-research payment fails in the Stack Wallet app. It replaces small floating notification banners with larger popup dialogs so users are more likely to notice the problem. There is no security fix here—only a user-interface improvement.
No security action needed; treat as a routine UX change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies lib/pages/shopinbit/shopinbit_car_research_payment_view.dart, replacing three calls to showFloatingFlushBar with await showDialog
Changed components
lib/pages/shopinbit/shopinbit_car_research_payment_view.dartInspect captured patch +22 / −13
diff --git a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
index af854f7..349b045 100644
--- a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
@@ -396,11 +396,14 @@ class _ShopInBitCarResearchPaymentViewState
} catch (e) {
if (mounted) {
setState(() => _flowState = _PaymentFlowState.error);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to submit car research request",
+ maxWidth: Util.isDesktop ? 500 : null,
message: e.toString(),
- context: context,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
@@ -419,11 +422,14 @@ class _ShopInBitCarResearchPaymentViewState
if (logResp.hasError || logResp.value == null) {
if (mounted) {
setState(() => _flowState = _PaymentFlowState.error);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
- message: logResp.exception?.message ?? "Failed to log payment",
- context: context,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to log car research payment",
+ maxWidth: Util.isDesktop ? 500 : null,
+ message: logResp.exception?.message,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
@@ -520,11 +526,14 @@ class _ShopInBitCarResearchPaymentViewState
} catch (e) {
if (mounted) {
setState(() => _flowState = _PaymentFlowState.error);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to process car research payment",
+ maxWidth: Util.isDesktop ? 500 : null,
message: e.toString(),
- context: context,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
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.