refacor blockchain handlers
This commit is contained in:
parent
1c5b59a263
commit
dd8fcaa1b1
5 changed files with 17 additions and 23 deletions
|
|
@ -1887,7 +1887,17 @@ Wallet.prototype.getAddressesStr = function(opts) {
|
|||
* @desc Alias for {@link PublicKeyRing#getAddressesInfo}
|
||||
*/
|
||||
Wallet.prototype.getAddressesInfo = function(opts) {
|
||||
return this.publicKeyRing.getAddressesInfo(opts, this.publicKey);
|
||||
var addrInfo = this.publicKeyRing.getAddressesInfo(opts, this.publicKey);
|
||||
var currentAddrs = this.blockchain.getSubscriptions();
|
||||
|
||||
var newAddrs = [];
|
||||
for (var i in addrInfo) {
|
||||
var a = addrInfo[i];
|
||||
if (!currentAddrs[a.addressStr] && !a.isChange)
|
||||
newAddrs.push(a.addressStr);
|
||||
}
|
||||
this.blockchain.subscribe(newAddrs);
|
||||
return addrInfo;
|
||||
};
|
||||
/**
|
||||
* @desc Returns true if a given address was generated by deriving our master public key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue