diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/index.js b/src/js/index.js index 567a3f7..afa743d 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -813,7 +813,7 @@ | |||
813 | var keyPair = key.keyPair; | 813 | var keyPair = key.keyPair; |
814 | var useUncompressed = useBip38; | 814 | var useUncompressed = useBip38; |
815 | if (useUncompressed) { | 815 | if (useUncompressed) { |
816 | keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { compressed: false }); | 816 | keyPair = new bitcoinjs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false }); |
817 | } | 817 | } |
818 | // get address | 818 | // get address |
819 | var address = keyPair.getAddress().toString(); | 819 | var address = keyPair.getAddress().toString(); |
@@ -821,7 +821,7 @@ | |||
821 | var hasPrivkey = !key.isNeutered(); | 821 | var hasPrivkey = !key.isNeutered(); |
822 | var privkey = "NA"; | 822 | var privkey = "NA"; |
823 | if (hasPrivkey) { | 823 | if (hasPrivkey) { |
824 | privkey = keyPair.toWIF(network); | 824 | privkey = keyPair.toWIF(); |
825 | // BIP38 encode private key if required | 825 | // BIP38 encode private key if required |
826 | if (useBip38) { | 826 | if (useBip38) { |
827 | privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { | 827 | privkey = bitcoinjsBip38.encrypt(keyPair.d.toBuffer(), false, bip38password, function(p) { |