fix: crash when user changes token and goes to transaction confirmation screen (#20187)
Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
parent
8f7b641fa2
commit
47e5d663f9
|
@ -220,14 +220,15 @@
|
||||||
(rf/reg-event-fx
|
(rf/reg-event-fx
|
||||||
:wallet/edit-token-to-send
|
:wallet/edit-token-to-send
|
||||||
(fn [{:keys [db]} [token]]
|
(fn [{:keys [db]} [token]]
|
||||||
(let [{token-networks :networks} token
|
(let [{token-networks :networks
|
||||||
|
token-symbol :symbol} token
|
||||||
receiver-networks (get-in db [:wallet :ui :send :receiver-networks])
|
receiver-networks (get-in db [:wallet :ui :send :receiver-networks])
|
||||||
token-networks-ids (mapv #(:chain-id %) token-networks)
|
token-networks-ids (mapv #(:chain-id %) token-networks)
|
||||||
token-not-supported-in-receiver-networks? (not (some (set receiver-networks)
|
token-not-supported-in-receiver-networks? (not (some (set receiver-networks)
|
||||||
token-networks-ids))]
|
token-networks-ids))]
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
(assoc-in [:wallet :ui :send :token] token)
|
(assoc-in [:wallet :ui :send :token] token)
|
||||||
(assoc-in [:wallet :ui :send :token-display-name] token)
|
(assoc-in [:wallet :ui :send :token-display-name] token-symbol)
|
||||||
(assoc-in [:wallet :ui :send :token-not-supported-in-receiver-networks?]
|
(assoc-in [:wallet :ui :send :token-not-supported-in-receiver-networks?]
|
||||||
token-not-supported-in-receiver-networks?))
|
token-not-supported-in-receiver-networks?))
|
||||||
:fx [[:dispatch [:hide-bottom-sheet]]
|
:fx [[:dispatch [:hide-bottom-sheet]]
|
||||||
|
|
Loading…
Reference in New Issue