Skip to content

Commit ff15f4c

Browse files
[#21439] fix: close swap flow after confirmation
1 parent 7e5df76 commit ff15f4c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,7 @@
294294
:receive-token-symbol token-id-to
295295
:receive-amount receive-amount}))])
296296
(rf/dispatch [:hide-bottom-sheet])
297-
(rf/dispatch [:dismiss-modal
298-
(if approval-required?
299-
:screen/wallet.swap-set-spending-cap
300-
:screen/wallet.swap-confirmation)])
297+
(rf/dispatch [:wallet/end-swap-flow])
301298
(when-not approval-required?
302299
(debounce/debounce-and-dispatch
303300
[:toasts/upsert
@@ -424,3 +421,10 @@
424421
:last-request-uuid
425422
:approved-amount
426423
:approval-transaction-id)))})))
424+
425+
(rf/reg-event-fx :wallet/end-swap-flow
426+
(fn [{:keys [db]}]
427+
(let [address (get-in db [:wallet :current-viewing-account-address])]
428+
{:fx [[:dispatch [:wallet/navigate-to-account-within-stack address]]
429+
[:dispatch [:wallet/fetch-activities-for-current-account]]
430+
[:dispatch [:wallet/select-account-tab :activity]]]})))

0 commit comments

Comments
 (0)