diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 938027e81..cb2afa396 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -62,6 +62,7 @@ jobs: /opt/android/cake_wallet/cw_haven/android/.cxx /opt/android/cake_wallet/scripts/monero_c/release key: ${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh' ,'**/cache_dependencies.yml') }} + - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals run: | @@ -73,8 +74,8 @@ jobs: id: cache-keystore uses: actions/cache@v3 with: - path: /opt/android/cake_wallet/android/app/key.jks - key: $STORE_PASS + path: /opt/android/cake_wallet/android/app + key: keystore - if: ${{ steps.cache-keystore.outputs.cache-hit != 'true' }} name: Generate KeyStore diff --git a/.github/workflows/no_print_in_dart.yaml b/.github/workflows/no_print_in_dart.yaml new file mode 100644 index 000000000..8cd24edfe --- /dev/null +++ b/.github/workflows/no_print_in_dart.yaml @@ -0,0 +1,21 @@ +name: No print statements in dart files + +on: + pull_request: + branches: [main] + +jobs: + PR_test_build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + - name: Check for print() statements in dart code (use printV() instead) + if: github.event_name == 'pull_request' + run: | + GIT_GREP_OUT="$(git grep ' print(' | (grep .dart: || test $? = 1) | (grep -v print_verbose.dart || test $? = 1) || true)" + [[ "x$GIT_GREP_OUT" == "x" ]] && exit 0 + echo "$GIT_GREP_OUT" + echo "There are .dart files which use print() statements" + echo "Please use printV from package: cw_core/utils/print_verbose.dart" + exit 1 diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index c65592278..ec2fbc3f8 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -53,7 +53,7 @@ jobs: - name: Flutter action uses: subosito/flutter-action@v1 with: - flutter-version: "3.24.4" + flutter-version: "3.24.0" channel: stable - name: Install package dependencies @@ -61,14 +61,32 @@ jobs: sudo apt update sudo apt-get install -y pigz curl unzip automake build-essential file pkg-config git python-is-python3 libtool libtinfo6 cmake clang llvm - - name: Execute Build and Setup Commands + + - name: Clone Repo run: | sudo mkdir -p /opt/android sudo chown $USER /opt/android + cd /opt/android + git clone https://github.com/cake-tech/cake_wallet.git --branch ${{ env.BRANCH_NAME }} + +# - name: Cache Keystore +# id: cache-keystore +# uses: actions/cache@v3 +# with: +# path: /opt/android/cake_wallet/android/app +# key: keystore +# +# - if: ${{ steps.cache-keystore.outputs.cache-hit != 'true' }} + - name: Generate KeyStore + run: | + cd /opt/android/cake_wallet/android/app + keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass $STORE_PASS -keypass $KEY_PASS + + - name: Execute Build and Setup Commands + run: | cd /opt/android -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh cargo install cargo-ndk - git clone https://github.com/cake-tech/cake_wallet.git --branch ${{ env.BRANCH_NAME }} cd cake_wallet/scripts/android/ ./install_ndk.sh source ./app_env.sh cakewallet @@ -115,19 +133,6 @@ jobs: cd /opt/android/cake_wallet/scripts/android/ ./build_mwebd.sh --dont-install -# - name: Cache Keystore -# id: cache-keystore -# uses: actions/cache@v3 -# with: -# path: /opt/android/cake_wallet/android/app/key.jks -# key: $STORE_PASS -# -# - if: ${{ steps.cache-keystore.outputs.cache-hit != 'true' }} - - name: Generate KeyStore - run: | - cd /opt/android/cake_wallet/android/app - keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass $STORE_PASS -keypass $KEY_PASS - - name: Generate key properties run: | cd /opt/android/cake_wallet diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index 9e25f9f7a..c37b11582 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -38,7 +38,7 @@ jobs: - name: Flutter action uses: subosito/flutter-action@v1 with: - flutter-version: "3.24.4" + flutter-version: "3.24.0" channel: stable - name: Install package dependencies diff --git a/README.md b/README.md index 078c4437e..ea8f34624 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,17 @@ Cake Wallet includes support for several cryptocurrencies, including: * F-Droid: https://fdroid.cakelabs.com * APK: https://github.com/cake-tech/cake_wallet/releases +### APK Verification + +APK releases on GitHub, Accrescent, and F-Droid use the same key. They can easily be verified using [apksigner](https://developer.android.com/tools/apksigner#options-verify) or [AppVerifier](https://github.com/soupslurpr/AppVerifier). + +See below for Cake Wallet's SHA-256 signing certificate hash: + +``` +com.cakewallet.cake_wallet +C5:40:53:AB:0F:10:D9:54:17:62:A3:DA:76:65:AE:3D:BA:5E:7C:74:3A:B4:F1:08:A5:34:9D:62:AC:10:6E:F5 +``` + # Support We have 24/7 free support. Please contact support@cakewallet.com diff --git a/android/app/build.gradle b/android/app/build.gradle index c19211117..238dc769d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -44,7 +44,7 @@ android { disable 'InvalidPackage' } - namespace appProperties['id'] + namespace "com.cakewallet.cake_wallet" defaultConfig { applicationId appProperties['id'] diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index dc767a55d..f880684a6 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index 5b080e3ec..a92f493df 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index dc767a55d..f880684a6 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 46f21e172..556010062 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,3 +1,2 @@ -Add airgapped Monero wallet support (best used with our new offline app Cupcake) -New Buy & Sell flow -Bug fixes \ No newline at end of file +UI/UX enhancements +Bug fixes and app improvements \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 6764826a7..556010062 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,5 +1,2 @@ -Add Litecoin Ledger support -Add airgapped Monero wallet support (best used with our new offline app Cupcake) -MWEB fixes and enhancements -New Buy & Sell flow -Bug fixes \ No newline at end of file +UI/UX enhancements +Bug fixes and app improvements \ No newline at end of file diff --git a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart index a02c51c69..c8715b239 100644 --- a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart @@ -6,6 +6,7 @@ import 'package:cw_bitcoin/utils.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; import 'package:ledger_bitcoin/ledger_bitcoin.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart'; +import 'package:cw_core/utils/print_verbose.dart'; class BitcoinHardwareWalletService { BitcoinHardwareWalletService(this.ledgerConnection); diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index df8e14119..28e3f47be 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cw_bitcoin/bitcoin_amount_format.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/foundation.dart'; import 'package:rxdart/rxdart.dart'; @@ -117,17 +118,17 @@ class ElectrumClient { _parseResponse(message); } } catch (e) { - print("socket.listen: $e"); + printV("socket.listen: $e"); } }, onError: (Object error) { final errorMsg = error.toString(); - print(errorMsg); + printV(errorMsg); unterminatedString = ''; socket = null; }, onDone: () { - print("SOCKET CLOSED!!!!!"); + printV("SOCKET CLOSED!!!!!"); unterminatedString = ''; try { if (host == socket?.address.host || socket == null) { @@ -136,7 +137,7 @@ class ElectrumClient { socket = null; } } catch (e) { - print("onDone: $e"); + printV("onDone: $e"); } }, cancelOnError: true, @@ -181,7 +182,7 @@ class ElectrumClient { unterminatedString = ''; } } catch (e) { - print("parse $e"); + printV("parse $e"); } } @@ -403,7 +404,7 @@ class ElectrumClient { } on RequestFailedTimeoutException catch (_) { return null; } catch (e) { - print("getCurrentBlockChainTip: ${e.toString()}"); + printV("getCurrentBlockChainTip: ${e.toString()}"); return null; } } @@ -434,7 +435,7 @@ class ElectrumClient { return subscription; } catch (e) { - print("subscribe $e"); + printV("subscribe $e"); return null; } } @@ -473,7 +474,7 @@ class ElectrumClient { return completer.future; } catch (e) { - print("callWithTimeout $e"); + printV("callWithTimeout $e"); rethrow; } } diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index b688f097b..658f83f8a 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -5,6 +5,7 @@ import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_history.dart'; import 'package:cw_core/utils/file.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; @@ -51,7 +52,7 @@ abstract class ElectrumTransactionHistoryBase final data = json.encode({'height': _height, 'transactions': txjson}); await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e) { - print('Error while save bitcoin transaction history: ${e.toString()}'); + printV('Error while save bitcoin transaction history: ${e.toString()}'); } } @@ -88,7 +89,7 @@ abstract class ElectrumTransactionHistoryBase _height = content['height'] as int; } catch (e) { - print(e); + printV(e); } } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 771d135a0..d4f0e4adc 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -4,6 +4,8 @@ import 'dart:io'; import 'dart:isolate'; import 'package:bitcoin_base/bitcoin_base.dart'; +import 'package:cw_bitcoin/litecoin_wallet_addresses.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_bitcoin/bitcoin_wallet.dart'; import 'package:cw_bitcoin/litecoin_wallet.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -479,8 +481,8 @@ abstract class ElectrumWalletBase syncStatus = SyncedSyncStatus(); } } catch (e, stacktrace) { - print(stacktrace); - print("startSync $e"); + printV(stacktrace); + printV("startSync $e"); syncStatus = FailedSyncStatus(); } } @@ -506,7 +508,7 @@ abstract class ElectrumWalletBase _feeRates = [slowFee, mediumFee, fastFee]; return; } catch (e) { - print(e); + printV(e); } } @@ -588,8 +590,8 @@ abstract class ElectrumWalletBase await electrumClient.connectToUri(node.uri, useSSL: node.useSSL); } catch (e, stacktrace) { - print(stacktrace); - print("connectToNode $e"); + printV(stacktrace); + printV("connectToNode $e"); syncStatus = FailedSyncStatus(); } } @@ -1492,7 +1494,7 @@ abstract class ElectrumWalletBase await unspentCoinsInfo.deleteAll(keys); } } catch (e) { - print("refreshUnspentCoinsInfo $e"); + printV("refreshUnspentCoinsInfo $e"); } } @@ -1935,7 +1937,7 @@ abstract class ElectrumWalletBase return historiesWithDetails; } catch (e) { - print("fetchTransactions $e"); + printV("fetchTransactions $e"); return {}; } } @@ -2059,7 +2061,7 @@ abstract class ElectrumWalletBase } Future updateTransactions() async { - print("updateTransactions() called!"); + printV("updateTransactions() called!"); try { if (_isTransactionUpdating) { return; @@ -2091,8 +2093,8 @@ abstract class ElectrumWalletBase walletAddresses.updateReceiveAddresses(); _isTransactionUpdating = false; } catch (e, stacktrace) { - print(stacktrace); - print(e); + printV(stacktrace); + printV(e); _isTransactionUpdating = false; } } @@ -2110,13 +2112,13 @@ abstract class ElectrumWalletBase try { await _scripthashesUpdateSubject[sh]?.close(); } catch (e) { - print("failed to close: $e"); + printV("failed to close: $e"); } } try { _scripthashesUpdateSubject[sh] = await electrumClient.scripthashUpdate(sh); } catch (e) { - print("failed scripthashUpdate: $e"); + printV("failed scripthashUpdate: $e"); } _scripthashesUpdateSubject[sh]?.listen((event) async { try { @@ -2126,7 +2128,7 @@ abstract class ElectrumWalletBase await _fetchAddressHistory(address, await getCurrentChainTip()); } catch (e, s) { - print("sub error: $e"); + printV("sub error: $e"); _onError?.call(FlutterErrorDetails( exception: e, stack: s, @@ -2134,7 +2136,7 @@ abstract class ElectrumWalletBase )); } }, onError: (e, s) { - print("sub_listen error: $e $s"); + printV("sub_listen error: $e $s"); }); })); } @@ -2186,7 +2188,7 @@ abstract class ElectrumWalletBase if (balances.isNotEmpty && balances.first['confirmed'] == null) { // if we got null balance responses from the server, set our connection status to lost and return our last known balance: - print("got null balance responses from the server, setting connection status to lost"); + printV("got null balance responses from the server, setting connection status to lost"); syncStatus = LostConnectionSyncStatus(); return balance[currency] ?? ElectrumBalance(confirmed: 0, unconfirmed: 0, frozen: 0); } @@ -2213,7 +2215,7 @@ abstract class ElectrumWalletBase } Future updateBalance() async { - print("updateBalance() called!"); + printV("updateBalance() called!"); balance[currency] = await fetchBalances(); await save(); } @@ -2353,7 +2355,7 @@ abstract class ElectrumWalletBase } void _syncStatusReaction(SyncStatus syncStatus) async { - print("SYNC_STATUS_CHANGE: ${syncStatus}"); + printV("SYNC_STATUS_CHANGE: ${syncStatus}"); if (syncStatus is SyncingSyncStatus) { return; } diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart index c29579436..6774a5036 100644 --- a/cw_bitcoin/lib/electrum_wallet_addresses.dart +++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart @@ -3,6 +3,8 @@ import 'dart:io' show Platform; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; +import 'package:cw_bitcoin/electrum_wallet.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_bitcoin/bitcoin_unspent.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; @@ -193,7 +195,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { receiveAddresses.remove(addressRecord); receiveAddresses.insert(0, addressRecord); } catch (e) { - print("ElectrumWalletAddressBase: set address ($addr): $e"); + printV("ElectrumWalletAddressBase: set address ($addr): $e"); } } @@ -483,7 +485,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { await saveAddressesInBox(); } catch (e) { - print("updateAddresses $e"); + printV("updateAddresses $e"); } } diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 86228fc83..e55516e9a 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -9,6 +9,7 @@ import 'package:crypto/crypto.dart'; import 'package:cw_bitcoin/bitcoin_transaction_credentials.dart'; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/mweb_utxo.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/node.dart'; import 'package:cw_mweb/mwebd.pbgrpc.dart'; import 'package:fixnum/fixnum.dart'; @@ -283,7 +284,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future waitForMwebAddresses() async { - print("waitForMwebAddresses() called!"); + printV("waitForMwebAddresses() called!"); // ensure that we have the full 1000 mweb addresses generated before continuing: // should no longer be needed, but leaving here just in case await (walletAddresses as LitecoinWalletAddresses).ensureMwebAddressUpToIndexExists(1020); @@ -302,8 +303,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { @action @override Future startSync() async { - print("startSync() called!"); - print("STARTING SYNC - MWEB ENABLED: $mwebEnabled"); + printV("startSync() called!"); + printV("STARTING SYNC - MWEB ENABLED: $mwebEnabled"); if (!mwebEnabled) { try { // in case we're switching from a litecoin wallet that had mweb enabled @@ -317,33 +318,33 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { return; } - print("STARTING SYNC - MWEB ENABLED: $mwebEnabled"); + printV("STARTING SYNC - MWEB ENABLED: $mwebEnabled"); _syncTimer?.cancel(); try { mwebSyncStatus = SyncronizingSyncStatus(); try { await subscribeForUpdates(); } catch (e) { - print("failed to subcribe for updates: $e"); + printV("failed to subcribe for updates: $e"); } updateFeeRates(); _feeRatesTimer?.cancel(); _feeRatesTimer = Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates()); - print("START SYNC FUNCS"); + printV("START SYNC FUNCS"); await waitForMwebAddresses(); await processMwebUtxos(); await updateTransactions(); await updateUnspent(); await updateBalance(); - print("DONE SYNC FUNCS"); - } catch (e, s) { - print("mweb sync failed: $e $s"); - mwebSyncStatus = FailedSyncStatus(error: "mweb sync failed: $e"); + } catch (e) { + printV("failed to start mweb sync: $e"); + syncStatus = FailedSyncStatus(); return; } + _syncTimer?.cancel(); _syncTimer = Timer.periodic(const Duration(milliseconds: 3000), (timer) async { if (mwebSyncStatus is FailedSyncStatus) { _syncTimer?.cancel(); @@ -401,7 +402,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { for (var coin in tx.unspents!) { final utxo = mwebUtxosBox.get(coin.address); if (utxo != null) { - print("deleting utxo ${coin.address} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); + printV("deleting utxo ${coin.address} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); await mwebUtxosBox.delete(coin.address); } } @@ -428,7 +429,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { return; } } catch (e) { - print("error syncing: $e"); + printV("error syncing: $e"); mwebSyncStatus = FailedSyncStatus(error: e.toString()); } }); @@ -437,12 +438,12 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { @action @override Future stopSync() async { - print("stopSync() called!"); + printV("stopSync() called!"); _syncTimer?.cancel(); _utxoStream?.cancel(); _feeRatesTimer?.cancel(); await CwMweb.stop(); - print("stopped syncing!"); + printV("stopped syncing!"); } Future initMwebUtxosBox() async { @@ -514,7 +515,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future handleIncoming(MwebUtxo utxo) async { - print("handleIncoming() called!"); + printV("handleIncoming() called!"); final status = await CwMweb.status(StatusRequest()); var date = DateTime.now(); var confirmations = 0; @@ -559,7 +560,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { final addressRecord = walletAddresses.allAddresses .firstWhereOrNull((addressRecord) => addressRecord.address == utxo.address); if (addressRecord == null) { - print("we don't have this address in the wallet! ${utxo.address}"); + printV("we don't have this address in the wallet! ${utxo.address}"); return; } @@ -580,13 +581,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future processMwebUtxos() async { - print("processMwebUtxos() called!"); + printV("processMwebUtxos() called!"); if (!mwebEnabled) { return; } int restoreHeight = walletInfo.restoreHeight; - print("SCANNING FROM HEIGHT: $restoreHeight"); + printV("SCANNING FROM HEIGHT: $restoreHeight"); final req = UtxosRequest(scanSecret: scanSecret, fromHeight: restoreHeight); // process new utxos as they come in: @@ -621,7 +622,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { // but do update the utxo height if it's somehow different: final existingUtxo = mwebUtxosBox.get(utxo.outputId); if (existingUtxo!.height != utxo.height) { - print( + printV( "updating utxo height for $utxo.outputId: ${existingUtxo.height} -> ${utxo.height}"); existingUtxo.height = utxo.height; await mwebUtxosBox.put(utxo.outputId, existingUtxo); @@ -644,7 +645,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { await handleIncoming(utxo); }, onError: (error) { - print("error in utxo stream: $error"); + printV("error in utxo stream: $error"); mwebSyncStatus = FailedSyncStatus(error: error.toString()); }, cancelOnError: true, @@ -652,7 +653,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future deleteSpentUtxos() async { - print("deleteSpentUtxos() called!"); + printV("deleteSpentUtxos() called!"); final chainHeight = await electrumClient.getCurrentBlockChainTip(); final status = await CwMweb.status(StatusRequest()); if (chainHeight == null || status.blockHeaderHeight != chainHeight) return; @@ -676,7 +677,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future checkMwebUtxosSpent() async { - print("checkMwebUtxosSpent() called!"); + printV("checkMwebUtxosSpent() called!"); if (!mwebEnabled) { return; } @@ -791,7 +792,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } Future updateUnspent() async { - print("updateUnspent() called!"); + printV("updateUnspent() called!"); await checkMwebUtxosSpent(); await updateAllUnspents(); } @@ -822,7 +823,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { .firstWhereOrNull((addressRecord) => addressRecord.address == utxo.address); if (addressRecord == null) { - print("utxo contains an address that is not in the wallet: ${utxo.address}"); + printV("utxo contains an address that is not in the wallet: ${utxo.address}"); return; } final unspent = BitcoinUnspent( @@ -863,7 +864,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { mwebUtxosBox.values.forEach((utxo) { bool isConfirmed = utxo.height > 0; - print( + printV( "utxo: ${isConfirmed ? "confirmed" : "unconfirmed"} ${utxo.spent ? "spent" : "unspent"} ${utxo.outputId} ${utxo.height} ${utxo.value}"); if (isConfirmed) { @@ -1001,7 +1002,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { final sum1 = _sumOutputAmounts(outputs.map((e) => e.toOutput).toList()) + fee; final sum2 = utxos.sumOfUtxosValue(); if (sum1 != sum2) { - print("@@@@@ WE HAD TO ADJUST THE FEE! @@@@@@@@"); + printV("@@@@@ WE HAD TO ADJUST THE FEE! @@@@@@@@"); final diff = sum2 - sum1; // add the difference to the fee (abs value): fee += diff.abs(); @@ -1166,7 +1167,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { addressRecord.balance -= utxo.value.toInt(); }); transaction.inputAddresses?.addAll(addresses); - print("isPegIn: $isPegIn, isPegOut: $isPegOut"); + printV("isPegIn: $isPegIn, isPegOut: $isPegOut"); transaction.additionalInfo["isPegIn"] = isPegIn; transaction.additionalInfo["isPegOut"] = isPegOut; transactionHistory.addOne(transaction); @@ -1174,10 +1175,10 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { await updateBalance(); }); } catch (e, s) { - print(e); - print(s); + printV(e); + printV(s); if (e.toString().contains("commit failed")) { - print(e); + printV(e); throw Exception("Transaction commit failed (no peers responded), please try again."); } rethrow; diff --git a/cw_bitcoin/lib/litecoin_wallet_addresses.dart b/cw_bitcoin/lib/litecoin_wallet_addresses.dart index 062c590ba..afe3c75b8 100644 --- a/cw_bitcoin/lib/litecoin_wallet_addresses.dart +++ b/cw_bitcoin/lib/litecoin_wallet_addresses.dart @@ -9,6 +9,7 @@ import 'package:cw_bitcoin/bitcoin_unspent.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_mweb/cw_mweb.dart'; import 'package:flutter/foundation.dart'; @@ -35,7 +36,7 @@ abstract class LitecoinWalletAddressesBase extends ElectrumWalletAddresses with for (int i = 0; i < mwebAddresses.length; i++) { mwebAddrs.add(mwebAddresses[i].address); } - print("initialized with ${mwebAddrs.length} mweb addresses"); + printV("initialized with ${mwebAddrs.length} mweb addresses"); } final Bip32Slip10Secp256k1? mwebHd; @@ -73,25 +74,25 @@ abstract class LitecoinWalletAddressesBase extends ElectrumWalletAddresses with } while (generating) { - print("generating....."); + printV("generating....."); // this function was called multiple times in multiple places: await Future.delayed(const Duration(milliseconds: 100)); } - print("Generating MWEB addresses up to index $index"); + printV("Generating MWEB addresses up to index $index"); generating = true; try { while (mwebAddrs.length <= (index + 1)) { final addresses = await CwMweb.addresses(scan, spend, mwebAddrs.length, mwebAddrs.length + 50); - print("generated up to index ${mwebAddrs.length}"); + printV("generated up to index ${mwebAddrs.length}"); // sleep for a bit to avoid making the main thread unresponsive: await Future.delayed(Duration(milliseconds: 200)); mwebAddrs.addAll(addresses!); } } catch (_) {} generating = false; - print("Done generating MWEB addresses len: ${mwebAddrs.length}"); + printV("Done generating MWEB addresses len: ${mwebAddrs.length}"); // ensure mweb addresses are up to date: // This is the Case if the Litecoin Wallet is a hardware Wallet @@ -109,7 +110,7 @@ abstract class LitecoinWalletAddressesBase extends ElectrumWalletAddresses with )) .toList(); addMwebAddresses(addressRecords); - print("set ${addressRecords.length} mweb addresses"); + printV("set ${addressRecords.length} mweb addresses"); } } diff --git a/cw_bitcoin/lib/psbt_transaction_builder.dart b/cw_bitcoin/lib/psbt_transaction_builder.dart index 81efb792e..8cb979730 100644 --- a/cw_bitcoin/lib/psbt_transaction_builder.dart +++ b/cw_bitcoin/lib/psbt_transaction_builder.dart @@ -2,6 +2,7 @@ import 'dart:typed_data'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:convert/convert.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:ledger_bitcoin/psbt.dart'; class PSBTTransactionBuild { @@ -16,6 +17,10 @@ class PSBTTransactionBuild { for (var i = 0; i < inputs.length; i++) { final input = inputs[i]; + printV(input.utxo.isP2tr()); + printV(input.utxo.isSegwit()); + printV(input.utxo.isP2shSegwit()); + psbt.setInputPreviousTxId(i, Uint8List.fromList(hex.decode(input.utxo.txHash).reversed.toList())); psbt.setInputOutputIndex(i, input.utxo.vout); psbt.setInputSequence(i, enableRBF ? 0x1 : 0xffffffff); diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index aa9f3ba05..c65f056bb 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -1031,10 +1031,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: "direct overridden" description: diff --git a/cw_core/lib/battery_optimization_native.dart b/cw_core/lib/battery_optimization_native.dart index edd04d3f4..8e476ea6a 100644 --- a/cw_core/lib/battery_optimization_native.dart +++ b/cw_core/lib/battery_optimization_native.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/services.dart'; const MethodChannel _channel = MethodChannel('com.cake_wallet/native_utils'); @@ -6,17 +7,17 @@ Future requestDisableBatteryOptimization() async { try { await _channel.invokeMethod('disableBatteryOptimization'); } on PlatformException catch (e) { - print("Failed to disable battery optimization: '${e.message}'."); + printV("Failed to disable battery optimization: '${e.message}'."); } } Future isBatteryOptimizationDisabled() async { try { final bool isDisabled = await _channel.invokeMethod('isBatteryOptimizationDisabled') as bool; - print('It\'s actually disabled? $isDisabled'); + printV('It\'s actually disabled? $isDisabled'); return isDisabled; } on PlatformException catch (e) { - print("Failed to check battery optimization status: '${e.message}'."); + printV("Failed to check battery optimization status: '${e.message}'."); return false; } } diff --git a/cw_core/lib/get_height_by_date.dart b/cw_core/lib/get_height_by_date.dart index 7929d7cbd..aee12b423 100644 --- a/cw_core/lib/get_height_by_date.dart +++ b/cw_core/lib/get_height_by_date.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:intl/intl.dart'; import 'dart:convert'; import 'package:http/http.dart' as http; @@ -152,7 +153,7 @@ int getMoneroHeigthByDate({required DateTime date}) { height = startHeight + daysHeight - heightPerDay; } } catch (e) { - print(e.toString()); + printV(e.toString()); } return height; diff --git a/cw_core/lib/monero_balance.dart b/cw_core/lib/monero_balance.dart index 98a7f134a..9a63c407e 100644 --- a/cw_core/lib/monero_balance.dart +++ b/cw_core/lib/monero_balance.dart @@ -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); diff --git a/cw_core/lib/utils/print_verbose.dart b/cw_core/lib/utils/print_verbose.dart new file mode 100644 index 000000000..a5c3337e5 --- /dev/null +++ b/cw_core/lib/utils/print_verbose.dart @@ -0,0 +1,84 @@ +void printV(dynamic content) { + CustomTrace programInfo = CustomTrace(StackTrace.current); + print("${programInfo.fileName}#${programInfo.lineNumber}:${programInfo.columnNumber} ${programInfo.callerFunctionName}: $content"); +} + +// https://stackoverflow.com/a/59386101 + +class CustomTrace { + final StackTrace _trace; + + String? fileName; + String? functionName; + String? callerFunctionName; + int? lineNumber; + int? columnNumber; + + CustomTrace(this._trace) { + try { + _parseTrace(); + } catch (e) { + print("Unable to parse trace (printV): $e"); + } + } + + String _getFunctionNameFromFrame(String frame) { + /* Just giving another nickname to the frame */ + var currentTrace = frame; + /* To get rid off the #number thing, get the index of the first whitespace */ + var indexOfWhiteSpace = currentTrace.indexOf(' '); + + /* Create a substring from the first whitespace index till the end of the string */ + var subStr = currentTrace.substring(indexOfWhiteSpace); + + /* Grab the function name using reg expr */ + var indexOfFunction = subStr.indexOf(RegExp(r'[A-Za-z0-9_]')); + + /* Create a new substring from the function name index till the end of string */ + subStr = subStr.substring(indexOfFunction); + + indexOfWhiteSpace = subStr.indexOf(RegExp(r'[ .]')); + + /* Create a new substring from start to the first index of a whitespace. This substring gives us the function name */ + subStr = subStr.substring(0, indexOfWhiteSpace); + + return subStr; + } + + void _parseTrace() { + /* The trace comes with multiple lines of strings, (each line is also known as a frame), so split the trace's string by lines to get all the frames */ + var frames = this._trace.toString().split("\n"); + + /* The first frame is the current function */ + this.functionName = _getFunctionNameFromFrame(frames[0]); + + /* The second frame is the caller function */ + this.callerFunctionName = _getFunctionNameFromFrame(frames[1]); + + /* The first frame has all the information we need */ + var traceString = frames[1]; + + /* Search through the string and find the index of the file name by looking for the '.dart' regex */ + var indexOfFileName = traceString.indexOf(RegExp(r'[/A-Za-z_]+.dart'), 1); // 1 to offest and not print the printV function name + + var fileInfo = traceString.substring(indexOfFileName); + + var listOfInfos = fileInfo.split(":"); + + /* Splitting fileInfo by the character ":" separates the file name, the line number and the column counter nicely. + Example: main.dart:5:12 + To get the file name, we split with ":" and get the first index + To get the line number, we would have to get the second index + To get the column number, we would have to get the third index + */ + try { + this.fileName = listOfInfos[0]; + this.lineNumber = int.tryParse(listOfInfos[1]); + var columnStr = listOfInfos[2]; + columnStr = columnStr.replaceFirst(")", ""); + this.columnNumber = int.tryParse(columnStr); + } catch (e) { + + } + } +} diff --git a/cw_core/lib/wallet_addresses.dart b/cw_core/lib/wallet_addresses.dart index 714d229d9..b0da0e7a1 100644 --- a/cw_core/lib/wallet_addresses.dart +++ b/cw_core/lib/wallet_addresses.dart @@ -1,4 +1,5 @@ import 'package:cw_core/address_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; @@ -71,7 +72,7 @@ abstract class WalletAddresses { await walletInfo.save(); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_core/lib/window_size.dart b/cw_core/lib/window_size.dart index a0f192f66..dffbfab99 100644 --- a/cw_core/lib/window_size.dart +++ b/cw_core/lib/window_size.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/services.dart'; const MethodChannel _channel = MethodChannel('com.cake_wallet/native_utils'); @@ -14,9 +15,9 @@ Future setDefaultMinimumWindowSize() async { ) as bool; if (!result) { - print("Failed to set minimum window size."); + printV("Failed to set minimum window size."); } } on PlatformException catch (e) { - print("Failed to set minimum window size: '${e.message}'."); + printV("Failed to set minimum window size: '${e.message}'."); } } diff --git a/cw_core/pubspec.lock b/cw_core/pubspec.lock index 44ef15a41..c12839a19 100644 --- a/cw_core/pubspec.lock +++ b/cw_core/pubspec.lock @@ -722,10 +722,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: "direct overridden" description: diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index cfaf39d98..eeb86c5bd 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -14,6 +14,7 @@ import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/pending_transaction.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; @@ -200,7 +201,7 @@ abstract class EVMChainWalletBase } else { // MaxFeePerGas with gasPrice; maxFeePerGas = gasPrice; - debugPrint('MaxFeePerGas with gasPrice: $maxFeePerGas'); + printV('MaxFeePerGas with gasPrice: $maxFeePerGas'); } final totalGasFee = estimatedGasUnits * maxFeePerGas; diff --git a/cw_evm/lib/evm_ledger_credentials.dart b/cw_evm/lib/evm_ledger_credentials.dart index a0b7788dc..b579b9108 100644 --- a/cw_evm/lib/evm_ledger_credentials.dart +++ b/cw_evm/lib/evm_ledger_credentials.dart @@ -3,6 +3,7 @@ import 'dart:typed_data'; import 'package:cw_core/hardware/device_not_connected_exception.dart' as exception; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:ledger_ethereum/ledger_ethereum.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart'; import 'package:web3dart/crypto.dart'; @@ -96,7 +97,7 @@ class EvmLedgerCredentials extends CredentialsWithKnownAddress { await ethereumLedgerApp!.getAndProvideERC20TokenInformation( erc20ContractAddress: erc20ContractAddress, chainId: chainId); } catch (e) { - print(e); + printV(e); rethrow; // if (e.errorCode != -28672) rethrow; } diff --git a/cw_haven/lib/haven_account_list.dart b/cw_haven/lib/haven_account_list.dart index 9399efc27..41e3bbf57 100644 --- a/cw_haven/lib/haven_account_list.dart +++ b/cw_haven/lib/haven_account_list.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/account.dart'; import 'package:cw_core/account_list.dart'; @@ -77,7 +78,7 @@ abstract class HavenAccountListBase extends AccountList with Store { _isRefreshing = false; } catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_haven/lib/haven_subaddress_list.dart b/cw_haven/lib/haven_subaddress_list.dart index b40b3484c..8a5125a55 100644 --- a/cw_haven/lib/haven_subaddress_list.dart +++ b/cw_haven/lib/haven_subaddress_list.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_haven/api/structs/subaddress_row.dart'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -79,7 +80,7 @@ abstract class HavenSubaddressListBase with Store { _isRefreshing = false; } on PlatformException catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index e2e598bbe..734a6da9c 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_haven/haven_transaction_creation_credentials.dart'; import 'package:cw_core/monero_amount_format.dart'; import 'package:cw_haven/haven_transaction_creation_exception.dart'; @@ -130,7 +131,7 @@ abstract class HavenWalletBase syncStatus = ConnectedSyncStatus(); } catch (e) { syncStatus = FailedSyncStatus(); - print(e); + printV(e); } } @@ -147,7 +148,7 @@ abstract class HavenWalletBase _listener?.start(); } catch (e) { syncStatus = FailedSyncStatus(); - print(e); + printV(e); rethrow; } } @@ -324,7 +325,7 @@ abstract class HavenWalletBase await transactionHistory.save(); _isTransactionUpdating = false; } catch (e) { - print(e); + printV(e); _isTransactionUpdating = false; } } @@ -403,7 +404,7 @@ abstract class HavenWalletBase syncStatus = SyncingSyncStatus(blocksLeft, ptc); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -413,7 +414,7 @@ abstract class HavenWalletBase _askForUpdateBalance(); await Future.delayed(Duration(seconds: 1)); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_haven/lib/haven_wallet_addresses.dart b/cw_haven/lib/haven_wallet_addresses.dart index c3d1ef46c..192c09ef7 100644 --- a/cw_haven/lib/haven_wallet_addresses.dart +++ b/cw_haven/lib/haven_wallet_addresses.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_addresses_with_account.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/account.dart'; @@ -60,7 +61,7 @@ abstract class HavenWalletAddressesBase extends WalletAddressesWithAccount e.address).toList(); final amounts = outputs.map((e) => monero.Wallet_amountFromString(e.amount)).toList(); - // print("multDest: dstAddrs: $dstAddrs"); - // print("multDest: amounts: $amounts"); + // printV("multDest: dstAddrs: $dstAddrs"); + // printV("multDest: amounts: $amounts"); final txptr = monero.Wallet_createTransactionMultDest( wptr!, diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 667a1ff69..f57beb5fc 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:ffi'; import 'dart:isolate'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_monero/api/account_list.dart'; import 'package:cw_monero/api/exceptions/setup_wallet_exception.dart'; import 'package:flutter/foundation.dart'; @@ -11,7 +12,7 @@ import 'package:mutex/mutex.dart'; int getSyncingHeight() { // final height = monero.MONERO_cw_WalletListener_height(getWlptr()); final h2 = monero.Wallet_blockChainHeight(wptr!); - // print("height: $height / $h2"); + // printV("height: $height / $h2"); return h2; } @@ -70,9 +71,9 @@ String getSeedLegacy(String? language) { Map>> addressCache = {}; String getAddress({int accountIndex = 0, int addressIndex = 0}) { - // print("getaddress: ${accountIndex}/${addressIndex}: ${monero.Wallet_numSubaddresses(wptr!, accountIndex: accountIndex)}: ${monero.Wallet_address(wptr!, accountIndex: accountIndex, addressIndex: addressIndex)}"); + // printV("getaddress: ${accountIndex}/${addressIndex}: ${monero.Wallet_numSubaddresses(wptr!, accountIndex: accountIndex)}: ${monero.Wallet_address(wptr!, accountIndex: accountIndex, addressIndex: addressIndex)}"); while (monero.Wallet_numSubaddresses(wptr!, accountIndex: accountIndex)-1 < addressIndex) { - print("adding subaddress"); + printV("adding subaddress"); monero.Wallet_addSubaddress(wptr!, accountIndex: accountIndex); } addressCache[wptr!.address] ??= {}; @@ -101,7 +102,7 @@ Future setupNodeSync( bool useSSL = false, bool isLightWallet = false, String? socksProxyAddress}) async { - print(''' + printV(''' { wptr!, daemonAddress: $address, @@ -126,7 +127,7 @@ Future setupNodeSync( if (status != 0) { final error = monero.Wallet_errorString(wptr!); - print("error: $error"); + printV("error: $error"); throw SetupWalletException(message: error); } diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 3a47132c5..530d58d62 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -2,6 +2,7 @@ import 'dart:ffi'; import 'dart:io'; import 'dart:isolate'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_monero/api/account_list.dart'; import 'package:cw_monero/api/exceptions/wallet_creation_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart'; @@ -50,9 +51,9 @@ final monero.WalletManager wmPtr = Pointer.fromAddress((() { // than plugging gdb in. Especially on windows/android. monero.printStarts = false; _wmPtr ??= monero.WalletManagerFactory_getWalletManager(); - print("ptr: $_wmPtr"); + printV("ptr: $_wmPtr"); } catch (e) { - print(e); + printV(e); rethrow; } return _wmPtr!.address; @@ -223,7 +224,7 @@ void restoreWalletFromSpendKeySync( if (status != 0) { final err = monero.Wallet_errorString(newWptr); - print("err: $err"); + printV("err: $err"); throw WalletRestoreFromKeysException(message: err); } @@ -301,7 +302,7 @@ Future loadWallet( ); final status = monero.WalletManager_errorString(wmPtr); if (status != "") { - print("loadWallet:"+status); + printV("loadWallet:"+status); throw WalletOpeningException(message: status); } } else { @@ -326,7 +327,7 @@ Future loadWallet( final status = monero.Wallet_status(newWptr); if (status != 0) { final err = monero.Wallet_errorString(newWptr); - print("loadWallet:"+err); + printV("loadWallet:"+err); throw WalletOpeningException(message: err); } diff --git a/cw_monero/lib/ledger.dart b/cw_monero/lib/ledger.dart index c947d0944..e7af9f390 100644 --- a/cw_monero/lib/ledger.dart +++ b/cw_monero/lib/ledger.dart @@ -28,9 +28,9 @@ void enableLedgerExchange(monero.wallet ptr, LedgerConnection connection) { ptr, emptyPointer.cast(), 0); malloc.free(emptyPointer); - // print("> ${ledgerRequest.toHexString()}"); + // printV("> ${ledgerRequest.toHexString()}"); final response = await exchange(connection, ledgerRequest); - // print("< ${response.toHexString()}"); + // printV("< ${response.toHexString()}"); final Pointer result = malloc(response.length); for (var i = 0; i < response.length; i++) { diff --git a/cw_monero/lib/monero_account_list.dart b/cw_monero/lib/monero_account_list.dart index 29d096efd..aa23e276f 100644 --- a/cw_monero/lib/monero_account_list.dart +++ b/cw_monero/lib/monero_account_list.dart @@ -1,4 +1,5 @@ import 'package:cw_core/monero_amount_format.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/account.dart'; import 'package:cw_monero/api/account_list.dart' as account_list; @@ -74,7 +75,7 @@ abstract class MoneroAccountListBase with Store { _isRefreshing = false; } catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_monero/lib/monero_subaddress_list.dart b/cw_monero/lib/monero_subaddress_list.dart index c20b23b5e..bc6f223d7 100644 --- a/cw_monero/lib/monero_subaddress_list.dart +++ b/cw_monero/lib/monero_subaddress_list.dart @@ -1,4 +1,5 @@ import 'package:cw_core/subaddress.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_monero/api/coins_info.dart'; import 'package:cw_monero/api/subaddress_list.dart' as subaddress_list; import 'package:cw_monero/api/wallet.dart'; @@ -87,7 +88,7 @@ abstract class MoneroSubaddressListBase with Store { _isRefreshing = false; } on PlatformException catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_monero/lib/monero_unspent.dart b/cw_monero/lib/monero_unspent.dart index f45fcddaf..8a104edf4 100644 --- a/cw_monero/lib/monero_unspent.dart +++ b/cw_monero/lib/monero_unspent.dart @@ -1,4 +1,5 @@ import 'package:cw_core/unspent_transaction_output.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_monero/api/coins_info.dart'; import 'package:monero/monero.dart' as monero; @@ -10,7 +11,7 @@ class MoneroUnspent extends Unspent { @override set isFrozen(bool freeze) { - print("set isFrozen: $freeze ($keyImage): $freeze"); + printV("set isFrozen: $freeze ($keyImage): $freeze"); final coinId = getCoinByKeyImage(keyImage!); if (coinId == null) throw Exception("Unable to find a coin for address $address"); if (freeze) { @@ -22,7 +23,7 @@ class MoneroUnspent extends Unspent { @override bool get isFrozen { - print("get isFrozen"); + printV("get isFrozen"); final coinId = getCoinByKeyImage(keyImage!); if (coinId == null) throw Exception("Unable to find a coin for address $address"); final coin = getCoin(coinId); diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 2b302e745..83d9504ad 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -17,6 +17,7 @@ import 'package:cw_core/pending_transaction.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_monero/api/account_list.dart'; @@ -198,7 +199,7 @@ abstract class MoneroWalletBase extends WalletBase.delayed(Duration(seconds: 1)); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_monero/lib/monero_wallet_addresses.dart b/cw_monero/lib/monero_wallet_addresses.dart index ae78132d3..14b8a2b9b 100644 --- a/cw_monero/lib/monero_wallet_addresses.dart +++ b/cw_monero/lib/monero_wallet_addresses.dart @@ -1,6 +1,7 @@ import 'package:cw_core/account.dart'; import 'package:cw_core/address_info.dart'; import 'package:cw_core/subaddress.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_monero/api/subaddress_list.dart' as subaddress_list; @@ -96,7 +97,7 @@ abstract class MoneroWalletAddressesBase extends WalletAddresses with Store { await saveAddressesInBox(); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index 0fb2e9aee..6f2435258 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cw_core/monero_wallet_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; @@ -110,7 +111,7 @@ class MoneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: ${e.toString()}'); + printV('MoneroWalletsManager Error: ${e.toString()}'); rethrow; } } @@ -122,7 +123,7 @@ class MoneroWalletService extends WalletService< return monero_wallet_manager.isWalletExist(path: path); } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: $e'); + printV('MoneroWalletsManager Error: $e'); rethrow; } } @@ -177,7 +178,7 @@ class MoneroWalletService extends WalletService< final path = await pathForWalletDir(name: wallet, type: getType()); if (openedWalletsByPath["$path/$wallet"] != null) { // NOTE: this is realistically only required on windows. - print("closing wallet"); + printV("closing wallet"); final wmaddr = wmPtr.address; final waddr = openedWalletsByPath["$path/$wallet"]!.address; // await Isolate.run(() { @@ -185,7 +186,7 @@ class MoneroWalletService extends WalletService< Pointer.fromAddress(wmaddr), Pointer.fromAddress(waddr), false); // }); openedWalletsByPath.remove("$path/$wallet"); - print("wallet closed"); + printV("wallet closed"); } final file = Directory(path); @@ -241,7 +242,7 @@ class MoneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: $e'); + printV('MoneroWalletsManager Error: $e'); rethrow; } } @@ -272,7 +273,7 @@ class MoneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: $e'); + printV('MoneroWalletsManager Error: $e'); rethrow; } } @@ -301,7 +302,7 @@ class MoneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: $e'); + printV('MoneroWalletsManager Error: $e'); rethrow; } } @@ -318,7 +319,7 @@ class MoneroWalletService extends WalletService< path, credentials.password!, polyseed, credentials.walletInfo!, lang); } catch (e) { // TODO: Implement Exception for wallet list service. - print('MoneroWalletsManager Error: $e'); + printV('MoneroWalletsManager Error: $e'); rethrow; } } @@ -381,7 +382,7 @@ class MoneroWalletService extends WalletService< newFile.writeAsBytesSync(file.readAsBytesSync()); }); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_monero/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux b/cw_monero/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux index a2b4915e7..17553f81e 120000 --- a/cw_monero/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux +++ b/cw_monero/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux @@ -1 +1 @@ -/Users/user/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ \ No newline at end of file +/Users/omarhatem/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ \ No newline at end of file diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 1e9916e2b..13f513a8c 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -829,10 +829,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: "direct overridden" description: diff --git a/cw_mweb/lib/cw_mweb.dart b/cw_mweb/lib/cw_mweb.dart index 75cc0bcca..594197018 100644 --- a/cw_mweb/lib/cw_mweb.dart +++ b/cw_mweb/lib/cw_mweb.dart @@ -4,6 +4,7 @@ import 'dart:developer'; import 'dart:io'; import 'dart:typed_data'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:grpc/grpc.dart'; import 'package:path_provider/path_provider.dart'; import 'cw_mweb_platform_interface.dart'; @@ -39,18 +40,18 @@ class CwMweb { final fileStream = file.openRead(lastLength, currentLength); final newLines = await fileStream.transform(utf8.decoder).join(); lastLength = currentLength; - log(newLines); + printV(newLines); } } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log('The mwebd debug log probably is not initialized yet.'); + printV('The mwebd debug log probably is not initialized yet.'); } }); } static Future _initializeClient() async { - print("_initializeClient() called!"); + printV("_initializeClient() called!"); final appDir = await getApplicationSupportDirectory(); const ltcNodeUri = "ltc-electrum.cakewallet.com:9333"; @@ -61,14 +62,14 @@ class CwMweb { if (_port == null || _port == 0) { throw Exception("Failed to start server"); } - log("Attempting to connect to server on port: $_port"); + printV("Attempting to connect to server on port: $_port"); // wait for the server to finish starting up before we try to connect to it: await Future.delayed(const Duration(seconds: 8)); _clientChannel = ClientChannel('127.0.0.1', port: _port!, channelShutdownHandler: () { _rpcClient = null; - log("Channel is shutting down!"); + printV("Channel is shutting down!"); }, options: const ChannelOptions( credentials: ChannelCredentials.insecure(), @@ -90,14 +91,14 @@ class CwMweb { } return _rpcClient!; } on GrpcError catch (e) { - log("Attempt $i failed: $e"); - log('Caught grpc error: ${e.message}'); + printV("Attempt $i failed: $e"); + printV('Caught grpc error: ${e.message}'); _rpcClient = null; // necessary if the database isn't open: await stop(); await Future.delayed(const Duration(seconds: 3)); } catch (e) { - log("Attempt $i failed: $e"); + printV("Attempt $i failed: $e"); _rpcClient = null; await stop(); await Future.delayed(const Duration(seconds: 3)); @@ -111,9 +112,9 @@ class CwMweb { await CwMwebPlatform.instance.stop(); await cleanup(); } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error stopping server: $e"); + printV("Error stopping server: $e"); } } @@ -123,9 +124,9 @@ class CwMweb { ?.split(',') .first; } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error getting address: $e"); + printV("Error getting address: $e"); } return null; } @@ -159,9 +160,9 @@ class CwMweb { _rpcClient = await stub(); return await _rpcClient!.spent(request, options: CallOptions(timeout: TIMEOUT_DURATION)); } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error getting spent: $e"); + printV("Error getting spent: $e"); } return SpentResponse(); } @@ -172,9 +173,9 @@ class CwMweb { _rpcClient = await stub(); return await _rpcClient!.status(request, options: CallOptions(timeout: TIMEOUT_DURATION)); } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error getting status: $e"); + printV("Error getting status: $e"); } return StatusResponse(); } @@ -185,9 +186,9 @@ class CwMweb { _rpcClient = await stub(); return await _rpcClient!.create(request, options: CallOptions(timeout: TIMEOUT_DURATION)); } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error getting create: $e"); + printV("Error getting create: $e"); } return CreateResponse(); } @@ -201,9 +202,9 @@ class CwMweb { log("got utxo stream"); return resp; } on GrpcError catch (e) { - log('Caught grpc error: ${e.message}'); + printV('Caught grpc error: ${e.message}'); } catch (e) { - log("Error getting utxos: $e"); + printV("Error getting utxos: $e"); } return null; } @@ -217,7 +218,7 @@ class CwMweb { log('Caught grpc error: ${e.message}'); throw "error from broadcast mweb: $e"; } catch (e) { - log("Error getting create: $e"); + printV("Error getting utxos: $e"); rethrow; } } diff --git a/cw_mweb/pubspec.yaml b/cw_mweb/pubspec.yaml index cfe43c70b..2b71264ee 100644 --- a/cw_mweb/pubspec.yaml +++ b/cw_mweb/pubspec.yaml @@ -13,6 +13,8 @@ dependencies: grpc: ^3.2.4 path_provider: ^2.1.2 plugin_platform_interface: ^2.0.2 + cw_core: + path: ../cw_core dev_dependencies: flutter_test: diff --git a/cw_nano/lib/nano_client.dart b/cw_nano/lib/nano_client.dart index 7f8e1d0a9..8b62273da 100644 --- a/cw_nano/lib/nano_client.dart +++ b/cw_nano/lib/nano_client.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:cw_core/nano_account_info_response.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_nano/nano_block_info_response.dart'; import 'package:cw_core/n2_node.dart'; import 'package:cw_nano/nano_balance.dart'; @@ -106,7 +107,7 @@ class NanoClient { final data = await jsonDecode(response.body); return AccountInfoResponse.fromJson(data as Map); } catch (e) { - print("error while getting account info $e"); + printV("error while getting account info $e"); return null; } } @@ -127,7 +128,7 @@ class NanoClient { final data = await jsonDecode(response.body); return BlockContentsResponse.fromJson(data["contents"] as Map); } catch (e) { - print("error while getting block info $e"); + printV("error while getting block info $e"); return null; } } @@ -508,7 +509,7 @@ class NanoClient { .map((transaction) => NanoTransactionModel.fromJson(transaction)) .toList(); } catch (e) { - print(e); + printV(e); return []; } } diff --git a/cw_nano/lib/nano_transaction_history.dart b/cw_nano/lib/nano_transaction_history.dart index 44d64f7d4..7b4c5bc12 100644 --- a/cw_nano/lib/nano_transaction_history.dart +++ b/cw_nano/lib/nano_transaction_history.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'dart:core'; import 'package:cw_core/pathForWallet.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/encryption_file_utils.dart'; import 'package:mobx/mobx.dart'; @@ -37,7 +38,7 @@ abstract class NanoTransactionHistoryBase extends TransactionHistoryBase>> addressCache = {}; String getAddress({int accountIndex = 0, int addressIndex = 1}) { while (wownero.Wallet_numSubaddresses(wptr!, accountIndex: accountIndex)-1 < addressIndex) { - print("adding subaddress"); + printV("adding subaddress"); wownero.Wallet_addSubaddress(wptr!, accountIndex: accountIndex); } addressCache[wptr!.address] ??= {}; @@ -100,7 +101,7 @@ Future setupNodeSync( bool useSSL = false, bool isLightWallet = false, String? socksProxyAddress}) async { - print(''' + printV(''' { wptr!, daemonAddress: $address, @@ -125,7 +126,7 @@ Future setupNodeSync( if (status != 0) { final error = wownero.Wallet_errorString(wptr!); - print("error: $error"); + printV("error: $error"); throw SetupWalletException(message: error); } diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index ed6d86823..6681652db 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -2,6 +2,7 @@ import 'dart:ffi'; import 'dart:io'; import 'dart:isolate'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_wownero/api/account_list.dart'; import 'package:cw_wownero/api/exceptions/wallet_creation_exception.dart'; import 'package:cw_wownero/api/exceptions/wallet_opening_exception.dart'; @@ -53,9 +54,9 @@ final wownero.WalletManager wmPtr = Pointer.fromAddress((() { // than plugging gdb in. Especially on windows/android. wownero.printStarts = false; _wmPtr ??= wownero.WalletManagerFactory_getWalletManager(); - print("ptr: $_wmPtr"); + printV("ptr: $_wmPtr"); } catch (e) { - print(e); + printV(e); rethrow; } return _wmPtr!.address; @@ -230,7 +231,7 @@ void restoreWalletFromSpendKeySync( if (status != 0) { final err = wownero.Wallet_errorString(newWptr); - print("err: $err"); + printV("err: $err"); throw WalletRestoreFromKeysException(message: err); } @@ -299,7 +300,7 @@ void loadWallet( final status = wownero.Wallet_status(newWptr); if (status != 0) { final err = wownero.Wallet_errorString(newWptr); - print(err); + printV(err); throw WalletOpeningException(message: err); } wptr = newWptr; diff --git a/cw_wownero/lib/mywownero.dart b/cw_wownero/lib/mywownero.dart index d50e48b64..afbb9b375 100644 --- a/cw_wownero/lib/mywownero.dart +++ b/cw_wownero/lib/mywownero.dart @@ -1,3 +1,5 @@ +import 'package:cw_core/utils/print_verbose.dart'; + const prefixLength = 3; String swapEndianBytes(String original) { @@ -37,14 +39,14 @@ String mnemonicDecode(String seed) { .indexOf(wlist[i + 2].substring(0, prefixLength)); if (w1 == -1 || w2 == -1 || w3 == -1) { - print("invalid word in mnemonic"); + printV("invalid word in mnemonic"); return ''; } final x = w1 + n * (((n - w1) + w2) % n) + n * n * (((n - w2) + w3) % n); if (x % n != w1) { - print("Something went wrong when decoding your private key, please try again"); + printV("Something went wrong when decoding your private key, please try again"); return ''; } diff --git a/cw_wownero/lib/wownero_account_list.dart b/cw_wownero/lib/wownero_account_list.dart index 6d408ba8f..cf1554b7a 100644 --- a/cw_wownero/lib/wownero_account_list.dart +++ b/cw_wownero/lib/wownero_account_list.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wownero_amount_format.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/account.dart'; @@ -74,7 +75,7 @@ abstract class WowneroAccountListBase with Store { _isRefreshing = false; } catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_wownero/lib/wownero_subaddress_list.dart b/cw_wownero/lib/wownero_subaddress_list.dart index 2ef4f2045..876e4bfcf 100644 --- a/cw_wownero/lib/wownero_subaddress_list.dart +++ b/cw_wownero/lib/wownero_subaddress_list.dart @@ -1,4 +1,5 @@ import 'package:cw_core/subaddress.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_wownero/api/coins_info.dart'; import 'package:cw_wownero/api/subaddress_list.dart' as subaddress_list; import 'package:cw_wownero/api/wallet.dart'; @@ -95,7 +96,7 @@ abstract class WowneroSubaddressListBase with Store { _isRefreshing = false; } on PlatformException catch (e) { _isRefreshing = false; - print(e); + printV(e); rethrow; } } diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index 5927d6434..db0fe7bd8 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -15,6 +15,7 @@ import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wownero_amount_format.dart'; @@ -185,7 +186,7 @@ abstract class WowneroWalletBase syncStatus = ConnectedSyncStatus(); } catch (e) { syncStatus = FailedSyncStatus(); - print(e); + printV(e); } } @@ -216,7 +217,7 @@ abstract class WowneroWalletBase _listener?.start(); } catch (e) { syncStatus = FailedSyncStatus(); - print(e); + printV(e); rethrow; } } @@ -349,8 +350,8 @@ abstract class WowneroWalletBase try { await backupWalletFiles(name); } catch (e) { - print("¯\\_(ツ)_/¯"); - print(e); + printV("¯\\_(ツ)_/¯"); + printV(e); } } @@ -359,7 +360,7 @@ abstract class WowneroWalletBase final currentWalletDirPath = await pathForWalletDir(name: name, type: type); if (openedWalletsByPath["$currentWalletDirPath/$name"] != null) { // NOTE: this is realistically only required on windows. - print("closing wallet"); + printV("closing wallet"); final wmaddr = wmPtr.address; final waddr = openedWalletsByPath["$currentWalletDirPath/$name"]!.address; await Isolate.run(() { @@ -367,7 +368,7 @@ abstract class WowneroWalletBase Pointer.fromAddress(wmaddr), Pointer.fromAddress(waddr), true); }); openedWalletsByPath.remove("$currentWalletDirPath/$name"); - print("wallet closed"); + printV("wallet closed"); } try { // -- rename the waller folder -- @@ -499,7 +500,7 @@ abstract class WowneroWalletBase await _refreshUnspentCoinsInfo(); _askForUpdateBalance(); } catch (e, s) { - print(e.toString()); + printV(e.toString()); onError?.call(FlutterErrorDetails( exception: e, stack: s, @@ -546,7 +547,7 @@ abstract class WowneroWalletBase await unspentCoinsInfo.deleteAll(keys); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -577,7 +578,7 @@ abstract class WowneroWalletBase await transactionHistory.save(); _isTransactionUpdating = false; } catch (e) { - print(e); + printV(e); _isTransactionUpdating = false; } } @@ -717,7 +718,7 @@ abstract class WowneroWalletBase syncStatus = SyncingSyncStatus(blocksLeft, ptc); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -727,7 +728,7 @@ abstract class WowneroWalletBase _askForUpdateBalance(); await Future.delayed(Duration(seconds: 1)); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_wownero/lib/wownero_wallet_addresses.dart b/cw_wownero/lib/wownero_wallet_addresses.dart index eed81eb45..0b2ade073 100644 --- a/cw_wownero/lib/wownero_wallet_addresses.dart +++ b/cw_wownero/lib/wownero_wallet_addresses.dart @@ -1,6 +1,7 @@ import 'package:cw_core/account.dart'; import 'package:cw_core/address_info.dart'; import 'package:cw_core/subaddress.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_wownero/api/transaction_history.dart'; @@ -94,7 +95,7 @@ abstract class WowneroWalletAddressesBase extends WalletAddresses with Store { await saveAddressesInBox(); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/cw_wownero/lib/wownero_wallet_service.dart b/cw_wownero/lib/wownero_wallet_service.dart index 6f0fafc88..1cd462cd9 100644 --- a/cw_wownero/lib/wownero_wallet_service.dart +++ b/cw_wownero/lib/wownero_wallet_service.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cw_core/monero_wallet_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; @@ -99,7 +100,7 @@ class WowneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('WowneroWalletsManager Error: ${e.toString()}'); + printV('WowneroWalletsManager Error: ${e.toString()}'); rethrow; } } @@ -111,7 +112,7 @@ class WowneroWalletService extends WalletService< return wownero_wallet_manager.isWalletExist(path: path); } catch (e) { // TODO: Implement Exception for wallet list service. - print('WowneroWalletsManager Error: $e'); + printV('WowneroWalletsManager Error: $e'); rethrow; } } @@ -182,7 +183,7 @@ class WowneroWalletService extends WalletService< final path = await pathForWalletDir(name: wallet, type: getType()); if (openedWalletsByPath["$path/$wallet"] != null) { // NOTE: this is realistically only required on windows. - print("closing wallet"); + printV("closing wallet"); final wmaddr = wmPtr.address; final waddr = openedWalletsByPath["$path/$wallet"]!.address; // await Isolate.run(() { @@ -190,7 +191,7 @@ class WowneroWalletService extends WalletService< Pointer.fromAddress(wmaddr), Pointer.fromAddress(waddr), false); // }); openedWalletsByPath.remove("$path/$wallet"); - print("wallet closed"); + printV("wallet closed"); } final file = Directory(path); @@ -241,7 +242,7 @@ class WowneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('WowneroWalletsManager Error: $e'); + printV('WowneroWalletsManager Error: $e'); rethrow; } } @@ -274,7 +275,7 @@ class WowneroWalletService extends WalletService< return wallet; } catch (e) { // TODO: Implement Exception for wallet list service. - print('WowneroWalletsManager Error: $e'); + printV('WowneroWalletsManager Error: $e'); rethrow; } } @@ -291,7 +292,7 @@ class WowneroWalletService extends WalletService< path, credentials.password!, polyseed, credentials.walletInfo!, lang); } catch (e) { // TODO: Implement Exception for wallet list service. - print('WowneroWalletsManager Error: $e'); + printV('WowneroWalletsManager Error: $e'); rethrow; } } @@ -348,7 +349,7 @@ class WowneroWalletService extends WalletService< newFile.writeAsBytesSync(file.readAsBytesSync()); }); } catch (e) { - print(e.toString()); + printV(e.toString()); } } } diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index a2390b640..eb564f6a3 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -757,10 +757,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: "direct overridden" description: diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bb55b01c6..8046ba307 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,6 +3,38 @@ PODS: - Flutter - ReachabilitySwift - CryptoSwift (1.8.3) + - cw_haven (0.0.1): + - cw_haven/Boost (= 0.0.1) + - cw_haven/Haven (= 0.0.1) + - cw_haven/OpenSSL (= 0.0.1) + - cw_haven/Sodium (= 0.0.1) + - cw_shared_external + - Flutter + - cw_haven/Boost (0.0.1): + - cw_shared_external + - Flutter + - cw_haven/Haven (0.0.1): + - cw_shared_external + - Flutter + - cw_haven/OpenSSL (0.0.1): + - cw_shared_external + - Flutter + - cw_haven/Sodium (0.0.1): + - cw_shared_external + - Flutter + - cw_mweb (0.0.1): + - Flutter + - cw_shared_external (0.0.1): + - cw_shared_external/Boost (= 0.0.1) + - cw_shared_external/OpenSSL (= 0.0.1) + - cw_shared_external/Sodium (= 0.0.1) + - Flutter + - cw_shared_external/Boost (0.0.1): + - Flutter + - cw_shared_external/OpenSSL (0.0.1): + - Flutter + - cw_shared_external/Sodium (0.0.1): + - Flutter - device_display_brightness (0.0.1): - Flutter - device_info_plus (0.0.1): @@ -62,11 +94,10 @@ PODS: - fluttertoast (0.0.2): - Flutter - Toast - - in_app_review (0.2.0): + - in_app_review (2.0.0): - Flutter - integration_test (0.0.1): - Flutter - - MTBBarcodeScanner (5.0.11) - OrderedSet (6.0.3) - package_info_plus (0.4.5): - Flutter @@ -86,7 +117,6 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - SwiftProtobuf (1.28.2) - sp_scanner (0.0.1): - Flutter - SwiftyGif (5.4.5) @@ -106,6 +136,9 @@ PODS: DEPENDENCIES: - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - CryptoSwift + - cw_haven (from `.symlinks/plugins/cw_haven/ios`) + - cw_mweb (from `.symlinks/plugins/cw_mweb/ios`) + - cw_shared_external (from `.symlinks/plugins/cw_shared_external/ios`) - device_display_brightness (from `.symlinks/plugins/device_display_brightness/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - devicelocale (from `.symlinks/plugins/devicelocale/ios`) @@ -125,6 +158,7 @@ DEPENDENCIES: - sensitive_clipboard (from `.symlinks/plugins/sensitive_clipboard/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - sp_scanner (from `.symlinks/plugins/sp_scanner/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`) - universal_ble (from `.symlinks/plugins/universal_ble/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) @@ -145,6 +179,12 @@ SPEC REPOS: EXTERNAL SOURCES: connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" + cw_haven: + :path: ".symlinks/plugins/cw_haven/ios" + cw_mweb: + :path: ".symlinks/plugins/cw_mweb/ios" + cw_shared_external: + :path: ".symlinks/plugins/cw_shared_external/ios" device_display_brightness: :path: ".symlinks/plugins/device_display_brightness/ios" device_info_plus: @@ -183,6 +223,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + sp_scanner: + :path: ".symlinks/plugins/sp_scanner/ios" uni_links: :path: ".symlinks/plugins/uni_links/ios" universal_ble: @@ -197,9 +239,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483 + cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a + cw_mweb: 87af74f9659fed0c1a2cbfb44413f1070e79e3ae + cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 - devicelocale: b22617f40038496deffba44747101255cee005b0 + devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926 DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60 fast_scanner: 44c00940355a51258cd6c2085734193cd23d95bc @@ -209,10 +254,9 @@ SPEC CHECKSUMS: flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be - fluttertoast: 48c57db1b71b0ce9e6bba9f31c940ff4b001293c - in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d + fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c + in_app_review: a31b5257259646ea78e0e35fc914979b0031d011 integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 - MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 @@ -222,7 +266,6 @@ SPEC CHECKSUMS: sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - SwiftProtobuf: 4dbaffec76a39a8dc5da23b40af1a5dc01a4c02d sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e diff --git a/ios/ZanoWallet.framework/ZanoWallet b/ios/ZanoWallet.framework/ZanoWallet new file mode 100644 index 000000000..701878274 Binary files /dev/null and b/ios/ZanoWallet.framework/ZanoWallet differ diff --git a/ios/zano_libwallet2_api_c.dylib b/ios/zano_libwallet2_api_c.dylib new file mode 120000 index 000000000..ed324a208 --- /dev/null +++ b/ios/zano_libwallet2_api_c.dylib @@ -0,0 +1 @@ +../scripts/monero_c/release/zano/host-apple-ios_libwallet2_api_c.dylib \ No newline at end of file diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index 60364c289..d098ea0e4 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -404,8 +404,8 @@ class CWBitcoin extends Bitcoin { list.add(dInfoCopy); } catch (e, s) { - print("derivationInfoError: $e"); - print("derivationInfoStack: $s"); + printV("derivationInfoError: $e"); + printV("derivationInfoStack: $s"); } } } @@ -498,7 +498,7 @@ class CWBitcoin extends Bitcoin { try { return hardwareWalletService.getAvailableAccounts(index: index, limit: limit); } catch (err) { - print(err); + printV(err); throw err; } } @@ -510,7 +510,7 @@ class CWBitcoin extends Bitcoin { try { return hardwareWalletService.getAvailableAccounts(index: index, limit: limit); } catch (err) { - print(err); + printV(err); throw err; } } diff --git a/lib/buy/dfx/dfx_buy_provider.dart b/lib/buy/dfx/dfx_buy_provider.dart index c1ed762b1..c11a0d771 100644 --- a/lib/buy/dfx/dfx_buy_provider.dart +++ b/lib/buy/dfx/dfx_buy_provider.dart @@ -12,6 +12,7 @@ import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; @@ -136,7 +137,7 @@ class DFXBuyProvider extends BuyProvider { return {}; } } catch (e) { - print('DFX Error fetching fiat currencies: $e'); + printV('DFX Error fetching fiat currencies: $e'); return {}; } } @@ -266,19 +267,19 @@ class DFXBuyProvider extends BuyProvider { quote.setCryptoCurrency = cryptoCurrency; return [quote]; } else { - print('DFX: Unexpected data type: ${responseData.runtimeType}'); + printV('DFX: Unexpected data type: ${responseData.runtimeType}'); return null; } } else { if (responseData is Map && responseData.containsKey('message')) { - print('DFX Error: ${responseData['message']}'); + printV('DFX Error: ${responseData['message']}'); } else { - print('DFX Failed to fetch buy quote: ${response.statusCode}'); + printV('DFX Failed to fetch buy quote: ${response.statusCode}'); } return null; } } catch (e) { - print('DFX Error fetching buy quote: $e'); + printV('DFX Error fetching buy quote: $e'); return null; } } diff --git a/lib/buy/meld/meld_buy_provider.dart b/lib/buy/meld/meld_buy_provider.dart index 1ac3931d1..a9759aab8 100644 --- a/lib/buy/meld/meld_buy_provider.dart +++ b/lib/buy/meld/meld_buy_provider.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:flutter/material.dart'; import 'dart:developer'; @@ -75,11 +76,11 @@ class MeldBuyProvider extends BuyProvider { data.map((e) => PaymentMethod.fromMeldJson(e as Map)).toList(); return paymentMethods; } else { - print('Meld: Failed to fetch payment types'); + printV('Meld: Failed to fetch payment types'); return List.empty(); } } catch (e) { - print('Meld: Failed to fetch payment types: $e'); + printV('Meld: Failed to fetch payment types: $e'); return List.empty(); } } @@ -132,7 +133,7 @@ class MeldBuyProvider extends BuyProvider { return null; } } catch (e) { - print('Error fetching buy quote: $e'); + printV('Error fetching buy quote: $e'); return null; } } diff --git a/lib/buy/moonpay/moonpay_provider.dart b/lib/buy/moonpay/moonpay_provider.dart index b93c0f02d..5794e0794 100644 --- a/lib/buy/moonpay/moonpay_provider.dart +++ b/lib/buy/moonpay/moonpay_provider.dart @@ -18,6 +18,7 @@ import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -113,11 +114,11 @@ class MoonPayProvider extends BuyProvider { if (response.statusCode == 200) { return jsonDecode(response.body) as Map; } else { - print('MoonPay does not support fiat: $fiatCurrency'); + printV('MoonPay does not support fiat: $fiatCurrency'); return {}; } } catch (e) { - print('MoonPay Error fetching fiat currencies: $e'); + printV('MoonPay Error fetching fiat currencies: $e'); return {}; } } @@ -204,11 +205,11 @@ class MoonPayProvider extends BuyProvider { return [quote]; } else { - print('Moon Pay: Error fetching buy quote: '); + printV('Moon Pay: Error fetching buy quote: '); return null; } } catch (e) { - print('Moon Pay: Error fetching buy quote: $e'); + printV('Moon Pay: Error fetching buy quote: $e'); return null; } } diff --git a/lib/buy/onramper/onramper_buy_provider.dart b/lib/buy/onramper/onramper_buy_provider.dart index 827a5d448..f229cb833 100644 --- a/lib/buy/onramper/onramper_buy_provider.dart +++ b/lib/buy/onramper/onramper_buy_provider.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; @@ -67,11 +68,11 @@ class OnRamperBuyProvider extends BuyProvider { .map((item) => PaymentMethod.fromOnramperJson(item as Map)) .toList(); } else { - print('Failed to fetch available payment types'); + printV('Failed to fetch available payment types'); return []; } } catch (e) { - print('Failed to fetch available payment types: $e'); + printV('Failed to fetch available payment types: $e'); return []; } } @@ -98,11 +99,11 @@ class OnRamperBuyProvider extends BuyProvider { return result; } else { - print('Failed to fetch onramp metadata'); + printV('Failed to fetch onramp metadata'); return {}; } } catch (e) { - print('Error occurred: $e'); + printV('Error occurred: $e'); return {}; } } @@ -178,11 +179,11 @@ class OnRamperBuyProvider extends BuyProvider { return validQuotes; } else { - print('Onramper: Failed to fetch rate'); + printV('Onramper: Failed to fetch rate'); return null; } } catch (e) { - print('Onramper: Failed to fetch rate $e'); + printV('Onramper: Failed to fetch rate $e'); return null; } } diff --git a/lib/buy/robinhood/robinhood_buy_provider.dart b/lib/buy/robinhood/robinhood_buy_provider.dart index a64c9d736..271b9c090 100644 --- a/lib/buy/robinhood/robinhood_buy_provider.dart +++ b/lib/buy/robinhood/robinhood_buy_provider.dart @@ -13,6 +13,7 @@ import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; @@ -176,7 +177,7 @@ class RobinhoodBuyProvider extends BuyProvider { if (responseData.containsKey('message')) { log('Robinhood Error: ${responseData['message']}'); } else { - print('Robinhood Failed to fetch $action quote: ${response.statusCode}'); + printV('Robinhood Failed to fetch $action quote: ${response.statusCode}'); } return null; } diff --git a/lib/cake_pay/cake_pay_api.dart b/lib/cake_pay/cake_pay_api.dart index ea44d3335..cc04a0ca1 100644 --- a/lib/cake_pay/cake_pay_api.dart +++ b/lib/cake_pay/cake_pay_api.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:cake_wallet/cake_pay/cake_pay_order.dart'; import 'package:cake_wallet/cake_pay/cake_pay_user_credentials.dart'; import 'package:cake_wallet/cake_pay/cake_pay_vendor.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cake_wallet/entities/country.dart'; import 'package:http/http.dart' as http; @@ -140,7 +141,7 @@ class CakePayApi { final response = await http.get(uri, headers: headers); - print('Response: ${response.statusCode}'); + printV('Response: ${response.statusCode}'); if (response.statusCode != 200) { throw Exception('Unexpected http status: ${response.statusCode}'); @@ -167,7 +168,7 @@ class CakePayApi { throw Exception('Unexpected http status: ${response.statusCode}'); } } catch (e) { - print('Caught exception: $e'); + printV('Caught exception: $e'); } } diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 9ca8a41ad..c122a872b 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -134,7 +134,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.btcln: pattern = '(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)'; default: - pattern = '[0-9a-zA-Z]+'; + return ''; } return '$BEFORE_REGEX($pattern)$AFTER_REGEX'; diff --git a/lib/core/auth_service.dart b/lib/core/auth_service.dart index 791701395..378c52ec0 100644 --- a/lib/core/auth_service.dart +++ b/lib/core/auth_service.dart @@ -4,6 +4,7 @@ import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cake_wallet/core/totp_request_details.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:mobx/mobx.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -51,7 +52,7 @@ class AuthService with Store { try { password = await secureStorage.read(key: key) ?? ''; } catch (e) { - print(e); + printV(e); } return walletName.isNotEmpty && password.isNotEmpty; diff --git a/lib/core/backup_service.dart b/lib/core/backup_service.dart index 3413ec1d3..f101ed7e1 100644 --- a/lib/core/backup_service.dart +++ b/lib/core/backup_service.dart @@ -7,6 +7,7 @@ import 'package:cake_wallet/entities/transaction_description.dart'; import 'package:cake_wallet/themes/theme_list.dart'; import 'package:cw_core/root_dir.dart'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; @@ -110,11 +111,11 @@ class BackupService { for (var ignore in ignoreFiles) { final filename = entity.absolute.path; if (filename.endsWith(ignore) && !filename.contains("wallets/")) { - print("ignoring backup file: $filename"); + printV("ignoring backup file: $filename"); return; } } - print("restoring: $filename"); + printV("restoring: $filename"); if (entity.statSync().type == FileSystemEntityType.directory) { zipEncoder.addDirectory(Directory(entity.path)); } else { @@ -175,11 +176,11 @@ class BackupService { final filename = file.name; for (var ignore in ignoreFiles) { if (filename.endsWith(ignore) && !filename.contains("wallets/")) { - print("ignoring backup file: $filename"); + printV("ignoring backup file: $filename"); continue outer; } } - print("restoring: $filename"); + printV("restoring: $filename"); if (file.isFile) { final content = file.content as List; File('${appDir.path}/' + filename) @@ -193,7 +194,7 @@ class BackupService { await _verifyWallets(); await _importKeychainDumpV2(password); await _importPreferencesDump(); - await _importTransactionDescriptionDump(); + await _importTransactionDescriptionDump(); // HiveError: Box has already been closed } Future _verifyWallets() async { diff --git a/lib/core/wallet_connect/chain_service/solana/solana_chain_service.dart b/lib/core/wallet_connect/chain_service/solana/solana_chain_service.dart index efbf9df74..d7fe53c73 100644 --- a/lib/core/wallet_connect/chain_service/solana/solana_chain_service.dart +++ b/lib/core/wallet_connect/chain_service/solana/solana_chain_service.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/wallet_connect/widgets/message_display_w import 'package:cake_wallet/core/wallet_connect/models/connection_model.dart'; import 'package:cake_wallet/src/screens/wallet_connect/widgets/connection_widget.dart'; import 'package:cake_wallet/src/screens/wallet_connect/widgets/modals/web3_request_modal.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:solana/base58.dart'; import 'package:solana/solana.dart'; import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart'; @@ -127,7 +128,7 @@ class SolanaChainServiceImpl implements ChainService { commitment: Commitment.confirmed, ); - print(signature); + printV(signature); bottomSheetService.queueBottomSheet( isModalDismissible: true, @@ -165,7 +166,7 @@ class SolanaChainServiceImpl implements ChainService { try { sign = await ownerKeyPair?.sign(base58decode(solanaSignMessage.message)); } catch (e) { - print(e); + printV(e); } if (sign == null) { diff --git a/lib/core/wallet_connect/web3wallet_service.dart b/lib/core/wallet_connect/web3wallet_service.dart index ba4785643..ad892a594 100644 --- a/lib/core/wallet_connect/web3wallet_service.dart +++ b/lib/core/wallet_connect/web3wallet_service.dart @@ -17,6 +17,7 @@ import 'package:cake_wallet/src/screens/wallet_connect/widgets/connection_reques import 'package:cake_wallet/src/screens/wallet_connect/widgets/message_display_widget.dart'; import 'package:cake_wallet/src/screens/wallet_connect/widgets/modals/web3_request_modal.dart'; import 'package:cake_wallet/store/app_store.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:eth_sig_util/eth_sig_util.dart'; import 'package:flutter/material.dart'; @@ -260,7 +261,7 @@ abstract class Web3WalletServiceBase with Store { @action void _refreshPairings() { - print('Refreshing pairings'); + printV('Refreshing pairings'); pairings.clear(); final allPairings = _web3Wallet.pairings.getAll(); @@ -397,10 +398,10 @@ abstract class Web3WalletServiceBase with Store { // Get all pairing topics attached to this key final pairingTopicsForWallet = getPairingTopicsForWallet(key); - print(pairingTopicsForWallet); + printV(pairingTopicsForWallet); bool isPairingTopicAlreadySaved = pairingTopicsForWallet.contains(pairingTopic); - print('Is Pairing Topic Saved: $isPairingTopicAlreadySaved'); + printV('Is Pairing Topic Saved: $isPairingTopicAlreadySaved'); if (!isPairingTopicAlreadySaved) { // Update the list with the most recent pairing topic diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 3a60197de..6b1553443 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -12,6 +12,7 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/utils/exception_handler.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cw_core/cake_hive.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; @@ -97,7 +98,7 @@ class WalletLoadingService { // if found a wallet that is not corrupted, then still display the seeds of the corrupted ones authenticatedErrorStreamController.add(corruptedWalletsSeeds); } catch (e) { - print(e); + printV(e); // save seeds and show corrupted wallets' seeds to the user try { final seeds = await _getCorruptedWalletSeeds(walletInfo.name, walletInfo.type); diff --git a/lib/entities/background_tasks.dart b/lib/entities/background_tasks.dart index a373ca0ad..60e4c86cd 100644 --- a/lib/entities/background_tasks.dart +++ b/lib/entities/background_tasks.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/utils/feature_flag.dart'; import 'package:cake_wallet/view_model/settings/sync_mode.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; @@ -83,8 +84,8 @@ void callbackDispatcher() { return Future.value(true); } catch (error, stackTrace) { - print(error); - print(stackTrace); + printV(error); + printV(stackTrace); return Future.error(error); } }); @@ -149,8 +150,8 @@ class BackgroundTasks { constraints: constraints, ); } catch (error, stackTrace) { - print(error); - print(stackTrace); + printV(error); + printV(stackTrace); } } @@ -158,8 +159,8 @@ class BackgroundTasks { try { Workmanager().cancelByUniqueName(moneroSyncTaskKey); } catch (error, stackTrace) { - print(error); - print(stackTrace); + printV(error); + printV(stackTrace); } } } diff --git a/lib/entities/biometric_auth.dart b/lib/entities/biometric_auth.dart index 353cd0492..ca9205f2a 100644 --- a/lib/entities/biometric_auth.dart +++ b/lib/entities/biometric_auth.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/services.dart'; import 'package:flutter_local_authentication/flutter_local_authentication.dart'; @@ -9,7 +10,7 @@ class BiometricAuth { final authenticated = await _flutterLocalAuthenticationPlugin.authenticate(); return authenticated; } catch (e) { - print(e); + printV(e); } return false; } @@ -20,7 +21,7 @@ class BiometricAuth { canAuthenticate = await _flutterLocalAuthenticationPlugin.canAuthenticate(); await _flutterLocalAuthenticationPlugin.setTouchIDAuthenticationAllowableReuseDuration(0); } catch (error) { - print("Exception checking support. $error"); + printV("Exception checking support. $error"); canAuthenticate = false; } diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 7f0679625..f2cfe79b7 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -7,6 +7,7 @@ import 'package:cake_wallet/entities/fiat_api_mode.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cw_core/root_dir.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:hive/hive.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; @@ -296,7 +297,7 @@ Future defaultSettingsMigration( await sharedPreferences.setInt( PreferencesKey.currentDefaultSettingsMigrationVersion, version); } catch (e) { - print('Migration error: ${e.toString()}'); + printV('Migration error: ${e.toString()}'); } }); @@ -714,7 +715,7 @@ Future insecureStorageMigration({ await secureStorage.write( key: SecureKey.lastAuthTimeMilliseconds, value: lastAuthTimeMilliseconds.toString()); } catch (e) { - print("Error migrating shared preferences to secure storage!: $e"); + printV("Error migrating shared preferences to secure storage!: $e"); // this actually shouldn't be that big of a problem since we don't delete the old keys in this update // and we read and write to the new locations when loading storage, the migration is just for extra safety } @@ -870,7 +871,7 @@ Future addAddressesForMoneroWallets(Box walletInfoSource) asyn info.address = addressText; await info.save(); } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/lib/entities/ens_record.dart b/lib/entities/ens_record.dart index b2ce51806..e07d0731f 100644 --- a/lib/entities/ens_record.dart +++ b/lib/entities/ens_record.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/ethereum/ethereum.dart'; import 'package:cake_wallet/polygon/polygon.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:ens_dart/ens_dart.dart'; @@ -45,7 +46,7 @@ class EnsRecord { final addr = await ens.withName(name).getAddress(); return addr.hex; } catch (e) { - print(e); + printV(e); return ""; } } diff --git a/lib/entities/fs_migration.dart b/lib/entities/fs_migration.dart index ba3541561..a7604f4f1 100644 --- a/lib/entities/fs_migration.dart +++ b/lib/entities/fs_migration.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'dart:convert'; import 'package:cake_wallet/core/secure_storage.dart'; import 'package:collection/collection.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:hive/hive.dart'; import 'package:path_provider/path_provider.dart'; @@ -171,7 +172,7 @@ Future ios_migrate_wallet_passwords() async { await keyService.saveWalletPassword(walletName: name, password: password!); } } catch (e) { - print(e.toString()); + printV(e.toString()); } }); @@ -326,7 +327,7 @@ Future ios_migrate_wallet_info(Box walletsInfoSource) async { return walletInfo; } } catch (e) { - print(e.toString()); + printV(e.toString()); return null; } }) @@ -336,7 +337,7 @@ Future ios_migrate_wallet_info(Box walletsInfoSource) async { await walletsInfoSource.addAll(infoRecords); await prefs.setBool('ios_migration_wallet_info_completed', true); } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -403,7 +404,7 @@ Future ios_migrate_trades_list(Box tradeSource) async { await tradeSource.addAll(trades); await prefs.setBool('ios_migration_trade_list_completed', true); } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -437,6 +438,6 @@ Future ios_migrate_address_book(Box contactSource) async { await contactSource.addAll(contacts); await prefs.setBool('ios_migration_address_book_completed', true); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/entities/openalias_record.dart b/lib/entities/openalias_record.dart index 6d8b759f5..b2af2e53d 100644 --- a/lib/entities/openalias_record.dart +++ b/lib/entities/openalias_record.dart @@ -1,4 +1,5 @@ import 'package:basic_utils/basic_utils.dart'; +import 'package:cw_core/utils/print_verbose.dart'; class OpenaliasRecord { OpenaliasRecord({ @@ -27,7 +28,7 @@ class OpenaliasRecord { return txtRecord; } catch (e) { - print("${e.toString()}"); + printV("${e.toString()}"); return null; } } diff --git a/lib/entities/parse_address_from_domain.dart b/lib/entities/parse_address_from_domain.dart index 42ab19b31..54fa4e75a 100644 --- a/lib/entities/parse_address_from_domain.dart +++ b/lib/entities/parse_address_from_domain.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/nostr/nostr_api.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/twitter/twitter_api.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/entities/fio_address_provider.dart'; @@ -283,7 +284,7 @@ class AddressResolver { } } } catch (e) { - print(e.toString()); + printV(e.toString()); } return ParsedAddress(addresses: [text]); diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index 5ed7a7ed6..58a540278 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -91,6 +91,7 @@ class PreferencesKey { static const donationLinkWalletName = 'donation_link_wallet_name'; static const lastSeenAppVersion = 'last_seen_app_version'; static const shouldShowMarketPlaceInDashboard = 'should_show_marketplace_in_dashboard'; + static const showAddressBookPopupEnabled = 'show_address_book_popup_enabled'; static const isNewInstall = 'is_new_install'; static const serviceStatusShaKey = 'service_status_sha_key'; static const walletConnectPairingTopicsList = 'wallet_connect_pairing_topics_list'; diff --git a/lib/entities/qr_scanner.dart b/lib/entities/qr_scanner.dart index 2e2637566..311bc498a 100644 --- a/lib/entities/qr_scanner.dart +++ b/lib/entities/qr_scanner.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/main.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:fast_scanner/fast_scanner.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; @@ -61,7 +62,7 @@ class _BarcodeScannerSimpleState extends State { ); }, ); - print(e); + printV(e); } } diff --git a/lib/entities/unstoppable_domain_address.dart b/lib/entities/unstoppable_domain_address.dart index 6966fdd75..a047c85d9 100644 --- a/lib/entities/unstoppable_domain_address.dart +++ b/lib/entities/unstoppable_domain_address.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart' as http; Future fetchUnstoppableDomainAddress(String domain, String ticker) async { @@ -20,7 +21,7 @@ Future fetchUnstoppableDomainAddress(String domain, String ticker) async return records[key] as String? ?? ''; } catch (e) { - print('Unstoppable domain error: ${e.toString()}'); + printV('Unstoppable domain error: ${e.toString()}'); address = ''; } diff --git a/lib/ethereum/cw_ethereum.dart b/lib/ethereum/cw_ethereum.dart index 7a06a1679..413cafc30 100644 --- a/lib/ethereum/cw_ethereum.dart +++ b/lib/ethereum/cw_ethereum.dart @@ -205,7 +205,7 @@ class CWEthereum extends Ethereum { try { return await hardwareWalletService.getAvailableAccounts(index: index, limit: limit); } catch (err) { - print(err); + printV(err); throw err; } } diff --git a/lib/exchange/provider/changenow_exchange_provider.dart b/lib/exchange/provider/changenow_exchange_provider.dart index 255767fa1..79f8d70d4 100644 --- a/lib/exchange/provider/changenow_exchange_provider.dart +++ b/lib/exchange/provider/changenow_exchange_provider.dart @@ -15,6 +15,7 @@ import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/utils/distribution_info.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart'; class ChangeNowExchangeProvider extends ExchangeProvider { @@ -127,7 +128,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider { return isReverse ? (amount / fromAmount) : (toAmount / amount); } catch (e) { - print(e.toString()); + printV(e.toString()); return 0.0; } } diff --git a/lib/exchange/provider/exolix_exchange_provider.dart b/lib/exchange/provider/exolix_exchange_provider.dart index 5eeb6f9cf..49aa56195 100644 --- a/lib/exchange/provider/exolix_exchange_provider.dart +++ b/lib/exchange/provider/exolix_exchange_provider.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/exchange/trade_request.dart'; import 'package:cake_wallet/exchange/trade_state.dart'; import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart'; class ExolixExchangeProvider extends ExchangeProvider { @@ -124,7 +125,7 @@ class ExolixExchangeProvider extends ExchangeProvider { return responseJSON['rate'] as double; } catch (e) { - print(e.toString()); + printV(e.toString()); return 0.0; } } diff --git a/lib/exchange/provider/letsexchange_exchange_provider.dart b/lib/exchange/provider/letsexchange_exchange_provider.dart index 1d4da55cb..0a2f81317 100644 --- a/lib/exchange/provider/letsexchange_exchange_provider.dart +++ b/lib/exchange/provider/letsexchange_exchange_provider.dart @@ -97,6 +97,8 @@ class LetsExchangeExchangeProvider extends ExchangeProvider { final amountToGet = double.tryParse(responseJSON['amount'] as String) ?? 0.0; + if (amountToGet == 0.0) return 0.0; + return isFixedRateMode ? amount / amountToGet : amountToGet / amount; } catch (e) { log(e.toString()); diff --git a/lib/exchange/provider/quantex_exchange_provider.dart b/lib/exchange/provider/quantex_exchange_provider.dart index a4d8bafe5..ee3473360 100644 --- a/lib/exchange/provider/quantex_exchange_provider.dart +++ b/lib/exchange/provider/quantex_exchange_provider.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/exchange/trade_request.dart'; import 'package:cake_wallet/exchange/trade_state.dart'; import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart'; class QuantexExchangeProvider extends ExchangeProvider { @@ -86,7 +87,7 @@ class QuantexExchangeProvider extends ExchangeProvider { // coin not found: return Limits(min: 0, max: 0); } catch (e) { - print(e.toString()); + printV(e.toString()); return Limits(min: 0, max: 0); } } @@ -121,7 +122,7 @@ class QuantexExchangeProvider extends ExchangeProvider { double rate = double.parse(data['price'].toString()); return rate; } catch (e) { - print("error fetching rate: ${e.toString()}"); + printV("error fetching rate: ${e.toString()}"); return 0.0; } } @@ -178,7 +179,7 @@ class QuantexExchangeProvider extends ExchangeProvider { isSendAll: isSendAll, ); } catch (e) { - print("error creating trade: ${e.toString()}"); + printV("error creating trade: ${e.toString()}"); throw TradeNotCreatedException(description, description: e.toString()); } } @@ -225,7 +226,7 @@ class QuantexExchangeProvider extends ExchangeProvider { state: state, ); } catch (e) { - print("error getting trade: ${e.toString()}"); + printV("error getting trade: ${e.toString()}"); throw TradeNotFoundException( id, provider: description, diff --git a/lib/exchange/provider/thorchain_exchange.provider.dart b/lib/exchange/provider/thorchain_exchange.provider.dart index 99b9dcf9f..aa7ab2d27 100644 --- a/lib/exchange/provider/thorchain_exchange.provider.dart +++ b/lib/exchange/provider/thorchain_exchange.provider.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/exchange/trade_request.dart'; import 'package:cake_wallet/exchange/trade_state.dart'; import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:hive/hive.dart'; import 'package:http/http.dart' as http; @@ -86,7 +87,7 @@ class ThorChainExchangeProvider extends ExchangeProvider { return _thorChainAmountToDouble(expectedAmountOut) / amount; } catch (e) { - print(e.toString()); + printV(e.toString()); return 0.0; } } diff --git a/lib/exchange/provider/trocador_exchange_provider.dart b/lib/exchange/provider/trocador_exchange_provider.dart index 5529d824a..b01ce9eae 100644 --- a/lib/exchange/provider/trocador_exchange_provider.dart +++ b/lib/exchange/provider/trocador_exchange_provider.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/exchange/trade_request.dart'; import 'package:cake_wallet/exchange/trade_state.dart'; import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart'; class TrocadorExchangeProvider extends ExchangeProvider { @@ -148,7 +149,7 @@ class TrocadorExchangeProvider extends ExchangeProvider { return isReceiveAmount ? (amount / fromAmount) : (toAmount / amount); } catch (e) { - print(e.toString()); + printV(e.toString()); return 0.0; } } diff --git a/lib/mastodon/mastodon_api.dart b/lib/mastodon/mastodon_api.dart index 8326ce05d..a2fdc97bd 100644 --- a/lib/mastodon/mastodon_api.dart +++ b/lib/mastodon/mastodon_api.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:http/http.dart' as http; import 'package:cake_wallet/mastodon/mastodon_user.dart'; @@ -27,7 +28,7 @@ class MastodonAPI { return MastodonUser.fromJson(responseJSON); } catch (e) { - print('Error in lookupUserByUserName: $e'); + printV('Error in lookupUserByUserName: $e'); return null; } } @@ -56,7 +57,7 @@ class MastodonAPI { return responseJSON.map((json) => PinnedPost.fromJson(json as Map)).toList(); } catch (e) { - print('Error in getPinnedPosts: $e'); + printV('Error in getPinnedPosts: $e'); throw e; } } diff --git a/lib/nano/cw_nano.dart b/lib/nano/cw_nano.dart index 9e47edc04..9a2243d00 100644 --- a/lib/nano/cw_nano.dart +++ b/lib/nano/cw_nano.dart @@ -249,7 +249,7 @@ class CWNanoUtil extends NanoUtil { try { mnemonic = NanoDerivations.standardSeedToMnemonic(seedKey); } catch (e) { - print("not a valid 'nano' seed key"); + printV("not a valid 'nano' seed key"); } } if (derivationType == DerivationType.bip39) { @@ -306,7 +306,7 @@ class CWNanoUtil extends NanoUtil { try { mnemonic = NanoDerivations.standardSeedToMnemonic(seedKey!); } catch (e) { - print("not a valid 'nano' seed key"); + printV("not a valid 'nano' seed key"); } } diff --git a/lib/nostr/nostr_api.dart b/lib/nostr/nostr_api.dart index 7c0eea5ef..be59f0eba 100644 --- a/lib/nostr/nostr_api.dart +++ b/lib/nostr/nostr_api.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/nostr/nostr_user.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:nostr_tools/nostr_tools.dart'; @@ -83,7 +84,7 @@ class NostrProfileHandler { relay.close(); return null; } catch (e) { - print('[!] Error with relay $relayUrl: $e'); + printV('[!] Error with relay $relayUrl: $e'); return null; } } @@ -115,7 +116,7 @@ class NostrProfileHandler { var uri = Uri.parse(relayUrl); return uri.host; } catch (e) { - print('Error parsing URL: $e'); + printV('Error parsing URL: $e'); return ''; } } diff --git a/lib/polygon/cw_polygon.dart b/lib/polygon/cw_polygon.dart index 74b4026eb..7c447406d 100644 --- a/lib/polygon/cw_polygon.dart +++ b/lib/polygon/cw_polygon.dart @@ -204,7 +204,7 @@ class CWPolygon extends Polygon { try { return await hardwareWalletService.getAvailableAccounts(index: index, limit: limit); } catch (err) { - print(err); + printV(err); throw err; } } diff --git a/lib/reactions/check_connection.dart b/lib/reactions/check_connection.dart index 570b96864..d60037543 100644 --- a/lib/reactions/check_connection.dart +++ b/lib/reactions/check_connection.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/wallet_type.dart'; @@ -36,7 +37,7 @@ void startCheckConnectionReaction(WalletBase wallet, SettingsStore settingsStore } } } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/lib/reactions/fiat_rate_update.dart b/lib/reactions/fiat_rate_update.dart index e46ef4b64..62710c515 100644 --- a/lib/reactions/fiat_rate_update.dart +++ b/lib/reactions/fiat_rate_update.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/tron/tron.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/erc20_token.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:mobx/mobx.dart'; @@ -71,7 +72,7 @@ Future startFiatRateUpdate( } } } catch (e) { - print(e); + printV(e); } }; diff --git a/lib/reactions/on_current_node_change.dart b/lib/reactions/on_current_node_change.dart index 59a1e4897..730fba674 100644 --- a/lib/reactions/on_current_node_change.dart +++ b/lib/reactions/on_current_node_change.dart @@ -1,3 +1,4 @@ +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/node.dart'; import 'package:cake_wallet/store/app_store.dart'; @@ -10,14 +11,14 @@ void startOnCurrentNodeChangeReaction(AppStore appStore) { try { await appStore.wallet!.connectToNode(node: change.newValue!); } catch (e) { - print(e.toString()); + printV(e.toString()); } }); appStore.settingsStore.powNodes.observe((change) async { try { await appStore.wallet!.connectToPowNode(node: change.newValue!); } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/lib/reactions/on_current_wallet_change.dart b/lib/reactions/on_current_wallet_change.dart index b804ff14e..3840b042e 100644 --- a/lib/reactions/on_current_wallet_change.dart +++ b/lib/reactions/on_current_wallet_change.dart @@ -9,6 +9,7 @@ import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_history.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/transaction_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/reactions/check_connection.dart'; import 'package:cake_wallet/reactions/on_wallet_sync_status_change.dart'; @@ -46,7 +47,7 @@ void startCurrentWalletChangeReaction( // appStore.wallet.walletInfo.yatLastUsedAddress = address; // await appStore.wallet.walletInfo.save(); //} catch (e) { - // print(e.toString()); + // printV(e.toString()); //} //}); @@ -91,7 +92,7 @@ void startCurrentWalletChangeReaction( } } } catch (e) { - print(e.toString()); + printV(e.toString()); } }); @@ -138,7 +139,7 @@ void startCurrentWalletChangeReaction( } } } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/lib/reactions/on_wallet_sync_status_change.dart b/lib/reactions/on_wallet_sync_status_change.dart index 96305de04..072602e5f 100644 --- a/lib/reactions/on_wallet_sync_status_change.dart +++ b/lib/reactions/on_wallet_sync_status_change.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/entities/update_haven_rate.dart'; import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; @@ -31,7 +32,7 @@ void startWalletSyncStatusChangeReaction( await WakelockPlus.disable(); } } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/lib/src/screens/buy/buy_webview_page.dart b/lib/src/screens/buy/buy_webview_page.dart index ad6970861..5bca7a2ed 100644 --- a/lib/src/screens/buy/buy_webview_page.dart +++ b/lib/src/screens/buy/buy_webview_page.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/store/dashboard/orders_store.dart'; import 'package:cake_wallet/view_model/buy/buy_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; @@ -103,7 +104,7 @@ class BuyWebViewPageBodyState extends State { } } catch (e) { _isSaving = false; - print(e); + printV(e); } }); } diff --git a/lib/src/screens/cake_pay/cards/cake_pay_buy_card_page.dart b/lib/src/screens/cake_pay/cards/cake_pay_buy_card_page.dart index 21e35359b..bd1840974 100644 --- a/lib/src/screens/cake_pay/cards/cake_pay_buy_card_page.dart +++ b/lib/src/screens/cake_pay/cards/cake_pay_buy_card_page.dart @@ -248,14 +248,11 @@ class CakePayBuyCardPage extends BasePage { } bool isWordInCardsName(CakePayCard card, String word) { - // word must be followed by a space or beginning of the string - final regex = RegExp(r'(^|\s)' + word + r'(\s|$)', caseSensitive: false); - - return regex.hasMatch(card.name.toLowerCase()); + return card.name.toLowerCase().contains(word.toLowerCase()); } bool isIOSUnavailable(CakePayCard card) { - if (!Platform.isIOS) { + if (!Platform.isIOS && !Platform.isMacOS) { return false; } diff --git a/lib/src/screens/connect_device/connect_device_page.dart b/lib/src/screens/connect_device/connect_device_page.dart index c2cc40229..109c5eee2 100644 --- a/lib/src/screens/connect_device/connect_device_page.dart +++ b/lib/src/screens/connect_device/connect_device_page.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -127,7 +128,7 @@ class ConnectDevicePageBodyState extends State { _bleRefreshTimer = null; } } catch (e) { - print(e); + printV(e); } } diff --git a/lib/src/screens/connect_device/debug_device_page.dart b/lib/src/screens/connect_device/debug_device_page.dart index bed9d59a7..d5af9f2f6 100644 --- a/lib/src/screens/connect_device/debug_device_page.dart +++ b/lib/src/screens/connect_device/debug_device_page.dart @@ -223,10 +223,10 @@ // setState(() => status = "Sending..."); // final acc = await func(); // setState(() => status = "$method: $acc"); -// print("$method: $acc"); +// printV("$method: $acc"); // } on LedgerException catch (ex) { // setState(() => status = "${ex.errorCode.toRadixString(16)} ${ex.message}"); -// print("${ex.errorCode.toRadixString(16)} ${ex.message}"); +// printV("${ex.errorCode.toRadixString(16)} ${ex.message}"); // } // }, // color: Theme.of(context).primaryColor, diff --git a/lib/src/screens/contact/contact_list_page.dart b/lib/src/screens/contact/contact_list_page.dart index 166288135..50b4ae7c0 100644 --- a/lib/src/screens/contact/contact_list_page.dart +++ b/lib/src/screens/contact/contact_list_page.dart @@ -322,6 +322,7 @@ class _ContactListBodyState extends State { ? widget.contactListViewModel.contacts : widget.contactListViewModel.contactsToShow; return Scaffold( + backgroundColor: Theme.of(context).colorScheme.background, body: Container( child: FilteredList( list: contacts, diff --git a/lib/src/screens/dashboard/pages/cake_features_page.dart b/lib/src/screens/dashboard/pages/cake_features_page.dart index 775cb6c3f..bd96fd534 100644 --- a/lib/src/screens/dashboard/pages/cake_features_page.dart +++ b/lib/src/screens/dashboard/pages/cake_features_page.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; @@ -5,6 +7,7 @@ import 'package:cake_wallet/src/widgets/dashboard_card_widget.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/view_model/dashboard/cake_features_view_model.dart'; import 'package:flutter/material.dart'; @@ -40,7 +43,13 @@ class CakeFeaturesPage extends StatelessWidget { children: [ SizedBox(height: 20), DashBoardRoundedCardWidget( - onTap: () => _navigatorToGiftCardsPage(context), + onTap: () { + if (Platform.isMacOS) { + _launchUrl("buy.cakepay.com"); + } else { + _navigatorToGiftCardsPage(context); + } + }, title: 'Cake Pay', subTitle: S.of(context).cake_pay_subtitle, image: Image.asset( @@ -75,7 +84,7 @@ class CakeFeaturesPage extends StatelessWidget { icon: Icon( Icons.speaker_notes_rounded, color: - Theme.of(context).extension()!.pageTitleTextColor, + Theme.of(context).extension()!.pageTitleTextColor, size: 75, ), ); @@ -97,7 +106,7 @@ class CakeFeaturesPage extends StatelessWidget { mode: LaunchMode.externalApplication, ); } catch (e) { - print(e); + printV(e); } } diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 6b62435d0..0e37c8570 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -4,6 +4,7 @@ import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/totp_request_details.dart'; import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/view_model/link_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; @@ -91,7 +92,7 @@ class RootState extends State with WidgetsBindingObserver { handleDeepLinking(await getInitialUri()); } catch (e) { - print(e); + printV(e); } } diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 7003ceafb..4b1227751 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -28,6 +28,7 @@ import 'package:cake_wallet/utils/request_review_handler.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/send/output.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/unspent_coin_type.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/view_model/send/send_view_model.dart'; @@ -524,14 +525,14 @@ class SendPage extends BasePage { ? '. ${S.of(_dialogContext).waitFewSecondForTxUpdate}' : ''; - final newContactMessage = newContactAddress != null + final newContactMessage = newContactAddress != null && sendViewModel.showAddressBookPopup ? '\n${S.of(_dialogContext).add_contact_to_address_book}' : ''; String alertContent = "$successMessage$waitMessage$newContactMessage"; - if (newContactAddress != null) { + if (newContactMessage.isNotEmpty) { return AlertWithTwoActions( alertDialogKey: ValueKey('send_page_sent_dialog_key'), alertTitle: '', @@ -584,7 +585,7 @@ class SendPage extends BasePage { mode: LaunchMode.externalApplication, ); } catch (e) { - print(e); + printV(e); } } } diff --git a/lib/src/screens/settings/other_settings_page.dart b/lib/src/screens/settings/other_settings_page.dart index f6a6288f5..24f321798 100644 --- a/lib/src/screens/settings/other_settings_page.dart +++ b/lib/src/screens/settings/other_settings_page.dart @@ -6,6 +6,7 @@ import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/settings/widgets/setting_priority_picker_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart'; +import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_version_cell.dart'; import 'package:cake_wallet/view_model/settings/other_settings_view_model.dart'; import 'package:cw_core/wallet_type.dart'; @@ -62,6 +63,13 @@ class OtherSettingsPage extends BasePage { handler: (BuildContext context) => Navigator.of(context).pushNamed(Routes.readDisclaimer), ), + SettingsSwitcherCell( + title: S.of(context).show_address_book_popup, + value: _otherSettingsViewModel.showAddressBookPopup, + onValueChange: (_, bool value) { + _otherSettingsViewModel.setShowAddressBookPopup(value); + }, + ), Spacer(), SettingsVersionCell( title: S.of(context).version(_otherSettingsViewModel.currentVersion)), diff --git a/lib/src/screens/settings/tor_page.dart b/lib/src/screens/settings/tor_page.dart index 2f544be35..2eb8d6c11 100644 --- a/lib/src/screens/settings/tor_page.dart +++ b/lib/src/screens/settings/tor_page.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/store/app_store.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; // import 'package:tor/tor.dart'; @@ -57,7 +58,7 @@ class _TorPageBodyState extends State { // } // widget.appStore.wallet!.connectToNode(node: node); - print('Done awaiting; tor should be running'); + printV('Done awaiting; tor should be running'); } Future endTor() async { @@ -69,7 +70,7 @@ class _TorPageBodyState extends State { // torEnabled = Tor.instance.enabled; // Update flag // }); // - // print('Done awaiting; tor should be stopped'); + // printV('Done awaiting; tor should be stopped'); } // // @override diff --git a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart index 70660c59d..64e8f3aab 100644 --- a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart +++ b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart @@ -3,6 +3,7 @@ import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/totp_request_details.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/view_model/auth_state.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -53,7 +54,7 @@ class TotpAuthCodePageState extends State { } if (state is FailureState) { - print(state.error); + printV(state.error); widget.totpArguments.onTotpAuthenticationFinished!(false, this); } @@ -197,8 +198,9 @@ class TOTPEnterCode extends BasePage { }, ); if (isForSetup && result) { - Navigator.pushReplacementNamed( - context, Routes.modify2FAPage); + if (context.mounted) { + Navigator.pushReplacementNamed(context, Routes.modify2FAPage); + } } }, diff --git a/lib/src/screens/support_chat/support_chat_page.dart b/lib/src/screens/support_chat/support_chat_page.dart index 97d59a2d9..203b75775 100644 --- a/lib/src/screens/support_chat/support_chat_page.dart +++ b/lib/src/screens/support_chat/support_chat_page.dart @@ -3,6 +3,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/support_chat/widgets/chatwoot_widget.dart'; import 'package:cake_wallet/view_model/support_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; @@ -22,7 +23,7 @@ class SupportChatPage extends BasePage { Widget body(BuildContext context) => FutureBuilder( future: getCookie(), builder: (BuildContext context, AsyncSnapshot snapshot) { - print(snapshot.data); + printV(snapshot.data); if (snapshot.hasData) return ChatwootWidget( secureStorage, diff --git a/lib/src/screens/support_chat/widgets/chatwoot_widget.dart b/lib/src/screens/support_chat/widgets/chatwoot_widget.dart index b49993f7f..4f5e58c97 100644 --- a/lib/src/screens/support_chat/widgets/chatwoot_widget.dart +++ b/lib/src/screens/support_chat/widgets/chatwoot_widget.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'package:cake_wallet/core/secure_storage.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; @@ -38,7 +39,7 @@ class ChatwootWidgetState extends State { final eventType = parsedMessage["event"]; if (eventType == 'loaded') { final authToken = parsedMessage["config"]["authToken"]; - print(authToken); + printV(authToken); storeCookie(authToken as String); } } diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 1ecaf50cc..aa7df4ba9 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -36,6 +36,7 @@ import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/set_app_secure_native.dart'; import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/material.dart'; @@ -53,6 +54,7 @@ abstract class SettingsStoreBase with Store { required BackgroundTasks backgroundTasks, required SharedPreferences sharedPreferences, required bool initialShouldShowMarketPlaceInDashboard, + required bool initialShowAddressBookPopupEnabled, required FiatCurrency initialFiatCurrency, required BalanceDisplayMode initialBalanceDisplayMode, required bool initialSaveRecipientAddress, @@ -156,6 +158,7 @@ abstract class SettingsStoreBase with Store { walletListAscending = initialWalletListAscending, contactListAscending = initialContactListAscending, shouldShowMarketPlaceInDashboard = initialShouldShowMarketPlaceInDashboard, + showAddressBookPopupEnabled = initialShowAddressBookPopupEnabled, exchangeStatus = initialExchangeStatus, currentTheme = initialTheme, pinCodeLength = initialPinLength, @@ -353,6 +356,11 @@ abstract class SettingsStoreBase with Store { (bool value) => sharedPreferences.setBool(PreferencesKey.shouldShowMarketPlaceInDashboard, value)); + reaction( + (_) => showAddressBookPopupEnabled, + (bool value) => + sharedPreferences.setBool(PreferencesKey.showAddressBookPopupEnabled, value)); + reaction((_) => pinCodeLength, (int pinLength) => sharedPreferences.setInt(PreferencesKey.currentPinLength, pinLength)); @@ -605,6 +613,9 @@ abstract class SettingsStoreBase with Store { @observable bool shouldShowMarketPlaceInDashboard; + @observable + bool showAddressBookPopupEnabled; + @observable ObservableList actionlistDisplayMode; @@ -916,6 +927,8 @@ abstract class SettingsStoreBase with Store { final tokenTrialNumber = sharedPreferences.getInt(PreferencesKey.failedTotpTokenTrials) ?? 0; final shouldShowMarketPlaceInDashboard = sharedPreferences.getBool(PreferencesKey.shouldShowMarketPlaceInDashboard) ?? true; + final showAddressBookPopupEnabled = + sharedPreferences.getBool(PreferencesKey.showAddressBookPopupEnabled) ?? true; final exchangeStatus = ExchangeApiMode.deserialize( raw: sharedPreferences.getInt(PreferencesKey.exchangeStatusKey) ?? ExchangeApiMode.enabled.raw); @@ -1184,6 +1197,7 @@ abstract class SettingsStoreBase with Store { secureStorage: secureStorage, sharedPreferences: sharedPreferences, initialShouldShowMarketPlaceInDashboard: shouldShowMarketPlaceInDashboard, + initialShowAddressBookPopupEnabled: showAddressBookPopupEnabled, nodes: nodes, powNodes: powNodes, appVersion: packageInfo.version, @@ -1360,6 +1374,9 @@ abstract class SettingsStoreBase with Store { shouldShowMarketPlaceInDashboard = sharedPreferences.getBool(PreferencesKey.shouldShowMarketPlaceInDashboard) ?? shouldShowMarketPlaceInDashboard; + showAddressBookPopupEnabled = + sharedPreferences.getBool(PreferencesKey.showAddressBookPopupEnabled) ?? + showAddressBookPopupEnabled; exchangeStatus = ExchangeApiMode.deserialize( raw: sharedPreferences.getInt(PreferencesKey.exchangeStatusKey) ?? ExchangeApiMode.enabled.raw); @@ -1663,8 +1680,8 @@ abstract class SettingsStoreBase with Store { final windowsInfo = await deviceInfoPlugin.windowsInfo; deviceName = windowsInfo.productName; } catch (e) { - print(e); - print( + printV(e); + printV( 'likely digitalProductId is null wait till https://github.com/fluttercommunity/plus_plugins/pull/3188 is merged'); deviceName = "Windows Device"; } diff --git a/lib/store/yat/yat_store.dart b/lib/store/yat/yat_store.dart index 81c5de3b5..964b96db3 100644 --- a/lib/store/yat/yat_store.dart +++ b/lib/store/yat/yat_store.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cw_core/transaction_history.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/transaction_info.dart'; @@ -250,7 +251,7 @@ abstract class YatStoreBase with Store { walletInfo!.save(); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -265,7 +266,7 @@ abstract class YatStoreBase with Store { // apiKey = await fetchYatApiKey(accessToken); // await secureStorage.write(key: yatApiKey(_wallet.walletInfo.name), value: accessToken); //} catch (e) { - // print(e.toString()); + // printV(e.toString()); //} } diff --git a/lib/utils/distribution_info.dart b/lib/utils/distribution_info.dart index 5a2cb8e9d..2fbb6a175 100644 --- a/lib/utils/distribution_info.dart +++ b/lib/utils/distribution_info.dart @@ -1,5 +1,6 @@ import 'dart:io'; import 'package:cake_wallet/utils/package_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; enum DistributionType { googleplay, github, appstore, fdroid } @@ -32,7 +33,7 @@ class DistributionInfo { final packageInfo = await PackageInfo.fromPlatform(); return packageInfo.packageName == 'com.android.vending'; } catch (e) { - print('Error: $e'); + printV('Error: $e'); return false; } } diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 6f1ed35a0..d79dfe314 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -1,13 +1,15 @@ import 'dart:io'; -import 'package:cake_wallet/core/secure_storage.dart'; +import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/main.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; +import 'package:cake_wallet/store/app_store.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cw_core/root_dir.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -21,16 +23,29 @@ class ExceptionHandler { static const _coolDownDurationInDays = 7; static File? _file; - static Future _saveException(String? error, StackTrace? stackTrace, {String? library}) async { + static Future _saveException(String? error, StackTrace? stackTrace, + {String? library}) async { final appDocDir = await getAppDir(); if (_file == null) { _file = File('${appDocDir.path}/error.txt'); } + String? walletType; + CustomTrace? programInfo; + + try { + walletType = getIt.get().wallet?.type.name; + + programInfo = CustomTrace(stackTrace ?? StackTrace.current); + } catch (_) {} + final exception = { "${DateTime.now()}": { "Error": "$error\n\n", + "WalletType": "$walletType\n\n", + "VerboseLog": + "${programInfo?.fileName}#${programInfo?.lineNumber}:${programInfo?.columnNumber} ${programInfo?.callerFunctionName}\n\n", "Library": "$library\n\n", "StackTrace": stackTrace.toString(), } @@ -67,7 +82,7 @@ class ExceptionHandler { final bool canSend = await FlutterMailer.canSendMail(); if (Platform.isIOS && !canSend) { - debugPrint('Mail app is not available'); + printV('Mail app is not available'); return; } @@ -99,11 +114,12 @@ class ExceptionHandler { static Future onError(FlutterErrorDetails errorDetails) async { if (kDebugMode || kProfileMode) { FlutterError.presentError(errorDetails); - debugPrint(errorDetails.toString()); + printV(errorDetails.toString()); return; } - if (_ignoreError(errorDetails.exception.toString())) { + if (_ignoreError(errorDetails.exception.toString()) || + _ignoreError(errorDetails.stack.toString())) { return; } @@ -199,6 +215,13 @@ class ExceptionHandler { "input stream error", "invalid signature", "invalid password", + // Temporary ignored, More context: Flutter secure storage reads the values as null some times + // probably when the device was locked and then opened on Cake + // this is solved by a restart of the app + // just ignoring until we find a solution to this issue or migrate from flutter secure storage + "core/auth_service.dart:63", + "core/key_service.dart:14", + "core/wallet_loading_service.dart:132", ]; static Future _addDeviceInfo(File file) async { diff --git a/lib/view_model/anonpay_details_view_model.dart b/lib/view_model/anonpay_details_view_model.dart index fe4b9da3d..e83b939cd 100644 --- a/lib/view_model/anonpay_details_view_model.dart +++ b/lib/view_model/anonpay_details_view_model.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/date_formatter.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -47,7 +48,7 @@ abstract class AnonpayDetailsViewModelBase with Store { invoiceDetail.status = data.status; _updateItems(); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/view_model/backup_view_model.dart b/lib/view_model/backup_view_model.dart index bbd147e2b..53e2864d4 100644 --- a/lib/view_model/backup_view_model.dart +++ b/lib/view_model/backup_view_model.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cake_wallet/store/secret_store.dart'; import 'package:cw_core/root_dir.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/foundation.dart'; import 'package:mobx/mobx.dart'; import 'package:intl/intl.dart'; @@ -67,7 +68,7 @@ abstract class BackupViewModelBase with Store { return BackupExportFile(backupContent.toList(), name: fileName); } catch (e) { - print(e.toString()); + printV(e.toString()); state = FailureState(e.toString()); return null; } diff --git a/lib/view_model/buy/buy_item.dart b/lib/view_model/buy/buy_item.dart index 97bd661f2..b6e7523b9 100644 --- a/lib/view_model/buy/buy_item.dart +++ b/lib/view_model/buy/buy_item.dart @@ -2,6 +2,7 @@ import 'package:cake_wallet/buy/buy_amount.dart'; import 'package:cake_wallet/buy/buy_provider.dart'; import 'package:cake_wallet/entities/fiat_currency.dart'; import 'package:cake_wallet/view_model/buy/buy_amount_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; class BuyItem { BuyItem({required this.provider, required this.buyAmountViewModel}); @@ -21,7 +22,7 @@ class BuyItem { .calculateAmount(amount?.toString() ?? '', fiatCurrency.title); } catch (e) { _buyAmount = BuyAmount(sourceAmount: 0.0, destAmount: 0.0); - print(e.toString()); + printV(e.toString()); } return _buyAmount; diff --git a/lib/view_model/buy/buy_view_model.dart b/lib/view_model/buy/buy_view_model.dart index 7c2591cbb..181276ed5 100644 --- a/lib/view_model/buy/buy_view_model.dart +++ b/lib/view_model/buy/buy_view_model.dart @@ -3,6 +3,7 @@ import 'package:cake_wallet/buy/moonpay/moonpay_provider.dart'; import 'package:cake_wallet/buy/wyre/wyre_buy_provider.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cake_wallet/entities/fiat_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/view_model/buy/buy_item.dart'; @@ -63,7 +64,7 @@ abstract class BuyViewModelBase with Store { try { _url = await selectedProvider!.requestUrl(doubleAmount.toString(), fiatCurrency.title); } catch (e) { - print(e.toString()); + printV(e.toString()); } return _url; @@ -77,7 +78,7 @@ abstract class BuyViewModelBase with Store { await ordersSource.add(order); ordersStore.setOrder(order); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/view_model/dashboard/home_settings_view_model.dart b/lib/view_model/dashboard/home_settings_view_model.dart index 1aeacd28f..0c3a611eb 100644 --- a/lib/view_model/dashboard/home_settings_view_model.dart +++ b/lib/view_model/dashboard/home_settings_view_model.dart @@ -15,6 +15,7 @@ import 'package:cake_wallet/tron/tron.dart'; import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/erc20_token.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:mobx/mobx.dart'; import 'package:http/http.dart' as http; @@ -236,7 +237,7 @@ abstract class HomeSettingsViewModelBase with Store { return false; } catch (e) { - print('Error while checking scam via moralis: ${e.toString()}'); + printV('Error while checking scam via moralis: ${e.toString()}'); return true; } } @@ -277,7 +278,7 @@ abstract class HomeSettingsViewModelBase with Store { return false; } catch (e) { - print('Error while checking scam via explorers: ${e.toString()}'); + printV('Error while checking scam via explorers: ${e.toString()}'); return true; } } @@ -303,21 +304,21 @@ abstract class HomeSettingsViewModelBase with Store { final decodedResponse = jsonDecode(response.body) as Map; if (decodedResponse['status'] == '0') { - print('${response.body}\n'); - print('${decodedResponse['result']}\n'); + printV('${response.body}\n'); + printV('${decodedResponse['result']}\n'); return true; } if (decodedResponse['status'] == '1' && decodedResponse['result'][0]['ABI'] == 'Contract source code not verified') { - print('Call is valid but contract is not verified'); + printV('Call is valid but contract is not verified'); return true; // Contract is not verified } else { - print('Call is valid and contract is verified'); + printV('Call is valid and contract is verified'); return false; // Contract is verified } } catch (e) { - print('Error while checking contract verification: ${e.toString()}'); + printV('Error while checking contract verification: ${e.toString()}'); return true; } } diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 4cb7e4cad..ac0456440 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -16,6 +16,7 @@ import 'package:cake_wallet/src/screens/exchange_trade/exchange_trade_item.dart' import 'package:cake_wallet/store/dashboard/trades_store.dart'; import 'package:cake_wallet/view_model/send/send_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -139,7 +140,7 @@ abstract class ExchangeTradeViewModelBase with Store { _updateItems(); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index d29b7df6b..ee8a88b6b 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/exchange/provider/stealth_ex_exchange_provider.dart' import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:hive/hive.dart'; import 'package:http/http.dart' as http; @@ -944,7 +945,7 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with return isContractAddress; } catch (e) { - print(e); + printV(e); return false; } } diff --git a/lib/view_model/hardware_wallet/ledger_view_model.dart b/lib/view_model/hardware_wallet/ledger_view_model.dart index 3cd131efa..9a4bb6a45 100644 --- a/lib/view_model/hardware_wallet/ledger_view_model.dart +++ b/lib/view_model/hardware_wallet/ledger_view_model.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/polygon/polygon.dart'; import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; import 'package:cw_core/hardware/device_connection_type.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; @@ -95,7 +96,7 @@ abstract class LedgerViewModelBase with Store { if (_connectionChangeListener == null) { _connectionChangeListener = ledger.deviceStateChanges.listen((event) { - print('Ledger Device State Changed: $event'); + printV('Ledger Device State Changed: $event'); if (event == sdk.BleConnectionState.disconnected) { _connection = null; if (type == WalletType.monero) { diff --git a/lib/view_model/order_details_view_model.dart b/lib/view_model/order_details_view_model.dart index 1eab2f861..a7cd98a21 100644 --- a/lib/view_model/order_details_view_model.dart +++ b/lib/view_model/order_details_view_model.dart @@ -3,6 +3,7 @@ import 'package:cake_wallet/buy/buy_provider.dart'; import 'package:cake_wallet/buy/buy_provider_description.dart'; import 'package:cake_wallet/buy/order.dart'; import 'package:cake_wallet/utils/date_formatter.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; @@ -65,7 +66,7 @@ abstract class OrderDetailsViewModelBase with Store { _updateItems(); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/view_model/send/output.dart b/lib/view_model/send/output.dart index e53127e0c..f977ef003 100644 --- a/lib/view_model/send/output.dart +++ b/lib/view_model/send/output.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/src/screens/send/widgets/extract_address_from_parsed import 'package:cake_wallet/tron/tron.dart'; import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:mobx/mobx.dart'; @@ -180,7 +181,7 @@ abstract class OutputBase with Store { return polygon!.formatterPolygonAmountToDouble(amount: BigInt.from(fee)); } } catch (e) { - print(e.toString()); + printV(e.toString()); } return 0; diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 69a500c9b..61474d6c9 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -27,6 +27,7 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coin_type.dart'; import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cake_wallet/view_model/send/send_template_view_model.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -108,6 +109,8 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor final UnspentCoinType coinTypeToSpendFrom; + bool get showAddressBookPopup => _settingsStore.showAddressBookPopupEnabled; + @action void addOutput() { outputs @@ -534,16 +537,6 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor throw Exception('Priority is null for wallet type: ${wallet.type}'); } - if (hasCoinControl) { - bool isCoinSelected = false; - for (var coin in unspentCoinsListViewModel.items) { - isCoinSelected = isCoinSelected || (coin.isSending && !coin.isFrozen); - } - if (!isCoinSelected) { - throw Exception("No coin selected in coin control, you need to select a coin in order to spend"); - } - } - switch (wallet.type) { case WalletType.bitcoin: case WalletType.litecoin: @@ -682,7 +675,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor lamportsNeeded != null ? ((lamportsNeeded + 5000) / lamportsPerSol) : 0.0; return S.current.insufficient_lamports(solValueNeeded.toString()); } else { - print("No match found."); + printV("No match found."); return S.current.insufficient_lamport_for_tx; } } diff --git a/lib/view_model/settings/other_settings_view_model.dart b/lib/view_model/settings/other_settings_view_model.dart index 3036e8ae9..c7a5d0b90 100644 --- a/lib/view_model/settings/other_settings_view_model.dart +++ b/lib/view_model/settings/other_settings_view_model.dart @@ -60,6 +60,10 @@ abstract class OtherSettingsViewModelBase with Store { bool get changeRepresentativeEnabled => _wallet.type == WalletType.nano || _wallet.type == WalletType.banano; + @computed + bool get showAddressBookPopup => _settingsStore.showAddressBookPopupEnabled; + + @computed bool get displayTransactionPriority => !(changeRepresentativeEnabled || _wallet.type == WalletType.solana || @@ -114,6 +118,9 @@ abstract class OtherSettingsViewModelBase with Store { return customItem != null ? priorities.indexOf(customItem) : null; } + @action + void setShowAddressBookPopup(bool value) => _settingsStore.showAddressBookPopupEnabled = value; + int? get maxCustomFeeRate { if (_wallet.type == WalletType.bitcoin) { return bitcoin!.getMaxCustomFeeRate(_wallet); diff --git a/lib/view_model/trade_details_view_model.dart b/lib/view_model/trade_details_view_model.dart index 19315f40d..59813090d 100644 --- a/lib/view_model/trade_details_view_model.dart +++ b/lib/view_model/trade_details_view_model.dart @@ -22,6 +22,7 @@ import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/date_formatter.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:collection/collection.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; import 'package:hive/hive.dart'; @@ -134,7 +135,7 @@ abstract class TradeDetailsViewModelBase with Store { _updateItems(); } catch (e) { - print(e.toString()); + printV(e.toString()); } } diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index e675acf17..9ec542361 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/tron/tron.dart'; import 'package:cake_wallet/wownero/wownero.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/wallet_type.dart'; @@ -279,7 +280,7 @@ abstract class TransactionDetailsViewModelBase with Store { )); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } @@ -769,7 +770,7 @@ abstract class TransactionDetailsViewModelBase with Store { ); } } catch (e) { - print(e.toString()); + printV(e.toString()); } } 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 6c15511b5..52820adcb 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 @@ -6,6 +6,7 @@ import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/unspent_coin_type.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/unspent_transaction_output.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/cupertino.dart'; @@ -82,7 +83,7 @@ abstract class UnspentCoinsListViewModelBase with Store { await existingInfo.save(); _updateUnspentCoinsInfo(); } catch (e) { - print('Error saving coin info: $e'); + printV('Error saving coin info: $e'); } } @@ -151,7 +152,7 @@ abstract class UnspentCoinsListViewModelBase with Store { isSilentPayment: existingItem.isSilentPayment ?? false, ); } catch (e, s) { - print('Error: $e\nStack: $s'); + printV('Error: $e\nStack: $s'); ExceptionHandler.onError( FlutterErrorDetails(exception: e, stack: s), ); diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index 17a8d6d28..68548b64a 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -12,6 +12,7 @@ import 'package:cake_wallet/view_model/restore/restore_mode.dart'; import 'package:cake_wallet/view_model/restore/restore_wallet.dart'; import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cw_core/pathForWallet.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; @@ -116,8 +117,8 @@ abstract class WalletCreationVMBase with Store { _appStore.authenticationStore.allowed(); state = ExecutedSuccessfullyState(); } catch (e, s) { - print("error: $e"); - print("stack: $s"); + printV("error: $e"); + printV("stack: $s"); state = FailureState(e.toString()); } } diff --git a/lib/view_model/wallet_hardware_restore_view_model.dart b/lib/view_model/wallet_hardware_restore_view_model.dart index 0971622a5..541e169d0 100644 --- a/lib/view_model/wallet_hardware_restore_view_model.dart +++ b/lib/view_model/wallet_hardware_restore_view_model.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cake_wallet/view_model/wallet_creation_vm.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; @@ -82,7 +83,7 @@ abstract class WalletHardwareRestoreViewModelBase extends WalletCreationVM with // } on LedgerException catch (e) { // error = ledgerViewModel.interpretErrorCode(e.errorCode.toRadixString(16)); } catch (e) { - print(e); + printV(e); error = S.current.ledger_connection_error; } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 4b9eb3b2d..f52be7481 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -10,6 +10,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + sp_scanner ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 52b44e53e..42b9fa84c 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,6 +6,7 @@ import FlutterMacOS import Foundation import connectivity_plus +import cw_mweb import device_info_plus import devicelocale import fast_scanner @@ -23,6 +24,7 @@ import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) + CwMwebPlugin.register(with: registry.registrar(forPlugin: "CwMwebPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin")) MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin")) diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 001d75696..4445e5976 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -12,21 +12,21 @@ PODS: - FlutterMacOS - flutter_inappwebview_macos (0.0.1): - FlutterMacOS - - OrderedSet (~> 5.0) + - OrderedSet (~> 6.0.3) - flutter_local_authentication (1.2.0): - FlutterMacOS - flutter_secure_storage_macos (6.1.1): - FlutterMacOS - FlutterMacOS (1.0.0) - - in_app_review (0.2.0): + - in_app_review (2.0.0): - FlutterMacOS - - OrderedSet (5.0.0) + - OrderedSet (6.0.3) - package_info_plus (0.0.1): - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - ReachabilitySwift (5.0.0) + - ReachabilitySwift (5.2.4) - share_plus (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): @@ -34,6 +34,9 @@ PODS: - FlutterMacOS - sp_scanner (0.0.1): - FlutterMacOS + - universal_ble (0.0.1): + - Flutter + - FlutterMacOS - url_launcher_macos (0.0.1): - FlutterMacOS - wakelock_plus (0.0.1): @@ -55,6 +58,7 @@ DEPENDENCIES: - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - sp_scanner (from `Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos`) + - universal_ble (from `Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) @@ -94,6 +98,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin sp_scanner: :path: Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos + universal_ble: + :path: Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos wakelock_plus: @@ -105,18 +111,19 @@ SPEC CHECKSUMS: device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 fast_scanner: d31bae07e2653403a69dac99fb710c1722b16a97 - flutter_inappwebview_macos: 9600c9df9fdb346aaa8933812009f8d94304203d + flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b flutter_local_authentication: 85674893931e1c9cfa7c9e4f5973cb8c56b018b0 flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 - OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c - package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c + in_app_review: a6a031b9acd03c7d103e341aa334adf2c493fb93 + OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 + package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf + ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda + share_plus: 1fa619de8392a4398bfaf176d441853922614e89 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303 + universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6 url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269 diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index cd7f006e6..42212fdc0 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -2,7 +2,7 @@ import Cocoa import FlutterMacOS import IOKit.pwr_mgt -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 9c0774155..cfcbca163 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -259,7 +259,7 @@ "enterTokenID": "ﺰﻴﻤﻤﻟﺍ ﺰﻣﺮﻟﺍ ﻑﺮﻌﻣ ﻞﺧﺩﺃ", "enterWalletConnectURI": "WalletConnect ـﻟ URI ﻞﺧﺩﺃ", "error": "خطأ", - "error_dialog_content": "عفوًا ، لقد حصلنا على بعض الخطأ.\n\nيرجى إرسال تقرير التعطل إلى فريق الدعم لدينا لتحسين التطبيق.", + "error_dialog_content": "عفوًا ، حصلنا على بعض الخطأ.\n\nيرجى إرسال تقرير الخطأ إلى فريق الدعم الخاص بنا لجعل التطبيق أفضل.", "error_text_account_name": "يجب أن يحتوي اسم الحساب على أحرف وأرقام فقط\nويجب أن يتراوح بين حرف واحد و 15 حرفًا", "error_text_address": "يجب أن يتوافق عنوان المحفظة مع نوع\nالعملة المشفرة", "error_text_amount": "يجب أن يحتوي المبلغ على أرقام فقط", @@ -710,6 +710,7 @@ "share_address": "شارك العنوان", "shared_seed_wallet_groups": "مجموعات محفظة البذور المشتركة", "show": "يعرض", + "show_address_book_popup": "عرض \"إضافة إلى كتاب العناوين\" المنبثقة بعد الإرسال", "show_details": "اظهر التفاصيل", "show_keys": "اظهار السييد / المفاتيح", "show_market_place": "إظهار السوق", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index dc57086c4..b9197a8ea 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -259,7 +259,7 @@ "enterTokenID": "Въведете идентификатора на токена", "enterWalletConnectURI": "Въведете URI на WalletConnect", "error": "Грешка", - "error_dialog_content": "Получихме грешка.\n\nМоля, изпратете доклада до нашия отдел поддръжка, за да подобрим приложението.", + "error_dialog_content": "Ами сега, получихме някаква грешка.\n\nМоля, изпратете отчета за грешки до нашия екип за поддръжка, за да подобрите приложението.", "error_text_account_name": "Името на профила може да съдържа само букви и числа \nи трябва да е между 1 и 15 символа", "error_text_address": "Адресът на портфейла трябва да отговаря \n на вида криптовалута", "error_text_amount": "Сумата може да съдържа само числа", @@ -710,6 +710,7 @@ "share_address": "Сподели адрес", "shared_seed_wallet_groups": "Споделени групи за портфейли за семена", "show": "Показване", + "show_address_book_popup": "Показване на изскачането на „Добавяне към адресната книга“ след изпращане", "show_details": "Показване на подробностите", "show_keys": "Покажи seed/keys", "show_market_place": "Покажи пазар", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 8702f8fe1..a3c3c03d6 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -259,7 +259,7 @@ "enterTokenID": "Zadejte ID tokenu", "enterWalletConnectURI": "Zadejte identifikátor URI WalletConnect", "error": "Chyba", - "error_dialog_content": "Nastala chyba.\n\nProsím odešlete zprávu o chybě naší podpoře, aby mohli zajistit opravu.", + "error_dialog_content": "Jejda, dostali jsme nějakou chybu.\n\nZašlete prosím chybovou zprávu našemu týmu podpory, abyste aplikaci vylepšili.", "error_text_account_name": "Název účtu může obsahovat jen písmena a čísla\na musí mít délku 1 až 15 znaků", "error_text_address": "Adresa peněženky musí odpovídat typu\nkryptoměny", "error_text_amount": "Částka může obsahovat pouze čísla", @@ -710,6 +710,7 @@ "share_address": "Sdílet adresu", "shared_seed_wallet_groups": "Skupiny sdílených semen", "show": "Show", + "show_address_book_popup": "Po odeslání zobrazíte vyskakovací okno „Přidat do adresáře“", "show_details": "Zobrazit detaily", "show_keys": "Zobrazit seed/klíče", "show_market_place": "Zobrazit trh", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index c2dde5521..39b239f97 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -259,7 +259,7 @@ "enterTokenID": "Geben Sie die Token-ID ein", "enterWalletConnectURI": "Geben Sie den WalletConnect-URI ein", "error": "Fehler", - "error_dialog_content": "Hoppla, wir haben einen Fehler.\n\nBitte senden Sie den Absturzbericht an unser Support-Team, um die Anwendung zu verbessern.", + "error_dialog_content": "Hoppla, wir haben einen Fehler.\n\nBitte senden Sie den Fehlerbericht an unser Support -Team, um die Anwendung zu verbessern.", "error_text_account_name": "Der Kontoname darf nur Buchstaben und Zahlen enthalten\nund muss zwischen 1 und 15 Zeichen lang sein", "error_text_address": "Die Walletadresse muss dem Typ der Kryptowährung\nentsprechen", "error_text_amount": "Betrag darf nur Zahlen enthalten", @@ -498,8 +498,8 @@ "placeholder_transactions": "Ihre Transaktionen werden hier angezeigt", "please_fill_totp": "Bitte geben Sie den 8-stelligen Code ein, der auf Ihrem anderen Gerät vorhanden ist", "please_make_selection": "Bitte treffen Sie unten eine Auswahl zum Erstellen oder Wiederherstellen Ihrer Wallet.", - "please_reference_document": "Bitte verweisen Sie auf die folgenden Dokumente, um weitere Informationen zu erhalten.", "Please_reference_document": "Weitere Informationen finden Sie in den Dokumenten unten.", + "please_reference_document": "Bitte verweisen Sie auf die folgenden Dokumente, um weitere Informationen zu erhalten.", "please_select": "Bitte auswählen:", "please_select_backup_file": "Bitte wählen Sie die Sicherungsdatei und geben Sie das Sicherungskennwort ein.", "please_try_to_connect_to_another_node": "Bitte versuchen Sie, sich mit einem anderen Knoten zu verbinden", @@ -711,6 +711,7 @@ "share_address": "Adresse teilen ", "shared_seed_wallet_groups": "Gemeinsame Walletsseed Gruppen", "show": "Zeigen", + "show_address_book_popup": "Popup \"zum Adressbuch hinzufügen\" nach dem Senden anzeigen", "show_details": "Details anzeigen", "show_keys": "Seed/Schlüssel anzeigen", "show_market_place": "Marktplatz anzeigen", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index a971b797e..496ac1afc 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -259,7 +259,7 @@ "enterTokenID": "Enter the token ID", "enterWalletConnectURI": "Enter WalletConnect URI", "error": "Error", - "error_dialog_content": "Oops, we got some error.\n\nPlease send the crash report to our support team to make the application better.", + "error_dialog_content": "Oops, we got some error.\n\nPlease send the error report to our support team to make the application better.", "error_text_account_name": "Account name can only contain letters, numbers\nand must be between 1 and 15 characters long", "error_text_address": "Wallet address must correspond to the type\nof cryptocurrency", "error_text_amount": "Amount can only contain numbers", @@ -710,6 +710,7 @@ "share_address": "Share address", "shared_seed_wallet_groups": "Shared Seed Wallet Groups", "show": "Show", + "show_address_book_popup": "Show 'Add to Address Book' popup after sending", "show_details": "Show Details", "show_keys": "Show seed/keys", "show_market_place": "Show Marketplace", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 990e3c154..f44909fe4 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -259,7 +259,7 @@ "enterTokenID": "Ingresa el ID del token", "enterWalletConnectURI": "Ingresa el URI de WalletConnect", "error": "Error", - "error_dialog_content": "Vaya, tenemos un error.\n\nEnvía el informe de error a nuestro equipo de soporte para mejorar la aplicación.", + "error_dialog_content": "Vaya, recibimos algo de error.\n\nEnvíe el informe de error a nuestro equipo de soporte para mejorar la aplicación.", "error_text_account_name": "El nombre de la cuenta solo puede contener letras, números \ny debe tener entre 1 y 15 caracteres de longitud", "error_text_address": "La dirección de la billetera debe corresponder al tipo \nde criptomoneda", "error_text_amount": "La cantidad solo puede contener números", @@ -711,6 +711,7 @@ "share_address": "Compartir dirección", "shared_seed_wallet_groups": "Grupos de billetera de semillas compartidas", "show": "Espectáculo", + "show_address_book_popup": "Mostrar ventana emergente 'Agregar a la libreta de direcciones' después de enviar", "show_details": "Mostrar detalles", "show_keys": "Mostrar semilla/claves", "show_market_place": "Mostrar mercado", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 6b0e58846..fd22e40fc 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -39,8 +39,8 @@ "alert_notice": "Avis", "all": "TOUT", "all_coins": "Toutes les pièces", - "all_trades": "Tous échanges", - "all_transactions": "Toutes transactions", + "all_trades": "Tous les échanges", + "all_transactions": "Toutes les transactions", "alphabetical": "Alphabétique", "already_have_account": "Vous avez déjà un compte ?", "always": "toujours", @@ -55,7 +55,7 @@ "arrive_in_this_address": "${currency} ${tag}arrivera à cette adresse", "ascending": "Ascendant", "ask_each_time": "Demander à chaque fois", - "auth_store_ban_timeout": "délai de bannisement", + "auth_store_ban_timeout": "expulsion_temporaire", "auth_store_banned_for": "Banni pour ", "auth_store_banned_minutes": " minutes", "auth_store_incorrect_password": "Mauvais code PIN", @@ -85,7 +85,7 @@ "Blocks_remaining": "Blocs Restants : ${status}", "bluetooth": "Bluetooth", "bright_theme": "Vif", - "bump_fee": "Frais de bosse", + "bump_fee": "Augmenter les frais", "buy": "Acheter", "buy_alert_content": "Actuellement, nous ne prenons en charge que l'achat de Bitcoin, Ethereum, Litecoin et Monero. Veuillez créer ou basculer vers votre portefeuille Bitcoin, Ethereum, Litecoin ou Monero.", "buy_bitcoin": "Acheter du Bitcoin", @@ -94,7 +94,7 @@ "buy_with": "Acheter avec", "by_cake_pay": "par Cake Pay", "cake_2fa_preset": "Cake 2FA prédéfini", - "cake_dark_theme": "Thème sombre du gâteau", + "cake_dark_theme": "Thème sombre Cake", "cake_pay_account_note": "Inscrivez-vous avec juste une adresse e-mail pour voir et acheter des cartes. Certaines sont même disponibles à prix réduit !", "cake_pay_learn_more": "Achetez et utilisez instantanément des cartes-cadeaux dans l'application !\nBalayer de gauche à droite pour en savoir plus.", "cake_pay_save_order": "La carte doit être envoyée à votre e-mail dans un jour ouvrable \n Enregistrez votre identifiant de commande:", @@ -107,7 +107,7 @@ "camera_consent": "Votre appareil photo sera utilisé pour capturer une image à des fins d'identification par ${provider}. Veuillez consulter leur politique de confidentialité pour plus de détails.", "camera_permission_is_required": "L'autorisation de la caméra est requise.\nVeuillez l'activer à partir des paramètres de l'application.", "cancel": "Annuler", - "card_address": "Adresse :", + "card_address": "Adresse:", "cardholder_agreement": "Contrat de titulaire de carte", "cards": "Cartes", "chains": "Chaînes", @@ -128,13 +128,13 @@ "choose_a_payment_method": "Choisissez un mode de paiement", "choose_a_provider": "Choisissez un fournisseur", "choose_account": "Choisir le compte", - "choose_address": "\n\nMerci de choisir l'adresse :", + "choose_address": "\n\nMerci de choisir l'adresse:", "choose_card_value": "Choisissez une valeur de carte", - "choose_derivation": "Choisissez le chemin de dérivation du portefeuille", - "choose_from_available_options": "Choisissez parmi les options disponibles :", + "choose_derivation": "Choisir la dérivation du portefeuille", + "choose_from_available_options": "Choisissez parmi les options disponibles:", "choose_one": "Choisissez-en un", "choose_relay": "Veuillez choisir un relais à utiliser", - "choose_wallet_currency": "Merci de choisir la devise du portefeuille (wallet) :", + "choose_wallet_currency": "Merci de choisir la devise du portefeuille (wallet):", "choose_wallet_group": "Choisissez un groupe de portefeuille", "clear": "Effacer", "clearnet_link": "Lien Clearnet", @@ -145,12 +145,12 @@ "commit_transaction_amount_fee": "Valider la transaction\nMontant : ${amount}\nFrais : ${fee}", "confirm": "Confirmer", "confirm_delete_template": "Cette action va supprimer ce modèle. Souhaitez-vous continuer ?", - "confirm_delete_wallet": "Cette action va supprimer ce portefeuille (wallet). Souhaitez-vous contnuer ?", + "confirm_delete_wallet": "Cette action va supprimer ce portefeuille (wallet). Souhaitez-vous continuer ?", "confirm_fee_deduction": "Confirmer la déduction des frais", "confirm_fee_deduction_content": "Acceptez-vous de déduire les frais de la production?", "confirm_passphrase": "Confirmer la phrase passante", "confirm_sending": "Confirmer l'envoi", - "confirm_silent_payments_switch_node": "Votre nœud actuel ne prend pas en charge les paiements silencieux \\ ncake qui passera à un nœud compatible, juste pour la numérisation", + "confirm_silent_payments_switch_node": "Votre nœud actuel ne prend pas en charge les paiements silencieux.\n\nCake Wallet passera à un nœud compatible pendant l'analyse.", "confirmations": "Confirmations", "confirmed": "Solde confirmé", "confirmed_tx": "Confirmé", @@ -178,7 +178,7 @@ "copy_id": "Copier l'ID", "copyWalletConnectLink": "Copiez le lien WalletConnect depuis l'application décentralisée (dApp) et collez-le ici", "corrupted_seed_notice": "Les fichiers de ce portefeuille sont corrompus et ne peuvent pas être ouverts. Veuillez consulter la phrase de graines, sauver et restaurer le portefeuille.\n\nSi la valeur est vide, la graine n'a pas pu être correctement récupérée.", - "countries": "Des pays", + "countries": "Pays", "create_account": "Créer un compte", "create_backup": "Créer une sauvegarde", "create_donation_link": "Créer un lien de don", @@ -189,8 +189,8 @@ "creating_new_wallet": "Création d'un nouveau portefeuille (wallet)", "creating_new_wallet_error": "Erreur : ${description}", "creation_date": "Date de création", - "custom": "personnalisé", - "custom_drag": "Custom (maintenir et traîner)", + "custom": "Personnalisé", + "custom_drag": "Personnalisé (Maintenir et Glisser)", "custom_redeem_amount": "Montant d'échange personnalisé", "custom_value": "Valeur personnalisée", "dark_theme": "Sombre", @@ -245,7 +245,7 @@ "enable": "Activer", "enable_mempool_api": "API Mempool pour les frais et dates précis", "enable_replace_by_fee": "Activer Remplace-by-Fee", - "enable_silent_payments_scanning": "Commencez à scanner les paiements silencieux, jusqu'à ce que la pointe soit atteinte", + "enable_silent_payments_scanning": "Commencez à analyser les transactions envoyées à votre adresse de paiement silencieux.", "enabled": "Activé", "enter_amount": "Entrez le montant", "enter_backup_password": "Entrez le mot de passe de sauvegarde ici", @@ -259,7 +259,7 @@ "enterTokenID": "Entrez l'ID du jeton", "enterWalletConnectURI": "Saisissez l'URI de WalletConnect.", "error": "Erreur", - "error_dialog_content": "Oups, nous avons rencontré une erreur.\n\nMerci d'envoyer le rapport d'erreur à notre équipe d'assistance afin de nous permettre d'améliorer l'application.", + "error_dialog_content": "Oups, nous avons eu une erreur.\n\nVeuillez envoyer le rapport d'erreur à notre équipe d'assistance pour améliorer l'application.", "error_text_account_name": "Le nom de compte ne peut contenir que des lettres et des chiffres\net sa longueur doit être comprise entre 1 et 15 caractères", "error_text_address": "L'adresse du portefeuille (wallet) doit correspondre au type de\ncryptomonnaie", "error_text_amount": "Le montant ne peut comporter que des nombres", @@ -289,7 +289,7 @@ "event": "Événement", "events": "Événements", "exchange": "Échanger", - "exchange_incorrect_current_wallet_for_xmr": "Si vous souhaitez échanger XMR à partir de votre balance monero portefeuille de gâteau, veuillez d'abord passer à votre portefeuille Monero.", + "exchange_incorrect_current_wallet_for_xmr": "Si vous souhaitez échanger des XMR depuis le solde Monero de votre Cake Wallet, veuillez d'abord passer à votre portefeuille Monero.", "exchange_new_template": "Nouveau modèle d'échange", "exchange_provider_unsupported": "${providerName} n'est plus pris en charge !", "exchange_result_confirm": "En pressant confirmer, vous enverrez ${fetchingLabel} ${from} depuis votre portefeuille (wallet) nommé ${walletName} vers l'adresse ci-dessous. Vous pouvez aussi envoyer depuis votre portefeuille externe vers l'adresse/QR code ci-dessous.\n\nMerci d'appuyer sur confirmer pour continuer ou retournez en arrière pour modifier les montants.", @@ -370,11 +370,11 @@ "is_percentage": "est", "last_30_days": "30 derniers jours", "learn_more": "En savoir plus", - "ledger_connection_error": "Impossible de se connecter à votre grand livre. Veuillez réessayer.", - "ledger_error_device_locked": "Le grand livre est verrouillé", + "ledger_connection_error": "Impossible de se connecter à votre Ledger. Veuillez réessayer.", + "ledger_error_device_locked": "La Ledger est verrouillé", "ledger_error_tx_rejected_by_user": "Transaction rejetée sur l'appareil", - "ledger_error_wrong_app": "Veuillez vous assurer d'ouvrir la bonne application sur votre grand livre", - "ledger_please_enable_bluetooth": "Veuillez activer Bluetooth pour détecter votre grand livre", + "ledger_error_wrong_app": "Veuillez vous assurer d'ouvrir la bonne application sur votre Ledger", + "ledger_please_enable_bluetooth": "Veuillez activer le Bluetooth pour détecter votre Ledger", "light_theme": "Clair", "litecoin_enable_mweb_sync": "Activer la numérisation MWEB", "litecoin_mweb": "Mweb", @@ -386,8 +386,8 @@ "litecoin_mweb_enable_later": "Vous pouvez choisir d'activer à nouveau MWEB sous Paramètres d'affichage.", "litecoin_mweb_logs": "Journaux MWEB", "litecoin_mweb_node": "Node MWEB", - "litecoin_mweb_pegin": "Entraver", - "litecoin_mweb_pegout": "Crever", + "litecoin_mweb_pegin": "Dépôt Peg", + "litecoin_mweb_pegout": "Retrait Peg", "litecoin_mweb_scanning": "Scann mweb", "litecoin_mweb_settings": "Paramètres MWEB", "litecoin_mweb_warning": "L'utilisation de MWEB téléchargera initialement ~ 600 Mo de données et peut prendre jusqu'à 30 minutes en fonction de la vitesse du réseau. Ces données initiales ne téléchargeront qu'une seule fois et seront disponibles pour tous les portefeuilles litecoin", @@ -395,9 +395,9 @@ "live_fee_rates": "Taux de frais en direct via l'API", "load_more": "Charger plus", "loading_your_wallet": "Chargement de votre portefeuille (wallet)", - "login": "Utilisateur", + "login": "Connexion", "logout": "Déconnexion", - "low_fee": "Frais modiques", + "low_fee": "Frais faibles", "low_fee_alert": "Vous utilisez actuellement une priorité de frais de réseau peu élevés. Cela pourrait entraîner de longues attentes, des taux différents ou des transactions annulées. Nous vous recommandons de fixer des frais plus élevés pour une meilleure expérience.", "manage_nodes": "Gérer les nœuds", "manage_pow_nodes": "Gérer les nœuds PoW", @@ -428,9 +428,9 @@ "nano_current_rep": "Représentant actuel", "nano_gpt_thanks_message": "Merci d'avoir utilisé Nanogpt! N'oubliez pas de retourner au navigateur une fois votre transaction terminée!", "nano_pick_new_rep": "Choisissez un nouveau représentant", - "nanogpt_subtitle": "Tous les modèles les plus récents (GPT-4, Claude). \\ NNO abonnement, payez avec crypto.", - "narrow": "Étroit", - "new_first_wallet_text": "Garder votre crypto en sécurité est un morceau de gâteau", + "nanogpt_subtitle": "Tous les modèles les plus récents (GPT-4, Claude).\nPas d'abonnement, payez avec vos crypto-monnaies.", + "narrow": "Rédruit", + "new_first_wallet_text": "Garder vos crypto-monnaies en sécurité est un jeu d'enfant.", "new_node_testing": "Test du nouveau nœud", "new_subaddress_create": "Créer", "new_subaddress_label_name": "Nom", @@ -459,7 +459,7 @@ "note_optional": "Note (optionnelle)", "note_tap_to_change": "Note (appuyez pour changer)", "nullURIError": "L'URI est nul", - "offer_expires_in": "L'Offre expire dans : ", + "offer_expires_in": "L'Offre expire dans: ", "offline": "Hors ligne", "ok": "OK", "old_fee": "Anciens", @@ -517,7 +517,7 @@ "private_key": "Clef privée", "proceed_after_one_minute": "Si l'écran ne s'affiche pas après 1 minute, vérifiez vos e-mails.", "proceed_on_device": "Continuez sur votre appareil", - "proceed_on_device_description": "Veuillez suivre les instructions invitées sur votre portefeuille matériel", + "proceed_on_device_description": "Veuillez suivre les instructions affichées sur votre portefeuille physique.", "profile": "Profil", "provider_error": "Erreur de ${provider}", "public_key": "Clef publique", @@ -535,8 +535,8 @@ "reconnect": "Reconnecter", "reconnect_alert_text": "Êtes vous certain de vouloir vous reconnecter ?", "reconnection": "Reconnexion", - "red_dark_theme": "Thème rouge noir", - "red_light_theme": "Thème de la lumière rouge", + "red_dark_theme": "Thème rouge sombre", + "red_light_theme": "Thème rouge clair", "redeemed": "Converties", "refund_address": "Adresse de Remboursement", "reject": "Rejeter", @@ -567,9 +567,9 @@ "restore_address": "Adresse", "restore_bitcoin_description_from_keys": "Restaurer votre portefeuille (wallet) d'après la chaîne WIF générée d'après vos clefs privées", "restore_bitcoin_description_from_seed": "Restaurer votre portefeuille (wallet) à l'aide d'une phrase secrète (seed) de 24 mots", - "restore_bitcoin_title_from_keys": "Restaurer depuis la chaîne WIF", + "restore_bitcoin_title_from_keys": "Restaurer à partir de WIF", "restore_description_from_backup": "Vous pouvez restaurer l'intégralité de l'application Cake Wallet depuis un fichier de sauvegarde", - "restore_description_from_hardware_wallet": "Restaurer à partir d'un portefeuille matériel de grand livre", + "restore_description_from_hardware_wallet": "Restaurer depuis un portefeuille matériel Ledger", "restore_description_from_keys": "Restaurer votre portefeuille (wallet) d'après les séquences de touches générées d'après vos clefs privées", "restore_description_from_seed": "Restaurer votre portefeuille (wallet) depuis une phrase secrète (seed) de 25 ou 13 mots", "restore_description_from_seed_keys": "Restaurez votre portefeuille (wallet) depuis une phrase secrète (seed) ou des clefs que vous avez stockées en lieu sûr", @@ -636,10 +636,10 @@ "seed_reminder": "Merci d'écrire votre phrase secrète (seed) au cas où vous perdriez ou effaceriez votre téléphone", "seed_share": "Partager la phrase secrète (seed)", "seed_title": "Phrase secrète (seed)", - "seedtype": "Type de type graine", - "seedtype_alert_content": "Le partage de graines avec d'autres portefeuilles n'est possible qu'avec Bip39 SeedType.", - "seedtype_alert_title": "Alerte de type SeedType", - "seedtype_legacy": "Héritage (25 mots)", + "seedtype": "Type de graine", + "seedtype_alert_content": "Le partage de graines avec d'autres portefeuilles n'est possible qu'avec le type de graine BIP39.", + "seedtype_alert_title": "Alerte Type de Graine", + "seedtype_legacy": "Legacy (25 words)", "seedtype_polyseed": "Polyseed (16 mots)", "seedtype_wownero": "WOWNERO (14 mots)", "select_backup_file": "Sélectionnez le fichier de sauvegarde", @@ -652,13 +652,13 @@ "sell_monero_com_alert_content": "La vente de Monero n'est pas encore prise en charge", "send": "Envoyer", "send_address": "adresse ${cryptoCurrency}", - "send_amount": "Montant :", + "send_amount": "Montant:", "send_change_to_you": "Changer, pour vous:", "send_creating_transaction": "Création de la transaction", "send_error_currency": "La monnaie ne peut contenir que des nombres", "send_error_minimum_value": "La valeur minimale du montant est 0.01", "send_estimated_fee": "Estimation des frais :", - "send_fee": "Frais :", + "send_fee": "Frais:", "send_name": "Nom", "send_new": "Nouveau", "send_payment_id": "ID de paiement (optionnel)", @@ -672,9 +672,9 @@ "send_your_wallet": "Votre portefeuille (wallet)", "sending": "Envoi", "sent": "Envoyés", - "service_health_disabled": "Le bulletin de santé du service est handicapé", + "service_health_disabled": "Le bulletin de santé du service est désactivé.", "service_health_disabled_message": "Ceci est la page du Bulletin de santé du service, vous pouvez activer cette page sous Paramètres -> Confidentialité", - "set_a_pin": "Régler une goupille", + "set_a_pin": "Définir un code PIN", "settings": "Paramètres", "settings_all": "TOUT", "settings_allow_biometrical_authentication": "Autoriser l'authentification biométrique", @@ -704,12 +704,13 @@ "setup_pin": "Configurer le code PIN", "setup_successful": "Votre code PIN a été configuré avec succès !", "setup_totp_recommended": "Configurer TOTP", - "setup_warning_2fa_text": "Vous devrez restaurer votre portefeuille à partir de la graine mnémonique.\n\nLe support Cake ne pourra pas vous aider si vous perdez l'accès à vos graines 2FA ou mnémoniques.\nCake 2FA est une seconde authentification pour certaines actions dans le portefeuille. Avant d'utiliser Cake 2FA, nous vous recommandons de lire le guide.Ce n’est PAS aussi sécurisé que l’entreposage frigorifique.\n\nSi vous perdez l'accès à votre application 2FA ou à vos clés TOTP, vous perdrez l'accès à ce portefeuille. ", + "setup_warning_2fa_text": "Vous devrez restaurer votre portefeuille à partir de la graine mnémotechnique.\n\nLe support Cake ne pourra pas vous aider si vous perdez l'accès à vos graines 2FA ou mnémotechniques.\nCake 2FA est une seconde authentification pour certaines actions dans le portefeuille. Avant d'utiliser Cake 2FA, nous vous recommandons de lire le guide.Ce n’est PAS aussi sécurisé que l’entreposage frigorifique.\n\nSi vous perdez l'accès à votre application 2FA ou à vos clés TOTP, vous perdrez l'accès à ce portefeuille. ", "setup_your_debit_card": "Configurer votre carte de débit", "share": "Partager", "share_address": "Partager l'adresse", "shared_seed_wallet_groups": "Groupes de portefeuilles partagés", "show": "Montrer", + "show_address_book_popup": "Afficher la popup `` Ajouter au carnet d'adresses '' après avoir envoyé", "show_details": "Afficher les détails", "show_keys": "Visualiser la phrase secrète (seed) et les clefs", "show_market_place": "Afficher la place de marché", @@ -731,15 +732,15 @@ "silent_payments_scan_from_date": "Analyser à partir de la date", "silent_payments_scan_from_date_or_blockheight": "Veuillez saisir la hauteur du bloc que vous souhaitez commencer à scanner pour les paiements silencieux entrants, ou utilisez la date à la place. Vous pouvez choisir si le portefeuille continue de numériser chaque bloc ou ne vérifie que la hauteur spécifiée.", "silent_payments_scan_from_height": "Scan à partir de la hauteur du bloc", - "silent_payments_scanned_tip": "Scanné à la pointe! (${tip})", - "silent_payments_scanning": "Payments silencieux SCANNING", + "silent_payments_scanned_tip": "SCANNEZ POUR DONNER ! (${tip})", + "silent_payments_scanning": "Scan des paiements silencieux", "silent_payments_settings": "Paramètres de paiement silencieux", "single_seed_wallets_group": "Portefeuilles de semences simples", "slidable": "Glissable", "sort_by": "Trier par", "spend_key_private": "Clef de dépense (spend key) (privée)", "spend_key_public": "Clef de dépense (spend key) (publique)", - "status": "Statut : ", + "status": "Statut: ", "string_default": "Défaut", "subaddress_title": "Liste des sous-adresses", "subaddresses": "Sous-adresses", @@ -752,7 +753,7 @@ "support_title_live_chat": "Support en direct", "support_title_other_links": "Autres liens d'assistance", "sweeping_wallet": "Portefeuille (wallet) de consolidation", - "sweeping_wallet_alert": "Cette opération ne devrait pas prendre longtemps. NE QUITTEZ PAS CET ÉCRAN OU LES FONDS CONSOLIDÉS POURRAIENT ÊTRE PERDUS", + "sweeping_wallet_alert": "Cela ne devrait pas prendre longtemps. NE QUITTEZ PAS CET ÉCRAN OU LES FONDS TRANSFÉRÉS POURRAIENT ÊTRE PERDUS.", "switchToETHWallet": "Veuillez passer à un portefeuille (wallet) Ethereum et réessayer", "switchToEVMCompatibleWallet": "Veuillez passer à un portefeuille compatible EVM et réessayer (Ethereum, Polygon)", "symbol": "Symbole", @@ -779,7 +780,7 @@ "thorchain_contract_address_not_supported": "Thorchain ne prend pas en charge l'envoi à une adresse de contrat", "thorchain_taproot_address_not_supported": "Le fournisseur de Thorchain ne prend pas en charge les adresses de tapoot. Veuillez modifier l'adresse ou sélectionner un autre fournisseur.", "time": "${minutes}m ${seconds}s", - "tip": "Pourboire :", + "tip": "Pourboire:", "today": "Aujourd'hui", "token_contract_address": "Adresse du contrat de token", "token_decimal": "Décimales de token", @@ -928,8 +929,8 @@ "wallets": "Portefeuilles", "warning": "Avertissement", "welcome": "Bienvenue sur", - "welcome_subtitle_new_wallet": "Si vous souhaitez recommencer à créer un nouveau portefeuille ci-dessous et vous serez parti pour les courses.", - "welcome_subtitle_restore_wallet": "Si vous avez un portefeuille existant que vous souhaitez apporter dans le gâteau, choisissez simplement restaurer le portefeuille existant et nous vous guiderons tout au long du processus.", + "welcome_subtitle_new_wallet": "Si vous souhaitez repartir de zéro, appuyez sur Créer un nouveau portefeuille ci-dessous et vous serez prêt à commencer.", + "welcome_subtitle_restore_wallet": "Si vous avez un portefeuille existant que vous souhaitez importer dans Cake, choisissez simplement Restaurer un portefeuille existant et nous vous guiderons à travers le processus.", "welcome_to_cakepay": "Bienvenue sur Cake Pay !", "what_is_silent_payments": "Qu'est-ce que les paiements silencieux?", "widgets_address": "Adresse", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 8d2a66062..4efffb579 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -259,7 +259,7 @@ "enterTokenID": "Shigar da alamar alama", "enterWalletConnectURI": "Shigar da WalletConnect URI", "error": "Kuskure", - "error_dialog_content": "Ai, yanzu muka ga alamar kuskure. \n\nDa fatan, aika rahoton kuskuren da muka kira zuwa gasar tsarinmu don gaskiyar shirya.", + "error_dialog_content": "Oops, mun sami kuskure.\n\nDon Allah a aika rahoton kuskuren zuwa ga ƙungiyar goyon bayanmu don yin aikace-aikacen da kyau.", "error_text_account_name": "Sunan ajiya zai iya ɗauka ne kawai da haruffa, lambobi\nkuma ya zama tsakanin 1 zuwa 15 haruffa", "error_text_address": "Adireshin hujja ya kamata ya dace da irin\nna cryptocurrency", "error_text_amount": "Adadin biya zai iya ƙunsar lambobi kawai", @@ -712,6 +712,7 @@ "share_address": "Raba adireshin", "shared_seed_wallet_groups": "Raba ƙungiya walat", "show": "Nuna", + "show_address_book_popup": "Nuna 'ƙara don magance littafin' Popup bayan aikawa", "show_details": "Nuna Cikakkun bayanai", "show_keys": "Nuna iri/maɓallai", "show_market_place": "Nuna dan kasuwa", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index ceede03fb..4659b45eb 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -259,7 +259,7 @@ "enterTokenID": "टोकन आईडी दर्ज करें", "enterWalletConnectURI": "वॉलेटकनेक्ट यूआरआई दर्ज करें", "error": "त्रुटि", - "error_dialog_content": "ओह, हमसे कुछ गड़बड़ी हुई है.\n\nएप्लिकेशन को बेहतर बनाने के लिए कृपया क्रैश रिपोर्ट हमारी सहायता टीम को भेजें।", + "error_dialog_content": "उफ़, हमें कुछ त्रुटि मिली।\n\nकृपया आवेदन को बेहतर बनाने के लिए हमारी सहायता टीम को त्रुटि रिपोर्ट भेजें।", "error_text_account_name": "खाता नाम में केवल अक्षर, संख्याएं हो सकती हैं\nऔर 1 और 15 वर्णों के बीच लंबा होना चाहिए", "error_text_address": "वॉलेट पता प्रकार के अनुरूप होना चाहिए\nक्रिप्टोकरेंसी का", "error_text_amount": "राशि में केवल संख्याएँ हो सकती हैं", @@ -712,6 +712,7 @@ "share_address": "पता साझा करें", "shared_seed_wallet_groups": "साझा बीज बटुए समूह", "show": "दिखाओ", + "show_address_book_popup": "भेजने के बाद 'एड एड्रेस बुक' पॉपअप दिखाएं", "show_details": "विवरण दिखाएं", "show_keys": "बीज / कुंजियाँ दिखाएँ", "show_market_place": "बाज़ार दिखाएँ", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index f0ee38a9e..d7f9293db 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -259,7 +259,7 @@ "enterTokenID": "Unesite ID tokena", "enterWalletConnectURI": "Unesite WalletConnect URI", "error": "Greška", - "error_dialog_content": "Ups, imamo grešku.\n\nPošaljite izvješće o padu našem timu za podršku kako bismo poboljšali aplikaciju.", + "error_dialog_content": "Ups, dobili smo pogrešku.\n\nMolimo pošaljite izvještaj o pogrešci našem timu za podršku kako biste poboljšali aplikaciju.", "error_text_account_name": "Ime računa smije sadržavati samo slova i brojeve\nte mora biti dužine između 1 i 15 znakova", "error_text_address": "Adresa novčanika mora odgovarati\nvrsti kriptovalute", "error_text_amount": "Iznos smije sadržavati samo brojeve", @@ -710,6 +710,7 @@ "share_address": "Podijeli adresu", "shared_seed_wallet_groups": "Zajedničke grupe za sjeme novčanika", "show": "Pokazati", + "show_address_book_popup": "Pokažite \"dodaj u adresar\" skočni prozor nakon slanja", "show_details": "Prikaži pojedinosti", "show_keys": "Prikaži pristupni izraz/ključ", "show_market_place": "Prikaži tržište", diff --git a/res/values/strings_hy.arb b/res/values/strings_hy.arb index d4abeaace..d323844da 100644 --- a/res/values/strings_hy.arb +++ b/res/values/strings_hy.arb @@ -259,7 +259,7 @@ "enterTokenID": "Մուտքագրեք Token ID֊ն", "enterWalletConnectURI": "Մուտքագրեք WalletConnect URI", "error": "Սխալ", - "error_dialog_content": "Օպս, մենք սխալ ենք ստացել: \n\nԽնդրում ենք ուղարկել սխալի հաշվետվությունը մեր աջակցության թիմին ծրագիրը բարելավելու համար:", + "error_dialog_content": "Վայ, մենք որոշակի սխալ ստացանք:\n\nԽնդրում ենք ուղարկել սխալի մասին զեկույցը մեր աջակցության թիմին `դիմումը ավելի լավ դարձնելու համար:", "error_text_account_name": "Հաշվի անունը կարող է պարունակել միայն տառեր և թվեր և պետք է լինի 1-15 նիշ", "error_text_address": "Դրամապանակի հասցեն պետք է համապատասխանի կրիպտոարժույթի տեսակին", "error_text_amount": "Գումարը կարող է պարունակել միայն թվեր", @@ -710,6 +710,7 @@ "share_address": "Կիսվել հասցեով", "shared_seed_wallet_groups": "Համօգտագործված սերմերի դրամապանակների խմբեր", "show": "Ցուցահանդես", + "show_address_book_popup": "Show ույց տալ «Ուղարկելուց հետո« Հասցեների գրքի »թռուցիկ", "show_details": "Ցուցադրել մանրամասներ", "show_keys": "Ցուցադրել բանալիներ", "show_market_place": "Ցուցադրել շուկան", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 022d31989..bde875a49 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -259,7 +259,7 @@ "enterTokenID": "Masukkan ID tokennya", "enterWalletConnectURI": "Masukkan URI WalletConnect", "error": "Kesalahan", - "error_dialog_content": "Ups, kami mendapat kesalahan.\n\nSilakan kirim laporan crash ke tim dukungan kami untuk membuat aplikasi lebih baik.", + "error_dialog_content": "Ups, kami mendapat kesalahan.\n\nSilakan kirim laporan kesalahan ke tim dukungan kami untuk membuat aplikasi lebih baik.", "error_text_account_name": "Nama akun hanya dapat berisi huruf, angka\ndan harus antara 1 dan 15 karakter panjang", "error_text_address": "Alamat dompet harus sesuai dengan tipe\nmata uang kripto", "error_text_amount": "Jumlah hanya dapat berisi angka", @@ -713,6 +713,7 @@ "share_address": "Bagikan alamat", "shared_seed_wallet_groups": "Kelompok dompet benih bersama", "show": "Menunjukkan", + "show_address_book_popup": "Tampilkan popup 'Tambahkan ke Alamat' setelah mengirim", "show_details": "Tampilkan Rincian", "show_keys": "Tampilkan seed/kunci", "show_market_place": "Tampilkan Pasar", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 62da65a1e..5b719d4ec 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -260,7 +260,7 @@ "enterTokenID": "Inserisci l'ID del token", "enterWalletConnectURI": "Inserisci l'URI di WalletConnect", "error": "Errore", - "error_dialog_content": "Spiacenti, abbiamo riscontrato un errore.\n\nSi prega di inviare il rapporto sull'arresto anomalo al nostro team di supporto per migliorare l'applicazione.", + "error_dialog_content": "Oops, abbiamo ricevuto qualche errore.\n\nSi prega di inviare il rapporto di errore al nostro team di supporto per migliorare l'applicazione.", "error_text_account_name": "Il nome del conto può contenere solo lettere, numeri\ne deve avere una lunghezza compresa tra 1 e 15 caratteri", "error_text_address": "L'indirizzo del Portafoglio deve corrispondere alla tipologia\ndi criptovaluta", "error_text_amount": "L'ammontare può contenere solo numeri", @@ -712,6 +712,7 @@ "share_address": "Condividi indirizzo", "shared_seed_wallet_groups": "Gruppi di portafoglio di semi condivisi", "show": "Spettacolo", + "show_address_book_popup": "Mostra il popup \"Aggiungi alla rubrica\" ​​dopo l'invio", "show_details": "Mostra dettagli", "show_keys": "Mostra seme/chiavi", "show_market_place": "Mostra mercato", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index e3f6dfb30..631af702c 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -259,7 +259,7 @@ "enterTokenID": "トークンIDを入力してください", "enterWalletConnectURI": "WalletConnect URI を入力してください", "error": "エラー", - "error_dialog_content": "エラーが発生しました。\n\nアプリケーションを改善するために、クラッシュ レポートをサポート チームに送信してください。", + "error_dialog_content": "おっと、エラーが発生しました。\n\nサポートチームにエラーレポートを送信して、アプリケーションを改善してください。", "error_text_account_name": "アカウント名には文字のみを含めることができます \n1〜15文字である必要があります", "error_text_address": "ウォレットアドレスは、\n暗号通貨", "error_text_amount": "金額には数字のみを含めることができます", @@ -711,6 +711,7 @@ "share_address": "住所を共有する", "shared_seed_wallet_groups": "共有シードウォレットグループ", "show": "見せる", + "show_address_book_popup": "送信後に「アドレスブックに追加」ポップアップを表示します", "show_details": "詳細を表示", "show_keys": "シード/キーを表示する", "show_market_place": "マーケットプレイスを表示", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 55174df01..74b4d4b31 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -259,7 +259,7 @@ "enterTokenID": "토큰 ID를 입력하세요", "enterWalletConnectURI": "WalletConnect URI를 입력하세요.", "error": "오류", - "error_dialog_content": "죄송합니다. 오류가 발생했습니다.\n\n응용 프로그램을 개선하려면 지원 팀에 충돌 보고서를 보내주십시오.", + "error_dialog_content": "죄송합니다. 오류가 발생했습니다.\n\n오류 보고서를 지원 팀에 보내 응용 프로그램을 개선하십시오.", "error_text_account_name": "계정 이름은 문자, 숫자 만 포함 할 수 있습니다\n1 ~ 15 자 사이 여야합니다", "error_text_address": "지갑 주소는 유형과 일치해야합니다\n암호 화폐", "error_text_amount": "금액은 숫자 만 포함 할 수 있습니다", @@ -711,6 +711,7 @@ "share_address": "주소 공유", "shared_seed_wallet_groups": "공유 종자 지갑 그룹", "show": "보여주다", + "show_address_book_popup": "전송 후 '주소 책에 추가'팝업을 표시하십시오", "show_details": "세부정보 표시", "show_keys": "시드 / 키 표시", "show_market_place": "마켓플레이스 표시", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 7da19d093..88719b1ba 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -259,7 +259,7 @@ "enterTokenID": "တိုကင် ID ကိုထည့်ပါ။", "enterWalletConnectURI": "WalletConnect URI ကိုရိုက်ထည့်ပါ။", "error": "အမှား", - "error_dialog_content": "အိုး၊ ကျွန်ုပ်တို့တွင် အမှားအယွင်းအချို့ရှိသည်။\n\nအပလီကေးရှင်းကို ပိုမိုကောင်းမွန်စေရန်အတွက် ပျက်စီးမှုအစီရင်ခံစာကို ကျွန်ုပ်တို့၏ပံ့ပိုးကူညီရေးအဖွဲ့ထံ ပေးပို့ပါ။", + "error_dialog_content": "အိုး, ငါတို့အမှားအယွင်းတွေရတယ်။\n\nလျှောက်လွှာကိုပိုကောင်းအောင်လုပ်ရန်ကျွန်ုပ်တို့၏ထောက်ခံမှုအဖွဲ့သို့အမှားအယွင်းများပေးပို့ပါ။", "error_text_account_name": "အကောင့်အမည်သည် အက္ခရာများ၊ နံပါတ်များသာ ပါဝင်နိုင်သည်\nနှင့် စာလုံးရေ 1 နှင့် 15 ကြားရှိရပါမည်။", "error_text_address": "Wallet လိပ်စာသည် အမျိုးအစား\no cryptocurrency နှင့် ကိုက်ညီရပါမည်။", "error_text_amount": "ပမာဏသည် နံပါတ်များသာ ပါဝင်နိုင်သည်။", @@ -710,6 +710,7 @@ "share_address": "လိပ်စာမျှဝေပါ။", "shared_seed_wallet_groups": "shared မျိုးစေ့ပိုက်ဆံအိတ်အုပ်စုများ", "show": "ပြသ", + "show_address_book_popup": "ပေးပို့ပြီးနောက် 'address book' popup ကိုပြပါ", "show_details": "အသေးစိတ်ပြ", "show_keys": "မျိုးစေ့ /သော့များကို ပြပါ။", "show_market_place": "စျေးကွက်ကိုပြသပါ။", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 38fedd52f..59d8c05ee 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -259,7 +259,7 @@ "enterTokenID": "Voer de token-ID in", "enterWalletConnectURI": "Voer WalletConnect-URI in", "error": "Fout", - "error_dialog_content": "Oeps, er is een fout opgetreden.\n\nStuur het crashrapport naar ons ondersteuningsteam om de applicatie te verbeteren.", + "error_dialog_content": "Oeps, we hebben wat fout.\n\nStuur het foutrapport naar ons ondersteuningsteam om de applicatie beter te maken.", "error_text_account_name": "Accountnaam mag alleen letters, cijfers bevatten\nen moet tussen de 1 en 15 tekens lang zijn", "error_text_address": "Portemonnee-adres moet overeenkomen met het type\nvan cryptocurrency", "error_text_amount": "Bedrag kan alleen cijfers bevatten", @@ -710,6 +710,7 @@ "share_address": "Deel adres", "shared_seed_wallet_groups": "Gedeelde zaadportelgroepen", "show": "Show", + "show_address_book_popup": "Toon 'Toevoegen aan adresboek' pop -up na verzenden", "show_details": "Toon details", "show_keys": "Toon zaad/sleutels", "show_market_place": "Toon Marktplaats", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index c1f805790..a2793fccf 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -259,7 +259,7 @@ "enterTokenID": "Wprowadź identyfikator tokena", "enterWalletConnectURI": "Wprowadź identyfikator URI WalletConnect", "error": "Błąd", - "error_dialog_content": "Ups, wystąpił błąd.\n\nPrześlij raport o awarii do naszego zespołu wsparcia, aby ulepszyć aplikację.", + "error_dialog_content": "Ups, mamy trochę błędu.\n\nProszę o przesłanie raportu o błędach do naszego zespołu wsparcia, aby aplikacja była lepsza.", "error_text_account_name": "Nazwa konta może zawierać tylko litery, cyfry\ni musi mieć od 1 do 15 znaków", "error_text_address": "Adres musi odpowiadać typowi kryptowaluty", "error_text_amount": "Kwota może zawierać tylko liczby", @@ -710,6 +710,7 @@ "share_address": "Udostępnij adres", "shared_seed_wallet_groups": "Wspólne grupy portfeli nasion", "show": "Pokazywać", + "show_address_book_popup": "Pokaż wysypkę „Dodaj do książki” po wysłaniu", "show_details": "Pokaż szczegóły", "show_keys": "Pokaż seed/klucze", "show_market_place": "Pokaż rynek", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 534af19a9..46309f90a 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -259,7 +259,7 @@ "enterTokenID": "Insira o ID do token", "enterWalletConnectURI": "Insira o URI do WalletConnect", "error": "Erro", - "error_dialog_content": "Ops, houve algum erro.\n\nPor favor, envie o relatório de falha para nossa equipe de suporte para melhorar o aplicativo.", + "error_dialog_content": "Opa, recebemos algum erro.\n\nEnvie o relatório de erro à nossa equipe de suporte para melhorar o aplicativo.", "error_text_account_name": "O nome da conta só pode conter letras, números\ne deve ter entre 1 e 15 caracteres", "error_text_address": "O endereço da carteira deve corresponder à\ncriptomoeda selecionada", "error_text_amount": "A quantia deve conter apenas números", @@ -429,7 +429,7 @@ "nano_current_rep": "Representante atual", "nano_gpt_thanks_message": "Obrigado por usar o Nanogpt! Lembre -se de voltar para o navegador após a conclusão da transação!", "nano_pick_new_rep": "Escolha um novo representante", - "nanogpt_subtitle": "Todos os modelos mais recentes (GPT-4, Claude). \\ Nno assinatura, pagam com criptografia.", + "nanogpt_subtitle": "Todos os modelos mais recentes (GPT-4, Claude). \\nSem assinatura, pague com criptomoeda.", "narrow": "Estreito", "new_first_wallet_text": "Manter sua cripto segura é um pedaço de bolo", "new_node_testing": "Teste de novo nó", @@ -712,6 +712,7 @@ "share_address": "Compartilhar endereço", "shared_seed_wallet_groups": "Grupos de carteira de sementes compartilhados", "show": "Mostrar", + "show_address_book_popup": "Mostre pop -up 'Adicionar ao livro de endereços' depois de enviar", "show_details": "Mostrar detalhes", "show_keys": "Mostrar semente/chaves", "show_market_place": "Mostrar mercado", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index b292ab8f6..8492f6053 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -259,7 +259,7 @@ "enterTokenID": "Введите идентификатор токена", "enterWalletConnectURI": "Введите URI WalletConnect", "error": "Ошибка", - "error_dialog_content": "Ой, у нас какая-то ошибка.\n\nПожалуйста, отправьте отчет о сбое в нашу службу поддержки, чтобы сделать приложение лучше.", + "error_dialog_content": "Упс, мы получили некоторую ошибку.\n\nПожалуйста, отправьте отчет об ошибках в нашу команду поддержки, чтобы сделать приложение лучше.", "error_text_account_name": "Имя аккаунта может содержать только буквы, цифры\nи должно быть от 1 до 15 символов в длину", "error_text_address": "Адрес кошелька должен соответствовать типу\nкриптовалюты", "error_text_amount": "Баланс может содержать только цифры", @@ -711,6 +711,7 @@ "share_address": "Поделиться адресом", "shared_seed_wallet_groups": "Общие группы кошелька семян", "show": "Показывать", + "show_address_book_popup": "Покажите всплывающее окно «Добавить в адрес адреса» после отправки", "show_details": "Показать детали", "show_keys": "Показать мнемоническую фразу/ключи", "show_market_place": "Показать торговую площадку", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 7647d51a3..bf45b6747 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -259,7 +259,7 @@ "enterTokenID": "ป้อนรหัสโทเค็น", "enterWalletConnectURI": "เข้าสู่ WalletConnect URI", "error": "ข้อผิดพลาด", - "error_dialog_content": "อ๊ะ เราพบข้อผิดพลาดบางอย่าง\n\nโปรดส่งรายงานข้อขัดข้องไปยังทีมสนับสนุนของเราเพื่อปรับปรุงแอปพลิเคชันให้ดียิ่งขึ้น", + "error_dialog_content": "อ๊ะเรามีข้อผิดพลาดบางอย่าง\n\nโปรดส่งรายงานข้อผิดพลาดไปยังทีมสนับสนุนของเราเพื่อให้แอปพลิเคชันดีขึ้น", "error_text_account_name": "ชื่อบัญชีสามารถเป็นเพียงตัวอักษรหรือตัวเลขเท่านั้น\nและต้องมีความยาวระหว่าง 1 ถึง 15 ตัวอักษร", "error_text_address": "ที่อยู่กระเป๋าจะต้องสอดคล้องกับประเภท\nของเหรียญคริปโตเนียม", "error_text_amount": "จำนวนจะต้องประกอบด้วยตัวเลขเท่านั้น", @@ -710,6 +710,7 @@ "share_address": "แชร์ที่อยู่", "shared_seed_wallet_groups": "กลุ่มกระเป๋าเงินที่ใช้ร่วมกัน", "show": "แสดง", + "show_address_book_popup": "แสดง 'เพิ่มในสมุดรายชื่อ' ป๊อปอัพหลังจากส่ง", "show_details": "แสดงรายละเอียด", "show_keys": "แสดงซีด/คีย์", "show_market_place": "แสดงตลาดกลาง", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 1d8897507..cb868028c 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -259,7 +259,7 @@ "enterTokenID": "Ipasok ang token ID", "enterWalletConnectURI": "Ipasok ang WalletConnect URI", "error": "Error", - "error_dialog_content": "Oops, nakakuha kami ng ilang error.\n\nMangyaring ipadala ang crash report sa aming koponan ng suporta upang maging mas mahusay ang application.", + "error_dialog_content": "Oops, nakakuha kami ng ilang error.\n\nMangyaring ipadala ang ulat ng error sa aming koponan ng suporta upang maging mas mahusay ang application.", "error_text_account_name": "Ang pangalan ng account ay maaari lamang maglaman ng mga titik, numero\nat dapat sa pagitan ng 1 at 15 character ang haba", "error_text_address": "Ang wallet address ay dapat na tumutugma sa uri\nng cryptocurrency", "error_text_amount": "Ang halaga ay maaari lamang maglaman ng mga numero", @@ -710,6 +710,7 @@ "share_address": "Ibahagi ang address", "shared_seed_wallet_groups": "Ibinahaging mga pangkat ng pitaka ng binhi", "show": "Ipakita", + "show_address_book_popup": "Ipakita ang popup na 'Idagdag sa Address Book' pagkatapos magpadala", "show_details": "Ipakita ang mga detalye", "show_keys": "Ipakita ang mga seed/key", "show_market_place": "Ipakita ang Marketplace", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index b69a957fb..a56478474 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -259,7 +259,7 @@ "enterTokenID": "Belirteç kimliğini girin", "enterWalletConnectURI": "WalletConnect URI'sini girin", "error": "Hata", - "error_dialog_content": "Hay aksi, bir hatamız var.\n\nUygulamayı daha iyi hale getirmek için lütfen kilitlenme raporunu destek ekibimize gönderin.", + "error_dialog_content": "Oops, biraz hata aldık.\n\nLütfen uygulamayı daha iyi hale getirmek için hata raporunu destek ekibimize gönderin.", "error_text_account_name": "Hesap ismi yalnızca harf, rakam \nve 1 ile 15 uzunluğunda karakter içermelidir.", "error_text_address": "Cüzdan adresi kripto para biriminin\ntürüne karşılık gelmelidir", "error_text_amount": "Miktar sadece sayı içerebilir", @@ -710,6 +710,7 @@ "share_address": "Adresi paylaş", "shared_seed_wallet_groups": "Paylaşılan tohum cüzdan grupları", "show": "Göstermek", + "show_address_book_popup": "Gönderdikten sonra 'adres defterine ekle' açılır", "show_details": "Detayları Göster", "show_keys": "Tohumları/anahtarları göster", "show_market_place": "Pazar Yerini Göster", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 12dcd2af9..7e2213a0a 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -259,7 +259,7 @@ "enterTokenID": "Введіть ідентифікатор токена", "enterWalletConnectURI": "Введіть URI WalletConnect", "error": "Помилка", - "error_dialog_content": "На жаль, ми отримали помилку.\n\nБудь ласка, надішліть звіт про збій нашій команді підтримки, щоб покращити додаток.", + "error_dialog_content": "На жаль, ми отримали певну помилку.\n\nБудь ласка, надішліть звіт про помилку нашій команді підтримки, щоб зробити заявку кращим.", "error_text_account_name": "Ім'я акаунту може містити тільки букви, цифри\nі повинно бути від 1 до 15 символів в довжину", "error_text_address": "Адреса гаманця повинна відповідати типу\nкриптовалюти", "error_text_amount": "Баланс може містити тільки цифри", @@ -711,6 +711,7 @@ "share_address": "Поділитися адресою", "shared_seed_wallet_groups": "Спільні групи насіннєвих гаманців", "show": "Показувати", + "show_address_book_popup": "Показати спливаюче вікно \"Додати до адресної книги\" після надсилання", "show_details": "Показати деталі", "show_keys": "Показати мнемонічну фразу/ключі", "show_market_place": "Відображати маркетплейс", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 28194915f..9dd5ab282 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -259,7 +259,7 @@ "enterTokenID": " ۔ﮟﯾﺮﮐ ﺝﺭﺩ ID ﻦﮐﻮﭨ", "enterWalletConnectURI": "WalletConnect URI ۔ﮟﯾﺮﮐ ﺝﺭﺩ", "error": "خرابی", - "error_dialog_content": "افوہ، ہمیں کچھ خرابی ملی۔\n\nایپلی کیشن کو بہتر بنانے کے لیے براہ کرم کریش رپورٹ ہماری سپورٹ ٹیم کو بھیجیں۔", + "error_dialog_content": "افوہ ، ہمیں کچھ غلطی ہوئی۔\n\nبراہ کرم درخواست کو بہتر بنانے کے لئے ہماری سپورٹ ٹیم کو غلطی کی رپورٹ بھیجیں۔", "error_text_account_name": "اکاؤنٹ کا نام صرف حروف، اعداد پر مشتمل ہو سکتا ہے\\nاور 1 سے 15 حروف کے درمیان ہونا چاہیے۔", "error_text_address": "والیٹ کا پتہ cryptocurrency کی قسم\\nکے مطابق ہونا چاہیے۔", "error_text_amount": "رقم صرف اعداد پر مشتمل ہو سکتی ہے۔", @@ -712,6 +712,7 @@ "share_address": "پتہ شیئر کریں۔", "shared_seed_wallet_groups": "مشترکہ بیج پرس گروپ", "show": "دکھائیں", + "show_address_book_popup": "بھیجنے کے بعد 'ایڈریس میں شامل کریں کتاب' پاپ اپ دکھائیں", "show_details": "تفصیلات دکھائیں", "show_keys": "بیج / چابیاں دکھائیں۔", "show_market_place": "بازار دکھائیں۔", diff --git a/res/values/strings_vi.arb b/res/values/strings_vi.arb index 762b5989a..b26420fea 100644 --- a/res/values/strings_vi.arb +++ b/res/values/strings_vi.arb @@ -258,7 +258,7 @@ "enterTokenID": "Nhập ID token", "enterWalletConnectURI": "Nhập URI WalletConnect", "error": "Lỗi", - "error_dialog_content": "Oops, chúng tôi gặp một số lỗi.\n\nVui lòng gửi báo cáo sự cố cho nhóm hỗ trợ của chúng tôi để cải thiện ứng dụng.", + "error_dialog_content": "Rất tiếc, chúng tôi đã gặp một số lỗi.\n\nVui lòng gửi báo cáo lỗi cho nhóm hỗ trợ của chúng tôi để làm cho ứng dụng tốt hơn.", "error_text_account_name": "Tên tài khoản chỉ được chứa chữ cái, số\nvà phải từ 1 đến 15 ký tự", "error_text_address": "Địa chỉ ví phải tương ứng với loại tiền điện tử", "error_text_amount": "Số tiền chỉ được chứa số", @@ -709,6 +709,7 @@ "share_address": "Chia sẻ địa chỉ", "shared_seed_wallet_groups": "Nhóm ví hạt được chia sẻ", "show": "Trình diễn", + "show_address_book_popup": "Hiển thị cửa sổ bật lên 'Thêm vào sổ địa chỉ' sau khi gửi", "show_details": "Hiển thị chi tiết", "show_keys": "Hiển thị hạt giống/khóa", "show_market_place": "Hiển thị Thị trường", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 9bb2142b5..eb446e984 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -260,7 +260,7 @@ "enterTokenID": "Tẹ ID ami sii", "enterWalletConnectURI": "Tẹ WalletConnect URI sii", "error": "Àṣìṣe", - "error_dialog_content": "Àṣìṣe ti dé.\n\nẸ jọ̀wọ́, fi àkọsílẹ̀ àṣìṣe ránṣẹ́ sí ẹgbẹ́ ìranlọ́wọ́ wa kí áàpù wa bá túbọ̀ dára.", + "error_dialog_content": "Oops, a ni aṣiṣe diẹ.\n\nJọwọ fi aṣiṣe naa ranṣẹ si ẹgbẹ atilẹyin wa lati jẹ ki ohun elo naa dara julọ.", "error_text_account_name": "Orúkọ àkáǹtì lè ni nìkan nínú ẹyọ ọ̀rọ̀ àti òǹkà\nGígun rẹ̀ kò gbọ́dọ̀ kéré ju oókan. Gígun rẹ̀ sì kò gbọ́dọ̀ tóbi ju márùndínlógún.", "error_text_address": "Àdírẹ́sì àpamọ́wọ́ gbọ́dọ̀ báramu irú owó", "error_text_amount": "Iye lè ni nìkan nínú àwọn òǹkà", @@ -711,6 +711,7 @@ "share_address": "Pín àdírẹ́sì", "shared_seed_wallet_groups": "Awọn ẹgbẹ ti a pin irugbin", "show": "Fihan", + "show_address_book_popup": "Fihan 'ṣafikun si Agbejade Iwe' Lẹhin fifiranṣẹ", "show_details": "Fi ìsọfúnni kékeré hàn", "show_keys": "Wo hóró / àwọn kọ́kọ́rọ́", "show_market_place": "Wa Sopọ Pataki", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index cb8f89d3c..0d3187dc8 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -259,7 +259,7 @@ "enterTokenID": "输入令牌 ID", "enterWalletConnectURI": "输入 WalletConnect URI", "error": "错误", - "error_dialog_content": "糟糕,我们遇到了一些错误。\n\n请将崩溃报告发送给我们的支持团队,以改进应用程序。", + "error_dialog_content": "糟糕,我们有一些错误。\n\n请将错误报告发送给我们的支持团队,以使应用程序更好。", "error_text_account_name": "帐户名称只能包含字母数字\n且必须介于1到15个字符之间", "error_text_address": "钱包地址必须与类型对应\n加密货币", "error_text_amount": "金额只能包含数字", @@ -710,6 +710,7 @@ "share_address": "分享地址", "shared_seed_wallet_groups": "共享种子钱包组", "show": "展示", + "show_address_book_popup": "发送后显示“添加到通讯簿”弹出窗口", "show_details": "显示详细信息", "show_keys": "显示种子/密钥", "show_market_place": "显示市场", diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 7eee6d6ae..24f1f5a51 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,15 +15,15 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.18.0" -MONERO_COM_BUILD_NUMBER=105 +MONERO_COM_VERSION="1.18.2" +MONERO_COM_BUILD_NUMBER=108 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.21.0" -CAKEWALLET_BUILD_NUMBER=236 +CAKEWALLET_VERSION="4.21.2" +CAKEWALLET_BUILD_NUMBER=239 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 fe18758c8..816ddd29a 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.18.0" -MONERO_COM_BUILD_NUMBER=103 +MONERO_COM_VERSION="1.18.2" +MONERO_COM_BUILD_NUMBER=105 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.21.0" -CAKEWALLET_BUILD_NUMBER=281 +CAKEWALLET_VERSION="4.21.2" +CAKEWALLET_BUILD_NUMBER=284 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 1cdb43ced..12f4cf8be 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.11.0" -CAKEWALLET_BUILD_NUMBER=38 +CAKEWALLET_VERSION="1.11.2" +CAKEWALLET_BUILD_NUMBER=40 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 930a1e5ed..bed3eb326 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -21,8 +21,8 @@ MONERO_COM_BUILD_NUMBER=37 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.14.1" -CAKEWALLET_BUILD_NUMBER=96 +CAKEWALLET_VERSION="1.14.2" +CAKEWALLET_BUILD_NUMBER=98 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 25f94cb1f..2cdd8c47c 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.2.0" +#define MyAppVersion "0.2.1" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe" diff --git a/tool/append_translation.dart b/tool/append_translation.dart index 5a3658cd0..8ef646502 100644 --- a/tool/append_translation.dart +++ b/tool/append_translation.dart @@ -1,3 +1,5 @@ +import 'package:cw_core/utils/print_verbose.dart'; + import 'utils/translation/arb_file_utils.dart'; import 'utils/translation/translation_constants.dart'; import 'utils/translation/translation_utils.dart'; @@ -14,7 +16,7 @@ void main(List args) async { final text = args[1]; final force = args.last == "--force"; - print('Appending "$name": "$text"'); + printV('Appending "$name": "$text"'); // add translation to all languages: for (var lang in langs) { @@ -24,12 +26,12 @@ void main(List args) async { appendStringToArbFile(fileName, name, translation, force: force); } - print('Alphabetizing all files...'); + printV('Alphabetizing all files...'); for (var lang in langs) { final fileName = getArbFileName(lang); alphabetizeArbFile(fileName); } - print('Done!'); + printV('Done!'); } \ No newline at end of file diff --git a/tool/configure.dart b/tool/configure.dart index 7199b8a82..d9d5c6667 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -95,6 +95,7 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/wallet_type.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/get_height_by_date.dart'; import 'package:hive/hive.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart' as ledger; @@ -834,6 +835,7 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:hive/hive.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart' as ledger; import 'package:web3dart/web3dart.dart'; @@ -938,6 +940,7 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:hive/hive.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart' as ledger; import 'package:web3dart/web3dart.dart'; @@ -1100,6 +1103,7 @@ import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/output_info.dart'; import 'package:cw_core/nano_account_info_response.dart'; import 'package:cw_core/n2_node.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:mobx/mobx.dart'; import 'package:hive/hive.dart'; import 'package:cake_wallet/view_model/send/output.dart'; diff --git a/tool/download_moneroc_prebuilds.dart b/tool/download_moneroc_prebuilds.dart index 9df0b4e7b..5169ea687 100644 --- a/tool/download_moneroc_prebuilds.dart +++ b/tool/download_moneroc_prebuilds.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:dio/dio.dart'; import 'package:archive/archive_io.dart'; @@ -29,7 +30,7 @@ Future main() async { final resp = await _dio.get("https://api.github.com/repos/mrcyjanek/monero_c/releases"); final data = resp.data[0]; final tagName = data['tag_name']; - print("Downloading artifacts for: ${tagName}"); + printV("Downloading artifacts for: ${tagName}"); final assets = data['assets'] as List; for (var i = 0; i < assets.length; i++) { for (var triplet in triplets) { @@ -40,9 +41,9 @@ Future main() async { String localFilename = filename.replaceAll("${coin}_${triplet}_", ""); localFilename = "scripts/monero_c/release/${coin}/${triplet}_${localFilename}"; final url = asset["browser_download_url"] as String; - print("- downloading $localFilename"); + printV("- downloading $localFilename"); await _dio.download(url, localFilename); - print(" extracting $localFilename"); + printV(" extracting $localFilename"); final inputStream = InputFileStream(localFilename); final archive = XZDecoder().decodeBuffer(inputStream); final outputStream = OutputFileStream(localFilename.replaceAll(".xz", "")); @@ -50,11 +51,11 @@ Future main() async { } } if (Platform.isMacOS) { - print("Generating ios framework"); + printV("Generating ios framework"); final result = Process.runSync("bash", [ "-c", "cd scripts/ios && ./gen_framework.sh && cd ../.." ]); - print((result.stdout+result.stderr).toString().trim()); + printV((result.stdout+result.stderr).toString().trim()); } } \ No newline at end of file diff --git a/tool/generate_localization.dart b/tool/generate_localization.dart index 530b316ac..0f9af8366 100644 --- a/tool/generate_localization.dart +++ b/tool/generate_localization.dart @@ -1,5 +1,7 @@ import 'dart:io'; import 'dart:convert'; +import 'package:cw_core/utils/print_verbose.dart'; + import 'localization/localization_constants.dart'; import 'utils/utils.dart'; @@ -35,7 +37,7 @@ Future main(List args) async { extraInfo.forEach((key, dynamic value) async { if (key != srcDir) { - print('Wrong key: $key'); + printV('Wrong key: $key'); return; } @@ -43,7 +45,7 @@ Future main(List args) async { final dir = Directory(dirPath); if (!await dir.exists()) { - print('Wrong directory path: $dirPath'); + printV('Wrong directory path: $dirPath'); return; } @@ -53,12 +55,12 @@ Future main(List args) async { final shortLocale = element.path.split('_',)[1].split('.')[0]; localePath[shortLocale] = element.path; } catch (e) { - print('Wrong file: ${element.path}'); + printV('Wrong file: ${element.path}'); } }); if (!localePath.keys.contains(defaultLocale)) { - print("Locale list doesn't contain $defaultLocale"); + printV("Locale list doesn't contain $defaultLocale"); return; } @@ -115,7 +117,7 @@ Future main(List args) async { await File(outputPath + localeListFileName).writeAsString(locales); } catch (e) { - print(e.toString()); + printV(e.toString()); } }); } diff --git a/tool/translation_add_lang.dart b/tool/translation_add_lang.dart index 8b392df6e..96f22158d 100644 --- a/tool/translation_add_lang.dart +++ b/tool/translation_add_lang.dart @@ -1,5 +1,7 @@ import 'dart:io'; +import 'package:cw_core/utils/print_verbose.dart'; + import 'utils/translation/arb_file_utils.dart'; import 'utils/translation/translation_constants.dart'; import 'utils/translation/translation_utils.dart'; @@ -32,5 +34,5 @@ void main(List args) async { } appendStringsToArbFile(targetFileName, translations); - print("Success! Please add your Language Code to lib/entities/language_service.dart"); + printV("Success! Please add your Language Code to lib/entities/language_service.dart"); } diff --git a/tool/translation_consistence.dart b/tool/translation_consistence.dart index 7f3ac130e..df24cce15 100644 --- a/tool/translation_consistence.dart +++ b/tool/translation_consistence.dart @@ -1,18 +1,20 @@ import 'dart:io'; +import 'package:cw_core/utils/print_verbose.dart'; + import 'utils/translation/arb_file_utils.dart'; import 'utils/translation/translation_constants.dart'; import 'utils/translation/translation_utils.dart'; void main(List args) async { - print('Checking Consistency of all arb-files. Default: $defaultLang'); + printV('Checking Consistency of all arb-files. Default: $defaultLang'); final doFix = args.contains("--fix"); if (doFix) - print('Auto fixing enabled!\n'); + printV('Auto fixing enabled!\n'); else - print('Auto fixing disabled!\nRun with arg "--fix" to enable autofix\n'); + printV('Auto fixing disabled!\nRun with arg "--fix" to enable autofix\n'); final fileName = getArbFileName(defaultLang); final file = File(fileName); @@ -25,7 +27,7 @@ void main(List args) async { final missingDefaults = {}; missingKeys.forEach((key) { - print('Missing in "$lang": "$key"'); + printV('Missing in "$lang": "$key"'); if (doFix) missingDefaults[key] = arbObj[key] as String; }); diff --git a/tool/utils/translation/arb_file_utils.dart b/tool/utils/translation/arb_file_utils.dart index 414d318dd..0fe31d85d 100644 --- a/tool/utils/translation/arb_file_utils.dart +++ b/tool/utils/translation/arb_file_utils.dart @@ -1,12 +1,14 @@ import 'dart:convert'; import 'dart:io'; +import 'package:cw_core/utils/print_verbose.dart'; + void appendStringToArbFile(String fileName, String name, String text, {bool force = false}) { final file = File(fileName); final arbObj = readArbFile(file); if (arbObj.containsKey(name) && !force) { - print("String $name already exists in $fileName!"); + printV("String $name already exists in $fileName!"); return; } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index f8f89611c..e0f2c11c0 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -14,6 +14,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + sp_scanner ) set(PLUGIN_BUNDLED_LIBRARIES)