Skip to content

Commit

Permalink
dont fetch routes if there are no affordable networks
Browse files Browse the repository at this point in the history
  • Loading branch information
briansztamfater committed Apr 3, 2024
1 parent acf3972 commit dabdce6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/status_im/contexts/wallet/send/input_amount/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@
app-keyboard-listener (.addEventListener rn/app-state "change" dismiss-keyboard-fn)]
#(.remove app-keyboard-listener))))
(rn/use-effect
#(fetch-routes input-num-value (current-limit) 2000)
#(when (> (count affordable-networks) 0)
(fetch-routes input-num-value (current-limit) 2000))
[@input-value])
(rn/use-effect
#(fetch-routes input-num-value (current-limit) 0)
#(when (> (count affordable-networks) 0)
(fetch-routes input-num-value (current-limit) 0))
[disabled-from-chain-ids])
[rn/view
{:style style/screen
Expand Down

0 comments on commit dabdce6

Please sign in to comment.