mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Check if all lower or upper before doing checksum.
This commit is contained in:
parent
243be92ac1
commit
ef6967325e
@ -70,7 +70,7 @@ function isValidAddress (address) {
|
||||
function isInvalidChecksumAddress (address) {
|
||||
var prefixed = ethUtil.addHexPrefix(address)
|
||||
if (address === '0x0000000000000000000000000000000000000000') return false
|
||||
return ethUtil.isValidAddress(prefixed) && !ethUtil.isValidChecksumAddress(prefixed)
|
||||
return !isAllOneCase(prefixed) && !ethUtil.isValidChecksumAddress(prefixed) && ethUtil.isValidAddress(prefixed)
|
||||
}
|
||||
|
||||
function isAllOneCase (address) {
|
||||
|
Loading…
Reference in New Issue
Block a user