From 678dc3b13570f9b5a07b70f839f006d56252b021 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 10 May 2024 21:28:49 +0300 Subject: [PATCH 1/2] update build numbers (#1441) * update build numbers * fix UI issue * Add Nano to secret generation properly [skip ci] * remove to utc from expiration time --- cw_tron/lib/tron_client.dart | 4 ++-- lib/src/screens/dashboard/pages/balance_page.dart | 6 +++--- .../xcshareddata/xcschemes/Runner.xcscheme | 8 ++++---- scripts/android/app_env.sh | 4 ++-- scripts/ios/app_env.sh | 4 ++-- scripts/macos/app_env.sh | 4 ++-- tool/import_secrets_config.dart | 14 ++++++++++++++ 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/cw_tron/lib/tron_client.dart b/cw_tron/lib/tron_client.dart index 25edb0f9a..e25887002 100644 --- a/cw_tron/lib/tron_client.dart +++ b/cw_tron/lib/tron_client.dart @@ -208,7 +208,7 @@ class TronClient { TransactionContract(type: contract.contractType, parameter: parameter); // Set the transaction expiration time (maximum 24 hours) - final expireTime = DateTime.now().toUtc().add(const Duration(hours: 24)); + final expireTime = DateTime.now().add(const Duration(hours: 24)); // Create a raw transaction TransactionRaw rawTransaction = TransactionRaw( @@ -369,7 +369,7 @@ class TronClient { TransactionContract(type: contract.contractType, parameter: parameter); // Set the transaction expiration time (maximum 24 hours) - final expireTime = DateTime.now().toUtc().add(const Duration(hours: 24)); + final expireTime = DateTime.now().add(const Duration(hours: 24)); // Create a raw transaction TransactionRaw rawTransaction = TransactionRaw( diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 83a57060d..7f9256c51 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -69,14 +69,14 @@ class BalancePage extends StatelessWidget { ), labelColor: Theme.of(context).extension()!.pageTitleTextColor, - dividerColor: - Theme.of(context).extension()!.pageTitleTextColor, + dividerColor: Colors.transparent, indicatorColor: Theme.of(context).extension()!.pageTitleTextColor, unselectedLabelColor: Theme.of(context) .extension()! .pageTitleTextColor .withOpacity(0.5), + tabAlignment: TabAlignment.start, tabs: [ Tab(text: 'My Crypto'), Tab(text: 'My NFTs'), @@ -351,7 +351,7 @@ class BalanceRowWidget extends StatelessWidget { style: TextStyle( fontSize: 16, fontFamily: 'Lato', - fontWeight: FontWeight.w500, + fontWeight: FontWeight.w500, color: Theme.of(context).extension()!.textColor, height: 1)), ], diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index fd9942aa8..f28097b88 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -54,7 +54,7 @@ @@ -71,7 +71,7 @@ diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 77ee02b9c..519d62ade 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -16,14 +16,14 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.13.0" -MONERO_COM_BUILD_NUMBER=85 +MONERO_COM_BUILD_NUMBER=86 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" MONERO_COM_SCHEME="monero.com" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.16.0" -CAKEWALLET_BUILD_NUMBER=208 +CAKEWALLET_BUILD_NUMBER=209 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 e772ea128..f7887e4bf 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.13.0" -MONERO_COM_BUILD_NUMBER=83 +MONERO_COM_BUILD_NUMBER=84 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.16.0" -CAKEWALLET_BUILD_NUMBER=234 +CAKEWALLET_BUILD_NUMBER=236 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 95201dc02..2a937f4f9 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -17,12 +17,12 @@ fi MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.3.0" -MONERO_COM_BUILD_NUMBER=17 +MONERO_COM_BUILD_NUMBER=18 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.9.0" -CAKEWALLET_BUILD_NUMBER=69 +CAKEWALLET_BUILD_NUMBER=70 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/tool/import_secrets_config.dart b/tool/import_secrets_config.dart index b2f3ca691..72a019636 100644 --- a/tool/import_secrets_config.dart +++ b/tool/import_secrets_config.dart @@ -13,6 +13,9 @@ const solanaOutputPath = 'cw_solana/lib/.secrets.g.dart'; const tronConfigPath = 'tool/.tron-secrets-config.json'; const tronOutputPath = 'cw_tron/lib/.secrets.g.dart'; + +const nanoConfigPath = 'tool/.nano-secrets-config.json'; +const nanoOutputPath = 'cw_nano/lib/.secrets.g.dart'; Future main(List args) async => importSecretsConfig(); Future importSecretsConfig() async { @@ -37,6 +40,11 @@ Future importSecretsConfig() async { final tronOutput = tronInput.keys.fold('', (String acc, String val) => acc + generateConst(val, tronInput)); + final nanoOutputFile = File(nanoOutputPath); + final nanoInput = json.decode(File(nanoConfigPath).readAsStringSync()) as Map; + final nanoOutput = + nanoInput.keys.fold('', (String acc, String val) => acc + generateConst(val, nanoInput)); + if (outputFile.existsSync()) { await outputFile.delete(); } @@ -60,4 +68,10 @@ Future importSecretsConfig() async { } await tronOutputFile.writeAsString(tronOutput); + + if (nanoOutputFile.existsSync()) { + await nanoOutputFile.delete(); + } + + await nanoOutputFile.writeAsString(nanoOutput); } From 97555f2ce12419187bdf004aa8af799bf0682bca Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 10 May 2024 21:34:28 +0300 Subject: [PATCH 2/2] V4.16.0 (#1445) * update build numbers * fix UI issue * Add Nano to secret generation properly [skip ci] * remove to utc from expiration time * update app version Remove tron --- assets/text/Release_Notes.txt | 1 - cw_tron/lib/tron_client.dart | 4 ++-- lib/view_model/send/send_view_model.dart | 2 +- scripts/android/app_env.sh | 2 +- scripts/android/pubspec_gen.sh | 2 +- scripts/ios/app_config.sh | 2 +- scripts/macos/app_config.sh | 2 +- scripts/macos/app_env.sh | 4 ++-- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 3ff7aa3b4..f9b05cea2 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,4 +1,3 @@ Hardware wallets support for Bitcoin, Ethereum and Polygon -Add Tron wallet Security enhancements Bug fixes and generic enhancements \ No newline at end of file diff --git a/cw_tron/lib/tron_client.dart b/cw_tron/lib/tron_client.dart index e25887002..92684cebc 100644 --- a/cw_tron/lib/tron_client.dart +++ b/cw_tron/lib/tron_client.dart @@ -387,7 +387,7 @@ class TronClient { if (feeLimit > tronBalanceInt) { final feeInTrx = TronHelper.fromSun(BigInt.parse(feeLimit.toString())); throw Exception( - 'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up.\nTransaction fee: $feeInTrx TRX', + 'You don\'t have enough TRX to cover the transaction fee for this transaction. Please top up.\nTransaction fee: $feeInTrx TRX', ); } @@ -444,7 +444,7 @@ class TronClient { if (feeLimit > tronBalanceInt) { final feeInTrx = TronHelper.fromSun(BigInt.parse(feeLimit.toString())); throw Exception( - 'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up. Transaction fee: $feeInTrx TRX', + 'You don\'t have enough TRX to cover the transaction fee for this transaction. Please top up. Transaction fee: $feeInTrx TRX', ); } diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 0d53c59cc..a633d3982 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -580,7 +580,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor } if (errorMessage.contains('Transaction expired')) { - return 'An error occurred while processing the transaction. Kindly retry the transaction'; + return 'An error occurred while processing the transaction. Please retry the transaction'; } } diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 519d62ade..c671a013f 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -23,7 +23,7 @@ MONERO_COM_SCHEME="monero.com" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.16.0" -CAKEWALLET_BUILD_NUMBER=209 +CAKEWALLET_BUILD_NUMBER=210 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" CAKEWALLET_SCHEME="cakewallet" diff --git a/scripts/android/pubspec_gen.sh b/scripts/android/pubspec_gen.sh index bc7985506..d238052fe 100755 --- a/scripts/android/pubspec_gen.sh +++ b/scripts/android/pubspec_gen.sh @@ -10,7 +10,7 @@ case $APP_ANDROID_TYPE in CONFIG_ARGS="--monero" ;; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash --solana --tron" + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash --solana" ;; $HAVEN) CONFIG_ARGS="--haven" diff --git a/scripts/ios/app_config.sh b/scripts/ios/app_config.sh index ab7fbd422..9f59d6632 100755 --- a/scripts/ios/app_config.sh +++ b/scripts/ios/app_config.sh @@ -28,7 +28,7 @@ case $APP_IOS_TYPE in CONFIG_ARGS="--monero" ;; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash --solana --tron" + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash --solana" ;; $HAVEN) diff --git a/scripts/macos/app_config.sh b/scripts/macos/app_config.sh index a1143bb12..bd1417c4b 100755 --- a/scripts/macos/app_config.sh +++ b/scripts/macos/app_config.sh @@ -31,7 +31,7 @@ case $APP_MACOS_TYPE in $MONERO_COM) CONFIG_ARGS="--monero";; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron";; #--haven + CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana";; #--haven esac cp -rf pubspec_description.yaml pubspec.yaml diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 2a937f4f9..e16df1e61 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -17,12 +17,12 @@ fi MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.3.0" -MONERO_COM_BUILD_NUMBER=18 +MONERO_COM_BUILD_NUMBER=17 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.9.0" -CAKEWALLET_BUILD_NUMBER=70 +CAKEWALLET_BUILD_NUMBER=71 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then