diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-02-10 20:10:07 +1100 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-02-10 20:25:47 +1100 |
commit | 0edac945e597099d1cabfa684e3c172b3d70cf6c (patch) | |
tree | c6164e8dff4ff6aded6eab5173ea9ae64a59d0c4 | |
parent | 505a31593ec3ead7200c9e181641ba7e3a7b5243 (diff) | |
download | BIP39-0edac945e597099d1cabfa684e3c172b3d70cf6c.tar.gz BIP39-0edac945e597099d1cabfa684e3c172b3d70cf6c.tar.zst BIP39-0edac945e597099d1cabfa684e3c172b3d70cf6c.zip |
Ethereum address table is populated
-rw-r--r-- | src/js/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js index c3c0a4a..41f8260 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -564,6 +564,13 @@ | |||
564 | if (useHardenedAddresses) { | 564 | if (useHardenedAddresses) { |
565 | indexText = indexText + "'"; | 565 | indexText = indexText + "'"; |
566 | } | 566 | } |
567 | // Ethereum values are different | ||
568 | if (networks[DOM.network.val()].name == "Ethereum") { | ||
569 | var privKeyBuffer = key.privKey.d.toBuffer(); | ||
570 | privkey = privKeyBuffer.toString('hex'); | ||
571 | var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); | ||
572 | address = "0x" + addressBuffer.toString('hex'); | ||
573 | } | ||
567 | addAddressToList(indexText, address, pubkey, privkey); | 574 | addAddressToList(indexText, address, pubkey, privkey); |
568 | }, 50) | 575 | }, 50) |
569 | } | 576 | } |
@@ -1123,6 +1130,13 @@ | |||
1123 | DOM.bip44coin.val(6); | 1130 | DOM.bip44coin.val(6); |
1124 | }, | 1131 | }, |
1125 | }, | 1132 | }, |
1133 | { | ||
1134 | name: "Ethereum", | ||
1135 | onSelect: function() { | ||
1136 | network = bitcoin.networks.bitcoin; | ||
1137 | DOM.bip44coin.val(60); | ||
1138 | }, | ||
1139 | }, | ||
1126 | ] | 1140 | ] |
1127 | 1141 | ||
1128 | init(); | 1142 | init(); |