add preconditions to Structure.js
This commit is contained in:
parent
88e6ea9f40
commit
2bf8ac912f
6 changed files with 22 additions and 27 deletions
|
|
@ -190,7 +190,7 @@ PublicKeyRing.prototype.getScriptPubKeyHex = function(index, isChange) {
|
|||
|
||||
//generate a new address, update index.
|
||||
PublicKeyRing.prototype.generateAddress = function(isChange) {
|
||||
|
||||
isChange = !!isChange;
|
||||
var index = isChange ? this.indexes.getChangeIndex() : this.indexes.getReceiveIndex();
|
||||
var ret = this.getAddress(index, isChange);
|
||||
this.indexes.increment(isChange);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue