Merge remote-tracking branch 'origin/main'

This commit is contained in:
OmarHatem 2024-12-09 14:25:45 +02:00
commit c74194abf4
4 changed files with 7 additions and 8 deletions

View file

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cakewallet.cake_wallet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View file

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cakewallet.cake_wallet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View file

@ -3,8 +3,8 @@ import 'package:cw_core/monero_amount_format.dart';
class MoneroBalance extends Balance {
MoneroBalance({required this.fullBalance, required this.unlockedBalance, this.frozenBalance = 0})
: formattedFullBalance = moneroAmountToString(amount: fullBalance),
formattedUnlockedBalance = moneroAmountToString(amount: unlockedBalance - frozenBalance),
: formattedFullBalance = moneroAmountToString(amount: frozenBalance + fullBalance),
formattedUnlockedBalance = moneroAmountToString(amount: unlockedBalance),
formattedLockedBalance =
moneroAmountToString(amount: frozenBalance + fullBalance - unlockedBalance),
super(unlockedBalance, fullBalance);

View file

@ -725,8 +725,9 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
void _askForUpdateBalance() {
final unlockedBalance = _getUnlockedBalance();
final fullBalance = _getUnlockedBalance() + _getFrozenBalance();
final frozenBalance = 0; // this is calculated on the monero side now
final fullBalance = monero_wallet.getFullBalance(
accountIndex: walletAddresses.account!.id);
final frozenBalance = _getFrozenBalance();
if (balance[currency]!.fullBalance != fullBalance ||
balance[currency]!.unlockedBalance != unlockedBalance ||
balance[currency]!.frozenBalance != frozenBalance) {