diff options
author | kumavis <aaron@kumavis.me> | 2019-03-29 13:34:49 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2019-03-29 13:34:49 +0800 |
commit | 0961449ca05e48c82961b58cce2b6ad5ca32714e (patch) | |
tree | ad41b0210bbe0bb9616267be995aa5fedc66fd3c | |
parent | 356ef794f22de272b12cb84205da4fc8af463458 (diff) | |
download | tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.gz tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.zst tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.zip |
send-footer.utils.js - addressIsNew - improve readability
-rw-r--r-- | ui/app/components/app/send/send-footer/send-footer.utils.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/app/components/app/send/send-footer/send-footer.utils.js b/ui/app/components/app/send/send-footer/send-footer.utils.js index a63316336..abb2ebc77 100644 --- a/ui/app/components/app/send/send-footer/send-footer.utils.js +++ b/ui/app/components/app/send/send-footer/send-footer.utils.js @@ -74,7 +74,9 @@ function constructUpdatedTx ({ } function addressIsNew (toAccounts, newAddress) { - return !toAccounts.find(({ address }) => (newAddress === address || newAddress.toLowerCase() === address)) + const newAddressNormalized = newAddress.toLowerCase() + const foundMatching = toAccounts.some(({ address }) => address === newAddressNormalized) + return !foundMatching } module.exports = { |