diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_1024.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_1024.png index 73101354a..c465fa26c 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_1024.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_1024.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_128.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_128.png index 9ceee3c5e..e79db4d99 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_128.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_128.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_16.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_16.png index ef46cd805..2d030845b 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_16.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_16.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_256.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_256.png index 6547a1b1b..eef607c2c 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_256.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_256.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_32.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_32.png index e436872e8..a09896830 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_32.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_32.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_512.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_512.png index 157b00493..a98c5faf8 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_512.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_512.png differ diff --git a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_64.png b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_64.png index a46ed4535..d8141a250 100644 Binary files a/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_64.png and b/assets/images/macos_icons/cakewallet_macos_icons/cakewallet_macos_64.png differ diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 5b2a9f873..1b2cc3a6d 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,5 +1,3 @@ -Add background sync to Monero -Enhance Backup files -Improve app usability and user experience -User interface enhancements +UI/UX enhancements +Performance improvements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 1a5986bd4..00a65ff57 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,8 +1,4 @@ -Add background sync to Monero -Add Decred Wallet -Remove Haven Wallet -Fix and Improve Solana Wallet -Enhance Backup files -Improve app usability and user experience -User interface enhancements +New App Logo +UI/UX enhancements +Performance improvements Bug fixes \ No newline at end of file diff --git a/cw_decred/lib/wallet.dart b/cw_decred/lib/wallet.dart index db30ab373..c41643067 100644 --- a/cw_decred/lib/wallet.dart +++ b/cw_decred/lib/wallet.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:cw_core/exceptions.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/utils/print_verbose.dart'; +import 'package:cw_decred/amount_format.dart'; import 'package:cw_decred/pending_transaction.dart'; import 'package:cw_decred/transaction_credentials.dart'; import 'package:flutter/foundation.dart'; @@ -122,6 +123,9 @@ abstract class DecredWalletBase return _pubkey; } + @override + String formatCryptoAmount(String amount) => decredAmountToString(amount: int.parse(amount)); + Future init() async { final getSeed = () async { if (!watchingOnly) { diff --git a/cw_monero/lib/monero_unspent.dart b/cw_monero/lib/monero_unspent.dart index 292c76dbe..224e33b2a 100644 --- a/cw_monero/lib/monero_unspent.dart +++ b/cw_monero/lib/monero_unspent.dart @@ -4,21 +4,32 @@ import 'package:cw_monero/api/coins_info.dart'; import 'package:monero/monero.dart' as monero; class MoneroUnspent extends Unspent { + static Future fromUnspent(String address, String hash, String keyImage, int value, bool isFrozen, bool isUnlocked) async { + return MoneroUnspent( + address: address, + hash: hash, + keyImage: keyImage, + value: value, + isFrozen: isFrozen, + isUnlocked: isUnlocked); + } + MoneroUnspent( - String address, String hash, String keyImage, int value, bool isFrozen, this.isUnlocked) + {required String address, + required String hash, + required String keyImage, + required int value, + required bool isFrozen, + required this.isUnlocked}) : super(address, hash, value, 0, keyImage) { - getCoinByKeyImage(keyImage).then((coinId) { - if (coinId == null) return; - getCoin(coinId).then((coin) { - _frozen = monero.CoinsInfo_frozen(coin); - }); - }); + _frozen = isFrozen; } bool _frozen = false; @override set isFrozen(bool freeze) { + _frozen = freeze; printV("set isFrozen: $freeze ($keyImage): $freeze"); getCoinByKeyImage(keyImage!).then((coinId) async { if (coinId == null) return; diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index de9fe8569..dc346a22c 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -592,7 +592,7 @@ abstract class MoneroWalletBase extends WalletBase with AutomaticKeepAliveClientMixin with AutomaticKeepAliveClientMixin output.setSendAll(sendViewModel.sendingBalance)), + allAmountCallback: () async => output.setSendAll(await sendViewModel.sendingBalance)), Divider( height: 1, color: Theme.of(context).extension()!.textFieldHintColor), Observer( - builder: (_) => Padding( - padding: EdgeInsets.only(top: 10), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - S.of(context).available_balance + ':', - style: TextStyle( + builder: (_) { + // force rebuild on mobx + final _ = sendViewModel.coinTypeToSpendFrom; + return Padding( + padding: EdgeInsets.only(top: 10), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + S.of(context).available_balance + ':', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: + Theme.of(context).extension()!.textFieldHintColor), + ), + ), + FutureBuilder( + future: sendViewModel.sendingBalance, + builder: (context, snapshot) { + return Text( + snapshot.data ?? sendViewModel.balance, // default to balance while loading + style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, color: Theme.of(context).extension()!.textFieldHintColor), - ), - ), - Text( - sendViewModel.sendingBalance, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: - Theme.of(context).extension()!.textFieldHintColor), - ) - ], - ), - ), + ); + }, + ) + ], + ), + ); + }, ), if (!sendViewModel.isFiatDisabled) CurrencyAmountTextField( @@ -509,9 +521,9 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin sendViewModel.selectedCryptoCurrency, (Currency currency) { + reaction((_) => sendViewModel.selectedCryptoCurrency, (Currency currency) async { if (output.sendAll) { - output.setSendAll(sendViewModel.sendingBalance); + output.setSendAll(await sendViewModel.sendingBalance); } output.setCryptoAmount(cryptoAmountController.text); diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index de96b509a..117706228 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -245,7 +245,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor } @computed - String get sendingBalance { + Future get sendingBalance async { // only for electrum, monero, wownero, decred wallets atm: switch (wallet.type) { case WalletType.bitcoin: @@ -255,7 +255,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor case WalletType.wownero: case WalletType.decred: return wallet.formatCryptoAmount( - unspentCoinsListViewModel.getSendingBalance(coinTypeToSpendFrom).toString()); + (await unspentCoinsListViewModel.getSendingBalance(coinTypeToSpendFrom)).toString()); default: return balance; } diff --git a/lib/view_model/unspent_coins/unspent_coins_list_view_model.dart b/lib/view_model/unspent_coins/unspent_coins_list_view_model.dart index a54e2be49..5136ead1e 100644 --- a/lib/view_model/unspent_coins/unspent_coins_list_view_model.dart +++ b/lib/view_model/unspent_coins/unspent_coins_list_view_model.dart @@ -149,12 +149,15 @@ abstract class UnspentCoinsListViewModelBase with Store { } @action - int getSendingBalance(UnspentCoinType overrideCoinTypeToSpendFrom) { + Future getSendingBalance(UnspentCoinType overrideCoinTypeToSpendFrom) async { // return items.where((element) => element.isSending).fold(0, (previousValue, element) => previousValue + element.value); // go through all unspent coins and add up the value minus frozen and non sending: int total = 0; - + await _updateUnspents(); + Set seen = {}; for (final item in _getSpecificUnspents(overrideCoinTypeToSpendFrom)) { + if (seen.contains(item.hash)) continue; + seen.add(item.hash); if (item.isFrozen || !item.isSending) continue; total += item.value; } diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 9b5685a07..92aab07cb 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,15 +14,15 @@ TYPES=($MONERO_COM $CAKEWALLET) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.21.0" -MONERO_COM_BUILD_NUMBER=116 +MONERO_COM_VERSION="4.25.0" +MONERO_COM_BUILD_NUMBER=118 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" MONERO_COM_SCHEME="monero.com" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="5.0.0" -CAKEWALLET_BUILD_NUMBER=254 +CAKEWALLET_VERSION="4.25.0" +CAKEWALLET_BUILD_NUMBER=255 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" CAKEWALLET_SCHEME="cakewallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index a9e86bb4a..84f3c181a 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -12,13 +12,13 @@ TYPES=($MONERO_COM $CAKEWALLET) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.21.0" -MONERO_COM_BUILD_NUMBER=114 +MONERO_COM_VERSION="4.25.0" +MONERO_COM_BUILD_NUMBER=115 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="5.0.0" -CAKEWALLET_BUILD_NUMBER=308 +CAKEWALLET_VERSION="4.25.0" +CAKEWALLET_BUILD_NUMBER=309 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 9d97b63cb..0ef31d6bb 100755 --- a/scripts/linux/app_env.sh +++ b/scripts/linux/app_env.sh @@ -14,8 +14,8 @@ if [ -n "$1" ]; then fi CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.14.0" -CAKEWALLET_BUILD_NUMBER=50 +CAKEWALLET_VERSION="4.25.0" +CAKEWALLET_BUILD_NUMBER=51 if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then echo "Wrong app type." diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 4ac64ba42..fa45b76d4 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.11.0" -MONERO_COM_BUILD_NUMBER=46 +MONERO_COM_VERSION="4.25.0" +MONERO_COM_BUILD_NUMBER=47 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.17.0" -CAKEWALLET_BUILD_NUMBER=108 +CAKEWALLET_VERSION="4.25.0" +CAKEWALLET_BUILD_NUMBER=109 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/scripts/windows/build_exe_installer.iss b/scripts/windows/build_exe_installer.iss index 3f433e1ae..0d757b8e5 100644 --- a/scripts/windows/build_exe_installer.iss +++ b/scripts/windows/build_exe_installer.iss @@ -1,5 +1,5 @@ #define MyAppName "Cake Wallet" -#define MyAppVersion "0.5.0" +#define MyAppVersion "4.25.0" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe"