diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2019-03-12 05:53:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-12 05:53:41 +0800 |
commit | c44f7857a8a404114c8ffd09ebefd9970125d0de (patch) | |
tree | 63952b09d3b8ba293679f759d05060b2b392c76e | |
parent | 5abcce2be739c8b480f2508f267bccd74d03a1dd (diff) | |
parent | ef7ac90bca6b0e82fb633763d2e268321df504cf (diff) | |
download | tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar.gz tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar.bz2 tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar.lz tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar.xz tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.tar.zst tangerine-wallet-browser-c44f7857a8a404114c8ffd09ebefd9970125d0de.zip |
Merge pull request #6280 from MetaMask/network-checksum-disable
No longer check network when validating checksum addresses
-rw-r--r-- | ui/app/util.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index e27956a45..3237e5feb 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -95,7 +95,6 @@ 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()) return (isAllOneCase(prefixed) && ethUtil.isValidAddress(prefixed)) || ethUtil.isValidChecksumAddress(prefixed) } @@ -315,7 +314,7 @@ function getTokenAddressFromTokenObject (token) { */ function checksumAddress (address, network) { const checksummed = address ? ethUtil.toChecksumAddress(address) : '' - return checksummed && network && !isEthNetwork(network) ? checksummed.toLowerCase() : checksummed + return checksummed } function addressSlicer (address = '') { |