diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/js/index.js b/src/js/index.js index 5f688f0..1e66dd8 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -238,7 +238,7 @@ | |||
238 | showValidationError(errorText); | 238 | showValidationError(errorText); |
239 | return; | 239 | return; |
240 | } | 240 | } |
241 | calcBip32ExtendedKey(derivationPath); | 241 | bip32ExtendedKey = calcBip32ExtendedKey(derivationPath); |
242 | displayBip32Info(); | 242 | displayBip32Info(); |
243 | hidePending(); | 243 | hidePending(); |
244 | } | 244 | } |
@@ -318,7 +318,7 @@ | |||
318 | } | 318 | } |
319 | 319 | ||
320 | function calcBip32ExtendedKey(path) { | 320 | function calcBip32ExtendedKey(path) { |
321 | bip32ExtendedKey = bip32RootKey; | 321 | var extendedKey = bip32RootKey; |
322 | // Derive the key from the path | 322 | // Derive the key from the path |
323 | var pathBits = path.split("/"); | 323 | var pathBits = path.split("/"); |
324 | for (var i=0; i<pathBits.length; i++) { | 324 | for (var i=0; i<pathBits.length; i++) { |
@@ -329,12 +329,13 @@ | |||
329 | } | 329 | } |
330 | var hardened = bit[bit.length-1] == "'"; | 330 | var hardened = bit[bit.length-1] == "'"; |
331 | if (hardened) { | 331 | if (hardened) { |
332 | bip32ExtendedKey = bip32ExtendedKey.deriveHardened(index); | 332 | extendedKey = extendedKey.deriveHardened(index); |
333 | } | 333 | } |
334 | else { | 334 | else { |
335 | bip32ExtendedKey = bip32ExtendedKey.derive(index); | 335 | extendedKey = extendedKey.derive(index); |
336 | } | 336 | } |
337 | } | 337 | } |
338 | return extendedKey | ||
338 | } | 339 | } |
339 | 340 | ||
340 | function showValidationError(errorText) { | 341 | function showValidationError(errorText) { |