aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2017-02-15 19:45:03 +1100
committerIan Coleman <coleman.ian@gmail.com>2017-02-15 19:45:03 +1100
commit49b21f122a232330f7efc499095d8d80f7895a20 (patch)
tree113cf9781c910a4f015c4b5f488ffeb8d9d4aeb8 /src/js
parent8b095871e8ab14ec236ddb181ffdfe36e6636058 (diff)
downloadBIP39-49b21f122a232330f7efc499095d8d80f7895a20.tar.gz
BIP39-49b21f122a232330f7efc499095d8d80f7895a20.tar.zst
BIP39-49b21f122a232330f7efc499095d8d80f7895a20.zip
Ethereum addresses include checksum
Diffstat (limited to 'src/js')
-rw-r--r--src/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 41f8260..4c947a4 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -569,7 +569,9 @@
569 var privKeyBuffer = key.privKey.d.toBuffer(); 569 var privKeyBuffer = key.privKey.d.toBuffer();
570 privkey = privKeyBuffer.toString('hex'); 570 privkey = privKeyBuffer.toString('hex');
571 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); 571 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer);
572 address = "0x" + addressBuffer.toString('hex'); 572 var hexAddress = addressBuffer.toString('hex');
573 var checksumAddress = ethUtil.toChecksumAddress(hexAddress);
574 address = ethUtil.addHexPrefix(checksumAddress);
573 } 575 }
574 addAddressToList(indexText, address, pubkey, privkey); 576 addAddressToList(indexText, address, pubkey, privkey);
575 }, 50) 577 }, 50)