diff options
author | Thomas Huang <thomas.b.huang@gmail.com> | 2019-03-12 02:00:03 +0800 |
---|---|---|
committer | Thomas Huang <thomas.b.huang@gmail.com> | 2019-03-12 02:00:03 +0800 |
commit | 22c4fe046990b9d38fa47d0983a40dc3f3c0b079 (patch) | |
tree | 9529ad020606e22ec722298b31ecb56e250206e5 /ui | |
parent | 82959b6b0edb9d57a2af61525010b59cd433613b (diff) | |
download | tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar.gz tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar.bz2 tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar.lz tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar.xz tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.tar.zst tangerine-wallet-browser-22c4fe046990b9d38fa47d0983a40dc3f3c0b079.zip |
No longer check network when validating checksum addresses
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/util.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index e27956a45..4fe7136a9 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -95,7 +95,8 @@ function miniAddressSummary (address) { function isValidAddress (address, network) { var prefixed = ethUtil.addHexPrefix(address) if (address === '0x0000000000000000000000000000000000000000') return false - if (!isEthNetwork(network)) return (ethUtil.isValidAddress(prefixed) && address === address.toLowerCase()) + // Checksums on non-ETH Blockchains #6001 + // if (!isEthNetwork(network)) return (ethUtil.isValidAddress(prefixed) && address === address.toLowerCase()) return (isAllOneCase(prefixed) && ethUtil.isValidAddress(prefixed)) || ethUtil.isValidChecksumAddress(prefixed) } @@ -315,7 +316,9 @@ function getTokenAddressFromTokenObject (token) { */ function checksumAddress (address, network) { const checksummed = address ? ethUtil.toChecksumAddress(address) : '' - return checksummed && network && !isEthNetwork(network) ? checksummed.toLowerCase() : checksummed + return checksummed + // Checksums on non-ETH Blockchains #6001 + // return checksummed && network && !isEthNetwork(network) ? checksummed.toLowerCase() : checksummed } function addressSlicer (address = '') { |