From 964d2b9478e612eb925637e002c94c5c3787fc57 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Tue, 28 May 2024 07:31:41 -0300 Subject: [PATCH] fix: crash when user changes token and goes to transaction confirmation screen (#20187) Signed-off-by: Brian Sztamfater --- src/status_im/contexts/wallet/send/events.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index a0ace8e571..446d9a0ec9 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -220,14 +220,15 @@ (rf/reg-event-fx :wallet/edit-token-to-send (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]) token-networks-ids (mapv #(:chain-id %) token-networks) token-not-supported-in-receiver-networks? (not (some (set receiver-networks) token-networks-ids))] {:db (-> db (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?] token-not-supported-in-receiver-networks?)) :fx [[:dispatch [:hide-bottom-sheet]]