fixing tests
This commit is contained in:
parent
56f4c32646
commit
4cd90c45a2
4 changed files with 8 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ var HK = bitcore.HierarchicalKey;
|
|||
var WalletKey = bitcore.WalletKey;
|
||||
var networks = bitcore.networks;
|
||||
var util = bitcore.util;
|
||||
var PublicKeyRing = require('./PublicKeyRing');
|
||||
var PublicKeyRing = require('./PublicKeyRing');
|
||||
|
||||
function PrivateKey(opts) {
|
||||
opts = opts || {};
|
||||
|
|
@ -62,6 +62,7 @@ PrivateKey.prototype._getHK = function(path) {
|
|||
};
|
||||
|
||||
PrivateKey.prototype.get = function(index,isChange) {
|
||||
console.log(PublicKeyRing);
|
||||
var path = PublicKeyRing.FullBranch(index, isChange);
|
||||
var pk = this.privateKeyCache[path];
|
||||
if (!pk) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
var imports = require('soop').imports();
|
||||
var bitcore = require('bitcore');
|
||||
var HK = bitcore.HierarchicalKey;
|
||||
var PrivateKey = require('./PrivateKey');
|
||||
var Address = bitcore.Address;
|
||||
var Script = bitcore.Script;
|
||||
var coinUtil = bitcore.util;
|
||||
|
|
@ -127,7 +128,8 @@ PublicKeyRing.prototype._checkKeys = function() {
|
|||
};
|
||||
|
||||
PublicKeyRing.prototype._newExtendedPublicKey = function () {
|
||||
return new HK(this.network.name)
|
||||
return new PrivateKey({networkName: this.network.name})
|
||||
.deriveBIP45Branch()
|
||||
.extendedPublicKeyString();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue