diff --git a/src/status_im/ui/screens/wallet/choose_recipient/events.cljs b/src/status_im/ui/screens/wallet/choose_recipient/events.cljs index a055fcb1f8..7c54340a6a 100644 --- a/src/status_im/ui/screens/wallet/choose_recipient/events.cljs +++ b/src/status_im/ui/screens/wallet/choose_recipient/events.cljs @@ -82,7 +82,9 @@ :ens-name recipient :cb #(re-frame/dispatch [:wallet.send/set-recipient %])}} (if (ethereum/address? recipient) - (if (eip55/valid-address-checksum? recipient) + (if (-> recipient + ethereum/address->checksum + eip55/valid-address-checksum?) {:db (assoc-in db [:wallet :send-transaction :to] recipient) :dispatch [:navigate-back]} {:ui/show-error (i18n/label :t/wallet-invalid-address-checksum {:data recipient})}) diff --git a/src/status_im/utils/ethereum/core.cljs b/src/status_im/utils/ethereum/core.cljs index 0de58d4d70..087b4b839d 100644 --- a/src/status_im/utils/ethereum/core.cljs +++ b/src/status_im/utils/ethereum/core.cljs @@ -48,6 +48,10 @@ (when s (.isAddress dependencies/Web3.prototype s))) +(defn address->checksum [s] + (when s + (.toChecksumAddress dependencies/Web3.prototype s))) + (defn network->chain-id [network] (get-in network [:config :NetworkId]))