diff options
-rw-r--r-- | bip39-standalone.html | 3 | ||||
-rw-r--r-- | src/js/index.js | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index 99fa529..22d7120 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -22865,8 +22865,7 @@ WORDLISTS = { | |||
22865 | 22865 | ||
22866 | function calcBip32Seed(phrase, passphrase, path) { | 22866 | function calcBip32Seed(phrase, passphrase, path) { |
22867 | var seed = mnemonic.toSeed(phrase, passphrase); | 22867 | var seed = mnemonic.toSeed(phrase, passphrase); |
22868 | var seedHash = Bitcoin.crypto.sha256(seed).toString("hex"); | 22868 | bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network); |
22869 | bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network); | ||
22870 | bip32ExtendedKey = bip32RootKey; | 22869 | bip32ExtendedKey = bip32RootKey; |
22871 | // Derive the key from the path | 22870 | // Derive the key from the path |
22872 | var pathBits = path.split("/"); | 22871 | var pathBits = path.split("/"); |
diff --git a/src/js/index.js b/src/js/index.js index 7f39ad2..cd3a506 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -164,8 +164,7 @@ | |||
164 | 164 | ||
165 | function calcBip32Seed(phrase, passphrase, path) { | 165 | function calcBip32Seed(phrase, passphrase, path) { |
166 | var seed = mnemonic.toSeed(phrase, passphrase); | 166 | var seed = mnemonic.toSeed(phrase, passphrase); |
167 | var seedHash = Bitcoin.crypto.sha256(seed).toString("hex"); | 167 | bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network); |
168 | bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network); | ||
169 | bip32ExtendedKey = bip32RootKey; | 168 | bip32ExtendedKey = bip32RootKey; |
170 | // Derive the key from the path | 169 | // Derive the key from the path |
171 | var pathBits = path.split("/"); | 170 | var pathBits = path.split("/"); |