mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 03:29:36 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
c74194abf4
4 changed files with 7 additions and 8 deletions
|
@ -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.
|
||||
-->
|
||||
|
|
|
@ -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.
|
||||
-->
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue