Skip to content

Commit

Permalink
remove wizard backward and replace it with navigate-back
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilad75 committed Mar 18, 2024
1 parent 28b80c8 commit e3c364e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
10 changes: 0 additions & 10 deletions src/status_im/common/wizard.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,3 @@
(if start-flow?
[:open-modal (:screen-id next-screen)]
[:navigate-to-within-stack [(:screen-id next-screen) current-screen]])]]})))

(rf/reg-event-fx
:navigation/wizard-backward
(fn [{:keys [db]}]
(let [stack (:modal-view-ids db)
current-screen (last stack)]
{:fx [[:dispatch
(if (= (count stack) 1)
[:navigate-back]
[:navigate-back-within-stack current-screen])]]})))
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
(rf/dispatch [:wallet/clean-selected-collectible])
(rf/dispatch [:wallet/clean-send-address])
(rf/dispatch [:wallet/select-address-tab nil])
(rf/dispatch [:navigation/wizard-backward]))
(rf/dispatch [:navigate-back]))
on-change-tab #(rf/dispatch [:wallet/select-address-tab %])
input-value (reagent/atom "")
input-focused? (reagent/atom false)]
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/contexts/wallet/send/select_asset/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
search-text (reagent/atom "")
on-change-text #(reset! search-text %)
on-change-tab #(reset! selected-tab %)
on-close #(rf/dispatch [:navigation/wizard-backward])]
on-close #(rf/dispatch [:navigate-back])]
(fn []
[rn/safe-area-view {:style style/container}
[account-switcher/view
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/contexts/wallet/send/send_amount/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
:on-navigate-back (fn []
(rf/dispatch [:wallet/clean-selected-token])
(rf/dispatch [:wallet/clean-selected-collectible])
(rf/dispatch [:navigation/wizard-backward]))}])
(rf/dispatch [:navigate-back]))}])

(def view (quo.theme/with-theme view-internal))
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
(let [on-close (fn []
(rf/dispatch [:wallet/clean-suggested-routes])
(rf/dispatch [:wallet/clean-selected-collectible])
(rf/dispatch [:navigation/wizard-backward]))]
(rf/dispatch [:navigate-back]))]
(fn [{:keys [theme]}]
(let [send-transaction-data (rf/sub [:wallet/wallet-send])
token (:token send-transaction-data)
Expand Down

0 comments on commit e3c364e

Please sign in to comment.