This commit is contained in:
Ulises M 2024-06-26 10:06:42 -06:00
parent e6a9018f3b
commit c350745aa8
No known key found for this signature in database
GPG Key ID: 5A15782EB758534E
1 changed files with 15 additions and 10 deletions

View File

@ -31,7 +31,7 @@
(cond
(<= (count address) 0) [:wallet/address-validation-failed address]
(validation/eth-address? address) [:wallet/address-validation-success address]
:else [:wallet/address-validation-failed address])
:else [:wallet/address-validation-failed address])
300))
(defn- address-input
@ -58,9 +58,9 @@
:on-detect-address (fn [address]
(when (or (= current-screen-id :screen/wallet.select-address)
(= current-screen-id :screen/wallet.scan-address))
; ^ this check is to prevent effect being triggered when screen is
; loaded but not being shown to the user (deep in the navigation
; stack) and avoid undesired behaviors
; ^ this check is to prevent effect being triggered when screen
; is loaded but not being shown to the user (deep in the
; navigation stack) and avoid undesired behaviors
(validate-address address)))
:on-detect-ens (fn [text cb]
(when (or (= current-screen-id :screen/wallet.select-address)
@ -111,10 +111,12 @@
(cond
(= type types/saved-address)
[quo/saved-address
(assoc props :user-props {:name primary-name
:address public-key
:ens ens-name
:customization-color color})]
(assoc props
:user-props
{:name primary-name
:address public-key
:ens ens-name
:customization-color color})]
(= type types/saved-contact-address)
[quo/saved-contact-address (merge props local-suggestion)]
(and (not ens) (= type types/address))
@ -167,8 +169,11 @@
:disabled? (not valid-ens-or-address?)
:on-press #(rf/dispatch
[:wallet/select-send-address
{:address (or local-suggestion-address @input-value)
:stack-id :screen/wallet.select-address}])
{:address (or
local-suggestion-address
@input-value)
:stack-id
:screen/wallet.select-address}])
:customization-color color}
(i18n/label :t/continue)])}
[quo/page-top