aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2019-03-29 13:34:49 +0800
committerkumavis <aaron@kumavis.me>2019-03-29 13:34:49 +0800
commit0961449ca05e48c82961b58cce2b6ad5ca32714e (patch)
treead41b0210bbe0bb9616267be995aa5fedc66fd3c /ui
parent356ef794f22de272b12cb84205da4fc8af463458 (diff)
downloadtangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.gz
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.bz2
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.lz
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.xz
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.tar.zst
tangerine-wallet-browser-0961449ca05e48c82961b58cce2b6ad5ca32714e.zip
send-footer.utils.js - addressIsNew - improve readability
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app/send/send-footer/send-footer.utils.js4
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 = {