diff --git a/js/src/abi/util/address.js b/js/src/abi/util/address.js index a961e70356a..d53d270bcac 100644 --- a/js/src/abi/util/address.js +++ b/js/src/abi/util/address.js @@ -18,12 +18,13 @@ import { keccak_256 } from 'js-sha3'; // eslint-disable-line camelcase export function isChecksumValid (_address) { const address = _address.replace('0x', ''); - const hash = keccak_256(address.toLowerCase(address)); + const hash = keccak_256(address.toLowerCase()); for (let n = 0; n < 40; n++) { + const char = address[n]; + const isLower = char !== char.toUpperCase(); + const isUpper = char !== char.toLowerCase(); const hashval = parseInt(hash[n], 16); - const isLower = address[n].toUpperCase() !== address[n]; - const isUpper = address[n].toLowerCase() !== address[n]; if ((hashval > 7 && isLower) || (hashval <= 7 && isUpper)) { return false; diff --git a/js/src/views/Dapps/builtin.json b/js/src/views/Dapps/builtin.json index 477678156a7..5572af81919 100644 --- a/js/src/views/Dapps/builtin.json +++ b/js/src/views/Dapps/builtin.json @@ -49,7 +49,7 @@ "id": "0xae74ad174b95cdbd01c88ac5b73a296d33e9088fc2a200e76bcedf3a94a7815d", "url": "localtx", "name": "TxQueue Viewer", - "description": "Have a peak on internals of transaction queue of your node.", + "description": "Have a peek at the internals of your node's transaction queue.", "author": "Parity Team ", "version": "1.0.0", "visible": true,