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
This commit is contained in:
Ulises Manuel 2024-08-02 09:30:00 -06:00 committed by GitHub
parent 328f9686c9
commit ae6205c874
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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?