Skip to content

Commit d3891d5

Browse files
committed
fix: remove double-pop from BuildingTransactionDialog cancel
The dialog's cancel button popped the navigator itself and then invoked onCancel, while callers' onCancel handlers also popped, causing a double pop. Drop the internal pop so the caller owns the dismissal, and add the missing pop to Step4View's onCancel.
1 parent 51db6c7 commit d3891d5

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

lib/pages/exchange_view/exchange_step_views/step_4_view.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
270270
isSpark: wallet is FiroWallet && !firoPublicSend,
271271
onCancel: () {
272272
wasCancelled = true;
273+
Navigator.of(context).pop();
273274
},
274275
);
275276
},

lib/pages/send_view/sub_widgets/building_transaction_dialog.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ class _RestoringDialogState extends ConsumerState<BuildingTransactionDialog> {
145145
style: STextStyles.itemSubtitle12(context),
146146
),
147147
onPressed: () {
148-
Navigator.of(context).pop();
149148
onCancel.call();
150149
},
151150
),
@@ -172,7 +171,6 @@ class _RestoringDialogState extends ConsumerState<BuildingTransactionDialog> {
172171
style: STextStyles.itemSubtitle12(context),
173172
),
174173
onPressed: () {
175-
Navigator.of(context).pop();
176174
onCancel.call();
177175
},
178176
),

0 commit comments

Comments
 (0)