From 75a1430075d7245b80706d612eb37f53ee143a37 Mon Sep 17 00:00:00 2001 From: Goran Jovic Date: Thu, 5 Jul 2018 13:38:33 +0200 Subject: [PATCH] bug #4930 - atomic navigation after error prevents send screen being briefly shown with invalid data Signed-off-by: Goran Jovic --- src/status_im/ui/screens/wallet/components/views.cljs | 2 +- src/status_im/ui/screens/wallet/send/events.cljs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs index ae7a616673..59bc48d081 100644 --- a/src/status_im/ui/screens/wallet/components/views.cljs +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -92,7 +92,7 @@ [react/text {:style styles/text-secondary-content} (clojure.core/name symbol)]] [react/text {:style (merge styles/text-secondary-content styles/asset-label)} - (str (wallet.utils/format-amount (symbol balance) decimals))]]]] + (str (wallet.utils/format-amount (get balance symbol) decimals))]]]] (when error [tooltip/tooltip error {}])]))) diff --git a/src/status_im/ui/screens/wallet/send/events.cljs b/src/status_im/ui/screens/wallet/send/events.cljs index 001105a6f1..a0354938bd 100644 --- a/src/status_im/ui/screens/wallet/send/events.cljs +++ b/src/status_im/ui/screens/wallet/send/events.cljs @@ -257,10 +257,10 @@ ;;NO ERROR, DISCARDED, TIMEOUT or DEFAULT ERROR (if (this-transaction-signing? id (:id send-transaction) view-id modal) (cond-> {:db (-> db + navigation/navigate-back (assoc-in [:wallet :transactions-queue] nil) (update-in [:wallet :transactions-unsigned] dissoc id) - (update-in [:wallet :send-transaction] merge clear-send-properties)) - :dispatch [:navigate-back]} + (update-in [:wallet :send-transaction] merge clear-send-properties))} (= method constants/web3-send-transaction) (handle-failed-tx error_message)) {:db (update-in db [:wallet :transactions-unsigned] dissoc id)})))))