send-footer.utils.js - addressIsNew - improve readability

feature/default_network_editable
kumavis 6 years ago
parent 356ef794f2
commit 0961449ca0
  1. 4
      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 = {

Loading…
Cancel
Save