From 592b965f601c49013e065298d2d4f6b118fcf95c Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Fri, 1 Dec 2023 15:06:26 -0300 Subject: [PATCH] fix: always navigate back to shell stack when closing watch account screen Signed-off-by: Brian Sztamfater --- src/status_im/contexts/wallet/events.cljs | 10 ++-------- src/status_im/navigation/screens.cljs | 5 ++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index cf48b9f4ced..aeb11628339 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -35,13 +35,7 @@ (fn [{:keys [db]} [address]] {:db (assoc-in db [:wallet :current-viewing-account-address] address) :fx [[:dispatch [:hide-bottom-sheet]] - [:dispatch-later - [{:dispatch [:navigate-back] - :ms 100} - {:dispatch [:navigate-back] - :ms 100} - {:dispatch [:navigate-to :wallet-accounts address] - :ms 300}]] + [:dispatch [:navigate-to :wallet-accounts address]] [:dispatch [:wallet/show-account-created-toast address]]]})) (rf/reg-event-fx :wallet/switch-current-viewing-account @@ -51,7 +45,7 @@ (rf/reg-event-fx :wallet/close-account-page (fn [{:keys [db]}] {:db (update db :wallet dissoc :current-viewing-account-address) - :fx [[:dispatch [:navigate-back]]]})) + :fx [[:dispatch [:pop-to-root :shell-stack]]]})) (rf/reg-event-fx :wallet/get-accounts-success diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 4c6f64c5e94..1ad3a8192e0 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -280,7 +280,10 @@ :component emoji-picker/view} {:name :wallet-accounts - :options {:insets {:top? true}} + :options {:insets {:top? true} + :popGesture false + :hardwareBackButton {:dismissModalOnPress false + :popStackOnPress false}} :component wallet-accounts/view} {:name :wallet-edit-account