From 7dde80fdf3083c6e20251d23f929a69f14702e32 Mon Sep 17 00:00:00 2001 From: Evan Saulpaugh Date: Tue, 17 Jan 2017 02:17:38 -0800 Subject: [PATCH] Minor refactor for clarity (#4174) * Spelling & grammar in TxQueue Viewer description * minor refactor for clarity * Fix lint. --- js/src/abi/util/address.js | 7 ++++--- js/src/views/Dapps/builtin.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/src/abi/util/address.js b/js/src/abi/util/address.js index a961e7035..d53d270bc 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 477678156..5572af819 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,