Skip to content

Commit fa42a1b

Browse files
smohamedjavidilmotta
authored andcommitted
fix(wallet)_: Activity tab is selected on navigating back from the swap flow (#21474)
This commit fixes activity tab is selected when navigating back from the swap flow Signed-off-by: Mohamed Javid <[email protected]>
1 parent 697e300 commit fa42a1b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/status_im/contexts/wallet/swap/events.cljs

+1-6
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,6 @@
204204
(fn [{:keys [db]}]
205205
{:db (update-in db [:wallet :ui] dissoc :swap)}))
206206

207-
(rf/reg-event-fx
208-
:wallet/on-swap-done
209-
(fn [_]
210-
{:fx [[:dispatch [:wallet/select-account-tab :activity]]
211-
[:dispatch [:wallet/clean-swap]]]}))
212-
213207
(rf/reg-event-fx :wallet/swap-transaction
214208
(fn [{:keys [db]} [sha3-pwd]]
215209
(let [wallet-address (get-in db
@@ -299,6 +293,7 @@
299293
:screen/wallet.swap-set-spending-cap
300294
:screen/wallet.swap-confirmation)])
301295
(when-not approval-required?
296+
(rf/dispatch [:wallet/select-account-tab :activity])
302297
(debounce/debounce-and-dispatch
303298
[:toasts/upsert
304299
{:id :swap-transaction-pending

src/status_im/contexts/wallet/swap/setup_swap/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
:valid-input? valid-pay-input?
157157
:clean-approval-transaction? true}))
158158
[pay-input-amount])]
159-
(rn/use-unmount #(rf/dispatch [:wallet/on-swap-done]))
159+
(rn/use-unmount #(rf/dispatch [:wallet/clean-swap]))
160160
(rn/use-effect
161161
(fn []
162162
(request-fetch-swap-proposal))

0 commit comments

Comments
 (0)