1
0
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:
Kevin Serrano 2017-09-12 12:52:13 -07:00
parent 243be92ac1
commit ef6967325e
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -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) {