diff options
author | Ian Coleman <ian@iancoleman.io> | 2017-11-22 09:40:35 +1100 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2017-11-22 09:40:35 +1100 |
commit | 1c2b8c6b2d77cdb0162f040c07d25bbe7cafe7c2 (patch) | |
tree | 27d2ba3ee3452f03ed9e0af7b6dbb422f92df55c /src/js | |
parent | 9f59e99bec5cc5faa63c0296f064a09b0745291f (diff) | |
download | BIP39-1c2b8c6b2d77cdb0162f040c07d25bbe7cafe7c2.tar.gz BIP39-1c2b8c6b2d77cdb0162f040c07d25bbe7cafe7c2.tar.zst BIP39-1c2b8c6b2d77cdb0162f040c07d25bbe7cafe7c2.zip |
Use ltub for litecoin by default instead of xprv
Introduced when upgrading from bitcoinjs-lib v3.3.0
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 11 | ||||
-rw-r--r-- | src/js/index.js | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index c98ff63..63f7c6e 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -316,3 +316,14 @@ bitcoinjs.bitcoin.networks.litecoinBip49 = { | |||
316 | scriptHash: 0x32, | 316 | scriptHash: 0x32, |
317 | wif: 0xb0 | 317 | wif: 0xb0 |
318 | }; | 318 | }; |
319 | |||
320 | bitcoinjs.bitcoin.networks.litecoinXprv = { | ||
321 | messagePrefix: '\x19Litecoin Signed Message:\n', | ||
322 | bip32: { | ||
323 | public: 0x0488b21e, | ||
324 | private: 0x0488ade4, | ||
325 | }, | ||
326 | pubKeyHash: 0x30, | ||
327 | scriptHash: 0x32, | ||
328 | wif: 0xb0 | ||
329 | }; | ||
diff --git a/src/js/index.js b/src/js/index.js index 38a7efd..e4920ce 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -14,7 +14,7 @@ | |||
14 | var showPubKey = true; | 14 | var showPubKey = true; |
15 | var showPrivKey = true; | 15 | var showPrivKey = true; |
16 | var showQr = false; | 16 | var showQr = false; |
17 | var litecoinUseLtub = false; | 17 | var litecoinUseLtub = true; |
18 | 18 | ||
19 | var entropyChangeTimeoutEvent = null; | 19 | var entropyChangeTimeoutEvent = null; |
20 | var phraseChangeTimeoutEvent = null; | 20 | var phraseChangeTimeoutEvent = null; |
@@ -318,10 +318,10 @@ | |||
318 | function litecoinUseLtubChanged() { | 318 | function litecoinUseLtubChanged() { |
319 | litecoinUseLtub = DOM.litecoinUseLtub.prop("checked"); | 319 | litecoinUseLtub = DOM.litecoinUseLtub.prop("checked"); |
320 | if (litecoinUseLtub) { | 320 | if (litecoinUseLtub) { |
321 | network = bitcoinjs.bitcoin.networks.litecoinLtub; | 321 | network = bitcoinjs.bitcoin.networks.litecoin; |
322 | } | 322 | } |
323 | else { | 323 | else { |
324 | network = bitcoinjs.bitcoin.networks.litecoin; | 324 | network = bitcoinjs.bitcoin.networks.litecoinXprv; |
325 | } | 325 | } |
326 | phraseChanged(); | 326 | phraseChanged(); |
327 | } | 327 | } |