Wallet.generateAddress uses the new HD wallet method
This commit is contained in:
parent
d150b7acc6
commit
102e2b3d48
@ -41,7 +41,7 @@ var Wallet = function (seed) {
|
|||||||
|
|
||||||
// Add a new address
|
// Add a new address
|
||||||
this.generateAddress = function() {
|
this.generateAddress = function() {
|
||||||
keys.push(masterkey.ckd(keys.length).key)
|
keys.push(masterkey.derive(keys.length))
|
||||||
this.addresses.push(keys[keys.length-1].getBitcoinAddress().toString())
|
this.addresses.push(keys[keys.length-1].getBitcoinAddress().toString())
|
||||||
return this.addresses[this.addresses.length - 1]
|
return this.addresses[this.addresses.length - 1]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user