Change value that triggers routes requesting in send screen (#21751)

This commit is contained in:
Volodymyr Kozieiev 2024-12-06 11:43:02 +00:00 committed by GitHub
parent e1d2b9b1c1
commit f1652ee2c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -332,7 +332,7 @@
:status (when (controlled-input/input-error input-state) :error)}]}]
[routes/view
{:token token-by-symbol
:send-amount-in-crypto amount-in-crypto
:input-value input-value
:valid-input? valid-input?
:token-not-supported-in-receiver-networks? unsupported-token-in-receiver?
:current-screen-id current-screen-id

View File

@ -180,7 +180,7 @@
(defn view
[{:keys [token theme valid-input? request-fetch-routes on-press-to-network current-screen-id
token-not-supported-in-receiver-networks? send-amount-in-crypto]}]
token-not-supported-in-receiver-networks? input-value]}]
(let [token-symbol (:symbol token)
nav-current-screen-id (rf/sub [:view-id])
active-screen? (= nav-current-screen-id current-screen-id)
@ -204,7 +204,7 @@
(when (and active-screen?
(> (count token-available-networks-for-suggested-routes) 0))
(request-fetch-routes 2000)))
[send-amount-in-crypto valid-input?])
[input-value valid-input?])
(rn/use-effect
#(when (and active-screen? (> (count token-available-networks-for-suggested-routes) 0))
(request-fetch-routes 0))