From 0d2869bfe077f6a6169d3da792633e15e73d9161 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Tue, 11 Jun 2024 08:05:47 +0400 Subject: [PATCH] fix: inability to input data while routes are loading (#20298) fix: inability to input data while routes are loading (#20298) --- .../wallet/send/input_amount/view.cljs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/status_im/contexts/wallet/send/input_amount/view.cljs b/src/status_im/contexts/wallet/send/input_amount/view.cljs index 369759c80e..7d142c5fe1 100644 --- a/src/status_im/contexts/wallet/send/input_amount/view.cljs +++ b/src/status_im/contexts/wallet/send/input_amount/view.cljs @@ -376,18 +376,17 @@ max-decimals (if crypto-currency? crypto-decimals 2) regex-pattern (str "^\\d*\\.?\\d{0," max-decimals "}$") regex (re-pattern regex-pattern)] - (when (and (not loading-routes?) - (re-matches regex new-text)) + (when (re-matches regex new-text) (debounce/clear-all) (set-just-toggled-mode? false) (set-input-state #(controlled-input/add-character % c))))) :on-delete (fn [] - (when-not loading-routes? - (debounce/clear-all) - (set-just-toggled-mode? false) - (set-input-state controlled-input/delete-last))) + (debounce/clear-all) + (set-just-toggled-mode? false) + (set-input-state controlled-input/delete-last) + (rf/dispatch [:wallet/clean-suggested-routes])) :on-long-press-delete (fn [] - (when-not loading-routes? - (debounce/clear-all) - (set-just-toggled-mode? false) - (set-input-state controlled-input/delete-all)))}]])) + (debounce/clear-all) + (set-just-toggled-mode? false) + (set-input-state controlled-input/delete-all) + (rf/dispatch [:wallet/clean-suggested-routes]))}]]))