mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
fix frozen balance
This commit is contained in:
parent
0e5a125611
commit
40adf669eb
1 changed files with 3 additions and 5 deletions
|
@ -696,9 +696,8 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
|
||||||
|
|
||||||
void _askForUpdateBalance() {
|
void _askForUpdateBalance() {
|
||||||
final unlockedBalance = _getUnlockedBalance();
|
final unlockedBalance = _getUnlockedBalance();
|
||||||
final fullBalance = _getFullBalance();
|
final fullBalance = _getUnlockedBalance() + _getFrozenBalance();
|
||||||
final frozenBalance = _getFrozenBalance();
|
final frozenBalance = 0; // this is calculated on the monero side now
|
||||||
|
|
||||||
if (balance[currency]!.fullBalance != fullBalance ||
|
if (balance[currency]!.fullBalance != fullBalance ||
|
||||||
balance[currency]!.unlockedBalance != unlockedBalance ||
|
balance[currency]!.unlockedBalance != unlockedBalance ||
|
||||||
balance[currency]!.frozenBalance != frozenBalance) {
|
balance[currency]!.frozenBalance != frozenBalance) {
|
||||||
|
@ -724,9 +723,8 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
|
||||||
for (var coin in unspentCoinsInfo.values.where((element) =>
|
for (var coin in unspentCoinsInfo.values.where((element) =>
|
||||||
element.walletId == id &&
|
element.walletId == id &&
|
||||||
element.accountIndex == walletAddresses.account!.id)) {
|
element.accountIndex == walletAddresses.account!.id)) {
|
||||||
if (coin.isFrozen) frozenBalance += coin.value;
|
if (coin.isFrozen && !coin.isSending) frozenBalance += coin.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return frozenBalance;
|
return frozenBalance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue