mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 11:04:33 +00:00
merge clean up
This commit is contained in:
parent
dc581cd4fc
commit
b2d7414cb6
1 changed files with 16 additions and 34 deletions
|
@ -633,6 +633,13 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
p2shChangeAddressArray.add(address);
|
||||
}
|
||||
|
||||
final addressesToStore = [
|
||||
...bip44P2pkhReceiveAddressArray,
|
||||
...bip44P2pkhChangeAddressArray,
|
||||
...p2shReceiveAddressArray,
|
||||
...p2shChangeAddressArray,
|
||||
];
|
||||
|
||||
if (!testnet) {
|
||||
final resultReceiveBch44 = _checkGaps(
|
||||
maxNumberOfIndexesToCheck,
|
||||
|
@ -691,41 +698,16 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
bch44P2pkhChangeAddressArray.add(address);
|
||||
}
|
||||
|
||||
if (isRescan) {
|
||||
await db.updateOrPutAddresses([
|
||||
...bip44P2pkhReceiveAddressArray,
|
||||
...bip44P2pkhChangeAddressArray,
|
||||
...bch44P2pkhReceiveAddressArray,
|
||||
...bch44P2pkhChangeAddressArray,
|
||||
...p2shReceiveAddressArray,
|
||||
...p2shChangeAddressArray,
|
||||
]);
|
||||
} else {
|
||||
await db.putAddresses([
|
||||
...bip44P2pkhReceiveAddressArray,
|
||||
...bip44P2pkhChangeAddressArray,
|
||||
...bch44P2pkhReceiveAddressArray,
|
||||
...bch44P2pkhChangeAddressArray,
|
||||
...p2shReceiveAddressArray,
|
||||
...p2shChangeAddressArray,
|
||||
]);
|
||||
}
|
||||
addressesToStore.addAll([
|
||||
...bch44P2pkhReceiveAddressArray,
|
||||
...bch44P2pkhChangeAddressArray,
|
||||
]);
|
||||
}
|
||||
|
||||
if (isRescan) {
|
||||
await db.updateOrPutAddresses(addressesToStore);
|
||||
} else {
|
||||
if (isRescan) {
|
||||
await db.updateOrPutAddresses([
|
||||
...bip44P2pkhReceiveAddressArray,
|
||||
...bip44P2pkhChangeAddressArray,
|
||||
...p2shReceiveAddressArray,
|
||||
...p2shChangeAddressArray,
|
||||
]);
|
||||
} else {
|
||||
await db.putAddresses([
|
||||
...bip44P2pkhReceiveAddressArray,
|
||||
...bip44P2pkhChangeAddressArray,
|
||||
...p2shReceiveAddressArray,
|
||||
...p2shChangeAddressArray,
|
||||
]);
|
||||
}
|
||||
await db.putAddresses(addressesToStore);
|
||||
}
|
||||
|
||||
await _updateUTXOs();
|
||||
|
|
Loading…
Reference in a new issue