mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: speedup multisig
This commit is contained in:
parent
fef49136ca
commit
8c0487adab
2 changed files with 3 additions and 1 deletions
|
@ -399,6 +399,8 @@ export class AbstractHDElectrumWallet extends AbstractHDWallet {
|
|||
txs = txs.concat(addressTxs);
|
||||
}
|
||||
|
||||
if (txs.length === 0) return []; // guard clause; so we wont spend time calculating addresses
|
||||
|
||||
// its faster to pre-build hashmap of owned addresses than to query `this.weOwnAddress()`, which in turn
|
||||
// iterates over all addresses in hierarchy
|
||||
const ownedAddressesHashmap = {};
|
||||
|
|
|
@ -190,6 +190,7 @@ export class MultisigHDWallet extends AbstractHDElectrumWallet {
|
|||
const xpub = this._getXpubFromCosigner(cosigner);
|
||||
const hdNode = HDNode.fromBase58(xpub);
|
||||
_node = hdNode.derive(nodeIndex);
|
||||
this._nodes[nodeIndex][cosignerIndex] = _node;
|
||||
} else {
|
||||
_node = this._nodes[nodeIndex][cosignerIndex];
|
||||
}
|
||||
|
@ -487,7 +488,6 @@ export class MultisigHDWallet extends AbstractHDElectrumWallet {
|
|||
xpub = xpub.substr(0, xpub.indexOf('/'));
|
||||
}
|
||||
|
||||
// console.warn('m[2] = ', m[2], {hexFingerprint, path, xpub});
|
||||
this.addCosigner(xpub, hexFingerprint.toUpperCase(), path);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue