Browse Source

Wallet.generateAddress uses the new HD wallet method

hk-custom-address
Wei Lu 11 years ago
parent
commit
102e2b3d48
  1. 2
      src/wallet.js

2
src/wallet.js

@ -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…
Cancel
Save