Wallet.generateAddress uses the new HD wallet method

This commit is contained in:
Wei Lu 2014-02-27 02:12:55 +08:00
parent d150b7acc6
commit 102e2b3d48

View file

@ -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]
} }