Skip to content

Commit

Permalink
send-footer.utils.js - addressIsNew - improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed Mar 29, 2019
1 parent 356ef79 commit 0961449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/app/components/app/send/send-footer/send-footer.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 0961449

Please sign in to comment.