What changed, and why it matters
This is a tiny one-line UI fix in a mobile wallet app. It adds an extra check before closing a bottom sheet during a cryptocurrency trade, likely to prevent a crash or visual glitch when the screen has already been dismissed. There is no clear security relevance in the commit itself.
No security action required. Treat as a normal stability/UI fix. If reviewing for release quality, verify the fix resolves the reported UI crash during exchange trade completion.
Security signals we found
No security-related keywords in commit title or message
Change is a defensive null/state guard, not a trust boundary or cryptographic change
No input validation, authentication, or authorization logic modified
No references to vulnerabilities, CVEs, or security researchers
Evidence from the diff
The change adds Navigator.canPop(bottomSheetContext) as an additional guard before calling Navigator.of(bottomSheetContext).pop(true) inside an onSlideActionComplete callback on the exchange trade page. This prevents calling pop() on a route that is no longer on the navigation stack, which would otherwise throw a Flutter assertion error or runtime exception. The actual transaction commit (commitTransaction) still runs regardless.
Changed components
lib/src/screens/exchange_trade/exchange_trade_page.dartInspect captured patch +1 / −1
diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart
index 0f068094..545c78d0 100644
--- a/lib/src/screens/exchange_trade/exchange_trade_page.dart
+++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart
@@ -328,7 +328,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
.pendingTransactionFeeFiatAmountFormatted,
outputs: widget.exchangeTradeViewModel.sendViewModel.outputs,
onSlideActionComplete: () async {
- if (bottomSheetContext.mounted) {
+ if (bottomSheetContext.mounted && Navigator.canPop(bottomSheetContext)) {
Navigator.of(bottomSheetContext).pop(true);
}
widget.exchangeTradeViewModel.sendViewModel.commitTransaction(context);
Why this scored 25/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.