Browse Source

bugfix

master
peter 2 years ago
parent
commit
c102bb2df5
2 changed files with 5 additions and 5 deletions
  1. 4
    4
      hdkey.ts
  2. 1
    1
      package.json

+ 4
- 4
hdkey.ts View File

@@ -77,7 +77,7 @@ export class HDKey{
77 77
 
78 78
 
79 79
     HDKeyFromExtendedKey(extendedKeyB58: string): any | false{
80
-        let hdkey
80
+        let key
81 81
         let version
82 82
         let t = this.checkHDKey(extendedKeyB58)
83 83
         if(!t){
@@ -87,11 +87,11 @@ export class HDKey{
87 87
             version = {private: 0x04358394, public: 0x043587CF} // HDKey does not support testnet keys out of the box
88 88
         }
89 89
         if(t.type === 'public'){
90
-            hdkey = hdkey.fromExtendedKey(extendedKeyB58, version)
90
+            key = hdKey.fromExtendedKey(extendedKeyB58, version)
91 91
         }else{
92
-            hdkey = hdkey.fromExtendedKey(extendedKeyB58, version)
92
+            key = hdKey.fromExtendedKey(extendedKeyB58, version)
93 93
         }
94
-        return hdkey
94
+        return key
95 95
     }
96 96
 
97 97
     checkHDKey(key: string): {net: network, type: keyType} | false{

+ 1
- 1
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "btc-hdkey",
3
-  "version": "0.0.16",
3
+  "version": "0.0.17",
4 4
   "description": "Hierarchical Deterministic Wallet support for BTC",
5 5
   "main": "hdkey.min.js",
6 6
   "types": "hdkey.d.ts",

Loading…
Cancel
Save