Skip to content

Commit

Permalink
fix: always navigate back to shell stack when closing watch account s…
Browse files Browse the repository at this point in the history
…creen

Signed-off-by: Brian Sztamfater <[email protected]>
  • Loading branch information
briansztamfater committed Jan 5, 2024
1 parent 947a1ef commit 592b965
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/status_im/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/status_im/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 592b965

Please sign in to comment.