mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-31 06:55:59 +00:00
works for simple mweb-mweb case, further testing needed
This commit is contained in:
parent
3a969acc6d
commit
4503ad5401
1 changed files with 4 additions and 3 deletions
|
@ -676,13 +676,14 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
try {
|
try {
|
||||||
mwebUtxosBox.values.forEach((utxo) {
|
mwebUtxosBox.values.forEach((utxo) {
|
||||||
if (utxo.height > 0) {
|
if (utxo.height > 0) {
|
||||||
// confirmed += utxo.value.toInt();
|
|
||||||
confirmedMweb += utxo.value.toInt();
|
confirmedMweb += utxo.value.toInt();
|
||||||
} else {
|
} else {
|
||||||
// unconfirmed += utxo.value.toInt();
|
|
||||||
unconfirmedMweb += utxo.value.toInt();
|
unconfirmedMweb += utxo.value.toInt();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (confirmedMweb > 0 && unconfirmedMweb > 0) {
|
||||||
|
unconfirmedMweb = -1 * (confirmedMweb - unconfirmedMweb);
|
||||||
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
// update unspent balances:
|
// update unspent balances:
|
||||||
|
@ -872,7 +873,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
final addresses = <String>{};
|
final addresses = <String>{};
|
||||||
transaction.inputAddresses?.forEach((id) async {
|
transaction.inputAddresses?.forEach((id) async {
|
||||||
final utxo = mwebUtxosBox.get(id);
|
final utxo = mwebUtxosBox.get(id);
|
||||||
await mwebUtxosBox.delete(id);
|
// await mwebUtxosBox.delete(id);
|
||||||
if (utxo == null) return;
|
if (utxo == null) return;
|
||||||
final addressRecord = walletAddresses.allAddresses
|
final addressRecord = walletAddresses.allAddresses
|
||||||
.firstWhere((addressRecord) => addressRecord.address == utxo.address);
|
.firstWhere((addressRecord) => addressRecord.address == utxo.address);
|
||||||
|
|
Loading…
Reference in a new issue