Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHatem28 committed Dec 9, 2024
2 parents 93ed71f + 9fcbc4d commit c74194a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -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.
-->
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -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.
-->
Expand Down
4 changes: 2 additions & 2 deletions cw_core/lib/monero_balance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions cw_monero/lib/monero_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c74194a

Please sign in to comment.