mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-31 06:55:59 +00:00
coin control edge cases
This commit is contained in:
parent
964f66c74a
commit
399d0cab8b
2 changed files with 10 additions and 1 deletions
|
@ -1168,7 +1168,7 @@ abstract class ElectrumWalletBase
|
|||
Future<void> updateUnspent() async {
|
||||
await updateAllUnspents();
|
||||
|
||||
if (unspentCoinsInfo.isEmpty) {
|
||||
if (unspentCoinsInfo.length != unspentCoins.length) {
|
||||
unspentCoins.forEach((coin) => addCoinInfo(coin));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -205,6 +205,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
}
|
||||
});
|
||||
processMwebUtxos();
|
||||
updateUnspent();
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -514,6 +515,12 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
});
|
||||
}
|
||||
|
||||
print(unspentCoins);
|
||||
print(updatedUnspentCoins);
|
||||
print(updatedUnspentCoins.length);
|
||||
|
||||
// print(updatedUnspentCoins[2].address);
|
||||
|
||||
unspentCoins = updatedUnspentCoins;
|
||||
}
|
||||
|
||||
|
@ -575,6 +582,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
}
|
||||
}
|
||||
|
||||
await updateUnspent();
|
||||
|
||||
return ElectrumBalance(confirmed: confirmed, unconfirmed: unconfirmed, frozen: balance.frozen);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue