Delete account name if setting recipient manually

This commit is contained in:
acolytec3 2019-10-25 14:14:08 -04:00 committed by Roman Volosovskyi
parent 33af176246
commit dc7724f88b
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 1 deletions

View File

@ -83,7 +83,9 @@
(if (ethereum/address? recipient) (if (ethereum/address? recipient)
(let [checksum (eip55/address->checksum recipient)] (let [checksum (eip55/address->checksum recipient)]
(if (eip55/valid-address-checksum? checksum) (if (eip55/valid-address-checksum? checksum)
{:db (assoc-in db [:wallet :send-transaction :to] checksum) {:db (-> db
(assoc-in [:wallet :send-transaction :to] checksum)
(assoc-in [:wallet :send-transaction :to-name] nil))
:dispatch [:navigate-back]} :dispatch [:navigate-back]}
{:ui/show-error (i18n/label :t/wallet-invalid-address-checksum {:data recipient})})) {:ui/show-error (i18n/label :t/wallet-invalid-address-checksum {:data recipient})}))
{:ui/show-error (i18n/label :t/wallet-invalid-address {:data recipient})})))) {:ui/show-error (i18n/label :t/wallet-invalid-address {:data recipient})}))))