From ae6205c874230c45de69206e308cefcc584e0e99 Mon Sep 17 00:00:00 2001 From: Ulises Manuel <90291778+ulisesmac@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:30:00 -0600 Subject: [PATCH] fix(wallet): Fix input amount step skipped while sending a token (#20852) * fix(wallet): Fix input amount step skipped while sending a token * Add comment about ^:flush-dom metadata --- src/status_im/contexts/wallet/send/events.cljs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index 91dda0608c..480ebc29ae 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -205,7 +205,7 @@ {:db (cond-> db :always (update-in [:wallet :ui :send] #(-> % - (dissoc :collectible) + (dissoc :collectible :tx-type) (assoc :token-not-supported-in-receiver-networks? unsupported-token?))) token-symbol (assoc-in [:wallet :ui :send :token-symbol] token-symbol) @@ -217,6 +217,11 @@ entry-point (assoc-in [:wallet :ui :send :entry-point] entry-point)) :fx [[:dispatch [:wallet/clean-suggested-routes]] [:dispatch + ;; ^:flush-dom allows us to make sure the re-frame DB state is always synced + ;; before the navigation occurs, so the new screen is always rendered with + ;; the DB state set by this event. By adding the metadata we are omitting + ;; a 1-frame blink when the screen is mounted. + ^:flush-dom [:wallet/wizard-navigate-forward {:current-screen stack-id :start-flow? start-flow?