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 authored Mar 29, 2019
1 parent 356ef79 commit be0daea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 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,8 @@ function constructUpdatedTx ({
}

function addressIsNew (toAccounts, newAddress) {
return !toAccounts.find(({ address }) => (newAddress === address || newAddress.toLowerCase() === address))
const newAddressNormalized = newAddress.toLowerCase()
return !toAccounts.includes(newAddressNormalized)
}

module.exports = {
Expand Down

0 comments on commit be0daea

Please sign in to comment.