Minor refactor for clarity (#4174)

* Spelling & grammar in TxQueue Viewer description

* minor refactor for clarity

* Fix lint.
This commit is contained in:
Evan Saulpaugh 2017-01-17 02:17:38 -08:00 committed by Gav Wood
parent 581604aae4
commit 7dde80fdf3
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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 <admin@ethcore.io>",
"version": "1.0.0",
"visible": true,