mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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) {
|
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 = {
|
module.exports = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user