performance: addressIsOwn piggybacking from addressToPath map on public key ring
This commit is contained in:
parent
9b4d261637
commit
46fddba5cd
2 changed files with 9 additions and 15 deletions
|
|
@ -2196,11 +2196,8 @@ Wallet.prototype.getAddressesInfo = function(opts) {
|
|||
* @desc Returns true if a given address was generated by deriving our master public key
|
||||
* @return {boolean}
|
||||
*/
|
||||
Wallet.prototype.addressIsOwn = function(addrStr, opts) {
|
||||
var addrList = this.getAddressesStr(opts);
|
||||
return _.any(addrList, function(value) {
|
||||
return value === addrStr;
|
||||
});
|
||||
Wallet.prototype.addressIsOwn = function(addrStr) {
|
||||
return !!this.publicKeyRing.addressToPath[addrStr];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue