mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
send-footer.utils.js - addressIsNew - improve readability
This commit is contained in:
parent
356ef794f2
commit
0961449ca0
@ -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…
Reference in New Issue
Block a user