From 01d40c4dc38705ef9df336541b1ef416e79562f5 Mon Sep 17 00:00:00 2001 From: tuxsudo Date: Fri, 19 Jul 2024 02:37:20 +0000 Subject: [PATCH 01/77] Guides update (#1542) * Rename build-guide-win.md to howto-build-windows.md * Update howto-build-windows.md * Update howto-build-windows.md * Update howto-build-windows.md * Update howto-build-windows.md * Update howto-build-android.md * Update howto-build-android.md * Update howto-build-macos.md * Update howto-build-macos.md * Update howto-build-ios.md * Update howto-build-android.md * Update howto-build-windows.md --- build-guide-win.md | 38 ---------------------------- howto-build-android.md | 40 ++++++++++++++--------------- howto-build-ios.md | 28 ++++++++++----------- howto-build-macos.md | 28 ++++++++++----------- howto-build-windows.md | 57 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+), 86 deletions(-) delete mode 100644 build-guide-win.md create mode 100644 howto-build-windows.md diff --git a/build-guide-win.md b/build-guide-win.md deleted file mode 100644 index 6ace961af..000000000 --- a/build-guide-win.md +++ /dev/null @@ -1,38 +0,0 @@ -# Building CakeWallet for Windows - -## Requirements and Setup - -The following are the system requirements to build CakeWallet for your Windows PC. - -``` -Windows 10 or later (64-bit), x86-64 based -Flutter 3 or above -``` - -## Building CakeWallet on Windows - -These steps will help you configure and execute a build of CakeWallet from its source code. - -### 1. Installing Package Dependencies - -For build CakeWallet windows application from sources you will be needed to have: -> [Install Flutter]Follow installation guide (https://docs.flutter.dev/get-started/install/windows) and install do not miss to dev tools (install https://docs.flutter.dev/get-started/install/windows/desktop#development-tools) which are required for windows desktop development (need to install Git for Windows and Visual Studio 2022). Then install `Desktop development with C++` packages via GUI Visual Studio 2022, or Visual Studio Build Tools 2022 including: `C++ Build Tools core features`, `C++ 2022 Redistributable Update`, `C++ core desktop features`, `MVC v143 - VS 2022 C++ x64/x86 build tools`, `C++ CMake tools for Windwos`, `Testing tools core features - Build Tools`, `C++ AddressSanitizer`. -> [Install WSL] for building monero dependencies need to install Windows WSL (https://learn.microsoft.com/en-us/windows/wsl/install) and required packages for WSL (Ubuntu): -`$ sudo apt update ` -`$ sudo apt build-essential cmake gcc-mingw-w64 g++-mingw-w64 autoconf libtool pkg-config` - -### 2. Pull CakeWallet source code - -You can downlaod CakeWallet source code from our [GitHub repository](github.com/cake-tech/cake_wallet) via git by following next command: -`$ git clone https://github.com/cake-tech/cake_wallet.git --branch MrCyjaneK-cyjan-monerodart` -OR you can download it as [Zip archive](https://github.com/cake-tech/cake_wallet/archive/refs/heads/MrCyjaneK-cyjan-monerodart.zip) - -### 3. Build Monero, Monero_c and their dependencies - -For use monero in the application need to build Monero wrapper - Monero_C which will be used by monero.dart package. For that need to run shell (bash - typically same named utility should be available after WSL is enabled in your system) with previously installed WSL, then change current directory to the application project directory with your used shell and then change current directory to `scripts/windows`: `$ cd scripts/windows`. Run build script: `$ ./build_all.sh`. - -### 4. Configure and build CakeWallet application - -To configure the application open directory where you have downloaded or unarchived CakeWallet sources and run `cakewallet.bat`. -Or if you used WSL and have active shell session you can run `$ ./cakewallet.sh` script in `scripts/windows` which will run `cakewallet.bat` in WSL. -After execution of `cakewallet.bat` you should to get `Cake Wallet.zip` in project root directory which will contains `CakeWallet.exe` file and another needed files for run the application. Now you can extract files from `Cake Wallet.zip` archive and run the application. diff --git a/howto-build-android.md b/howto-build-android.md index 4ad88ea0d..57d29f459 100644 --- a/howto-build-android.md +++ b/howto-build-android.md @@ -1,23 +1,19 @@ -# Building CakeWallet for Android +# Building Cake Wallet for Android ## Requirements and Setup -The following are the system requirements to build CakeWallet for your Android device. +The following are the system requirements to build Cake Wallet for your Android device. ``` Ubuntu >= 20.04 Android SDK 29 or higher (better to have the latest one 33) Android NDK 17c -Flutter 3.19.x or earlier +Flutter 3.19.x ``` -## Building CakeWallet on Android - -These steps will help you configure and execute a build of CakeWallet from its source code. - ### 1. Installing Package Dependencies -CakeWallet cannot be built without the following packages installed on your build system. +CakeWallet cannot be built without the following packages installed on your system. - curl @@ -51,13 +47,17 @@ You may easily install them on your build system with the following command: ### 2. Installing Android Studio and Android toolchain -You may download and install the latest version of Android Studio [here](https://developer.android.com/studio#downloads). After installing, start Android Studio, and go through the "Setup Wizard." This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by CakeWallet. **Be sure you are installing SDK version 28 or later when stepping through the wizard** +You may download and install the latest version of Android Studio [here](https://developer.android.com/studio#downloads). After installing, start Android Studio, and go through the "Setup Wizard." This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by Cake Wallet. **Be sure you are installing SDK version 28 or later when stepping through the wizard** ### 3. Installing Flutter -Need to install flutter with version `3.19.x`. For this please check section [Install Flutter manually](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually). +Install Flutter with version `3.19.x`. For this please check section [Install Flutter manually](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually). -### 4. Verify Installations +### 4. Installing rustup + +Install rustup from the [rustup.rs](https://rustup.rs/) website. + +### 5. Verify Installations Verify that the Android toolchain, Flutter, and Android Studio have been correctly installed on your system with the following command: @@ -71,15 +71,15 @@ Doctor summary (to see all details, run flutter doctor -v): [✓] Android Studio (version 4.0 or higher) ``` -### 5. Generate a secure keystore for Android +### 6. Generate a secure keystore for Android `$ keytool -genkey -v -keystore $HOME/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key` You will be prompted to create two passwords. First you will be prompted for the "store password", followed by a "key password" towards the end of the creation process. **TAKE NOTE OF THESE PASSWORDS!** You will need them in later steps. -### 6. Acquiring the CakeWallet Source Code +### 7. Acquiring the Cake Wallet Source Code -Create the directory that will be use to store the CakeWallet source... +Create the directory that will be use to store the Cake Wallet source... ``` $ sudo mkdir -p /opt/android @@ -95,11 +95,11 @@ Proceed into the source code before proceeding with the next steps: `$ cd cake_wallet/scripts/android/` -### 7. Installing Android NDK +### 8. Installing Android NDK `$ ./install_ndk.sh` -### 8. Execute Build & Setup Commands for CakeWallet +### 9. Execute Build & Setup Commands for Cak eWallet We need to generate project settings like app name, app icon, package name, etc. For this need to setup environment variables and configure project files. @@ -116,7 +116,7 @@ Build the Monero libraries and their dependencies: `$ ./build_all.sh` -It is now time to change back to the base directory of the CakeWallet source code: +It is now time to change back to the base directory of the Cake Wallet source code: `$ cd ../../` @@ -124,7 +124,7 @@ Install Flutter package dependencies with this command: `$ flutter pub get` -Your CakeWallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: +Your Cake Wallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: `$ flutter packages pub run tool/generate_new_secrets.dart` @@ -142,8 +142,8 @@ Finally build mobx models for the app: `$ ./model_generator.sh` -### 9. Build! +### 10. Build! `$ flutter build apk --release` -Copyright (c) 2022 Cake Technologies LLC. +Copyright (c) 2024 Cake Labs LLC diff --git a/howto-build-ios.md b/howto-build-ios.md index 3bb345861..418fbc96b 100644 --- a/howto-build-ios.md +++ b/howto-build-ios.md @@ -1,8 +1,8 @@ -# Building CakeWallet for iOS +# Building Cake Wallet for iOS ## Requirements and Setup -The following are the system requirements to build CakeWallet for your iOS device. +The following are the system requirements to build Cake Wallet for your iOS device. ``` macOS >= 14.0 @@ -10,13 +10,9 @@ Xcode 15.3 Flutter 3.19.x ``` -## Building CakeWallet on iOS - -These steps will help you configure and execute a build of CakeWallet from its source code. - ### 1. Installing Package Dependencies -CakeWallet cannot be built without the following packages installed on your build system. +Cake Wallet cannot be built without the following packages installed on your build system. For installing dependency tools you can use brew [Install brew](https://brew.sh). @@ -32,7 +28,11 @@ You may download and install the latest version of [Xcode](https://developer.app Need to install flutter with version `3.19.x`. For this please check section [Install Flutter](https://docs.flutter.dev/get-started/install/macos/mobile-ios?tab=download). -### 4. Verify Installations +### 4. Installing rustup + +Install rustup from the [rustup.rs](https://rustup.rs/) website. + +### 5. Verify Installations Verify that the Flutter and Xcode have been correctly installed on your system with the following command: @@ -45,7 +45,7 @@ Doctor summary (to see all details, run flutter doctor -v): [✓] Xcode - develop for iOS and macOS (Xcode 15.3) ``` -### 5. Acquiring the CakeWallet source code +### 6. Acquiring the CakeWallet source code Download the source code. @@ -55,7 +55,7 @@ Proceed into the source code before proceeding with the next steps: `$ cd cake_wallet/scripts/ios/` -### 6. Execute Build & Setup Commands for CakeWallet +### 7. Execute Build & Setup Commands for Cake Wallet We need to generate project settings like app name, app icon, package name, etc. For this need to setup environment variables and configure project files. @@ -72,7 +72,7 @@ Build the Monero libraries and their dependencies: `$ ./build_monero_all.sh` -It is now time to change back to the base directory of the CakeWallet source code: +It is now time to change back to the base directory of the Cake Wallet source code: `$ cd ../../` @@ -80,7 +80,7 @@ Install Flutter package dependencies with this command: `$ flutter pub get` -Your CakeWallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: +Your Cake Wallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: `$ flutter packages pub run tool/generate_new_secrets.dart` @@ -88,7 +88,7 @@ Then we need to generate localization files and mobx models. `$ ./configure_cake_wallet.sh ios` -### 7. Build! +### 8. Build! `$ flutter build ios --release` @@ -98,4 +98,4 @@ Or if you want to run to connected device: `$ flutter run --release` -Copyright (c) 2024 Cake Technologies LLC. +Copyright (c) 2024 Cake Labs LLC diff --git a/howto-build-macos.md b/howto-build-macos.md index 24d3a9d85..2e535e5be 100644 --- a/howto-build-macos.md +++ b/howto-build-macos.md @@ -1,8 +1,8 @@ -# Building CakeWallet for macOS +# Building Cake Wallet for macOS ## Requirements and Setup -The following are the system requirements to build CakeWallet for your macOS device. +The following are the system requirements to build Cake Wallet for your macOS device. ``` macOS >= 14.0 @@ -10,13 +10,9 @@ Xcode 15.3 Flutter 3.19.x ``` -## Building CakeWallet on macOS - -These steps will help you configure and execute a build of CakeWallet from its source code. - ### 1. Installing Package Dependencies -CakeWallet cannot be built without the following packages installed on your build system. +Cake Wallet cannot be built without the following packages installed on your build system. For installing dependency tools you can use brew [Install brew](https://brew.sh). @@ -34,7 +30,11 @@ You may download and install the latest version of [Xcode](https://developer.app Need to install flutter with version `3.19.x`. For this please check section [Install Flutter](https://docs.flutter.dev/get-started/install/macos/desktop?tab=download). -### 4. Verify Installations +### 4. Installing rustup + +Install rustup from the [rustup.rs](https://rustup.rs/) website. + +### 5. Verify Installations Verify that Flutter and Xcode have been correctly installed on your system with the following command: @@ -47,7 +47,7 @@ Doctor summary (to see all details, run flutter doctor -v): [✓] Xcode - develop for iOS and macOS (Xcode 15.3) ``` -### 5. Acquiring the CakeWallet source code +### 6. Acquiring the Cake Wallet source code Download the source code. @@ -57,7 +57,7 @@ Proceed into the source code before proceeding with the next steps: `$ cd cake_wallet/scripts/macos/` -### 6. Execute Build & Setup Commands for CakeWallet +### 7. Execute Build & Setup Commands for Cake Wallet We need to generate project settings like app name, app icon, package name, etc. For this need to setup environment variables and configure project files. @@ -83,7 +83,7 @@ If you be needed to build universal monero lib, then it will require additional If you will be needed to build monero wallet lib only for x86_64 on arm64 mac, then you need use steps above, but run build script with rosetta without arguments: `$ arch -x86_64 ./build_monero_all.sh`. -It is now time to change back to the base directory of the CakeWallet source code: +It is now time to change back to the base directory of the Cake Wallet source code: `$ cd ../../` @@ -91,7 +91,7 @@ Install Flutter package dependencies with this command: `$ flutter pub get` -Your CakeWallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: +Your Cake Wallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command: `$ flutter packages pub run tool/generate_new_secrets.dart` @@ -99,7 +99,7 @@ Then we need to generate localization files and mobx models. `$ ./configure_cake_wallet.sh macos` -### 7. Build! +### 8. Build! `$ flutter build macos --release` @@ -109,4 +109,4 @@ Or if you want to run to connected device: `$ flutter run --release` -Copyright (c) 2024 Cake Technologies LLC. +Copyright (c) 2024 Cake Labs LLC diff --git a/howto-build-windows.md b/howto-build-windows.md new file mode 100644 index 000000000..796cb3cc8 --- /dev/null +++ b/howto-build-windows.md @@ -0,0 +1,57 @@ +# Building Cake Wallet for Windows + +## Requirements and Setup + +The following are the system requirements to build CakeWallet for your Windows PC. + +``` +Windows 10 or later (64-bit), x86-64 based +Flutter 3.19.x +``` + +### 1. Installing Flutter + +Install Flutter with version `3.19.x`. Follow the Flutter [installation guide](https://docs.flutter.dev/get-started/install/windows). + +### 2. Install Development Tools + +Install Git for Windows and Visual Studio 2022. Follow the [Development Tools](https://docs.flutter.dev/get-started/install/windows/desktop#development-tools) installation instructions. + +Then install `Desktop development with C++` packages via Visual Studio 2022, or Visual Studio Build Tools 2022 including: +- `C++ Build Tools core features` +- `C++ 2022 Redistributable Update` +- `C++ core desktop features` +- `MVC v143 - VS 2022 C++ x64/x86 build tools` +- `C++ CMake tools for Windwos` +- `Testing tools core features - Build Tools` +- `C++ AddressSanitizer`. + +### 3. Installing rustup + +Install rustup from the [rustup.rs](https://rustup.rs/#) website. Download and run the 64-bit rustup-init.exe + +### 4. Installing WSL (Windows Subsystem for Linux) + +For building monero dependencies, it is required to install Windows WSL (https://learn.microsoft.com/en-us/windows/wsl/install) and required packages for WSL (Ubuntu): +`$ sudo apt update ` +`$ sudo apt build-essential cmake gcc-mingw-w64 g++-mingw-w64 autoconf libtool pkg-config` + +### 5. Pull Cake Wallet source code + +You can downlaod CakeWallet source code from our [GitHub repository](github.com/cake-tech/cake_wallet) via git: +`$ git clone https://github.com/cake-tech/cake_wallet.git --branch MrCyjaneK-cyjan-monerodart` +OR you can download it as [Zip archive](https://github.com/cake-tech/cake_wallet/archive/refs/heads/MrCyjaneK-cyjan-monerodart.zip) + +### 6. Build Monero, monero_c and their dependencies + +To use Monero in Cake Wallet, you must build the Monero_C wrapper which will be used by monero.dart package. + +For that you need to run the shell (bash - typically same named utility should be available after WSL is enabled in your system) with the previously installed WSL install, then change current directory to the application project directory with your shell then change current directory to `scripts/windows`: `$ cd scripts/windows`. Run build script: `$ ./build_all.sh`. + +### 7. Configure and build Cake Wallet application + +To configure the application, open the directory where you have downloaded or unarchived Cake Wallet sources and run `cakewallet.bat`. +Or if you used WSL and have active shell session you can run `$ ./cakewallet.sh` script in `scripts/windows` which will run `cakewallet.bat` in WSL. +After execution of `cakewallet.bat` you should to get `Cake Wallet.zip` in project root directory which will contains `CakeWallet.exe` file and another needed files for run the application. Now you can extract files from `Cake Wallet.zip` archive and run the application. + +Copyright (c) 2024 Cake Labs LLC. From d6c5b84188ddc7d3961e882452213de668f04a30 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Fri, 19 Jul 2024 19:31:11 +0200 Subject: [PATCH 02/77] Fix Bitcoin not sending on Ledger (#1539) --- cw_bitcoin/lib/electrum_wallet.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 6cc82780f..39cf95009 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -519,17 +519,20 @@ abstract class ElectrumWalletBase ); spendsSilentPayment = true; isSilentPayment = true; - } else { + } else if (!isHardwareWallet) { privkey = generateECPrivate(hd: hd, index: utx.bitcoinAddressRecord.index, network: network); } vinOutpoints.add(Outpoint(txid: utx.hash, index: utx.vout)); - inputPrivKeyInfos.add(ECPrivateInfo( - privkey, - address.type == SegwitAddresType.p2tr, - tweak: !isSilentPayment, - )); + + if (privkey != null) { + inputPrivKeyInfos.add(ECPrivateInfo( + privkey, + address.type == SegwitAddresType.p2tr, + tweak: !isSilentPayment, + )); + } utxos.add( UtxoWithAddress( @@ -541,7 +544,7 @@ abstract class ElectrumWalletBase isSilentPayment: isSilentPayment, ), ownerDetails: UtxoAddressDetails( - publicKey: privkey.getPublic().toHex(), + publicKey: pubKeyHex, address: address, ), ), From c0cd68a823d4ccd8d416529e6f146854a446ebf6 Mon Sep 17 00:00:00 2001 From: cyan Date: Fri, 19 Jul 2024 21:26:15 +0200 Subject: [PATCH 03/77] update monero_c to fix unreachable wownero git hosting (#1534) * update monero_c commit * fix: no element in getAllUnusedSubAddresses * fix: Wallet created with empty seed and 0 as private key The error that was there is caused when wallet is being created, but it errors out, so better handling of errors should be all that's needed, as it is not an error on it's own, but rather lack of handling. * fix: create transaction multi dest function is missing * update monero_c hash * fix: receiving on 2 different addresses shows as 1 --- cw_core/lib/transaction_info.dart | 1 + cw_monero/lib/api/wallet_manager.dart | 38 +++++++++---------- cw_monero/lib/monero_subaddress_list.dart | 2 +- cw_monero/lib/monero_transaction_info.dart | 14 +++++-- cw_wownero/lib/api/wallet_manager.dart | 38 +++++++++---------- cw_wownero/lib/wownero_transaction_info.dart | 12 ++++-- .../transaction_details_view_model.dart | 4 +- scripts/prepare_moneroc.sh | 2 +- 8 files changed, 57 insertions(+), 54 deletions(-) diff --git a/cw_core/lib/transaction_info.dart b/cw_core/lib/transaction_info.dart index 7b02bf1ff..a270c0479 100644 --- a/cw_core/lib/transaction_info.dart +++ b/cw_core/lib/transaction_info.dart @@ -3,6 +3,7 @@ import 'package:cw_core/keyable.dart'; abstract class TransactionInfo extends Object with Keyable { late String id; + late String txhash = id; late int amount; int? fee; late TransactionDirection direction; diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 8a1eee3f7..f77ef05e2 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -194,28 +194,24 @@ void loadWallet( wptr = openedWalletsByPath[path]!; return; } - try { - if (wptr == null || path != _lastOpenedWallet) { - if (wptr != null) { - final addr = wptr!.address; - Isolate.run(() { - monero.Wallet_store(Pointer.fromAddress(addr)); - }); - } - txhistory = null; - wptr = monero.WalletManager_openWallet(wmPtr, - path: path, password: password); - openedWalletsByPath[path] = wptr!; - _lastOpenedWallet = path; + if (wptr == null || path != _lastOpenedWallet) { + if (wptr != null) { + final addr = wptr!.address; + Isolate.run(() { + monero.Wallet_store(Pointer.fromAddress(addr)); + }); } - } catch (e) { - print(e); - } - final status = monero.Wallet_status(wptr!); - if (status != 0) { - final err = monero.Wallet_errorString(wptr!); - print(err); - throw WalletOpeningException(message: err); + txhistory = null; + wptr = monero.WalletManager_openWallet(wmPtr, + path: path, password: password); + _lastOpenedWallet = path; + final status = monero.Wallet_status(wptr!); + if (status != 0) { + final err = monero.Wallet_errorString(wptr!); + print(err); + throw WalletOpeningException(message: err); + } + openedWalletsByPath[path] = wptr!; } } diff --git a/cw_monero/lib/monero_subaddress_list.dart b/cw_monero/lib/monero_subaddress_list.dart index 676a9536c..623d744fd 100644 --- a/cw_monero/lib/monero_subaddress_list.dart +++ b/cw_monero/lib/monero_subaddress_list.dart @@ -124,7 +124,7 @@ abstract class MoneroSubaddressListBase with Store { Future> _getAllUnusedAddresses( {required int accountIndex, required String label}) async { final allAddresses = subaddress_list.getAllSubaddresses(); - final lastAddress = allAddresses.last.address; + final lastAddress = allAddresses.length == 0 ? allAddresses.last.address : Subaddress(id: -1, address: "", label: ""); if (allAddresses.isEmpty || _usedAddresses.contains(lastAddress)) { final isAddressUnused = await _newSubaddress(accountIndex: accountIndex, label: label); if (!isAddressUnused) { diff --git a/cw_monero/lib/monero_transaction_info.dart b/cw_monero/lib/monero_transaction_info.dart index 748b65329..b1a4e4229 100644 --- a/cw_monero/lib/monero_transaction_info.dart +++ b/cw_monero/lib/monero_transaction_info.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/monero_amount_format.dart'; import 'package:cw_monero/api/structs/transaction_info_row.dart'; @@ -7,12 +9,14 @@ import 'package:cw_core/format_amount.dart'; import 'package:cw_monero/api/transaction_history.dart'; class MoneroTransactionInfo extends TransactionInfo { - MoneroTransactionInfo(this.id, this.height, this.direction, this.date, + MoneroTransactionInfo(this.txhash, this.height, this.direction, this.date, this.isPending, this.amount, this.accountIndex, this.addressIndex, this.fee, - this.confirmations); + this.confirmations) : + id = "${txhash}_${amount}_${accountIndex}_${addressIndex}"; MoneroTransactionInfo.fromMap(Map map) - : id = (map['hash'] ?? '') as String, + : id = "${map['hash']}_${map['amount']}_${map['accountIndex']}_${map['addressIndex']}", + txhash = map['hash'] as String, height = (map['height'] ?? 0) as int, direction = map['direction'] != null ? parseTransactionDirectionFromNumber(map['direction'] as String) @@ -34,7 +38,8 @@ class MoneroTransactionInfo extends TransactionInfo { } MoneroTransactionInfo.fromRow(TransactionInfoRow row) - : id = row.getHash(), + : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", + txhash = row.getHash(), height = row.blockHeight, direction = parseTransactionDirectionFromInt(row.direction), date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), @@ -53,6 +58,7 @@ class MoneroTransactionInfo extends TransactionInfo { } final String id; + final String txhash; final int height; final TransactionDirection direction; final DateTime date; diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index 2f92bb080..e90843538 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -208,28 +208,24 @@ void loadWallet( wptr = openedWalletsByPath[path]!; return; } - try { - if (wptr == null || path != _lastOpenedWallet) { - if (wptr != null) { - final addr = wptr!.address; - Isolate.run(() { - wownero.Wallet_store(Pointer.fromAddress(addr)); - }); - } - txhistory = null; - wptr = wownero.WalletManager_openWallet(wmPtr, - path: path, password: password); - openedWalletsByPath[path] = wptr!; - _lastOpenedWallet = path; + if (wptr == null || path != _lastOpenedWallet) { + if (wptr != null) { + final addr = wptr!.address; + Isolate.run(() { + wownero.Wallet_store(Pointer.fromAddress(addr)); + }); } - } catch (e) { - print(e); - } - final status = wownero.Wallet_status(wptr!); - if (status != 0) { - final err = wownero.Wallet_errorString(wptr!); - print(err); - throw WalletOpeningException(message: err); + txhistory = null; + wptr = wownero.WalletManager_openWallet(wmPtr, + path: path, password: password); + _lastOpenedWallet = path; + final status = wownero.Wallet_status(wptr!); + if (status != 0) { + final err = wownero.Wallet_errorString(wptr!); + print(err); + throw WalletOpeningException(message: err); + } + openedWalletsByPath[path] = wptr!; } } diff --git a/cw_wownero/lib/wownero_transaction_info.dart b/cw_wownero/lib/wownero_transaction_info.dart index 2060f1f95..6016e2e59 100644 --- a/cw_wownero/lib/wownero_transaction_info.dart +++ b/cw_wownero/lib/wownero_transaction_info.dart @@ -7,12 +7,14 @@ import 'package:cw_core/format_amount.dart'; import 'package:cw_wownero/api/transaction_history.dart'; class WowneroTransactionInfo extends TransactionInfo { - WowneroTransactionInfo(this.id, this.height, this.direction, this.date, + WowneroTransactionInfo(this.txhash, this.height, this.direction, this.date, this.isPending, this.amount, this.accountIndex, this.addressIndex, this.fee, - this.confirmations); + this.confirmations) : + id = "${txhash}_${amount}_${accountIndex}_${addressIndex}"; WowneroTransactionInfo.fromMap(Map map) - : id = (map['hash'] ?? '') as String, + : id = "${map['hash']}_${map['amount']}_${map['accountIndex']}_${map['addressIndex']}", + txhash = map['hash'] as String, height = (map['height'] ?? 0) as int, direction = map['direction'] != null ? parseTransactionDirectionFromNumber(map['direction'] as String) @@ -34,7 +36,8 @@ class WowneroTransactionInfo extends TransactionInfo { } WowneroTransactionInfo.fromRow(TransactionInfoRow row) - : id = row.getHash(), + : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", + txhash = row.getHash(), height = row.blockHeight, direction = parseTransactionDirectionFromInt(row.direction), date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), @@ -53,6 +56,7 @@ class WowneroTransactionInfo extends TransactionInfo { } final String id; + final String txhash; final int height; final TransactionDirection direction; final DateTime date; diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index acf334382..025ccab9b 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -214,7 +214,7 @@ abstract class TransactionDetailsViewModelBase with Store { final addressIndex = tx.additionalInfo['addressIndex'] as int; final feeFormatted = tx.feeFormatted(); final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txhash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'), @@ -455,7 +455,7 @@ abstract class TransactionDetailsViewModelBase with Store { final addressIndex = tx.additionalInfo['addressIndex'] as int; final feeFormatted = tx.feeFormatted(); final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txhash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'), diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index 27d839ef4..e91b3d4a4 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -8,7 +8,7 @@ if [[ ! -d "monero_c" ]]; then git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip cd monero_c - git checkout eaa7bdb8be3479418445ddb18bf33d453f64afcf + git checkout d1e246aaf4c53b60ff9e4ab4a4ac3ae4a1f94a33 git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero From 44101016721abe3f2404a5a8c90ad434ae54e24d Mon Sep 17 00:00:00 2001 From: Serhii Date: Fri, 19 Jul 2024 23:55:01 +0300 Subject: [PATCH 04/77] add popup for cake pay transaction sent alert (#1533) * add popup for cake pay transaction sent alert * Revert "add popup for cake pay transaction sent alert" This reverts commit 1df1bf0f00a20765fc5c5e0eb3eaa893b53c6286. * fix localisation --- .../cake_pay_confirm_purchase_card_page.dart | 29 +++++++++++++++---- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 3 +- res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 3 +- res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 1 + res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + 27 files changed, 52 insertions(+), 7 deletions(-) diff --git a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart index 15aa576c8..fd8dce103 100644 --- a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart +++ b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart @@ -9,18 +9,18 @@ import 'package:cake_wallet/src/screens/cake_pay/widgets/link_extractor.dart'; import 'package:cake_wallet/src/screens/cake_pay/widgets/text_icon_button.dart'; import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.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/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; -import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/picker_theme.dart'; import 'package:cake_wallet/themes/extensions/receive_page_theme.dart'; -import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/cake_pay/cake_pay_purchase_view_model.dart'; import 'package:cake_wallet/view_model/send/send_view_model_state.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:mobx/mobx.dart'; @@ -372,9 +372,7 @@ class CakePayBuyCardDetailPage extends BasePage { if (state is TransactionCommitted) { WidgetsBinding.instance.addPostFrameCallback((_) { cakePayPurchaseViewModel.sendViewModel.clearOutputs(); - if (context.mounted) { - showStateAlert(context, S.of(context).sending, S.of(context).transaction_sent); - } + if (context.mounted) showSentAlert(context); }); } }); @@ -394,6 +392,27 @@ class CakePayBuyCardDetailPage extends BasePage { }); } + Future showSentAlert(BuildContext context) async { + final order = cakePayPurchaseViewModel.order!.orderId; + final isCopy = await showPopUp( + context: context, + builder: (BuildContext context) { + return AlertWithTwoActions( + alertTitle: S.of(context).transaction_sent, + alertContent: + S.of(context).cake_pay_save_order + '\n${order}', + leftButtonText: S.of(context).ignor, + rightButtonText: S.of(context).copy, + actionLeftButton: () => Navigator.of(context).pop(false), + actionRightButton: () => Navigator.of(context).pop(true)); + }) ?? + false; + + if (isCopy) { + await Clipboard.setData(ClipboardData(text: order)); + } + } + void _handleDispose(ReactionDisposer? disposer) { cakePayPurchaseViewModel.dispose(); if (disposer != null) { diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index db6a4cae2..59fe26ef8 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "موضوع الكعكة الظلام", "cake_pay_account_note": "قم بالتسجيل باستخدام عنوان بريد إلكتروني فقط لمشاهدة البطاقات وشرائها. حتى أن بعضها متوفر بسعر مخفض!", "cake_pay_learn_more": "شراء واسترداد بطاقات الهدايا على الفور في التطبيق!\nاسحب من اليسار إلى اليمين لمعرفة المزيد.", + "cake_pay_save_order": "يجب إرسال البطاقة إلى بريدك الإلكتروني خلال يوم عمل واحد \n حفظ معرف الطلب الخاص بك:", "cake_pay_subtitle": "شراء بطاقات مسبقة الدفع وبطاقات الهدايا في جميع أنحاء العالم", "cake_pay_web_cards_subtitle": "اشتري بطاقات مدفوعة مسبقا وبطاقات هدايا في جميع أنحاء العالم", "cake_pay_web_cards_title": "بطاقات Cake Pay Web", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 06132c244..689fc06cf 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Торта тъмна тема", "cake_pay_account_note": "Регистрайте се само с един имейл, за да виждате и купувате карти. За някои има дори и отстъпка!", "cake_pay_learn_more": "Купете и използвайте гифткарти директно в приложението!\nПлъзнете отляво надясно, за да научите още.", + "cake_pay_save_order": "Картата трябва да бъде изпратена до вашия имейл в рамките на 1 работен ден \n Запазете вашия идентификационен номер на поръчката:", "cake_pay_subtitle": "Купете предплатени карти и карти за подаръци в световен мащаб", "cake_pay_web_cards_subtitle": "Купете световно признати предплатени и гифт карти", "cake_pay_web_cards_title": "Cake Pay Онлайн Карти", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 589f89fd7..433351a5b 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Dort tmavé téma", "cake_pay_account_note": "Přihlaste se svou e-mailovou adresou pro zobrazení a nákup karet. Některé jsou dostupné ve slevě!", "cake_pay_learn_more": "Okamžitý nákup a uplatnění dárkových karet v aplikaci!\nPřejeďte prstem zleva doprava pro další informace.", + "cake_pay_save_order": "Karta by měla být odeslána do vašeho e-mailu do 1 pracovního dne \n Uložit ID objednávky:", "cake_pay_subtitle": "Kupte si celosvětové předplacené karty a dárkové karty", "cake_pay_web_cards_subtitle": "Kupte si celosvětové předplacené a dárkové karty", "cake_pay_web_cards_title": "Cake Pay webové karty", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index a4b816f5b..624147cc2 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake Dark Thema", "cake_pay_account_note": "Melden Sie sich nur mit einer E-Mail-Adresse an, um Karten anzuzeigen und zu kaufen. Einige sind sogar mit Rabatt erhältlich!", "cake_pay_learn_more": "Kaufen und lösen Sie Geschenkkarten sofort in der App ein!\nWischen Sie von links nach rechts, um mehr zu erfahren.", + "cake_pay_save_order": "Die Karte sollte innerhalb von 1 Werktag an Ihre E-Mail gesendet werden, \n Ihre Bestell-ID zu speichern:", "cake_pay_subtitle": "Kaufen Sie weltweite Prepaid -Karten und Geschenkkarten", "cake_pay_web_cards_subtitle": "Kaufen Sie weltweit Prepaid-Karten und Geschenkkarten", "cake_pay_web_cards_title": "Cake Pay-Webkarten", @@ -876,4 +877,4 @@ "you_will_get": "Konvertieren zu", "you_will_send": "Konvertieren von", "yy": "YY" -} +} \ No newline at end of file diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index d39b175dd..4c7dcbebe 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake Dark Theme", "cake_pay_account_note": "Sign up with just an email address to see and purchase cards. Some are even available at a discount!", "cake_pay_learn_more": "Instantly purchase and redeem gift cards in the app!\nSwipe left to right to learn more.", + "cake_pay_save_order": "The card should be sent to your e-mail within 1 business day \n Save your Order ID:", "cake_pay_subtitle": "Buy worldwide prepaid cards and gift cards", "cake_pay_web_cards_subtitle": "Buy worldwide prepaid cards and gift cards", "cake_pay_web_cards_title": "Cake Pay Web Cards", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 5fba46830..5cf99d3c3 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Tema oscuro del pastel", "cake_pay_account_note": "Regístrese con solo una dirección de correo electrónico para ver y comprar tarjetas. ¡Algunas incluso están disponibles con descuento!", "cake_pay_learn_more": "¡Compre y canjee tarjetas de regalo al instante en la aplicación!\nDeslice el dedo de izquierda a derecha para obtener más información.", + "cake_pay_save_order": "La tarjeta debe enviarse a su correo electrónico dentro de 1 día hábil \n Guardar su ID de pedido:", "cake_pay_subtitle": "Compre tarjetas prepagas y tarjetas de regalo en todo el mundo", "cake_pay_web_cards_subtitle": "Compre tarjetas de prepago y tarjetas de regalo en todo el mundo", "cake_pay_web_cards_title": "Tarjetas Web Cake Pay", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 7289b7511..244238975 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Thème sombre du gâteau", "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:", "cake_pay_subtitle": "Achetez des cartes et des cartes-cadeaux prépayées mondiales", "cake_pay_web_cards_subtitle": "Achetez des cartes prépayées et des cartes-cadeaux dans le monde entier", "cake_pay_web_cards_title": "Cartes Web Cake Pay", @@ -873,4 +874,4 @@ "you_will_get": "Convertir vers", "you_will_send": "Convertir depuis", "yy": "AA" -} +} \ No newline at end of file diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index c96568a76..292ce0614 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake Dark Jigo", "cake_pay_account_note": "Yi rajista tare da adireshin imel kawai don gani da siyan katunan. Wasu ma suna samuwa a rangwame!", "cake_pay_learn_more": "Nan take siya ku kwaso katunan kyaututtuka a cikin app!\nTake hagu zuwa dama don ƙarin koyo.", + "cake_pay_save_order": "Ya kamata a aika katin zuwa e-mail ɗinku a cikin rana 1 na kasuwanci \n Ajiye id ku:", "cake_pay_subtitle": "Sayi katunan shirye-shiryen duniya da katunan kyauta", "cake_pay_web_cards_subtitle": "Sayi katunan da aka riga aka biya na duniya da katunan kyauta", "cake_pay_web_cards_title": "Cake Pay Web Cards", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index ef740b4d6..3cfb5129a 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "केक डार्क थीम", "cake_pay_account_note": "कार्ड देखने और खरीदने के लिए केवल एक ईमेल पते के साथ साइन अप करें। कुछ छूट पर भी उपलब्ध हैं!", "cake_pay_learn_more": "ऐप में उपहार कार्ड तुरंत खरीदें और रिडीम करें!\nअधिक जानने के लिए बाएं से दाएं स्वाइप करें।", + "cake_pay_save_order": "कार्ड को आपके ई-मेल को 1 व्यावसायिक दिन के भीतर भेजा जाना चाहिए \n आपकी ऑर्डर आईडी सहेजें:", "cake_pay_subtitle": "दुनिया भर में प्रीपेड कार्ड और उपहार कार्ड खरीदें", "cake_pay_web_cards_subtitle": "दुनिया भर में प्रीपेड कार्ड और गिफ्ट कार्ड खरीदें", "cake_pay_web_cards_title": "केक भुगतान वेब कार्ड", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 295a01165..5f8271504 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "TOKA DARKA TEMA", "cake_pay_account_note": "Prijavite se samo s adresom e-pošte da biste vidjeli i kupili kartice. Neke su čak dostupne uz popust!", "cake_pay_learn_more": "Azonnal vásárolhat és válthat be ajándékutalványokat az alkalmazásban!\nTovábbi információért csúsztassa balról jobbra az ujját.", + "cake_pay_save_order": "Karticu treba poslati na vašu e-poštu u roku od 1 radnog dana \n Spremi ID narudžbe:", "cake_pay_subtitle": "Kupite svjetske unaprijed plaćene kartice i poklon kartice", "cake_pay_web_cards_subtitle": "Kupujte prepaid kartice i poklon kartice diljem svijeta", "cake_pay_web_cards_title": "Cake Pay Web kartice", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 8b28e928f..9c8d91b90 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Tema Kue Gelap", "cake_pay_account_note": "Daftar hanya dengan alamat email untuk melihat dan membeli kartu. Beberapa di antaranya bahkan tersedia dengan diskon!", "cake_pay_learn_more": "Beli dan tukar kartu hadiah secara instan di aplikasi!\nGeser ke kanan untuk informasi lebih lanjut.", + "cake_pay_save_order": "Kartu harus dikirim ke email Anda dalam 1 hari kerja \n Simpan ID pesanan Anda:", "cake_pay_subtitle": "Beli kartu prabayar di seluruh dunia dan kartu hadiah", "cake_pay_web_cards_subtitle": "Beli kartu prabayar dan kartu hadiah secara global", "cake_pay_web_cards_title": "Kartu Web Cake Pay", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index b1bd7cd6d..db55845ef 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Tema oscuro della torta", "cake_pay_account_note": "Iscriviti con solo un indirizzo email per vedere e acquistare le carte. Alcune sono anche disponibili con uno sconto!", "cake_pay_learn_more": "Acquista e riscatta istantaneamente carte regalo nell'app!\nScorri da sinistra a destra per saperne di più.", + "cake_pay_save_order": "La carta deve essere inviata alla tua e-mail entro 1 giorno lavorativo \n Salva il tuo ID ordine:", "cake_pay_subtitle": "Acquista carte prepagate in tutto il mondo e carte regalo", "cake_pay_web_cards_subtitle": "Acquista carte prepagate e carte regalo in tutto il mondo", "cake_pay_web_cards_title": "Carte Web Cake Pay", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 5803b86d5..d24f0224d 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "ケーキ暗いテーマ", "cake_pay_account_note": "メールアドレスだけでサインアップして、カードを表示して購入できます。割引価格で利用できるカードもあります!", "cake_pay_learn_more": "アプリですぐにギフトカードを購入して引き換えましょう!\n左から右にスワイプして詳細をご覧ください。", + "cake_pay_save_order": "カードは1営業日以内に電子メールに送信する必要があります\n注文IDを保存します。", "cake_pay_subtitle": "世界中のプリペイドカードとギフトカードを購入します", "cake_pay_web_cards_subtitle": "世界中のプリペイド カードとギフト カードを購入する", "cake_pay_web_cards_title": "Cake Pay ウェブカード", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 874ec2c27..262c40e8d 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "케이크 다크 테마", "cake_pay_account_note": "이메일 주소로 가입하면 카드를 보고 구매할 수 있습니다. 일부는 할인된 가격으로 사용 가능합니다!", "cake_pay_learn_more": "앱에서 즉시 기프트 카드를 구매하고 사용하세요!\n자세히 알아보려면 왼쪽에서 오른쪽으로 스와이프하세요.", + "cake_pay_save_order": "카드는 영업일 1 일 이내에 이메일로 전자 메일로 보내야합니다. \n 주문 ID 저장 :", "cake_pay_subtitle": "전세계 선불 카드와 기프트 카드를 구입하십시오", "cake_pay_web_cards_subtitle": "전 세계 선불 카드 및 기프트 카드 구매", "cake_pay_web_cards_title": "케이크페이 웹카드", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 890362fcd..4fd55684e 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "ကိတ်မုန့် Dark Theme", "cake_pay_account_note": "ကတ်များကြည့်ရှုဝယ်ယူရန် အီးမေးလ်လိပ်စာတစ်ခုဖြင့် စာရင်းသွင်းပါ။ အချို့ကို လျှော့ဈေးဖြင့်ပင် ရနိုင်သည်။", "cake_pay_learn_more": "အက်ပ်ရှိ လက်ဆောင်ကတ်များကို ချက်ချင်းဝယ်ယူပြီး ကူပွန်ဖြင့် လဲလှယ်ပါ။\nပိုမိုလေ့လာရန် ဘယ်မှညာသို့ ပွတ်ဆွဲပါ။", + "cake_pay_save_order": "ကဒ်ကိုသင်၏အီးမေးလ်သို့ပေးပို့သင့်သည်။ သင်၏အမှာစာ ID ကိုသိမ်းပါ။", "cake_pay_subtitle": "Worldwide ကြိုတင်ငွေဖြည့်ကဒ်များနှင့်လက်ဆောင်ကဒ်များကို 0 ယ်ပါ", "cake_pay_web_cards_subtitle": "ကမ္ဘာတစ်ဝှမ်း ကြိုတင်ငွေပေးကတ်များနှင့် လက်ဆောင်ကတ်များကို ဝယ်ယူပါ။", "cake_pay_web_cards_title": "Cake Pay ဝဘ်ကတ်များ", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 25b7f6b3a..70379c95c 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake Dark Theme", "cake_pay_account_note": "Meld u aan met alleen een e-mailadres om kaarten te bekijken en te kopen. Sommige zijn zelfs met korting verkrijgbaar!", "cake_pay_learn_more": "Koop en wissel cadeaubonnen direct in de app in!\nSwipe van links naar rechts voor meer informatie.", + "cake_pay_save_order": "De kaart moet binnen 1 werkdag naar uw e-mail worden verzonden.", "cake_pay_subtitle": "Koop wereldwijde prepaid -kaarten en cadeaubonnen", "cake_pay_web_cards_subtitle": "Koop wereldwijd prepaidkaarten en cadeaubonnen", "cake_pay_web_cards_title": "Cake Pay-webkaarten", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 1567a0841..6d8f05fcf 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake Dark Temat", "cake_pay_account_note": "Zarejestruj się, używając tylko adresu e-mail, aby przeglądać i kupować karty. Niektóre są nawet dostępne ze zniżką!", "cake_pay_learn_more": "Kupuj i wykorzystuj karty podarunkowe od razu w aplikacji!\nPrzesuń od lewej do prawej, aby dowiedzieć się więcej.", + "cake_pay_save_order": "Karta powinna zostać wysłana na adres e-mail w ciągu 1 dnia roboczego \n Zapisz identyfikator zamówienia:", "cake_pay_subtitle": "Kup na całym świecie karty przedpłacone i karty podarunkowe", "cake_pay_web_cards_subtitle": "Kupuj na całym świecie karty przedpłacone i karty podarunkowe", "cake_pay_web_cards_title": "Cake Pay Web Cards", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 272c0862e..381514341 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Bolo tema escuro", "cake_pay_account_note": "Inscreva-se com apenas um endereço de e-mail para ver e comprar cartões. Alguns estão até com desconto!", "cake_pay_learn_more": "Compre e resgate vales-presente instantaneamente no app!\nDeslize da esquerda para a direita para saber mais.", + "cake_pay_save_order": "O cartão deve ser enviado ao seu e-mail dentro de 1 dia útil \n Salvar seu ID do pedido:", "cake_pay_subtitle": "Compre cartões pré -pagos em todo o mundo e cartões -presente", "cake_pay_web_cards_subtitle": "Compre cartões pré-pagos e cartões-presente em todo o mundo", "cake_pay_web_cards_title": "Cartões Cake Pay Web", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index a8943db97..8611b32f8 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Тейт темная тема", "cake_pay_account_note": "Зарегистрируйтесь, указав только адрес электронной почты, чтобы просматривать и покупать карты. Некоторые даже доступны со скидкой!", "cake_pay_learn_more": "Мгновенно покупайте и используйте подарочные карты в приложении!\nПроведите по экрану слева направо, чтобы узнать больше.", + "cake_pay_save_order": "Карта должна быть отправлена ​​на ваше электронное письмо в течение 1 рабочего дня \n Сохраните свой идентификатор заказа:", "cake_pay_subtitle": "Купить карты с предоплатой и подарочными картами по всему миру", "cake_pay_web_cards_subtitle": "Покупайте карты предоплаты и подарочные карты по всему миру", "cake_pay_web_cards_title": "Веб-карты Cake Pay", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index c4d282761..b1a96414d 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "ธีมเค้กมืด", "cake_pay_account_note": "ลงทะเบียนด้วยอีเมลเพียงอย่างเดียวเพื่อดูและซื้อบัตร บางบัตรอาจมีส่วนลด!", "cake_pay_learn_more": "ซื้อและเบิกบัตรของขวัญในแอพพลิเคชันทันที!\nกระแทกขวาไปซ้ายเพื่อเรียนรู้เพิ่มเติม", + "cake_pay_save_order": "บัตรควรส่งไปยังอีเมลของคุณภายใน 1 วันทำการ \n บันทึกรหัสคำสั่งซื้อของคุณ:", "cake_pay_subtitle": "ซื้อบัตรเติมเงินและบัตรของขวัญทั่วโลก", "cake_pay_web_cards_subtitle": "ซื้อบัตรพร้อมเงินระดับโลกและบัตรของขวัญ", "cake_pay_web_cards_title": "Cake Pay Web Cards", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 775ab4c3d..5566e4b79 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Cake madilim na tema", "cake_pay_account_note": "Mag -sign up na may isang email address lamang upang makita at bumili ng mga kard. Ang ilan ay magagamit kahit sa isang diskwento!", "cake_pay_learn_more": "Agad na bumili at tubusin ang mga kard ng regalo sa app!\nMag -swipe pakaliwa sa kanan upang matuto nang higit pa.", + "cake_pay_save_order": "Ang card ay dapat ipadala sa iyong e-mail sa loob ng 1 araw ng negosyo \n i-save ang iyong order ID:", "cake_pay_subtitle": "Bumili ng mga pandaigdigang prepaid card at gift card", "cake_pay_web_cards_subtitle": "Bumili ng mga pandaigdigang prepaid card at gift card", "cake_pay_web_cards_title": "Cake pay web card", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 239a1aa2e..8af93e5aa 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Kek Koyu Tema", "cake_pay_account_note": "Kartları görmek ve satın almak için sadece bir e-posta adresiyle kaydolun. Hatta bazıları indirimli olarak bile mevcut!", "cake_pay_learn_more": "Uygulamada anında hediye kartları satın alın ve harcayın!\nDaha fazla öğrenmek için soldan sağa kaydır.", + "cake_pay_save_order": "Kart, 1 İş Günü içinde e-postanıza gönderilmelidir \n Sipariş Kimliğinizi Kaydet:", "cake_pay_subtitle": "Dünya çapında ön ödemeli kartlar ve hediye kartları satın alın", "cake_pay_web_cards_subtitle": "Dünya çapında ön ödemeli kartlar ve hediye kartları satın alın", "cake_pay_web_cards_title": "Cake Pay Web Kartları", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 3a45752d6..375b9c373 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Темна тема торта", "cake_pay_account_note": "Зареєструйтеся, використовуючи лише адресу електронної пошти, щоб переглядати та купувати картки. Деякі навіть доступні зі знижкою!", "cake_pay_learn_more": "Миттєво купуйте та активуйте подарункові картки в додатку!\nПроведіть пальцем зліва направо, щоб дізнатися більше.", + "cake_pay_save_order": "Картка повинна бути надіслана на вашу електронну пошту протягом 1 робочого дня \n Зберегти ідентифікатор замовлення:", "cake_pay_subtitle": "Купіть у всьому світі передплачені картки та подарункові картки", "cake_pay_web_cards_subtitle": "Купуйте передоплачені та подарункові картки по всьому світу", "cake_pay_web_cards_title": "Веб-картки Cake Pay", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 2ab1f927b..4f86a15b2 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "کیک ڈارک تھیم", "cake_pay_account_note": "کارڈز دیکھنے اور خریدنے کے لیے صرف ایک ای میل ایڈریس کے ساتھ سائن اپ کریں۔ کچھ رعایت پر بھی دستیاب ہیں!", "cake_pay_learn_more": "ایپ میں فوری طور پر گفٹ کارڈز خریدیں اور بھنائیں!\\nمزید جاننے کے لیے بائیں سے دائیں سوائپ کریں۔", + "cake_pay_save_order": "کارڈ 1 کاروباری دن کے اندر آپ کے ای میل پر بھیجا جانا چاہئے \n اپنے آرڈر کی شناخت کو بچائیں:", "cake_pay_subtitle": "دنیا بھر میں پری پیڈ کارڈز اور گفٹ کارڈ خریدیں", "cake_pay_web_cards_subtitle": "دنیا بھر میں پری پیڈ کارڈز اور گفٹ کارڈز خریدیں۔", "cake_pay_web_cards_title": "Cake پے ویب کارڈز", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index f9751f9f1..1bdb1115c 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "Akara oyinbo dudu koko", "cake_pay_account_note": "Ẹ fi àdírẹ́sì ímeèlì nìkan forúkọ sílẹ̀ k'ẹ́ rí àti ra àwọn káàdì. Ẹ lè fi owó tó kéré jù ra àwọn káàdì kan!", "cake_pay_learn_more": "Láìpẹ́ ra àti lo àwọn káàdí ìrajà t'á lò nínú irú kan ìtajà nínú áàpù!\nẸ tẹ̀ òsì de ọ̀tún láti kọ́ jù.", + "cake_pay_save_order": "Kaadi yẹ ki o firanṣẹ si imeeli rẹ laarin ọjọ iṣowo 1 \n Fipamọ aṣẹ rẹ:", "cake_pay_subtitle": "Ra awọn kaadi ti a san ni agbaye ati awọn kaadi ẹbun", "cake_pay_web_cards_subtitle": "Ra àwọn káàdì ìrajà t'á lò nínú ìtajà kan àti àwọn káàdì náà t'á lè lò níbikíbi", "cake_pay_web_cards_title": "Àwọn káàdì wẹ́ẹ̀bù ti Cake Pay", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index f3b8ee176..b3800f597 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -95,6 +95,7 @@ "cake_dark_theme": "蛋糕黑暗主题", "cake_pay_account_note": "只需使用電子郵件地址註冊即可查看和購買卡片。有些甚至可以打折!", "cake_pay_learn_more": "立即在应用中购买和兑换礼品卡!\n从左向右滑动以了解详情。", + "cake_pay_save_order": "该卡应在1个工作日内发送到您的电子邮件\n保存您的订单ID:", "cake_pay_subtitle": "购买全球预付费卡和礼品卡", "cake_pay_web_cards_subtitle": "购买全球预付卡和礼品卡", "cake_pay_web_cards_title": "蛋糕支付网络卡", From 415d2a35736a13fce200517c3f0e603573cf41c0 Mon Sep 17 00:00:00 2001 From: Adegoke David <64401859+Blazebrain@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:04:22 +0100 Subject: [PATCH 05/77] CW-672: Enhance ETH Transaction Fee Calculation (#1545) * fix: Eth transaction fees WIP * Revert "fix: Eth transaction fees WIP" This reverts commit b9a469bc7e22134d78bf0cc4c00485e1d4515ebd. * fix: Modifying fee WIP * fix: Enhance ETH Wallet fee calculation WIP * feat: Enhance Transaction fees for ETH Transactions, Native transactions done, left with ERC20 transactions * fix: Pre PR cleanups * minor things [skip ci] --------- Co-authored-by: OmarHatem --- cw_evm/lib/contract/erc20.dart | 4 +- cw_evm/lib/evm_chain_client.dart | 65 +++++++++++-- cw_evm/lib/evm_chain_wallet.dart | 162 ++++++++++++++++++++++++------- 3 files changed, 186 insertions(+), 45 deletions(-) diff --git a/cw_evm/lib/contract/erc20.dart b/cw_evm/lib/contract/erc20.dart index 297b77e71..76d45064f 100644 --- a/cw_evm/lib/contract/erc20.dart +++ b/cw_evm/lib/contract/erc20.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:web3dart/web3dart.dart' as web3; -final _contractAbi = web3.ContractAbi.fromJson( +final ethereumContractAbi = web3.ContractAbi.fromJson( '[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]', 'Erc20'); @@ -13,7 +13,7 @@ class ERC20 extends web3.GeneratedContract { required web3.EthereumAddress address, required web3.Web3Client client, int? chainId, - }) : super(web3.DeployedContract(_contractAbi, address), client, chainId); + }) : super(web3.DeployedContract(ethereumContractAbi, address), client, chainId); /// Returns the remaining number of tokens that [spender] will be allowed to spend on behalf of [owner] through [transferFrom]. This is zero by default. This value changes when [approve] or [transferFrom] are called. /// diff --git a/cw_evm/lib/evm_chain_client.dart b/cw_evm/lib/evm_chain_client.dart index 2185936ea..033dc7143 100644 --- a/cw_evm/lib/evm_chain_client.dart +++ b/cw_evm/lib/evm_chain_client.dart @@ -10,7 +10,7 @@ import 'package:cw_evm/evm_chain_transaction_priority.dart'; import 'package:cw_evm/evm_erc20_balance.dart'; import 'package:cw_evm/pending_evm_chain_transaction.dart'; import 'package:cw_evm/.secrets.g.dart' as secrets; -import 'package:flutter/services.dart'; +import 'package:flutter/foundation.dart'; import 'package:hex/hex.dart' as hex; import 'package:http/http.dart'; import 'package:web3dart/web3dart.dart'; @@ -65,16 +65,65 @@ abstract class EVMChainClient { Future getGasUnitPrice() async { try { final gasPrice = await _client!.getGasPrice(); + return gasPrice.getInWei.toInt(); } catch (_) { return 0; } } - Future getEstimatedGas() async { + Future getGasBaseFee() async { try { - final estimatedGas = await _client!.estimateGas(); - return estimatedGas.toInt(); + final blockInfo = await _client!.getBlockInformation(isContainFullObj: false); + final baseFee = blockInfo.baseFeePerGas; + + return baseFee!.getInWei.toInt(); + } catch (_) { + return 0; + } + } + + Future getEstimatedGas({ + String? contractAddress, + required EthereumAddress toAddress, + required EthereumAddress senderAddress, + required EtherAmount value, + EtherAmount? gasPrice, + // EtherAmount? maxFeePerGas, + // EtherAmount? maxPriorityFeePerGas, + }) async { + try { + if (contractAddress == null) { + final estimatedGas = await _client!.estimateGas( + sender: senderAddress, + gasPrice: gasPrice, + to: toAddress, + value: value, + // maxPriorityFeePerGas: maxPriorityFeePerGas, + // maxFeePerGas: maxFeePerGas, + ); + + return estimatedGas.toInt(); + } else { + final contract = DeployedContract( + ethereumContractAbi, + EthereumAddress.fromHex(contractAddress), + ); + + final transferFunction = contract.function('transferFrom'); + + final estimatedGas = await _client!.estimateGas( + sender: senderAddress, + to: toAddress, + value: value, + data: transferFunction.encodeCall([ + senderAddress, + toAddress, + value.getInWei, + ]), + ); + return estimatedGas.toInt(); + } } catch (_) { return 0; } @@ -84,7 +133,7 @@ abstract class EVMChainClient { required Credentials privateKey, required String toAddress, required BigInt amount, - required int gas, + required BigInt gas, required EVMChainTransactionPriority priority, required CryptoCurrency currency, required int exponent, @@ -97,8 +146,6 @@ abstract class EVMChainClient { bool isNativeToken = currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly; - final price = _client!.getGasPrice(); - final Transaction transaction = createTransaction( from: privateKey.address, to: EthereumAddress.fromHex(toAddress), @@ -130,11 +177,10 @@ abstract class EVMChainClient { _sendTransaction = () async => await sendTransaction(signedTransaction); - return PendingEVMChainTransaction( signedTransaction: signedTransaction, amount: amount.toString(), - fee: BigInt.from(gas) * (await price).getInWei, + fee: gas, sendTransaction: _sendTransaction, exponent: exponent, ); @@ -233,7 +279,6 @@ abstract class EVMChainClient { final decodedResponse = jsonDecode(response.body)[0] as Map; - final symbol = (decodedResponse['symbol'] ?? '') as String; String filteredSymbol = symbol.replaceFirst(RegExp('^\\\$'), ''); diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index 2adb54746..2ab1c17a0 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -27,6 +27,7 @@ import 'package:cw_evm/evm_chain_transaction_priority.dart'; import 'package:cw_evm/evm_chain_wallet_addresses.dart'; import 'package:cw_evm/evm_ledger_credentials.dart'; import 'package:cw_evm/file.dart'; +import 'package:flutter/foundation.dart'; import 'package:hex/hex.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -102,10 +103,12 @@ abstract class EVMChainWalletBase Credentials get evmChainPrivateKey => _evmChainPrivateKey; - late EVMChainClient _client; + late final EVMChainClient _client; + + int gasPrice = 0; + int? gasBaseFee = 0; + int estimatedGasUnits = 0; - int? _gasPrice; - int? _estimatedGas; bool _isTransactionUpdating; // TODO: remove after integrating our own node and having eth_newPendingTransactionFilter @@ -173,12 +176,70 @@ abstract class EVMChainWalletBase @override int calculateEstimatedFee(TransactionPriority priority, int? amount) { + { + try { + if (priority is EVMChainTransactionPriority) { + final priorityFee = EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt(); + + int maxFeePerGas; + if (gasBaseFee != null) { + // MaxFeePerGas with EIP1559; + maxFeePerGas = gasBaseFee! + priorityFee; + } else { + // MaxFeePerGas with gasPrice; + maxFeePerGas = gasPrice; + debugPrint('MaxFeePerGas with gasPrice: $maxFeePerGas'); + } + + final totalGasFee = estimatedGasUnits * maxFeePerGas; + return totalGasFee; + } + + return 0; + } catch (e) { + return 0; + } + } + } + + /// Allows more customization to the fetch estimatedFees flow. + /// + /// We are able to pass in: + /// - The exact amount the user wants to send, + /// - The addressHex for the receiving wallet, + /// - A contract address which would be essential in determining if to calcualate the estimate for ERC20 or native ETH + Future calculateActualEstimatedFeeForCreateTransaction({ + required amount, + required String? contractAddress, + required String receivingAddressHex, + required TransactionPriority priority, + }) async { try { if (priority is EVMChainTransactionPriority) { final priorityFee = EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt(); - return (_gasPrice! + priorityFee) * (_estimatedGas ?? 0); - } + int maxFeePerGas; + if (gasBaseFee != null) { + // MaxFeePerGas with EIP1559; + maxFeePerGas = gasBaseFee! + priorityFee; + } else { + // MaxFeePerGas with gasPrice + maxFeePerGas = gasPrice; + } + + final estimatedGas = await _client.getEstimatedGas( + contractAddress: contractAddress, + senderAddress: _evmChainPrivateKey.address, + value: EtherAmount.fromBigInt(EtherUnit.wei, amount!), + gasPrice: EtherAmount.fromInt(EtherUnit.wei, gasPrice), + toAddress: EthereumAddress.fromHex(receivingAddressHex), + // maxFeePerGas: EtherAmount.fromInt(EtherUnit.wei, maxFeePerGas), + // maxPriorityFeePerGas: EtherAmount.fromInt(EtherUnit.gwei, priority.tip), + ); + + final totalGasFee = estimatedGas * maxFeePerGas; + return totalGasFee; + } return 0; } catch (e) { return 0; @@ -225,13 +286,12 @@ abstract class EVMChainWalletBase syncStatus = AttemptingSyncStatus(); await _updateBalance(); await _updateTransactions(); - _gasPrice = await _client.getGasUnitPrice(); - _estimatedGas = await _client.getEstimatedGas(); - Timer.periodic( - const Duration(minutes: 1), (timer) async => _gasPrice = await _client.getGasUnitPrice()); - Timer.periodic(const Duration(seconds: 10), - (timer) async => _estimatedGas = await _client.getEstimatedGas()); + await _updateEstimatedGasFeeParams(); + + Timer.periodic(const Duration(seconds: 10), (timer) async { + await _updateEstimatedGasFeeParams(); + }); syncStatus = SyncedSyncStatus(); } catch (e) { @@ -239,6 +299,19 @@ abstract class EVMChainWalletBase } } + Future _updateEstimatedGasFeeParams() async { + gasBaseFee = await _client.getGasBaseFee(); + + gasPrice = await _client.getGasUnitPrice(); + + estimatedGasUnits = await _client.getEstimatedGas( + senderAddress: _evmChainPrivateKey.address, + toAddress: _evmChainPrivateKey.address, + gasPrice: EtherAmount.fromInt(EtherUnit.wei, gasPrice), + value: EtherAmount.fromBigInt(EtherUnit.wei, BigInt.one), + ); + } + @override Future createTransaction(Object credentials) async { final _credentials = credentials as EVMChainTransactionCredentials; @@ -258,8 +331,17 @@ abstract class EVMChainWalletBase final erc20Balance = balance[transactionCurrency]!; BigInt totalAmount = BigInt.zero; + BigInt estimatedFeesForTransaction = BigInt.zero; int exponent = transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18; num amountToEVMChainMultiplier = pow(10, exponent); + String? contractAddress; + String toAddress = _credentials.outputs.first.isParsedAddress + ? _credentials.outputs.first.extractedAddress! + : _credentials.outputs.first.address; + + if (transactionCurrency is Erc20Token) { + contractAddress = transactionCurrency.contractAddress; + } // so far this can not be made with Ethereum as Ethereum does not support multiple recipients if (hasMultiDestination) { @@ -271,35 +353,50 @@ abstract class EVMChainWalletBase outputs.fold(0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0))); totalAmount = BigInt.from(totalOriginalAmount * amountToEVMChainMultiplier); + final estimateFees = await calculateActualEstimatedFeeForCreateTransaction( + amount: totalAmount, + receivingAddressHex: toAddress, + priority: _credentials.priority!, + contractAddress: contractAddress, + ); + + estimatedFeesForTransaction = BigInt.from(estimateFees); + if (erc20Balance.balance < totalAmount) { throw EVMChainTransactionCreationException(transactionCurrency); } } else { final output = outputs.first; - // since the fees are taken from Ethereum - // then no need to subtract the fees from the amount if send all - final BigInt allAmount; - if (transactionCurrency is Erc20Token) { - allAmount = erc20Balance.balance; - } else { - final estimatedFee = BigInt.from(calculateEstimatedFee(_credentials.priority!, null)); - - if (estimatedFee > erc20Balance.balance) { - throw EVMChainTransactionFeesException(); - } - - allAmount = erc20Balance.balance - estimatedFee; - } - - if (output.sendAll) { - totalAmount = allAmount; - } else { + if (!output.sendAll) { final totalOriginalAmount = EVMChainFormatter.parseEVMChainAmountToDouble(output.formattedCryptoAmount ?? 0); totalAmount = BigInt.from(totalOriginalAmount * amountToEVMChainMultiplier); } + if (output.sendAll && transactionCurrency is Erc20Token) { + totalAmount = erc20Balance.balance; + } + + final estimateFees = await calculateActualEstimatedFeeForCreateTransaction( + amount: totalAmount, + receivingAddressHex: toAddress, + priority: _credentials.priority!, + contractAddress: contractAddress, + ); + + estimatedFeesForTransaction = BigInt.from(estimateFees); + + debugPrint('Estimated Fees for Transaction: $estimatedFeesForTransaction'); + + if (output.sendAll && transactionCurrency is! Erc20Token) { + totalAmount = (erc20Balance.balance - estimatedFeesForTransaction); + + if (estimatedFeesForTransaction > erc20Balance.balance) { + throw EVMChainTransactionFeesException(); + } + } + if (erc20Balance.balance < totalAmount) { throw EVMChainTransactionCreationException(transactionCurrency); } @@ -312,11 +409,9 @@ abstract class EVMChainWalletBase final pendingEVMChainTransaction = await _client.signTransaction( privateKey: _evmChainPrivateKey, - toAddress: _credentials.outputs.first.isParsedAddress - ? _credentials.outputs.first.extractedAddress! - : _credentials.outputs.first.address, + toAddress: toAddress, amount: totalAmount, - gas: _estimatedGas!, + gas: estimatedFeesForTransaction, priority: _credentials.priority!, currency: transactionCurrency, exponent: exponent, @@ -483,6 +578,7 @@ abstract class EVMChainWalletBase return EthPrivateKey.fromHex(HEX.encode(addressAtIndex.privateKey as List)); } + @override Future? updateBalance() async => await _updateBalance(); List get erc20Currencies => evmChainErc20TokensBox.values.toList(); From 341e06196da34df29891fb3ec28b47ca94fee3a5 Mon Sep 17 00:00:00 2001 From: Adegoke David <64401859+Blazebrain@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:26:05 +0100 Subject: [PATCH 06/77] CW-674: Improve Exchange Flow With Timeout For Rates (#1536) * fix: Improve exchange flow by adding a timeout to the call to fetch rate from providers * fix: Adjust time limit for fetching rate to 7 seconds and add timelimit to fetching limits * Improve loadlimits function [skip ci] --------- Co-authored-by: OmarHatem --- .../provider/sideshift_exchange_provider.dart | 16 ++++- .../exchange/exchange_view_model.dart | 58 ++++++++++++------- 2 files changed, 52 insertions(+), 22 deletions(-) diff --git a/lib/exchange/provider/sideshift_exchange_provider.dart b/lib/exchange/provider/sideshift_exchange_provider.dart index 1be4f8045..127421bbd 100644 --- a/lib/exchange/provider/sideshift_exchange_provider.dart +++ b/lib/exchange/provider/sideshift_exchange_provider.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:developer'; import 'package:cake_wallet/.secrets.g.dart' as secrets; import 'package:cake_wallet/exchange/provider/exchange_provider.dart'; @@ -29,6 +30,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { CryptoCurrency.bttc, CryptoCurrency.usdt, CryptoCurrency.eos, + CryptoCurrency.xmr, ]; static const affiliateId = secrets.sideShiftAffiliateId; @@ -137,8 +139,20 @@ class SideShiftExchangeProvider extends ExchangeProvider { final response = await get(uri); final responseJSON = json.decode(response.body) as Map; + if (response.statusCode == 500) { + final responseJSON = json.decode(response.body) as Map; + final error = responseJSON['error']['message'] as String; + + throw Exception('SideShift Internal Server Error: $error'); + } + + if (response.statusCode != 200) { + throw Exception('Unexpected http status: ${response.statusCode}'); + } + return double.parse(responseJSON['rate'] as String); - } catch (_) { + } catch (e) { + log('Error fetching rate in SideShift Provider: ${e.toString()}'); return 0.00; } } diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 404fa0f25..a97b3dc05 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -405,13 +405,22 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with .where((element) => !isFixedRateMode || element.supportsFixedRate) .toList(); - final result = await Future.wait(_providers.map((element) => element.fetchRate( - from: depositCurrency, - to: receiveCurrency, - amount: amount, - isFixedRateMode: isFixedRateMode, - isReceiveAmount: isFixedRateMode))); - + final result = await Future.wait( + _providers.map( + (element) => element + .fetchRate( + from: depositCurrency, + to: receiveCurrency, + amount: amount, + isFixedRateMode: isFixedRateMode, + isReceiveAmount: isFixedRateMode, + ) + .timeout( + Duration(seconds: 7), + onTimeout: () => 0.0, + ), + ), + ); _sortedAvailableProviders.clear(); for (int i = 0; i < result.length; i++) { @@ -441,22 +450,29 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with double? highestMax = 0.0; try { - for (var provider in selectedProviders) { - /// if this provider is not valid for the current pair, skip it - if (!providersForCurrentPair().contains(provider)) continue; + final result = await Future.wait(selectedProviders + .where((element) => providersForCurrentPair().contains(provider)) + .map((provider) => provider + .fetchLimits( + from: from, + to: to, + isFixedRateMode: isFixedRateMode, + ) + .onError((error, stackTrace) => Limits(max: 0.0, min: double.maxFinite)) + .timeout( + Duration(seconds: 7), + onTimeout: () => Limits(max: 0.0, min: double.maxFinite), + ))); - try { - final tempLimits = - await provider.fetchLimits(from: from, to: to, isFixedRateMode: isFixedRateMode); - - if (lowestMin != null && (tempLimits.min ?? -1) < lowestMin) lowestMin = tempLimits.min; - - if (highestMax != null && (tempLimits.max ?? double.maxFinite) > highestMax) - highestMax = tempLimits.max; - } catch (e) { - continue; + result.forEach((tempLimits) { + if (lowestMin != null && (tempLimits.min ?? -1) < lowestMin!) { + lowestMin = tempLimits.min; } - } + + if (highestMax != null && (tempLimits.max ?? double.maxFinite) > highestMax!) { + highestMax = tempLimits.max; + } + }); } on ConcurrentModificationError { /// if user changed the selected providers while fetching limits /// then delay the fetching limits a bit and try again From 7514d851cec10d122f09f5a3072a50a185401e5f Mon Sep 17 00:00:00 2001 From: cyan Date: Sun, 21 Jul 2024 02:43:09 +0200 Subject: [PATCH 07/77] store() on bad network (#1543) * fix: for storing on bad network connection. * feat from standup * fix missing declaration * remove forcing trusted daemon flag [skip ci] --------- Co-authored-by: OmarHatem --- cw_monero/lib/api/wallet.dart | 16 +++++++++++++++- cw_wownero/lib/api/wallet.dart | 15 ++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 59eeb1498..6ca9cd1bb 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -121,9 +121,23 @@ void setRecoveringFromSeed({required bool isRecovery}) => monero.Wallet_setRecoveringFromSeed(wptr!, recoveringFromSeed: isRecovery); final storeMutex = Mutex(); + + +int lastStorePointer = 0; +int lastStoreHeight = 0; void storeSync() async { - await storeMutex.acquire(); final addr = wptr!.address; + final synchronized = await Isolate.run(() { + return monero.Wallet_synchronized(Pointer.fromAddress(addr)); + }); + if (lastStorePointer == wptr!.address && + lastStoreHeight + 5000 < monero.Wallet_blockChainHeight(wptr!) && + !synchronized) { + return; + } + lastStorePointer = wptr!.address; + lastStoreHeight = monero.Wallet_blockChainHeight(wptr!); + await storeMutex.acquire(); await Isolate.run(() { monero.Wallet_store(Pointer.fromAddress(addr)); }); diff --git a/cw_wownero/lib/api/wallet.dart b/cw_wownero/lib/api/wallet.dart index 6a7550d84..96822dfe4 100644 --- a/cw_wownero/lib/api/wallet.dart +++ b/cw_wownero/lib/api/wallet.dart @@ -126,9 +126,22 @@ void setRecoveringFromSeed({required bool isRecovery}) => wownero.Wallet_setRecoveringFromSeed(wptr!, recoveringFromSeed: isRecovery); final storeMutex = Mutex(); + +int lastStorePointer = 0; +int lastStoreHeight = 0; void storeSync() async { - await storeMutex.acquire(); final addr = wptr!.address; + final synchronized = await Isolate.run(() { + return wownero.Wallet_synchronized(Pointer.fromAddress(addr)); + }); + if (lastStorePointer == wptr!.address && + lastStoreHeight + 5000 < wownero.Wallet_blockChainHeight(wptr!) && + !synchronized) { + return; + } + lastStorePointer = wptr!.address; + lastStoreHeight = wownero.Wallet_blockChainHeight(wptr!); + await storeMutex.acquire(); Isolate.run(() { wownero.Wallet_store(Pointer.fromAddress(addr)); }); From 311fff2c446416ecc5c17e6a994e5c9aa7b2ecde Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Sun, 21 Jul 2024 03:46:43 +0300 Subject: [PATCH 08/77] Generic fixes (#1528) * update target sdk for android * make welcome page scrollable fix moonpay url params * fix null exception when restoring from backup * fix ui issues * hopefully fix the timeout exception error report [skip ci] * validate electrum addresses * disable silent payments for hardware wallets * fixes and enhancements --- android/app/build.gradle | 2 +- cw_bitcoin/lib/electrum_wallet_addresses.dart | 17 +- cw_core/lib/crypto_currency.dart | 2 +- cw_core/lib/transaction_info.dart | 2 +- cw_monero/lib/monero_subaddress_list.dart | 3 +- cw_monero/lib/monero_transaction_info.dart | 10 +- cw_wownero/lib/wownero_transaction_info.dart | 10 +- lib/bitcoin/cw_bitcoin.dart | 2 +- lib/buy/moonpay/moonpay_provider.dart | 5 +- lib/entities/provider_types.dart | 3 +- .../screens/dashboard/pages/balance_page.dart | 2 +- lib/src/screens/rescan/rescan_page.dart | 66 ++++--- lib/src/screens/welcome/welcome_page.dart | 187 +++++++++--------- lib/src/widgets/blockchain_height_widget.dart | 148 +++++++------- lib/store/settings_store.dart | 8 +- .../dashboard/balance_view_model.dart | 2 +- .../dashboard/dashboard_view_model.dart | 2 +- .../transaction_details_view_model.dart | 26 +-- res/values/strings_ar.arb | 2 +- res/values/strings_bg.arb | 2 +- res/values/strings_cs.arb | 2 +- res/values/strings_de.arb | 2 +- res/values/strings_en.arb | 2 +- res/values/strings_es.arb | 2 +- res/values/strings_fr.arb | 2 +- res/values/strings_ha.arb | 2 +- res/values/strings_hi.arb | 2 +- res/values/strings_hr.arb | 2 +- res/values/strings_id.arb | 2 +- res/values/strings_it.arb | 2 +- res/values/strings_ja.arb | 2 +- res/values/strings_ko.arb | 2 +- res/values/strings_my.arb | 2 +- res/values/strings_nl.arb | 2 +- res/values/strings_pl.arb | 2 +- res/values/strings_pt.arb | 2 +- res/values/strings_ru.arb | 2 +- res/values/strings_th.arb | 2 +- res/values/strings_tl.arb | 2 +- res/values/strings_tr.arb | 2 +- res/values/strings_uk.arb | 2 +- res/values/strings_ur.arb | 2 +- res/values/strings_yo.arb | 2 +- res/values/strings_zh.arb | 2 +- tool/append_translation.dart | 2 + 45 files changed, 280 insertions(+), 271 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5e27aeb9e..60defb1fd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -46,7 +46,7 @@ android { defaultConfig { applicationId appProperties['id'] minSdkVersion 24 - targetSdkVersion 33 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart index e0857a6d0..9499a6db7 100644 --- a/cw_bitcoin/lib/electrum_wallet_addresses.dart +++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart @@ -224,6 +224,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { updateAddressesByMatch(); updateReceiveAddresses(); updateChangeAddresses(); + _validateAddresses(); await updateAddressesInBox(); if (currentReceiveAddressIndex >= receiveAddresses.length) { @@ -458,10 +459,6 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { Future discoverAddresses(List addressList, bool isHidden, Future Function(BitcoinAddressRecord) getAddressHistory, {BitcoinAddressType type = SegwitAddresType.p2wpkh}) async { - if (!isHidden) { - _validateSideHdAddresses(addressList.toList()); - } - final newAddresses = await _createNewAddresses(gap, startIndex: addressList.length, isHidden: isHidden, type: type); addAddresses(newAddresses); @@ -541,11 +538,15 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { updateAddressesByMatch(); } - void _validateSideHdAddresses(List addrWithTransactions) { - addrWithTransactions.forEach((element) { - if (element.address != - getAddress(index: element.index, hd: mainHd, addressType: element.type)) + void _validateAddresses() { + allAddresses.forEach((element) { + if (!element.isHidden && element.address != + getAddress(index: element.index, hd: mainHd, addressType: element.type)) { element.isHidden = true; + } else if (element.isHidden && element.address != + getAddress(index: element.index, hd: sideHd, addressType: element.type)) { + element.isHidden = false; + } }); } diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 6881393ed..cf7a73b3c 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -281,7 +281,7 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen final s = 'Unexpected token: $name for CryptoCurrency fromFullName'; throw ArgumentError.value(name, 'Fullname', s); } - return CryptoCurrency._fullNameCurrencyMap[name.toLowerCase()]!; + return CryptoCurrency._fullNameCurrencyMap[name.split("(").first.trim().toLowerCase()]!; } @override diff --git a/cw_core/lib/transaction_info.dart b/cw_core/lib/transaction_info.dart index a270c0479..e363d88db 100644 --- a/cw_core/lib/transaction_info.dart +++ b/cw_core/lib/transaction_info.dart @@ -3,7 +3,7 @@ import 'package:cw_core/keyable.dart'; abstract class TransactionInfo extends Object with Keyable { late String id; - late String txhash = id; + late String txHash = id; late int amount; int? fee; late TransactionDirection direction; diff --git a/cw_monero/lib/monero_subaddress_list.dart b/cw_monero/lib/monero_subaddress_list.dart index 623d744fd..c35afb282 100644 --- a/cw_monero/lib/monero_subaddress_list.dart +++ b/cw_monero/lib/monero_subaddress_list.dart @@ -124,8 +124,7 @@ abstract class MoneroSubaddressListBase with Store { Future> _getAllUnusedAddresses( {required int accountIndex, required String label}) async { final allAddresses = subaddress_list.getAllSubaddresses(); - final lastAddress = allAddresses.length == 0 ? allAddresses.last.address : Subaddress(id: -1, address: "", label: ""); - if (allAddresses.isEmpty || _usedAddresses.contains(lastAddress)) { + if (allAddresses.isEmpty || _usedAddresses.contains(allAddresses.last)) { final isAddressUnused = await _newSubaddress(accountIndex: accountIndex, label: label); if (!isAddressUnused) { return await _getAllUnusedAddresses(accountIndex: accountIndex, label: label); diff --git a/cw_monero/lib/monero_transaction_info.dart b/cw_monero/lib/monero_transaction_info.dart index b1a4e4229..596b26812 100644 --- a/cw_monero/lib/monero_transaction_info.dart +++ b/cw_monero/lib/monero_transaction_info.dart @@ -9,14 +9,14 @@ import 'package:cw_core/format_amount.dart'; import 'package:cw_monero/api/transaction_history.dart'; class MoneroTransactionInfo extends TransactionInfo { - MoneroTransactionInfo(this.txhash, this.height, this.direction, this.date, + MoneroTransactionInfo(this.txHash, this.height, this.direction, this.date, this.isPending, this.amount, this.accountIndex, this.addressIndex, this.fee, this.confirmations) : - id = "${txhash}_${amount}_${accountIndex}_${addressIndex}"; + id = "${txHash}_${amount}_${accountIndex}_${addressIndex}"; MoneroTransactionInfo.fromMap(Map map) : id = "${map['hash']}_${map['amount']}_${map['accountIndex']}_${map['addressIndex']}", - txhash = map['hash'] as String, + txHash = map['hash'] as String, height = (map['height'] ?? 0) as int, direction = map['direction'] != null ? parseTransactionDirectionFromNumber(map['direction'] as String) @@ -39,7 +39,7 @@ class MoneroTransactionInfo extends TransactionInfo { MoneroTransactionInfo.fromRow(TransactionInfoRow row) : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", - txhash = row.getHash(), + txHash = row.getHash(), height = row.blockHeight, direction = parseTransactionDirectionFromInt(row.direction), date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), @@ -58,7 +58,7 @@ class MoneroTransactionInfo extends TransactionInfo { } final String id; - final String txhash; + final String txHash; final int height; final TransactionDirection direction; final DateTime date; diff --git a/cw_wownero/lib/wownero_transaction_info.dart b/cw_wownero/lib/wownero_transaction_info.dart index 6016e2e59..7b0073452 100644 --- a/cw_wownero/lib/wownero_transaction_info.dart +++ b/cw_wownero/lib/wownero_transaction_info.dart @@ -7,14 +7,14 @@ import 'package:cw_core/format_amount.dart'; import 'package:cw_wownero/api/transaction_history.dart'; class WowneroTransactionInfo extends TransactionInfo { - WowneroTransactionInfo(this.txhash, this.height, this.direction, this.date, + WowneroTransactionInfo(this.txHash, this.height, this.direction, this.date, this.isPending, this.amount, this.accountIndex, this.addressIndex, this.fee, this.confirmations) : - id = "${txhash}_${amount}_${accountIndex}_${addressIndex}"; + id = "${txHash}_${amount}_${accountIndex}_${addressIndex}"; WowneroTransactionInfo.fromMap(Map map) : id = "${map['hash']}_${map['amount']}_${map['accountIndex']}_${map['addressIndex']}", - txhash = map['hash'] as String, + txHash = map['hash'] as String, height = (map['height'] ?? 0) as int, direction = map['direction'] != null ? parseTransactionDirectionFromNumber(map['direction'] as String) @@ -37,7 +37,7 @@ class WowneroTransactionInfo extends TransactionInfo { WowneroTransactionInfo.fromRow(TransactionInfoRow row) : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", - txhash = row.getHash(), + txHash = row.getHash(), height = row.blockHeight, direction = parseTransactionDirectionFromInt(row.direction), date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), @@ -56,7 +56,7 @@ class WowneroTransactionInfo extends TransactionInfo { } final String id; - final String txhash; + final String txHash; final int height; final TransactionDirection direction; final DateTime date; diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index 86d9c4985..efb1211bc 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -560,7 +560,7 @@ class CWBitcoin extends Bitcoin { if (tweaksResponse != null) { return true; } - } on RequestFailedTimeoutException { + } on RequestFailedTimeoutException catch (_) { return false; } catch (_) { rethrow; diff --git a/lib/buy/moonpay/moonpay_provider.dart b/lib/buy/moonpay/moonpay_provider.dart index 59251e064..c89fb222f 100644 --- a/lib/buy/moonpay/moonpay_provider.dart +++ b/lib/buy/moonpay/moonpay_provider.dart @@ -149,10 +149,9 @@ class MoonPayProvider extends BuyProvider { 'colorCode': settingsStore.currentTheme.type == ThemeType.dark ? '#${Palette.blueCraiola.value.toRadixString(16).substring(2, 8)}' : '#${Palette.moderateSlateBlue.value.toRadixString(16).substring(2, 8)}', - 'defaultCurrencyCode': _normalizeCurrency(currency), - 'baseCurrencyCode': _normalizeCurrency(currency), + 'baseCurrencyCode': settingsStore.fiatCurrency.title, 'baseCurrencyAmount': amount ?? '0', - 'currencyCode': currencyCode, + 'currencyCode': _normalizeCurrency(currency), 'walletAddress': walletAddress, 'lockAmount': 'false', 'showAllCurrencies': 'false', diff --git a/lib/entities/provider_types.dart b/lib/entities/provider_types.dart index da7bae4c1..b9dd4ef2a 100644 --- a/lib/entities/provider_types.dart +++ b/lib/entities/provider_types.dart @@ -67,9 +67,8 @@ class ProvidersHelper { ]; case WalletType.litecoin: case WalletType.bitcoinCash: - return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood, ProviderType.moonpay]; case WalletType.solana: - return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood]; + return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood, ProviderType.moonpay]; case WalletType.tron: return [ ProviderType.askEachTime, diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 7ffcf918d..d95c19dad 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -340,7 +340,7 @@ class CryptoBalanceWidget extends StatelessWidget { builder: (BuildContext context) => AlertWithTwoActions( alertTitle: S.of(context).change_current_node_title, alertContent: S.of(context).confirm_silent_payments_switch_node, - rightButtonText: S.of(context).ok, + rightButtonText: S.of(context).confirm, leftButtonText: S.of(context).cancel, actionRightButton: () { dashboardViewModel.setSilentPaymentsScanning(newValue); diff --git a/lib/src/screens/rescan/rescan_page.dart b/lib/src/screens/rescan/rescan_page.dart index 4b2327c43..b66c94878 100644 --- a/lib/src/screens/rescan/rescan_page.dart +++ b/lib/src/screens/rescan/rescan_page.dart @@ -22,38 +22,42 @@ class RescanPage extends BasePage { @override Widget body(BuildContext context) { - return Padding( - padding: EdgeInsets.only(left: 24, right: 24, bottom: 24), - child: Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Observer( - builder: (_) => BlockchainHeightWidget( - key: _blockchainHeightWidgetKey, - onHeightOrDateEntered: (value) => _rescanViewModel.isButtonEnabled = value, - isSilentPaymentsScan: _rescanViewModel.isSilentPaymentsScan, - doSingleScan: _rescanViewModel.doSingleScan, - toggleSingleScan: () => - _rescanViewModel.doSingleScan = !_rescanViewModel.doSingleScan, - walletType: _rescanViewModel.wallet.type, - )), - Observer( - builder: (_) => LoadingPrimaryButton( - isLoading: _rescanViewModel.state == RescanWalletState.rescaning, - text: S.of(context).rescan, - onPressed: () async { - if (_rescanViewModel.isSilentPaymentsScan) { - return _toggleSilentPaymentsScanning(context); - } + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => FocusScope.of(context).unfocus(), + child: Padding( + padding: EdgeInsets.only(left: 24, right: 24, bottom: 24), + child: Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Observer( + builder: (_) => BlockchainHeightWidget( + key: _blockchainHeightWidgetKey, + onHeightOrDateEntered: (value) => _rescanViewModel.isButtonEnabled = value, + isSilentPaymentsScan: _rescanViewModel.isSilentPaymentsScan, + doSingleScan: _rescanViewModel.doSingleScan, + toggleSingleScan: () => + _rescanViewModel.doSingleScan = !_rescanViewModel.doSingleScan, + walletType: _rescanViewModel.wallet.type, + )), + Observer( + builder: (_) => LoadingPrimaryButton( + isLoading: _rescanViewModel.state == RescanWalletState.rescaning, + text: S.of(context).rescan, + onPressed: () async { + if (_rescanViewModel.isSilentPaymentsScan) { + return _toggleSilentPaymentsScanning(context); + } - _rescanViewModel.rescanCurrentWallet( - restoreHeight: _blockchainHeightWidgetKey.currentState!.height); + _rescanViewModel.rescanCurrentWallet( + restoreHeight: _blockchainHeightWidgetKey.currentState!.height); - Navigator.of(context).pop(); - }, - color: Theme.of(context).primaryColor, - textColor: Colors.white, - isDisabled: !_rescanViewModel.isButtonEnabled, - )) - ]), + Navigator.of(context).pop(); + }, + color: Theme.of(context).primaryColor, + textColor: Colors.white, + isDisabled: !_rescanViewModel.isButtonEnabled, + )) + ]), + ), ); } @@ -71,7 +75,7 @@ class RescanPage extends BasePage { builder: (BuildContext _dialogContext) => AlertWithTwoActions( alertTitle: S.of(_dialogContext).change_current_node_title, alertContent: S.of(_dialogContext).confirm_silent_payments_switch_node, - rightButtonText: S.of(_dialogContext).ok, + rightButtonText: S.of(_dialogContext).confirm, leftButtonText: S.of(_dialogContext).cancel, actionRightButton: () async { Navigator.of(_dialogContext).pop(); diff --git a/lib/src/screens/welcome/welcome_page.dart b/lib/src/screens/welcome/welcome_page.dart index 2142fdf9b..defc8e2c8 100644 --- a/lib/src/screens/welcome/welcome_page.dart +++ b/lib/src/screens/welcome/welcome_page.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; @@ -49,115 +50,113 @@ class WelcomePage extends BasePage { @override Widget body(BuildContext context) { - final welcomeImage = currentTheme.type == ThemeType.dark - ? welcomeImageDark - : welcomeImageLight; + final welcomeImage = currentTheme.type == ThemeType.dark ? welcomeImageDark : welcomeImageLight; final newWalletImage = Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: Theme.of(context).extension()!.restoreWalletButtonTextColor); final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', - height: 12, - - width: 12, - color: Theme.of(context).extension()!.titleColor); + height: 12, width: 12, color: Theme.of(context).extension()!.titleColor); return WillPopScope( - onWillPop: () async => false, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only(top: 64, bottom: 24, left: 24, right: 24), - child: ConstrainedBox( - constraints: BoxConstraints( - maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - children: [ - AspectRatio( - aspectRatio: aspectRatioImage, - child: FittedBox( - child: welcomeImage, fit: BoxFit.contain), - ), - Padding( - padding: EdgeInsets.only(top: 24), - child: Text( - S.of(context).welcome, - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.hintTextColor, - ), - textAlign: TextAlign.center, - ), - ), - Padding( - padding: EdgeInsets.only(top: 5), - child: Text( - appTitle(context), - style: TextStyle( - fontSize: 36, - fontWeight: FontWeight.bold, - color: Theme.of(context).extension()!.titleColor, - ), - textAlign: TextAlign.center, - ), - ), - Padding( - padding: EdgeInsets.only(top: 5), - child: Text( - appDescription(context), - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.hintTextColor, - ), - textAlign: TextAlign.center, - ), - ), - ], - ), - Column( - children: [ - Text( - S.of(context).please_make_selection, + onWillPop: () async => false, + child: ScrollableWithBottomSection( + content: Container( + alignment: Alignment.center, + padding: EdgeInsets.only(top: 64, bottom: 24, left: 24, right: 24), + child: ConstrainedBox( + constraints: + BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + children: [ + AspectRatio( + aspectRatio: aspectRatioImage, + child: FittedBox(child: welcomeImage, fit: BoxFit.contain), + ), + Padding( + padding: EdgeInsets.only(top: 24), + child: Text( + S.of(context).welcome, style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.normal, + fontSize: 18, + fontWeight: FontWeight.w500, color: Theme.of(context).extension()!.hintTextColor, ), textAlign: TextAlign.center, ), - Padding( - padding: EdgeInsets.only(top: 24), - child: PrimaryImageButton( - onPressed: () => Navigator.pushNamed( - context, Routes.newWalletFromWelcome), - image: newWalletImage, - text: S.of(context).create_new, - color: Theme.of(context).extension()!.createNewWalletButtonBackgroundColor, - textColor: Theme.of(context).extension()!.restoreWalletButtonTextColor, + ), + Padding( + padding: EdgeInsets.only(top: 5), + child: Text( + appTitle(context), + style: TextStyle( + fontSize: 36, + fontWeight: FontWeight.bold, + color: Theme.of(context).extension()!.titleColor, ), + textAlign: TextAlign.center, ), - Padding( - padding: EdgeInsets.only(top: 10), - child: PrimaryImageButton( - onPressed: () { - Navigator.pushNamed( - context, Routes.restoreOptions, - arguments: true); - }, - image: restoreWalletImage, - text: S.of(context).restore_wallet, - color: Theme.of(context).cardColor, - textColor: Theme.of(context).extension()!.titleColor), - ) - ], - ) - ], + ), + Padding( + padding: EdgeInsets.only(top: 5), + child: Text( + appDescription(context), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.hintTextColor, + ), + textAlign: TextAlign.center, + ), + ), + ], + ), + ], + ), + ), + ), + bottomSection: Column( + children: [ + Text( + S.of(context).please_make_selection, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.normal, + color: Theme.of(context).extension()!.hintTextColor, ), - ))); + textAlign: TextAlign.center, + ), + Padding( + padding: EdgeInsets.only(top: 24), + child: PrimaryImageButton( + onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome), + image: newWalletImage, + text: S.of(context).create_new, + color: Theme.of(context) + .extension()! + .createNewWalletButtonBackgroundColor, + textColor: + Theme.of(context).extension()!.restoreWalletButtonTextColor, + ), + ), + Padding( + padding: EdgeInsets.only(top: 10), + child: PrimaryImageButton( + onPressed: () { + Navigator.pushNamed(context, Routes.restoreOptions, arguments: true); + }, + image: restoreWalletImage, + text: S.of(context).restore_wallet, + color: Theme.of(context).cardColor, + textColor: Theme.of(context).extension()!.titleColor), + ) + ], + ), + ), + ); } } diff --git a/lib/src/widgets/blockchain_height_widget.dart b/lib/src/widgets/blockchain_height_widget.dart index 4023e66ad..e0f83a4f4 100644 --- a/lib/src/widgets/blockchain_height_widget.dart +++ b/lib/src/widgets/blockchain_height_widget.dart @@ -65,89 +65,93 @@ class BlockchainHeightState extends State { @override Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Flexible( - child: Container( - padding: EdgeInsets.only(top: 20.0, bottom: 10.0), - child: BaseTextFormField( - focusNode: widget.focusNode, - controller: restoreHeightController, - keyboardType: TextInputType.numberWithOptions(signed: false, decimal: false), - hintText: widget.isSilentPaymentsScan - ? S.of(context).silent_payments_scan_from_height - : S.of(context).widgets_restore_from_blockheight, - ))) - ], - ), - if (widget.hasDatePicker) ...[ - Padding( - padding: EdgeInsets.only(top: 15, bottom: 15), - child: Text( - S.of(context).widgets_or, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.titleColor), - ), - ), + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => FocusScope.of(context).unfocus(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Row( children: [ Flexible( child: Container( - child: InkWell( - onTap: () => _selectDate(context), - child: IgnorePointer( + padding: EdgeInsets.only(top: 20.0, bottom: 10.0), child: BaseTextFormField( - controller: dateController, - hintText: widget.isSilentPaymentsScan - ? S.of(context).silent_payments_scan_from_date - : S.of(context).widgets_restore_from_date, - )), - ), - )) + focusNode: widget.focusNode, + controller: restoreHeightController, + keyboardType: TextInputType.numberWithOptions(signed: false, decimal: false), + hintText: widget.isSilentPaymentsScan + ? S.of(context).silent_payments_scan_from_height + : S.of(context).widgets_restore_from_blockheight, + ))) ], ), - if (widget.isSilentPaymentsScan) + if (widget.hasDatePicker) ...[ Padding( - padding: EdgeInsets.only(top: 24), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - S.of(context).scan_one_block, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Theme.of(context).extension()!.titleColor, - ), - ), - Padding( - padding: const EdgeInsets.only(right: 8), - child: StandardSwitch( - value: widget.doSingleScan, - onTaped: () => widget.toggleSingleScan?.call(), - ), - ) - ], + padding: EdgeInsets.only(top: 15, bottom: 15), + child: Text( + S.of(context).widgets_or, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.titleColor), ), ), - Padding( - padding: EdgeInsets.only(left: 40, right: 40, top: 24), - child: Text( - widget.isSilentPaymentsScan - ? S.of(context).silent_payments_scan_from_date_or_blockheight - : S.of(context).restore_from_date_or_blockheight, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12, fontWeight: FontWeight.normal, color: Theme.of(context).hintColor), + Row( + children: [ + Flexible( + child: Container( + child: InkWell( + onTap: () => _selectDate(context), + child: IgnorePointer( + child: BaseTextFormField( + controller: dateController, + hintText: widget.isSilentPaymentsScan + ? S.of(context).silent_payments_scan_from_date + : S.of(context).widgets_restore_from_date, + )), + ), + )) + ], ), - ) - ] - ], + if (widget.isSilentPaymentsScan) + Padding( + padding: EdgeInsets.only(top: 24), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + S.of(context).scan_one_block, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Theme.of(context).extension()!.titleColor, + ), + ), + Padding( + padding: const EdgeInsets.only(right: 8), + child: StandardSwitch( + value: widget.doSingleScan, + onTaped: () => widget.toggleSingleScan?.call(), + ), + ) + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 40, right: 40, top: 24), + child: Text( + widget.isSilentPaymentsScan + ? S.of(context).silent_payments_scan_from_date_or_blockheight + : S.of(context).restore_from_date_or_blockheight, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, fontWeight: FontWeight.normal, color: Theme.of(context).hintColor), + ), + ) + ] + ], + ), ); } diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 8e16adbff..8fb26df53 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -1184,9 +1184,11 @@ abstract class SettingsStoreBase with Store { raw: sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority)!) ?? priority[WalletType.monero]!; - priority[WalletType.wownero] = wownero?.deserializeWowneroTransactionPriority( - raw: sharedPreferences.getInt(PreferencesKey.wowneroTransactionPriority)!) ?? - priority[WalletType.wownero]!; + if (wownero != null && + sharedPreferences.getInt(PreferencesKey.wowneroTransactionPriority) != null) { + priority[WalletType.wownero] = wownero!.deserializeWowneroTransactionPriority( + raw: sharedPreferences.getInt(PreferencesKey.wowneroTransactionPriority)!); + } if (bitcoin != null && sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority) != null) { diff --git a/lib/view_model/dashboard/balance_view_model.dart b/lib/view_model/dashboard/balance_view_model.dart index c8acb9c2c..8deb3b27c 100644 --- a/lib/view_model/dashboard/balance_view_model.dart +++ b/lib/view_model/dashboard/balance_view_model.dart @@ -61,7 +61,7 @@ abstract class BalanceViewModelBase with Store { WalletBase, TransactionInfo> wallet; @computed - bool get hasSilentPayments => wallet.type == WalletType.bitcoin; + bool get hasSilentPayments => wallet.type == WalletType.bitcoin && !wallet.isHardwareWallet; @computed double get price { diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index b4c5240e1..cc9cf1b7a 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -308,7 +308,7 @@ abstract class DashboardViewModelBase with Store { wallet.type == WalletType.haven; @computed - bool get hasSilentPayments => wallet.type == WalletType.bitcoin; + bool get hasSilentPayments => wallet.type == WalletType.bitcoin && !wallet.isHardwareWallet; @computed bool get showSilentPaymentsCard => hasSilentPayments && settingsStore.silentPaymentsCardDisplay; diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index 025ccab9b..9e71837a7 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -86,7 +86,7 @@ abstract class TransactionDetailsViewModelBase with Store { if (showRecipientAddress && !isRecipientAddressShown) { try { final recipientAddress = transactionDescriptionBox.values - .firstWhere((val) => val.id == transactionInfo.id) + .firstWhere((val) => val.id == transactionInfo.txHash) .recipientAddress; if (recipientAddress?.isNotEmpty ?? false) { @@ -105,14 +105,14 @@ abstract class TransactionDetailsViewModelBase with Store { value: _explorerDescription(type), onTap: () async { try { - final uri = Uri.parse(_explorerUrl(type, tx.id)); + final uri = Uri.parse(_explorerUrl(type, tx.txHash)); if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); } catch (e) {} })); final description = transactionDescriptionBox.values.firstWhere( - (val) => val.id == transactionInfo.id, - orElse: () => TransactionDescription(id: transactionInfo.id)); + (val) => val.id == transactionInfo.txHash, + orElse: () => TransactionDescription(id: transactionInfo.txHash)); items.add(TextFieldListItem( title: S.current.note_tap_to_change, @@ -214,7 +214,7 @@ abstract class TransactionDetailsViewModelBase with Store { final addressIndex = tx.additionalInfo['addressIndex'] as int; final feeFormatted = tx.feeFormatted(); final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txhash), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'), @@ -250,7 +250,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addElectrumListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()), @@ -265,7 +265,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addHavenListItems(TransactionInfo tx, DateFormat dateFormat) { items.addAll([ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'), @@ -277,7 +277,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addEthereumListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()), @@ -296,7 +296,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addNanoListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), if (showRecipientAddress && tx.to != null) StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!), if (showRecipientAddress && tx.from != null) @@ -313,7 +313,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addPolygonListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()), @@ -332,7 +332,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addSolanaListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()), @@ -396,7 +396,7 @@ abstract class TransactionDetailsViewModelBase with Store { void _addTronListItems(TransactionInfo tx, DateFormat dateFormat) { final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.id), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()), @@ -455,7 +455,7 @@ abstract class TransactionDetailsViewModelBase with Store { final addressIndex = tx.additionalInfo['addressIndex'] as int; final feeFormatted = tx.feeFormatted(); final _items = [ - StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txhash), + StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash), StandartListItem( title: S.current.transaction_details_date, value: dateFormat.format(tx.date)), StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'), diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 59fe26ef8..124e85270 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "تأكيد خصم الرسوم", "confirm_fee_deduction_content": "هل توافق على خصم الرسوم من الإخراج؟", "confirm_sending": "تأكيد الإرسال", - "confirm_silent_payments_switch_node": "حاليا مطلوب لتبديل العقد لمسح المدفوعات الصامتة", + "confirm_silent_payments_switch_node": "العقدة الحالية لا تدعم المدفوعات الصامتة \\ ncake wallet سوف تتحول إلى عقدة متوافقة ، فقط للمسح الضوئي", "confirmations": "التأكيدات", "confirmed": "رصيد مؤكد", "confirmed_tx": "مؤكد", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 689fc06cf..dee839ea5 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Потвърдете приспадането на таксите", "confirm_fee_deduction_content": "Съгласни ли сте да приспадате таксата от продукцията?", "confirm_sending": "Потвърждаване на изпращането", - "confirm_silent_payments_switch_node": "Понастоящем се изисква да превключвате възлите за сканиране на мълчаливи плащания", + "confirm_silent_payments_switch_node": "Текущият ви възел не поддържа Silent Payments \\ Ncake Wallet ще премине към съвместим възел, само за сканиране", "confirmations": "потвърждения", "confirmed": "Потвърден баланс", "confirmed_tx": "Потвърдено", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 433351a5b..ddc572766 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Potvrďte odpočet poplatků", "confirm_fee_deduction_content": "Souhlasíte s odečtením poplatku z výstupu?", "confirm_sending": "Potvrdit odeslání", - "confirm_silent_payments_switch_node": "V současné době je nutné přepínat uzly pro skenování tichých plateb", + "confirm_silent_payments_switch_node": "Váš aktuální uzel nepodporuje tiché platby \\ Ncake peněženka se přepne na kompatibilní uzel, pouze pro skenování", "confirmations": "Potvrzení", "confirmed": "Potvrzený zůstatek", "confirmed_tx": "Potvrzeno", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 624147cc2..de21d7e30 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Gebührenabzug bestätigen", "confirm_fee_deduction_content": "Stimmen Sie zu, die Gebühr von der Ausgabe abzuziehen?", "confirm_sending": "Senden bestätigen", - "confirm_silent_payments_switch_node": "Derzeit ist es erforderlich, Knoten zu wechseln, um stille Zahlungen zu scannen", + "confirm_silent_payments_switch_node": "Ihr aktueller Knoten unterstützt keine stillen Zahlungen \\ NCAKE Wallet wechselt zu einem kompatiblen Knoten, nur zum Scannen", "confirmations": "Bestätigungen", "confirmed": "Bestätigter Saldo", "confirmed_tx": "Bestätigt", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 4c7dcbebe..48950464d 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Confirm Fee Deduction", "confirm_fee_deduction_content": "Do you agree to deduct the fee from the output?", "confirm_sending": "Confirm sending", - "confirm_silent_payments_switch_node": "Currently it is required to switch nodes to scan silent payments", + "confirm_silent_payments_switch_node": "Your current node does not support silent payments\\nCake Wallet will switch to a compatible node, just for scanning", "confirmations": "Confirmations", "confirmed": "Confirmed Balance", "confirmed_tx": "Confirmed", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 5cf99d3c3..4aa0042c0 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Confirmar la deducción de la tarifa", "confirm_fee_deduction_content": "¿Acepta deducir la tarifa de la producción?", "confirm_sending": "Confirmar envío", - "confirm_silent_payments_switch_node": "Actualmente se requiere cambiar los nodos para escanear pagos silenciosos", + "confirm_silent_payments_switch_node": "Su nodo actual no admite pagos silenciosos \\ ncake billet cambiará a un nodo compatible, solo para escanear", "confirmations": "Confirmaciones", "confirmed": "Saldo confirmado", "confirmed_tx": "Confirmado", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 244238975..198111909 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Confirmer la déduction des frais", "confirm_fee_deduction_content": "Acceptez-vous de déduire les frais de la production?", "confirm_sending": "Confirmer l'envoi", - "confirm_silent_payments_switch_node": "Actuellement, il est nécessaire de changer de nœuds pour scanner les paiements silencieux", + "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", "confirmations": "Confirmations", "confirmed": "Solde confirmé", "confirmed_tx": "Confirmé", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 292ce0614..4259162c2 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Tabbatar da cire kudade", "confirm_fee_deduction_content": "Shin kun yarda ku cire kuɗin daga fitarwa?", "confirm_sending": "Tabbatar da aikawa", - "confirm_silent_payments_switch_node": "A halin yanzu ana buƙatar sauya nodes don bincika biyan siliki", + "confirm_silent_payments_switch_node": "Kumburinku na yanzu ba ya goyan bayan biyan shiru da shiru \\ NCADA Wallet zai canza zuwa kumburi mai dacewa, don bincika", "confirmations": "Tabbatar", "confirmed": "An tabbatar", "confirmed_tx": "Tabbatar", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 3cfb5129a..01e9dc90e 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "शुल्क कटौती की पुष्टि करें", "confirm_fee_deduction_content": "क्या आप आउटपुट से शुल्क में कटौती करने के लिए सहमत हैं?", "confirm_sending": "भेजने की पुष्टि करें", - "confirm_silent_payments_switch_node": "वर्तमान में मूक भुगतान को स्कैन करने के लिए नोड्स को स्विच करना आवश्यक है", + "confirm_silent_payments_switch_node": "आपका वर्तमान नोड मूक भुगतान का समर्थन नहीं करता है \\ ncake वॉलेट एक संगत नोड पर स्विच करेगा, बस स्कैनिंग के लिए", "confirmations": "पुष्टिकरण", "confirmed": "पुष्टि की गई शेष राशिी", "confirmed_tx": "की पुष्टि", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 5f8271504..7c9a521bf 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Potvrdite odbitak naknade", "confirm_fee_deduction_content": "Slažete li se da ćete odbiti naknadu od izlaza?", "confirm_sending": "Potvrdi slanje", - "confirm_silent_payments_switch_node": "Trenutno je potrebno prebaciti čvorove na skeniranje tihih plaćanja", + "confirm_silent_payments_switch_node": "Vaš trenutni čvor ne podržava tiha plaćanja \\ ncake novčanik prebacit će se na kompatibilni čvor, samo za skeniranje", "confirmations": "Potvrde", "confirmed": "Potvrđeno stanje", "confirmed_tx": "Potvrđen", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 9c8d91b90..0e6a894dd 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Konfirmasi pengurangan biaya", "confirm_fee_deduction_content": "Apakah Anda setuju untuk mengurangi biaya dari output?", "confirm_sending": "Konfirmasi pengiriman", - "confirm_silent_payments_switch_node": "Saat ini diminta untuk mengganti node untuk memindai pembayaran diam", + "confirm_silent_payments_switch_node": "Node Anda saat ini tidak mendukung pembayaran diam \\ ncake Wallet akan beralih ke simpul yang kompatibel, hanya untuk pemindaian", "confirmations": "Konfirmasi", "confirmed": "Saldo Terkonfirmasi", "confirmed_tx": "Dikonfirmasi", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index db55845ef..3c937a96a 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Conferma la detrazione delle commissioni", "confirm_fee_deduction_content": "Accetti di detrarre la commissione dall'output?", "confirm_sending": "Conferma l'invio", - "confirm_silent_payments_switch_node": "Attualmente è necessario cambiare nodi per scansionare i pagamenti silenziosi", + "confirm_silent_payments_switch_node": "Il tuo nodo corrente non supporta i pagamenti silenziosi \\ ncake Wallet passerà a un nodo compatibile, solo per la scansione", "confirmations": "Conferme", "confirmed": "Saldo confermato", "confirmed_tx": "Confermato", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index d24f0224d..1f914113d 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "料金控除を確認します", "confirm_fee_deduction_content": "出力から料金を差し引くことに同意しますか?", "confirm_sending": "送信を確認", - "confirm_silent_payments_switch_node": "現在、ノードを切り替えてサイレント決済をスキャンする必要があります", + "confirm_silent_payments_switch_node": "現在のノードはサイレントペイメントをサポートしていません\\ ncakeウォレットは、スキャン用に互換性のあるノードに切り替えます", "confirmations": "確認", "confirmed": "確認済み残高", "confirmed_tx": "確認済み", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 262c40e8d..6f72497c7 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "수수료 공제를 확인하십시오", "confirm_fee_deduction_content": "출력에서 수수료를 공제하는 데 동의하십니까?", "confirm_sending": "전송 확인", - "confirm_silent_payments_switch_node": "현재 사일런트 결제를 스캔하려면 노드를 전환해야합니다.", + "confirm_silent_payments_switch_node": "현재 노드는 무음 지불을 지원하지 않습니다 \\ ncake 지갑은 스캔을 위해 호환 가능한 노드로 전환됩니다.", "confirmations": "확인", "confirmed": "확인된 잔액", "confirmed_tx": "확인", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 4fd55684e..fa0937561 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "အခကြေးငွေကိုနှုတ်ယူခြင်း", "confirm_fee_deduction_content": "output မှအခကြေးငွေကိုယူရန်သဘောတူပါသလား။", "confirm_sending": "ပေးပို့အတည်ပြုပါ။", - "confirm_silent_payments_switch_node": "လောလောဆယ်အသံတိတ်ငွေပေးချေမှုကိုစကင်ဖတ်စစ်ဆေးရန် node များကိုပြောင်းရန်လိုအပ်သည်", + "confirm_silent_payments_switch_node": "သင်၏လက်ရှိ node သည်အသံတိတ်ငွေပေးချေမှုကိုမပံ့ပိုးပါဟု \\ t", "confirmations": "အတည်ပြုချက်များ", "confirmed": "အတည်ပြုထားသော လက်ကျန်ငွေ", "confirmed_tx": "အတည်ပြုသည်", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 70379c95c..ebfa58377 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Bevestig de aftrek van de kosten", "confirm_fee_deduction_content": "Stemt u ermee in om de vergoeding af te trekken van de output?", "confirm_sending": "Bevestig verzending", - "confirm_silent_payments_switch_node": "Momenteel is het vereist om knooppunten te schakelen om stille betalingen te scannen", + "confirm_silent_payments_switch_node": "Uw huidige knooppunt ondersteunt geen stille betalingen \\ ncake -portemonnee schakelt over naar een compatibele knoop", "confirmations": "Bevestigingen", "confirmed": "Bevestigd saldo", "confirmed_tx": "Bevestigd", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 6d8f05fcf..ab49e165a 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Potwierdź odliczenie opłaty", "confirm_fee_deduction_content": "Czy zgadzasz się odliczyć opłatę od wyników?", "confirm_sending": "Potwierdź wysłanie", - "confirm_silent_payments_switch_node": "Obecnie wymagane jest zmiana węzłów w celu skanowania cichych płatności", + "confirm_silent_payments_switch_node": "Twój obecny węzeł nie obsługuje cichych płatności \\ NCAKE Portfel przełączy się na kompatybilny węzeł, tylko do skanowania", "confirmations": "Potwierdzenia", "confirmed": "Potwierdzone saldo", "confirmed_tx": "Potwierdzony", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 381514341..9536a1b24 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Confirme dedução da taxa", "confirm_fee_deduction_content": "Você concorda em deduzir a taxa da saída?", "confirm_sending": "Confirmar o envio", - "confirm_silent_payments_switch_node": "Atualmente, é necessário trocar de nós para digitalizar pagamentos silenciosos", + "confirm_silent_payments_switch_node": "Seu nó atual não suporta pagamentos silenciosos \\ Ncake Wallet mudará para um nó compatível, apenas para digitalização", "confirmations": "Confirmações", "confirmed": "Saldo Confirmado", "confirmed_tx": "Confirmado", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 8611b32f8..a95c09ca2 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Подтвердите вычет платы", "confirm_fee_deduction_content": "Согласны ли вы вычесть плату из вывода?", "confirm_sending": "Подтвердить отправку", - "confirm_silent_payments_switch_node": "В настоящее время требуется переключение узлов для сканирования молчаливых платежей", + "confirm_silent_payments_switch_node": "Ваш текущий узел не поддерживает Silent Payments \\ ncake Wallet переключится на совместимый узел, только для сканирования", "confirmations": "Подтверждения", "confirmed": "Подтвержденный баланс", "confirmed_tx": "Подтвержденный", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index b1a96414d..5ff6b456c 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "ยืนยันการหักค่าธรรมเนียม", "confirm_fee_deduction_content": "คุณตกลงที่จะหักค่าธรรมเนียมจากผลลัพธ์หรือไม่?", "confirm_sending": "ยืนยันการส่ง", - "confirm_silent_payments_switch_node": "ขณะนี้จำเป็นต้องเปลี่ยนโหนดเพื่อสแกนการชำระเงินแบบเงียบ", + "confirm_silent_payments_switch_node": "โหนดปัจจุบันของคุณไม่รองรับการชำระเงินแบบเงียบ \\ ncake กระเป๋าเงินจะเปลี่ยนเป็นโหนดที่เข้ากันได้เพียงเพื่อการสแกน", "confirmations": "การยืนยัน", "confirmed": "ยอดคงเหลือที่ยืนยันแล้ว", "confirmed_tx": "ซึ่งยืนยันแล้ว", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 5566e4b79..2839234c8 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Kumpirmahin ang pagbabawas ng bayad", "confirm_fee_deduction_content": "Sumasang -ayon ka bang bawasan ang bayad mula sa output?", "confirm_sending": "Kumpirmahin ang pagpapadala", - "confirm_silent_payments_switch_node": "Sa kasalukuyan kinakailangan itong lumipat ng mga node upang i -scan ang mga tahimik na pagbabayad", + "confirm_silent_payments_switch_node": "Ang iyong kasalukuyang node ay hindi sumusuporta sa tahimik na pagbabayad \\ ncake wallet ay lilipat sa isang katugmang node, para lamang sa pag -scan", "confirmations": "Mga kumpirmasyon", "confirmed": "Nakumpirma na balanse", "confirmed_tx": "Nakumpirma", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 8af93e5aa..e7d0b702d 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Ücret kesintisini onaylayın", "confirm_fee_deduction_content": "Ücreti çıktıdan düşürmeyi kabul ediyor musunuz?", "confirm_sending": "Göndermeyi onayla", - "confirm_silent_payments_switch_node": "Şu anda sessiz ödemeleri taramak için düğümleri değiştirmek gerekiyor", + "confirm_silent_payments_switch_node": "Mevcut düğümünüz sessiz ödemeleri desteklemiyor \\ nCake cüzdanı, sadece tarama için uyumlu bir düğüme geçecektir", "confirmations": "Onay", "confirmed": "Onaylanmış Bakiye", "confirmed_tx": "Onaylanmış", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 375b9c373..f858116cc 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Підтвердьте відрахування комісії", "confirm_fee_deduction_content": "Чи погоджуєтесь ви вирахувати комісію з сумми одержувача?", "confirm_sending": "Підтвердити відправлення", - "confirm_silent_payments_switch_node": "В даний час потрібно перемикати вузли на сканування мовчазних платежів", + "confirm_silent_payments_switch_node": "Ваш поточний вузол не підтримує мовчазні платежі \\ ncake Wallet перейде на сумісний вузол, лише для сканування", "confirmations": "Підтвердження", "confirmed": "Підтверджений баланс", "confirmed_tx": "Підтверджений", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 4f86a15b2..fc0351f4d 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "فیس میں کٹوتی کی تصدیق کریں", "confirm_fee_deduction_content": "کیا آپ آؤٹ پٹ سے فیس کم کرنے پر راضی ہیں؟", "confirm_sending": "بھیجنے کی تصدیق کریں۔", - "confirm_silent_payments_switch_node": "فی الحال خاموش ادائیگیوں کو اسکین کرنے کے لئے نوڈس کو تبدیل کرنے کی ضرورت ہے", + "confirm_silent_payments_switch_node": "آپ کا موجودہ نوڈ خاموش ادائیگیوں کی حمایت نہیں کرتا ہے۔", "confirmations": "تصدیقات", "confirmed": "تصدیق شدہ بیلنس", "confirmed_tx": "تصدیق", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 1bdb1115c..19a98ba1a 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "Jẹrisi iyọkuro owo", "confirm_fee_deduction_content": "Ṣe o gba lati yọkuro idiyele naa kuro ni iṣejade?", "confirm_sending": "Jẹ́rìí sí ránṣẹ́", - "confirm_silent_payments_switch_node": "Lọwọlọwọ o nilo lati yi awọn apa pada si awọn sisanwo ipalọlọ", + "confirm_silent_payments_switch_node": "Ilode rẹ ti lọwọlọwọ ko ṣe atilẹyin awọn sisanwo ti o dakẹ \\ owet apamọwọ yoo yipada si oju-ọrọ ibaramu, o kan fun Scning", "confirmations": "Àwọn ẹ̀rí", "confirmed": "A ti jẹ́rìí ẹ̀", "confirmed_tx": "Jẹrisi", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index b3800f597..fee4f99ee 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -143,7 +143,7 @@ "confirm_fee_deduction": "确认费用扣除", "confirm_fee_deduction_content": "您是否同意从产出中扣除费用?", "confirm_sending": "确认发送", - "confirm_silent_payments_switch_node": "目前需要切换节点来扫描无声付款", + "confirm_silent_payments_switch_node": "您当前的节点不支持无声付款\\ ncake钱包将切换到兼容节点,仅用于扫描", "confirmations": "确认", "confirmed": "确认余额", "confirmed_tx": "确认的", diff --git a/tool/append_translation.dart b/tool/append_translation.dart index ac114bf3c..24778746c 100644 --- a/tool/append_translation.dart +++ b/tool/append_translation.dart @@ -2,6 +2,8 @@ import 'utils/translation/arb_file_utils.dart'; import 'utils/translation/translation_constants.dart'; import 'utils/translation/translation_utils.dart'; +/// flutter packages pub run tool/append_translation.dart "hello_world" "Hello World!" + void main(List args) async { if (args.length != 2) { throw Exception( From 649305acc343f75d26892b92f878e18747ddc8a2 Mon Sep 17 00:00:00 2001 From: cyan Date: Sun, 21 Jul 2024 02:58:17 +0200 Subject: [PATCH 09/77] CW-681 Add address and account list to Wownero (#1538) --- lib/di.dart | 3 +- lib/src/screens/receive/receive_page.dart | 1 + .../dashboard/balance_view_model.dart | 2 +- .../dashboard/dashboard_view_model.dart | 89 ++++++++++++++++--- ...ero_account_edit_or_create_view_model.dart | 31 ++++++- .../monero_account_list_view_model.dart | 21 +++++ .../node_create_or_edit_view_model.dart | 2 +- ...let_address_edit_or_create_view_model.dart | 16 ++++ .../wallet_address_list_view_model.dart | 39 ++++---- 9 files changed, 171 insertions(+), 33 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index 9136260e5..1462370fc 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -678,7 +678,7 @@ Future setup({ getIt.registerFactory(() { final wallet = getIt.get().wallet!; - if (wallet.type == WalletType.monero || wallet.type == WalletType.haven) { + if (wallet.type == WalletType.monero || wallet.type == WalletType.wownero || wallet.type == WalletType.haven) { return MoneroAccountListViewModel(wallet); } throw Exception( @@ -709,6 +709,7 @@ Future setup({ getIt.registerFactoryParam( (AccountListItem? account, _) => MoneroAccountEditOrCreateViewModel( monero!.getAccountList(getIt.get().wallet!), + wownero?.getAccountList(getIt.get().wallet!), haven?.getAccountList(getIt.get().wallet!), wallet: getIt.get().wallet!, accountListItem: account)); diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 789fb42bf..03524ef79 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -139,6 +139,7 @@ class ReceivePage extends BasePage { walletAddressListViewModel: addressListViewModel, trailingButtonTap: () async { if (addressListViewModel.type == WalletType.monero || + addressListViewModel.type == WalletType.wownero || addressListViewModel.type == WalletType.haven) { await showPopUp( context: context, diff --git a/lib/view_model/dashboard/balance_view_model.dart b/lib/view_model/dashboard/balance_view_model.dart index 8deb3b27c..045b55261 100644 --- a/lib/view_model/dashboard/balance_view_model.dart +++ b/lib/view_model/dashboard/balance_view_model.dart @@ -88,7 +88,7 @@ abstract class BalanceViewModelBase with Store { wallet.type == WalletType.tron; @computed - bool get hasAccounts => wallet.type == WalletType.monero; + bool get hasAccounts => wallet.type == WalletType.monero || wallet.type == WalletType.wownero; @computed SortBalanceBy get sortBalanceBy => settingsStore.sortBalanceBy; diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index cc9cf1b7a..5b5353e06 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -31,6 +31,7 @@ import 'package:cake_wallet/view_model/dashboard/trade_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/transaction_list_item.dart'; import 'package:cake_wallet/view_model/settings/sync_mode.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; +import 'package:cake_wallet/wownero/wownero.dart' as wow; import 'package:cryptography/cryptography.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/cake_hive.dart'; @@ -163,6 +164,29 @@ abstract class DashboardViewModelBase with Store { final sortedTransactions = [..._accountTransactions]; sortedTransactions.sort((a, b) => a.date.compareTo(b.date)); + transactions = ObservableList.of(sortedTransactions.map((transaction) => TransactionListItem( + transaction: transaction, + balanceViewModel: balanceViewModel, + settingsStore: appStore.settingsStore))); + } else if (_wallet.type == WalletType.wownero) { + subname = wow.wownero!.getCurrentAccount(_wallet).label; + + _onMoneroAccountChangeReaction = reaction( + (_) => wow.wownero!.getWowneroWalletDetails(wallet).account, + (wow.Account account) => _onMoneroAccountChange(_wallet)); + + _onMoneroBalanceChangeReaction = reaction( + (_) => wow.wownero!.getWowneroWalletDetails(wallet).balance, + (wow.WowneroBalance balance) => _onMoneroTransactionsUpdate(_wallet)); + + final _accountTransactions = _wallet.transactionHistory.transactions.values + .where((tx) => + wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id) + .toList(); + + final sortedTransactions = [..._accountTransactions]; + sortedTransactions.sort((a, b) => a.date.compareTo(b.date)); + transactions = ObservableList.of(sortedTransactions.map((transaction) => TransactionListItem( transaction: transaction, balanceViewModel: balanceViewModel, @@ -200,6 +224,10 @@ abstract class DashboardViewModelBase with Store { return monero!.getTransactionInfoAccountId(transaction) == monero!.getCurrentAccount(wallet).id; } + if (wallet.type == WalletType.wownero) { + return wow.wownero!.getTransactionInfoAccountId(transaction) == + wow.wownero!.getCurrentAccount(wallet).id; + } return true; }); @@ -459,6 +487,21 @@ abstract class DashboardViewModelBase with Store { (_) => monero!.getMoneroWalletDetails(wallet).balance, (MoneroBalance balance) => _onMoneroTransactionsUpdate(wallet)); + _onMoneroTransactionsUpdate(wallet); + } else if (wallet.type == WalletType.wownero) { + subname = wow.wownero!.getCurrentAccount(wallet).label; + + _onMoneroAccountChangeReaction?.reaction.dispose(); + _onMoneroBalanceChangeReaction?.reaction.dispose(); + + _onMoneroAccountChangeReaction = reaction( + (_) => wow.wownero!.getWowneroWalletDetails(wallet).account, + (wow.Account account) => _onMoneroAccountChange(wallet)); + + _onMoneroBalanceChangeReaction = reaction( + (_) => wow.wownero!.getWowneroWalletDetails(wallet).balance, + (wow.WowneroBalance balance) => _onMoneroTransactionsUpdate(wallet)); + _onMoneroTransactionsUpdate(wallet); } else { // FIX-ME: Check for side effects @@ -489,32 +532,54 @@ abstract class DashboardViewModelBase with Store { return monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id; } + if (wallet.type == WalletType.wownero) { + return wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id; + } + return true; }); } @action void _onMoneroAccountChange(WalletBase wallet) { - subname = monero!.getCurrentAccount(wallet).label; + if (wallet.type == WalletType.monero) { + subname = monero!.getCurrentAccount(wallet).label; + } else if (wallet.type == WalletType.wownero) { + subname = wow.wownero!.getCurrentAccount(wallet).label; + } _onMoneroTransactionsUpdate(wallet); } @action void _onMoneroTransactionsUpdate(WalletBase wallet) { transactions.clear(); + if (wallet.type == WalletType.monero) { + final _accountTransactions = monero! + .getTransactionHistory(wallet) + .transactions + .values + .where( + (tx) => monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id) + .toList(); - final _accountTransactions = monero! - .getTransactionHistory(wallet) - .transactions - .values - .where( - (tx) => monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id) - .toList(); + transactions.addAll(_accountTransactions.map((transaction) => TransactionListItem( + transaction: transaction, + balanceViewModel: balanceViewModel, + settingsStore: appStore.settingsStore))); + } else if (wallet.type == WalletType.wownero) { + final _accountTransactions = wow.wownero! + .getTransactionHistory(wallet) + .transactions + .values + .where( + (tx) => wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id) + .toList(); - transactions.addAll(_accountTransactions.map((transaction) => TransactionListItem( - transaction: transaction, - balanceViewModel: balanceViewModel, - settingsStore: appStore.settingsStore))); + transactions.addAll(_accountTransactions.map((transaction) => TransactionListItem( + transaction: transaction, + balanceViewModel: balanceViewModel, + settingsStore: appStore.settingsStore))); + } } void updateActions() { diff --git a/lib/view_model/monero_account_list/monero_account_edit_or_create_view_model.dart b/lib/view_model/monero_account_list/monero_account_edit_or_create_view_model.dart index 2f707c9ec..8d626e258 100644 --- a/lib/view_model/monero_account_list/monero_account_edit_or_create_view_model.dart +++ b/lib/view_model/monero_account_list/monero_account_edit_or_create_view_model.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; @@ -13,7 +14,7 @@ class MoneroAccountEditOrCreateViewModel = MoneroAccountEditOrCreateViewModelBas with _$MoneroAccountEditOrCreateViewModel; abstract class MoneroAccountEditOrCreateViewModelBase with Store { - MoneroAccountEditOrCreateViewModelBase(this._moneroAccountList, this._havenAccountList, + MoneroAccountEditOrCreateViewModelBase(this._moneroAccountList, this._wowneroAccountList, this._havenAccountList, {required WalletBase wallet, AccountListItem? accountListItem}) : state = InitialExecutionState(), isEdit = accountListItem != null, @@ -30,6 +31,7 @@ abstract class MoneroAccountEditOrCreateViewModelBase with Store { String label; final MoneroAccountList _moneroAccountList; + final WowneroAccountList? _wowneroAccountList; final HavenAccountList? _havenAccountList; final AccountListItem? _accountListItem; final WalletBase _wallet; @@ -42,6 +44,10 @@ abstract class MoneroAccountEditOrCreateViewModelBase with Store { if (_wallet.type == WalletType.haven) { await saveHaven(); } + + if (_wallet.type == WalletType.wownero) { + await saveWownero(); + } } Future saveMonero() async { @@ -91,4 +97,27 @@ abstract class MoneroAccountEditOrCreateViewModelBase with Store { state = FailureState(e.toString()); } } + + Future saveWownero() async { + try { + state = IsExecutingState(); + + if (_accountListItem != null) { + await _wowneroAccountList?.setLabelAccount( + _wallet, + accountIndex: _accountListItem!.id, + label: label); + } else { + await _wowneroAccountList?.addAccount( + _wallet, + label: label); + } + + await _wallet.save(); + state = ExecutedSuccessfullyState(); + } catch (e) { + state = FailureState(e.toString()); + } + } + } diff --git a/lib/view_model/monero_account_list/monero_account_list_view_model.dart b/lib/view_model/monero_account_list/monero_account_list_view_model.dart index 4cbf95bab..448106779 100644 --- a/lib/view_model/monero_account_list/monero_account_list_view_model.dart +++ b/lib/view_model/monero_account_list/monero_account_list_view_model.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:mobx/mobx.dart'; @@ -47,6 +48,17 @@ abstract class MoneroAccountListViewModelBase with Store { .toList(); } + if (_wallet.type == WalletType.wownero) { + return wownero + !.getAccountList(_wallet) + .accounts.map((acc) => AccountListItem( + label: acc.label, + id: acc.id, + balance: acc.balance, + isSelected: acc.id == wownero!.getCurrentAccount(_wallet).id)) + .toList(); + } + throw Exception('Unexpected wallet type: ${_wallet.type}'); } @@ -62,6 +74,15 @@ abstract class MoneroAccountListViewModelBase with Store { ); } + if (_wallet.type == WalletType.wownero) { + wownero!.setCurrentAccount( + _wallet, + item.id, + item.label, + item.balance, + ); + } + if (_wallet.type == WalletType.haven) { haven!.setCurrentAccount( _wallet, diff --git a/lib/view_model/node_list/node_create_or_edit_view_model.dart b/lib/view_model/node_list/node_create_or_edit_view_model.dart index 850e248f2..86ceb654c 100644 --- a/lib/view_model/node_list/node_create_or_edit_view_model.dart +++ b/lib/view_model/node_list/node_create_or_edit_view_model.dart @@ -65,7 +65,7 @@ abstract class NodeCreateOrEditViewModelBase with Store { bool get isReady => address.isNotEmpty && port.isNotEmpty; bool get hasAuthCredentials => - _walletType == WalletType.monero || _walletType == WalletType.haven; + _walletType == WalletType.monero || _walletType == WalletType.wownero || _walletType == WalletType.haven; bool get hasTestnetSupport => _walletType == WalletType.bitcoin; diff --git a/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart b/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart index 0b4f969cb..2edda3d29 100644 --- a/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart +++ b/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart'; +import 'package:cake_wallet/wownero/wownero.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cake_wallet/bitcoin/bitcoin.dart'; @@ -80,6 +81,16 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store { await wallet.save(); } + if (wallet.type == WalletType.wownero) { + await wownero + !.getSubaddressList(wallet) + .addSubaddress( + wallet, + accountIndex: wownero!.getCurrentAccount(wallet).id, + label: label); + await wallet.save(); + } + if (wallet.type == WalletType.haven) { await haven !.getSubaddressList(wallet) @@ -103,6 +114,11 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store { accountIndex: monero!.getCurrentAccount(wallet).id, addressIndex: index, label: label); await wallet.save(); } + if (wallet.type == WalletType.wownero) { + await wownero!.getSubaddressList(wallet).setLabelSubaddress(wallet, + accountIndex: wownero!.getCurrentAccount(wallet).id, addressIndex: index, label: label); + await wallet.save(); + } if (wallet.type == WalletType.haven) { await haven!.getSubaddressList(wallet).setLabelSubaddress(wallet, accountIndex: haven!.getCurrentAccount(wallet).id, diff --git a/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart b/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart index dd7f02407..6c274bb7b 100644 --- a/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart +++ b/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart @@ -217,7 +217,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo selectedCurrency = walletTypeToCryptoCurrency(appStore.wallet!.type), _cryptoNumberFormat = NumberFormat(_cryptoNumberPattern), hasAccounts = - appStore.wallet!.type == WalletType.monero || appStore.wallet!.type == WalletType.haven, + appStore.wallet!.type == WalletType.monero || appStore.wallet!.type == WalletType.wownero || appStore.wallet!.type == WalletType.haven, amount = '', _settingsStore = appStore.settingsStore, super(appStore: appStore) { @@ -229,7 +229,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo _init(); selectedCurrency = walletTypeToCryptoCurrency(wallet.type); - hasAccounts = wallet.type == WalletType.monero || wallet.type == WalletType.haven; + hasAccounts = wallet.type == WalletType.monero || wallet.type == WalletType.wownero || wallet.type == WalletType.haven; } static const String _cryptoNumberPattern = '0.00000000'; @@ -340,6 +340,20 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo addressList.addAll(addressItems); } + if (wallet.type == WalletType.wownero) { + final primaryAddress = wownero!.getSubaddressList(wallet).subaddresses.first; + final addressItems = wownero!.getSubaddressList(wallet).subaddresses.map((subaddress) { + final isPrimary = subaddress == primaryAddress; + + return WalletAddressListItem( + id: subaddress.id, + isPrimary: isPrimary, + name: subaddress.label, + address: subaddress.address); + }); + addressList.addAll(addressItems); + } + if (wallet.type == WalletType.haven) { final primaryAddress = haven!.getSubaddressList(wallet).subaddresses.first; final addressItems = haven!.getSubaddressList(wallet).subaddresses.map((subaddress) { @@ -430,20 +444,6 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo addressList.add(WalletAddressListItem(isPrimary: true, name: null, address: primaryAddress)); } - if (wallet.type == WalletType.wownero) { - final primaryAddress = wownero!.getSubaddressList(wallet).subaddresses.first; - final addressItems = wownero!.getSubaddressList(wallet).subaddresses.map((subaddress) { - final isPrimary = subaddress == primaryAddress; - - return WalletAddressListItem( - id: subaddress.id, - isPrimary: isPrimary, - name: subaddress.label, - address: subaddress.address); - }); - addressList.addAll(addressItems); - } - if (searchText.isNotEmpty) { return ObservableList.of(addressList.where((item) { if (item is WalletAddressListItem) { @@ -465,6 +465,10 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo return monero!.getCurrentAccount(wallet).label; } + if (wallet.type == WalletType.wownero) { + return wownero!.getCurrentAccount(wallet).label; + } + if (wallet.type == WalletType.haven) { return haven!.getCurrentAccount(wallet).label; } @@ -475,6 +479,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo @computed bool get hasAddressList => wallet.type == WalletType.monero || + wallet.type == WalletType.wownero || wallet.type == WalletType.haven || wallet.type == WalletType.bitcoinCash || wallet.type == WalletType.bitcoin || @@ -513,7 +518,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo void _init() { _baseItems = []; - if (wallet.type == WalletType.monero || wallet.type == WalletType.haven) { + if (wallet.type == WalletType.monero || wallet.type == WalletType.wownero || wallet.type == WalletType.haven) { _baseItems.add(WalletAccountListHeader()); } From 1b109ac70280f61845919ec80be1f8f64c999eff Mon Sep 17 00:00:00 2001 From: cyan Date: Mon, 22 Jul 2024 17:42:13 +0200 Subject: [PATCH 10/77] make "Null check used on null value" errors when .so errors out more useful (#1549) bump monero_c commit to fix enotes error --- cw_monero/lib/api/wallet_manager.dart | 1 + cw_wownero/lib/api/wallet_manager.dart | 1 + scripts/prepare_moneroc.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index f77ef05e2..02ce2b7d6 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -21,6 +21,7 @@ final monero.WalletManager wmPtr = Pointer.fromAddress((() { print("ptr: $_wmPtr"); } catch (e) { print(e); + rethrow; } return _wmPtr!.address; })()); diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index e90843538..68d0796f9 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -21,6 +21,7 @@ final wownero.WalletManager wmPtr = Pointer.fromAddress((() { print("ptr: $_wmPtr"); } catch (e) { print(e); + rethrow; } return _wmPtr!.address; })()); diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index e91b3d4a4..cac5d3ad2 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -8,7 +8,7 @@ if [[ ! -d "monero_c" ]]; then git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip cd monero_c - git checkout d1e246aaf4c53b60ff9e4ab4a4ac3ae4a1f94a33 + git checkout c094ed5da69d2274747bf6edd7ca24124487bd34 git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero From 5c9f176d18be17c4922c38c907fc5ab6e1f3f25e Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:20:55 +0100 Subject: [PATCH 11/77] CW-674: Enhance Exchange Flow - Add estimated receive amount and amount currency to Confirm Sending Details Page (#1547) * fix: Improve exchange flow by adding a timeout to the call to fetch rate from providers * fix: Adjust time limit for fetching rate to 7 seconds and add timelimit to fetching limits * fix: Make fetch limits a Future.wait * feat: Add currency for amount and estimated receive amount to confirm sending page for exchange * fix: Remove unneeded code * fix: Modify receive amount to reflect value coming from the individual exchange providers if available and ensure receiveAmount is calculated based on selected exchange provider's rate --- ios/Podfile.lock | 38 -------------- lib/entities/fs_migration.dart | 9 +++- .../provider/changenow_exchange_provider.dart | 28 +++++----- .../provider/exolix_exchange_provider.dart | 27 +++++----- .../provider/quantex_exchange_provider.dart | 2 + .../provider/sideshift_exchange_provider.dart | 1 + .../simpleswap_exchange_provider.dart | 2 + .../provider/thorchain_exchange.provider.dart | 33 +++++++----- .../provider/trocador_exchange_provider.dart | 32 +++++++----- lib/exchange/trade.dart | 13 ++++- .../exchange/exchange_trade_view_model.dart | 34 +++++++++---- .../exchange/exchange_view_model.dart | 51 +++++++++++-------- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 1 + res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + 38 files changed, 174 insertions(+), 122 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 50295b3bb..edc9b5b02 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -8,36 +8,6 @@ PODS: - Flutter - ReachabilitySwift - CryptoSwift (1.8.2) - - 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_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): @@ -145,8 +115,6 @@ DEPENDENCIES: - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - CryptoSwift - - cw_haven (from `.symlinks/plugins/cw_haven/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`) @@ -194,10 +162,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/barcode_scan2/ios" connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" - cw_haven: - :path: ".symlinks/plugins/cw_haven/ios" - cw_shared_external: - :path: ".symlinks/plugins/cw_shared_external/ios" device_display_brightness: :path: ".symlinks/plugins/device_display_brightness/ios" device_info_plus: @@ -252,8 +216,6 @@ SPEC CHECKSUMS: BigInt: f668a80089607f521586bbe29513d708491ef2f7 connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d CryptoSwift: c63a805d8bb5e5538e88af4e44bb537776af11ea - cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a - cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 devicelocale: b22617f40038496deffba44747101255cee005b0 diff --git a/lib/entities/fs_migration.dart b/lib/entities/fs_migration.dart index 14237f080..ba3541561 100644 --- a/lib/entities/fs_migration.dart +++ b/lib/entities/fs_migration.dart @@ -391,7 +391,14 @@ Future ios_migrate_trades_list(Box tradeSource) async { } return Trade( - id: tradeId, provider: provider!, from: from, to: to, createdAt: date, amount: ''); + id: tradeId, + provider: provider!, + from: from, + to: to, + createdAt: date, + amount: '', + receiveAmount: '', + ); }); await tradeSource.addAll(trades); await prefs.setBool('ios_migration_trade_list_completed', true); diff --git a/lib/exchange/provider/changenow_exchange_provider.dart b/lib/exchange/provider/changenow_exchange_provider.dart index 42f8634fb..255767fa1 100644 --- a/lib/exchange/provider/changenow_exchange_provider.dart +++ b/lib/exchange/provider/changenow_exchange_provider.dart @@ -194,20 +194,24 @@ class ChangeNowExchangeProvider extends ExchangeProvider { final refundAddress = responseJSON['refundAddress'] as String; final extraId = responseJSON['payinExtraId'] as String?; final payoutAddress = responseJSON['payoutAddress'] as String; + final fromAmount = responseJSON['fromAmount']?.toString(); + final toAmount = responseJSON['toAmount']?.toString(); return Trade( - id: id, - from: request.fromCurrency, - to: request.toCurrency, - provider: description, - inputAddress: inputAddress, - refundAddress: refundAddress, - extraId: extraId, - createdAt: DateTime.now(), - amount: responseJSON['fromAmount']?.toString() ?? request.fromAmount, - state: TradeState.created, - payoutAddress: payoutAddress, - isSendAll: isSendAll); + id: id, + from: request.fromCurrency, + to: request.toCurrency, + provider: description, + inputAddress: inputAddress, + refundAddress: refundAddress, + extraId: extraId, + createdAt: DateTime.now(), + amount: fromAmount ?? request.fromAmount, + receiveAmount: toAmount ?? request.toAmount, + state: TradeState.created, + payoutAddress: payoutAddress, + isSendAll: isSendAll, + ); } @override diff --git a/lib/exchange/provider/exolix_exchange_provider.dart b/lib/exchange/provider/exolix_exchange_provider.dart index db11a8f58..8f2d5c241 100644 --- a/lib/exchange/provider/exolix_exchange_provider.dart +++ b/lib/exchange/provider/exolix_exchange_provider.dart @@ -172,20 +172,23 @@ class ExolixExchangeProvider extends ExchangeProvider { final extraId = responseJSON['depositExtraId'] as String?; final payoutAddress = responseJSON['withdrawalAddress'] as String; final amount = responseJSON['amount'].toString(); + final receiveAmount = responseJSON['amountTo']?.toString(); return Trade( - id: id, - from: request.fromCurrency, - to: request.toCurrency, - provider: description, - inputAddress: inputAddress, - refundAddress: refundAddress, - extraId: extraId, - createdAt: DateTime.now(), - amount: amount, - state: TradeState.created, - payoutAddress: payoutAddress, - isSendAll: isSendAll); + id: id, + from: request.fromCurrency, + to: request.toCurrency, + provider: description, + inputAddress: inputAddress, + refundAddress: refundAddress, + extraId: extraId, + createdAt: DateTime.now(), + amount: amount, + receiveAmount:receiveAmount ?? request.toAmount, + state: TradeState.created, + payoutAddress: payoutAddress, + isSendAll: isSendAll, + ); } @override diff --git a/lib/exchange/provider/quantex_exchange_provider.dart b/lib/exchange/provider/quantex_exchange_provider.dart index 9ab7fbb55..a4d8bafe5 100644 --- a/lib/exchange/provider/quantex_exchange_provider.dart +++ b/lib/exchange/provider/quantex_exchange_provider.dart @@ -162,11 +162,13 @@ class QuantexExchangeProvider extends ExchangeProvider { throw Exception('Unexpected http status: ${response.statusCode}'); final responseData = responseBody['data'] as Map; + final receiveAmount = responseData["amount_receive"]?.toString(); return Trade( id: responseData["order_id"] as String, inputAddress: responseData["server_address"] as String, amount: request.fromAmount, + receiveAmount: receiveAmount ?? request.toAmount, from: request.fromCurrency, to: request.toCurrency, provider: description, diff --git a/lib/exchange/provider/sideshift_exchange_provider.dart b/lib/exchange/provider/sideshift_exchange_provider.dart index 127421bbd..f53d778ec 100644 --- a/lib/exchange/provider/sideshift_exchange_provider.dart +++ b/lib/exchange/provider/sideshift_exchange_provider.dart @@ -213,6 +213,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { refundAddress: settleAddress, state: TradeState.created, amount: depositAmount ?? request.fromAmount, + receiveAmount: request.toAmount, payoutAddress: settleAddress, createdAt: DateTime.now(), isSendAll: isSendAll, diff --git a/lib/exchange/provider/simpleswap_exchange_provider.dart b/lib/exchange/provider/simpleswap_exchange_provider.dart index df83cf491..885878684 100644 --- a/lib/exchange/provider/simpleswap_exchange_provider.dart +++ b/lib/exchange/provider/simpleswap_exchange_provider.dart @@ -153,6 +153,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { final payoutAddress = responseJSON['address_to'] as String; final settleAddress = responseJSON['user_refund_address'] as String; final extraId = responseJSON['extra_id_from'] as String?; + final receiveAmount = responseJSON['amount_to'] as String?; return Trade( id: id, @@ -164,6 +165,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { extraId: extraId, state: TradeState.created, amount: request.fromAmount, + receiveAmount: receiveAmount ?? request.toAmount, payoutAddress: payoutAddress, createdAt: DateTime.now(), isSendAll: isSendAll, diff --git a/lib/exchange/provider/thorchain_exchange.provider.dart b/lib/exchange/provider/thorchain_exchange.provider.dart index 22937e603..897c2fdb9 100644 --- a/lib/exchange/provider/thorchain_exchange.provider.dart +++ b/lib/exchange/provider/thorchain_exchange.provider.dart @@ -40,7 +40,7 @@ class ThorChainExchangeProvider extends ExchangeProvider { static const _txInfoPath = '/thorchain/tx/status/'; static const _affiliateName = 'cakewallet'; static const _affiliateBps = '175'; - static const _nameLookUpPath= 'v2/thorname/lookup/'; + static const _nameLookUpPath = 'v2/thorname/lookup/'; final Box tradesStore; @@ -137,19 +137,27 @@ class ThorChainExchangeProvider extends ExchangeProvider { final inputAddress = responseJSON['inbound_address'] as String?; final memo = responseJSON['memo'] as String?; + final directAmountOutResponse = responseJSON['expected_amount_out'] as String?; + + String? receiveAmount; + if (directAmountOutResponse != null) { + receiveAmount = _thorChainAmountToDouble(directAmountOutResponse).toString(); + } return Trade( - id: '', - from: request.fromCurrency, - to: request.toCurrency, - provider: description, - inputAddress: inputAddress, - createdAt: DateTime.now(), - amount: request.fromAmount, - state: TradeState.notFound, - payoutAddress: request.toAddress, - memo: memo, - isSendAll: isSendAll); + id: '', + from: request.fromCurrency, + to: request.toCurrency, + provider: description, + inputAddress: inputAddress, + createdAt: DateTime.now(), + amount: request.fromAmount, + receiveAmount: receiveAmount ?? request.toAmount, + state: TradeState.notFound, + payoutAddress: request.toAddress, + memo: memo, + isSendAll: isSendAll, + ); } @override @@ -234,7 +242,6 @@ class ThorChainExchangeProvider extends ExchangeProvider { return chainToAddressMap; } - Future> _getSwapQuote(Map params) async { Uri uri = Uri.https(_baseNodeURL, _quotePath, params); diff --git a/lib/exchange/provider/trocador_exchange_provider.dart b/lib/exchange/provider/trocador_exchange_provider.dart index 688bf15c9..652543607 100644 --- a/lib/exchange/provider/trocador_exchange_provider.dart +++ b/lib/exchange/provider/trocador_exchange_provider.dart @@ -224,22 +224,26 @@ class TrocadorExchangeProvider extends ExchangeProvider { final password = responseJSON['password'] as String; final providerId = responseJSON['id_provider'] as String; final providerName = responseJSON['provider'] as String; + final amount = responseJSON['amount_from']?.toString(); + final receiveAmount = responseJSON['amount_to']?.toString(); return Trade( - id: id, - from: request.fromCurrency, - to: request.toCurrency, - provider: description, - inputAddress: inputAddress, - refundAddress: refundAddress, - state: TradeState.deserialize(raw: status), - password: password, - providerId: providerId, - providerName: providerName, - createdAt: DateTime.tryParse(date)?.toLocal(), - amount: responseJSON['amount_from']?.toString() ?? request.fromAmount, - payoutAddress: payoutAddress, - isSendAll: isSendAll); + id: id, + from: request.fromCurrency, + to: request.toCurrency, + provider: description, + inputAddress: inputAddress, + refundAddress: refundAddress, + state: TradeState.deserialize(raw: status), + password: password, + providerId: providerId, + providerName: providerName, + createdAt: DateTime.tryParse(date)?.toLocal(), + amount: amount ?? request.fromAmount, + receiveAmount: receiveAmount ?? request.toAmount, + payoutAddress: payoutAddress, + isSendAll: isSendAll, + ); } @override diff --git a/lib/exchange/trade.dart b/lib/exchange/trade.dart index aeb544ece..a0c08aac7 100644 --- a/lib/exchange/trade.dart +++ b/lib/exchange/trade.dart @@ -13,6 +13,7 @@ class Trade extends HiveObject { CryptoCurrency? from, CryptoCurrency? to, TradeState? state, + this.receiveAmount, this.createdAt, this.expiredAt, this.inputAddress, @@ -122,6 +123,9 @@ class Trade extends HiveObject { @HiveField(22) String? router; + @HiveField(23, defaultValue: '') + String? receiveAmount; + static Trade fromMap(Map map) { return Trade( id: map['id'] as String, @@ -131,6 +135,7 @@ class Trade extends HiveObject { createdAt: map['date'] != null ? DateTime.fromMillisecondsSinceEpoch(map['date'] as int) : null, amount: map['amount'] as String, + receiveAmount: map['receive_amount'] as String?, walletId: map['wallet_id'] as String, fromWalletAddress: map['from_wallet_address'] as String?, memo: map['memo'] as String?, @@ -149,6 +154,7 @@ class Trade extends HiveObject { 'output': to.serialize(), 'date': createdAt != null ? createdAt!.millisecondsSinceEpoch : null, 'amount': amount, + 'receive_amount': receiveAmount, 'wallet_id': walletId, 'from_wallet_address': fromWalletAddress, 'memo': memo, @@ -179,6 +185,7 @@ class TradeAdapter extends TypeAdapter { return Trade( id: fields[0] == null ? '' : fields[0] as String, amount: fields[7] == null ? '' : fields[7] as String, + receiveAmount: fields[23] as String?, createdAt: fields[5] as DateTime?, expiredAt: fields[6] as DateTime?, inputAddress: fields[8] as String?, @@ -206,7 +213,7 @@ class TradeAdapter extends TypeAdapter { @override void write(BinaryWriter writer, Trade obj) { writer - ..writeByte(23) + ..writeByte(24) ..writeByte(0) ..write(obj.id) ..writeByte(1) @@ -252,7 +259,9 @@ class TradeAdapter extends TypeAdapter { ..writeByte(21) ..write(obj.isSendAll) ..writeByte(22) - ..write(obj.router); + ..write(obj.router) + ..writeByte(23) + ..write(obj.receiveAmount); } @override diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index c5ce7a591..5d99ff8a5 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -147,8 +147,13 @@ abstract class ExchangeTradeViewModelBase with Store { items.clear(); if (trade.provider != ExchangeProviderDescription.thorChain) - items.add(ExchangeTradeItem( - title: "${trade.provider.title} ${S.current.id}", data: '${trade.id}', isCopied: true)); + items.add( + ExchangeTradeItem( + title: "${trade.provider.title} ${S.current.id}", + data: '${trade.id}', + isCopied: true, + ), + ); if (trade.extraId != null) { final title = trade.from == CryptoCurrency.xrp @@ -161,15 +166,26 @@ abstract class ExchangeTradeViewModelBase with Store { } items.addAll([ - ExchangeTradeItem(title: S.current.amount, data: '${trade.amount}', isCopied: true), ExchangeTradeItem( - title: S.current.send_to_this_address('${tradesStore.trade!.from}', tagFrom) + ':', - data: trade.inputAddress ?? '', - isCopied: true), + title: S.current.amount, + data: '${trade.amount} ${trade.from}', + isCopied: true, + ), ExchangeTradeItem( - title: S.current.arrive_in_this_address('${tradesStore.trade!.to}', tagTo) + ':', - data: trade.payoutAddress ?? '', - isCopied: true), + title: S.current.estimated_receive_amount +':', + data: '${tradesStore.trade?.receiveAmount} ${trade.to}', + isCopied: true, + ), + ExchangeTradeItem( + title: S.current.send_to_this_address('${tradesStore.trade!.from}', tagFrom) + ':', + data: trade.inputAddress ?? '', + isCopied: true, + ), + ExchangeTradeItem( + title: S.current.arrive_in_this_address('${tradesStore.trade!.to}', tagTo) + ':', + data: trade.payoutAddress ?? '', + isCopied: true, + ), ]); } diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index a97b3dc05..3e45e8ba1 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -450,19 +450,21 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with double? highestMax = 0.0; try { - final result = await Future.wait(selectedProviders - .where((element) => providersForCurrentPair().contains(provider)) - .map((provider) => provider - .fetchLimits( - from: from, - to: to, - isFixedRateMode: isFixedRateMode, - ) - .onError((error, stackTrace) => Limits(max: 0.0, min: double.maxFinite)) - .timeout( - Duration(seconds: 7), - onTimeout: () => Limits(max: 0.0, min: double.maxFinite), - ))); + final result = await Future.wait( + selectedProviders.where((provider) => providersForCurrentPair().contains(provider)).map( + (provider) => provider + .fetchLimits( + from: from, + to: to, + isFixedRateMode: isFixedRateMode, + ) + .onError((error, stackTrace) => Limits(max: 0.0, min: double.maxFinite)) + .timeout( + Duration(seconds: 7), + onTimeout: () => Limits(max: 0.0, min: double.maxFinite), + ), + ), + ); result.forEach((tempLimits) { if (lowestMin != null && (tempLimits.min ?? -1) < lowestMin!) { @@ -506,17 +508,24 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with } try { - for (var provider in _sortedAvailableProviders.values) { + for (var i = 0; i < _sortedAvailableProviders.values.length; i++) { + final provider = _sortedAvailableProviders.values.toList()[i]; + final providerRate = _sortedAvailableProviders.keys.toList()[i]; + if (!(await provider.checkIsAvailable())) continue; + _bestRate = providerRate; + await changeDepositAmount(amount: depositAmount); + final request = TradeRequest( - fromCurrency: depositCurrency, - toCurrency: receiveCurrency, - fromAmount: depositAmount.replaceAll(',', '.'), - toAmount: receiveAmount.replaceAll(',', '.'), - refundAddress: depositAddress, - toAddress: receiveAddress, - isFixedRate: isFixedRateMode); + fromCurrency: depositCurrency, + toCurrency: receiveCurrency, + fromAmount: depositAmount.replaceAll(',', '.'), + toAmount: receiveAmount.replaceAll(',', '.'), + refundAddress: depositAddress, + toAddress: receiveAddress, + isFixedRate: isFixedRateMode, + ); var amount = isFixedRateMode ? receiveAmount : depositAmount; amount = amount.replaceAll(',', '.'); diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 124e85270..435c7ccde 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "ﺔﻠﻣﺎﻌﻤﻟﺍ ﻊﻴﻗﻮﺗ ءﺎﻨﺛﺃ ﺄﻄﺧ ﺙﺪﺣ", "estimated": "مُقدَّر", "estimated_new_fee": "رسوم جديدة مقدرة", + "estimated_receive_amount": "مقدرة المبلغ الاستقبال", "etherscan_history": "Etherscan تاريخ", "event": "ﺙﺪﺣ", "events": "ﺙﺍﺪﺣﻷﺍ", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index dee839ea5..84bcabf9f 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Възникна грешка при подписване на транзакция", "estimated": "Изчислено", "estimated_new_fee": "Прогнозна нова такса", + "estimated_receive_amount": "Прогнозна сума за получаване", "etherscan_history": "История на Etherscan", "event": "Събитие", "events": "събития", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index ddc572766..731513bd7 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Při podepisování transakce došlo k chybě", "estimated": "Odhadováno", "estimated_new_fee": "Odhadovaný nový poplatek", + "estimated_receive_amount": "Odhadovaná částka přijímání", "etherscan_history": "Historie Etherscanu", "event": "událost", "events": "Události", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index de21d7e30..0f43e831d 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Beim Signieren der Transaktion ist ein Fehler aufgetreten", "estimated": "Geschätzt", "estimated_new_fee": "Geschätzte neue Gebühr", + "estimated_receive_amount": "Geschätzter Empfangsbetrag", "etherscan_history": "Etherscan-Geschichte", "event": "Ereignis", "events": "Veranstaltungen", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 48950464d..e4ef2119d 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "An error has occured while signing transaction", "estimated": "Estimated", "estimated_new_fee": "Estimated new fee", + "estimated_receive_amount": "Estimated receive amount", "etherscan_history": "Etherscan history", "event": "Event", "events": "Events", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 4aa0042c0..0b7dc4a28 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Se ha producido un error al firmar la transacción.", "estimated": "Estimado", "estimated_new_fee": "Nueva tarifa estimada", + "estimated_receive_amount": "Cantidad de recepción estimada", "etherscan_history": "historia de etherscan", "event": "Evento", "events": "Eventos", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 198111909..fad9576e8 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Une erreur s'est produite lors de la signature de la transaction", "estimated": "Estimé", "estimated_new_fee": "De nouveaux frais estimés", + "estimated_receive_amount": "Recevoir estimé le montant", "etherscan_history": "Historique Etherscan", "event": "Événement", "events": "Événements", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 4259162c2..de963a52d 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "An sami kuskure yayin sanya hannu kan ciniki", "estimated": "Kiyasta", "estimated_new_fee": "An kiyasta sabon kudin", + "estimated_receive_amount": "Kiyasta samun adadin", "etherscan_history": "Etherscan tarihin kowane zamani", "event": "Lamarin", "events": "Abubuwan da suka faru", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 01e9dc90e..edc301efe 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "लेन-देन पर हस्ताक्षर करते समय एक त्रुटि उत्पन्न हुई है", "estimated": "अनुमानित", "estimated_new_fee": "अनुमानित नया शुल्क", + "estimated_receive_amount": "अनुमानित राशि", "etherscan_history": "इथरस्कैन इतिहास", "event": "आयोजन", "events": "आयोजन", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 7c9a521bf..03dfcd2a1 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Došlo je do pogreške prilikom potpisivanja transakcije", "estimated": "procijenjen", "estimated_new_fee": "Procijenjena nova naknada", + "estimated_receive_amount": "Procijenjeni iznos primanja", "etherscan_history": "Etherscan povijest", "event": "Događaj", "events": "Događaji", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 0e6a894dd..f3276ff6c 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Terjadi kesalahan saat menandatangani transaksi", "estimated": "Diperkirakan", "estimated_new_fee": "Perkiraan biaya baru", + "estimated_receive_amount": "Diperkirakan jumlah menerima", "etherscan_history": "Sejarah Etherscan", "event": "Peristiwa", "events": "Acara", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 3c937a96a..d021e37a3 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -268,6 +268,7 @@ "errorSigningTransaction": "Si è verificato un errore durante la firma della transazione", "estimated": "Stimato", "estimated_new_fee": "Nuova commissione stimata", + "estimated_receive_amount": "Importo di ricezione stimato", "etherscan_history": "Storia Etherscan", "event": "Evento", "events": "Eventi", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 1f914113d..dd28f9688 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "トランザクションの署名中にエラーが発生しました", "estimated": "推定", "estimated_new_fee": "推定新しい料金", + "estimated_receive_amount": "推定受信金額", "etherscan_history": "イーサスキャンの歴史", "event": "イベント", "events": "イベント", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 6f72497c7..8b86c04c6 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "거래에 서명하는 동안 오류가 발생했습니다.", "estimated": "예상", "estimated_new_fee": "예상 새로운 수수료", + "estimated_receive_amount": "예상 수신 금액", "etherscan_history": "이더스캔 역사", "event": "이벤트", "events": "이벤트", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index fa0937561..42eb54f21 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "ငွေပေးငွေယူ လက်မှတ်ထိုးစဉ် အမှားအယွင်းတစ်ခု ဖြစ်ပေါ်ခဲ့သည်။", "estimated": "ခန့်မှန်း", "estimated_new_fee": "ခန့်မှန်းသစ်ခန့်မှန်း", + "estimated_receive_amount": "ခန့်မှန်းရရှိသောပမာဏ", "etherscan_history": "Etherscan သမိုင်း", "event": "ပွဲ", "events": "အဲ့ဒါနဲ့", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index ebfa58377..53db56332 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Er is een fout opgetreden tijdens het ondertekenen van de transactie", "estimated": "Geschatte", "estimated_new_fee": "Geschatte nieuwe vergoeding", + "estimated_receive_amount": "Geschat ontvangen bedrag", "etherscan_history": "Etherscan-geschiedenis", "event": "Evenement", "events": "Evenementen", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index ab49e165a..898756982 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Wystąpił błąd podczas podpisywania transakcji", "estimated": "Oszacowano", "estimated_new_fee": "Szacowana nowa opłata", + "estimated_receive_amount": "Szacowana kwota otrzymania", "etherscan_history": "Historia Etherscanu", "event": "Wydarzenie", "events": "Wydarzenia", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 9536a1b24..9e99866cb 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Ocorreu um erro ao assinar a transação", "estimated": "Estimado", "estimated_new_fee": "Nova taxa estimada", + "estimated_receive_amount": "Valor estimado de recebimento", "etherscan_history": "história Etherscan", "event": "Evento", "events": "Eventos", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index a95c09ca2..8d3892ace 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Произошла ошибка при подписании транзакции", "estimated": "Примерно", "estimated_new_fee": "Расчетная новая плата", + "estimated_receive_amount": "Расчетная сумма получения", "etherscan_history": "История Эфириума", "event": "Событие", "events": "События", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 5ff6b456c..9db9caa68 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "เกิดข้อผิดพลาดขณะลงนามธุรกรรม", "estimated": "ประมาณการ", "estimated_new_fee": "ค่าธรรมเนียมใหม่โดยประมาณ", + "estimated_receive_amount": "โดยประมาณว่าจำนวนเงินที่ได้รับ", "etherscan_history": "ประวัติอีเธอร์สแกน", "event": "เหตุการณ์", "events": "กิจกรรม", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 2839234c8..0f77f4813 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "May naganap na error habang pinipirmahan ang transaksyon", "estimated": "Tinatayang", "estimated_new_fee": "Tinatayang bagong bayad", + "estimated_receive_amount": "Tinatayang natanggap na halaga", "etherscan_history": "Kasaysayan ng Etherscan", "event": "Kaganapan", "events": "Mga kaganapan", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index e7d0b702d..961f0cf77 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "İşlem imzalanırken bir hata oluştu", "estimated": "Tahmini", "estimated_new_fee": "Tahmini yeni ücret", + "estimated_receive_amount": "Tahmini alma miktarı", "etherscan_history": "Etherscan geçmişi", "event": "Etkinlik", "events": "Olaylar", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index f858116cc..c9cda0854 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "Під час підписання транзакції сталася помилка", "estimated": "Приблизно ", "estimated_new_fee": "Орієнтовна нова комісія", + "estimated_receive_amount": "Орієнтовна сума отримує", "etherscan_history": "Історія Etherscan", "event": "Подія", "events": "Події", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index fc0351f4d..43cab6370 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "۔ﮯﮨ ﯽﺌﮔﺁ ﺶﯿﭘ ﯽﺑﺍﺮﺧ ﮏﯾﺍ ﺖﻗﻭ ﮯﺗﺮﮐ ﻂﺨﺘﺳﺩ ﺮﭘ ﻦﯾﺩ ﻦﯿﻟ", "estimated": "تخمینہ لگایا", "estimated_new_fee": "تخمینہ شدہ نئی فیس", + "estimated_receive_amount": "تخمینہ وصول کی رقم", "etherscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﺮﮭﺘﯾﺍ", "event": "ﺐﯾﺮﻘﺗ", "events": "ﺕﺎﺒﯾﺮﻘﺗ", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 19a98ba1a..b7d8ad828 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -268,6 +268,7 @@ "errorSigningTransaction": "Aṣiṣe kan ti waye lakoko ti o fowo si iṣowo", "estimated": "Ó tó a fojú díwọ̀n", "estimated_new_fee": "Ifoju tuntun owo tuntun", + "estimated_receive_amount": "Ifoju gba iye", "etherscan_history": "Etherscan itan", "event": "Iṣẹlẹ", "events": "Awọn iṣẹlẹ", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index fee4f99ee..389cf6c24 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -267,6 +267,7 @@ "errorSigningTransaction": "签署交易时发生错误", "estimated": "估计值", "estimated_new_fee": "估计新费用", + "estimated_receive_amount": "估计接收金额", "etherscan_history": "以太扫描历史", "event": "事件", "events": "活动", From a4282cb70402e7ed93a54f12d23718084d549c3f Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:21:03 +0100 Subject: [PATCH 12/77] CW-672: Enhance ETH Wallet Fee Calculation - Fix ERC20 Transaction Fee (#1548) * fix: Eth transaction fees WIP * Revert "fix: Eth transaction fees WIP" This reverts commit b9a469bc7e22134d78bf0cc4c00485e1d4515ebd. * fix: Modifying fee WIP * fix: Enhance ETH Wallet fee calculation WIP * feat: Enhance Transaction fees for ETH Transactions, Native transactions done, left with ERC20 transactions * fix: Pre PR cleanups * fix: ETH transaction fees for ERC20 transactions * fix: ETH transaction fees for ERC20 transactions * chore: Clarify comment in getEstimatedGas * fix: Switch call to estimate gas units to a more cleaner approach --- cw_evm/lib/evm_chain_client.dart | 18 +++++++++--------- cw_evm/lib/evm_chain_wallet.dart | 2 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cw_evm/lib/evm_chain_client.dart b/cw_evm/lib/evm_chain_client.dart index 033dc7143..1935df2af 100644 --- a/cw_evm/lib/evm_chain_client.dart +++ b/cw_evm/lib/evm_chain_client.dart @@ -72,12 +72,12 @@ abstract class EVMChainClient { } } - Future getGasBaseFee() async { + Future getGasBaseFee() async { try { final blockInfo = await _client!.getBlockInformation(isContainFullObj: false); final baseFee = blockInfo.baseFeePerGas; - return baseFee!.getInWei.toInt(); + return baseFee?.getInWei.toInt(); } catch (_) { return 0; } @@ -110,19 +110,19 @@ abstract class EVMChainClient { EthereumAddress.fromHex(contractAddress), ); - final transferFunction = contract.function('transferFrom'); + final transfer = contract.function('transfer'); - final estimatedGas = await _client!.estimateGas( + // Estimate gas units + final gasEstimate = await _client!.estimateGas( sender: senderAddress, - to: toAddress, - value: value, - data: transferFunction.encodeCall([ - senderAddress, + to: EthereumAddress.fromHex(contractAddress), + data: transfer.encodeCall([ toAddress, value.getInWei, ]), ); - return estimatedGas.toInt(); + + return gasEstimate.toInt(); } } catch (_) { return 0; diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index 2ab1c17a0..760c50a04 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -387,8 +387,6 @@ abstract class EVMChainWalletBase estimatedFeesForTransaction = BigInt.from(estimateFees); - debugPrint('Estimated Fees for Transaction: $estimatedFeesForTransaction'); - if (output.sendAll && transactionCurrency is! Erc20Token) { totalAmount = (erc20Balance.balance - estimatedFeesForTransaction); From 2347f922fea515fcfbe276054fb8f6c43fda854b Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 23 Jul 2024 05:18:59 +0300 Subject: [PATCH 13/77] update app version (#1551) --- assets/text/Monerocom_Release_Notes.txt | 1 + assets/text/Release_Notes.txt | 6 ++++-- cw_bitcoin/lib/electrum_wallet_addresses.dart | 2 +- ios/Podfile.lock | 6 ------ scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- scripts/ios/build_monero_all.sh | 1 + scripts/macos/app_env.sh | 8 ++++---- scripts/windows/build_exe_installer.iss | 2 +- 9 files changed, 20 insertions(+), 22 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 551d775ef..2a6c07abe 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,2 +1,3 @@ Monero enhancements +Synchronization improvements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index ae145cf94..d17a22c84 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,3 +1,5 @@ -Monero enhancements -Improvements for Tron and Nano wallets +Monero and Ethereum enhancements +Synchronization improvements +Exchange flow enhancements +Ledger improvements Bug fixes \ No newline at end of file diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart index 9499a6db7..b39821dbb 100644 --- a/cw_bitcoin/lib/electrum_wallet_addresses.dart +++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart @@ -539,7 +539,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } void _validateAddresses() { - allAddresses.forEach((element) { + _addresses.forEach((element) { if (!element.isHidden && element.address != getAddress(index: element.index, hd: mainHd, addressType: element.type)) { element.isHidden = true; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index edc9b5b02..fddf6e24f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -94,8 +94,6 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - sp_scanner (0.0.1): - - Flutter - SwiftProtobuf (1.26.0) - SwiftyGif (5.4.5) - Toast (4.1.1) @@ -134,7 +132,6 @@ 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`) - UnstoppableDomainsResolution (~> 4.0.0) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) @@ -200,8 +197,6 @@ 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" url_launcher_ios: @@ -242,7 +237,6 @@ SPEC CHECKSUMS: sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12 SwiftProtobuf: 5e8349171e7c2f88f5b9e683cb3cb79d1dc780b3 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 8e0bff866..a270afab0 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.16.0" -MONERO_COM_BUILD_NUMBER=94 +MONERO_COM_VERSION="1.16.1" +MONERO_COM_BUILD_NUMBER=95 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.19.0" -CAKEWALLET_BUILD_NUMBER=220 +CAKEWALLET_VERSION="4.19.1" +CAKEWALLET_BUILD_NUMBER=221 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 afab18521..22daba5de 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.16.0" -MONERO_COM_BUILD_NUMBER=92 +MONERO_COM_VERSION="1.16.1" +MONERO_COM_BUILD_NUMBER=93 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.0" -CAKEWALLET_BUILD_NUMBER=254 +CAKEWALLET_VERSION="4.19.1" +CAKEWALLET_BUILD_NUMBER=256 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/ios/build_monero_all.sh b/scripts/ios/build_monero_all.sh index aec6d86f3..a5993d181 100755 --- a/scripts/ios/build_monero_all.sh +++ b/scripts/ios/build_monero_all.sh @@ -19,6 +19,7 @@ NPROC="-j$(sysctl -n hw.logicalcpu)" for COIN in monero wownero; do pushd ../monero_c + rm -rf external/ios/build ./build_single.sh ${COIN} host-apple-ios $NPROC popd done diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 26c821c19..d46900405 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.6.0" -MONERO_COM_BUILD_NUMBER=24 +MONERO_COM_VERSION="1.6.1" +MONERO_COM_BUILD_NUMBER=26 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.12.0" -CAKEWALLET_BUILD_NUMBER=81 +CAKEWALLET_VERSION="1.12.1" +CAKEWALLET_BUILD_NUMBER=82 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 f36a59d0e..ef26941d7 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.0.2" +#define MyAppVersion "0.0.3" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe" From d5fca1969e096ac7083bb4cbb780d0df81603ead Mon Sep 17 00:00:00 2001 From: cyan Date: Thu, 25 Jul 2024 02:59:45 +0200 Subject: [PATCH 14/77] add a script to download prebuilds of monero_c (#1554) --- pubspec_base.yaml | 1 + tool/download_moneroc_prebuilds.dart | 50 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tool/download_moneroc_prebuilds.dart diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 458523fc2..2cfeae716 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -124,6 +124,7 @@ dev_dependencies: git: url: https://github.com/cake-tech/google-translator.git version: 1.0.0 + archive: ^3.6.1 dependency_overrides: bech32: diff --git a/tool/download_moneroc_prebuilds.dart b/tool/download_moneroc_prebuilds.dart new file mode 100644 index 000000000..58e8d4b03 --- /dev/null +++ b/tool/download_moneroc_prebuilds.dart @@ -0,0 +1,50 @@ +import 'package:dio/dio.dart'; +import 'package:archive/archive_io.dart'; + +final _dio = Dio(); + +final List triplets = [ + "x86_64-linux-gnu", // linux desktop - majority of users onlinux + // "i686-linux-gnu", // not supported by cake + // "i686-meego-linux-gnu", // sailfishos (emulator)- not supported by cake + // "aarch64-linux-gnu", // not (yet) supported by cake - (mostly) mobile linux + // "aarch64-meego-linux-gnu", // sailfishos - not supported by cake + "x86_64-linux-android", + // "i686-linux-android", // not supported by monero_c - mostly old android emulators + "aarch64-linux-android", + "armv7a-linux-androideabi", + // "i686-w64-mingw32", // 32bit windows - not supported by monero_c + "x86_64-w64-mingw32", + // "x86_64-apple-darwin11", // Intel macbooks (contrib) - not used by cake + // "aarch64-apple-darwin11", // apple silicon macbooks (contrib) - not used by cake + // "host-apple-darwin", // not available on CI (yet) + // "x86_64-host-apple-darwin", // not available on CI (yet) + "aarch64-host-apple-darwin", // apple silicon macbooks (local builds) + "host-apple-ios", +]; + +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}"); + final assets = data['assets'] as List; + for (var i = 0; i < assets.length; i++) { + for (var triplet in triplets) { + final asset = assets[i]; + final filename = asset["name"] as String; + if (!filename.contains(triplet)) continue; + final coin = filename.split("_")[0]; + 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"); + await _dio.download(url, localFilename); + print(" extracting $localFilename"); + final inputStream = InputFileStream(localFilename); + final archive = XZDecoder().decodeBuffer(inputStream); + final outputStream = OutputFileStream(localFilename.replaceAll(".xz", "")); + outputStream.writeBytes(archive); + } + } +} \ No newline at end of file From eb8158e9963b6dc518fbb24ba5bd36251e5c47f7 Mon Sep 17 00:00:00 2001 From: cyan Date: Fri, 26 Jul 2024 17:36:18 +0200 Subject: [PATCH 15/77] fix invalid wallet pointer getting set even when we throw (#1556) * fix invalid wallet pointer getting set even when we throw * Hide "wallet seeds" field if there is no seeds (cases of restore from keys) --------- Co-authored-by: OmarHatem --- cw_monero/lib/api/wallet_manager.dart | 37 +++++++++++-------- cw_wownero/lib/api/wallet_manager.dart | 41 +++++++++++++--------- lib/view_model/wallet_keys_view_model.dart | 12 +++---- 3 files changed, 53 insertions(+), 37 deletions(-) diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 02ce2b7d6..50ab41e04 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -32,13 +32,14 @@ void createWalletSync( required String language, int nettype = 0}) { txhistory = null; - wptr = monero.WalletManager_createWallet(wmPtr, + final newWptr = monero.WalletManager_createWallet(wmPtr, path: path, password: password, language: language, networkType: 0); - final status = monero.Wallet_status(wptr!); + final status = monero.Wallet_status(newWptr); if (status != 0) { - throw WalletCreationException(message: monero.Wallet_errorString(wptr!)); + throw WalletCreationException(message: monero.Wallet_errorString(newWptr)); } + wptr = newWptr; monero.Wallet_store(wptr!, path: path); openedWalletsByPath[path] = wptr!; @@ -57,7 +58,7 @@ void restoreWalletFromSeedSync( int nettype = 0, int restoreHeight = 0}) { txhistory = null; - wptr = monero.WalletManager_recoveryWallet( + final newWptr = monero.WalletManager_recoveryWallet( wmPtr, path: path, password: password, @@ -67,12 +68,13 @@ void restoreWalletFromSeedSync( networkType: 0, ); - final status = monero.Wallet_status(wptr!); + final status = monero.Wallet_status(newWptr); if (status != 0) { - final error = monero.Wallet_errorString(wptr!); + final error = monero.Wallet_errorString(newWptr); throw WalletRestoreFromSeedException(message: error); } + wptr = newWptr; openedWalletsByPath[path] = wptr!; } @@ -87,7 +89,7 @@ void restoreWalletFromKeysSync( int nettype = 0, int restoreHeight = 0}) { txhistory = null; - wptr = monero.WalletManager_createWalletFromKeys( + final newWptr = monero.WalletManager_createWalletFromKeys( wmPtr, path: path, password: password, @@ -98,12 +100,14 @@ void restoreWalletFromKeysSync( nettype: 0, ); - final status = monero.Wallet_status(wptr!); + final status = monero.Wallet_status(newWptr); if (status != 0) { throw WalletRestoreFromKeysException( - message: monero.Wallet_errorString(wptr!)); + message: monero.Wallet_errorString(newWptr)); } + wptr = newWptr; + openedWalletsByPath[path] = wptr!; } @@ -128,7 +132,7 @@ void restoreWalletFromSpendKeySync( // ); txhistory = null; - wptr = monero.WalletManager_createDeterministicWalletFromSpendKey( + final newWptr = monero.WalletManager_createDeterministicWalletFromSpendKey( wmPtr, path: path, password: password, @@ -138,14 +142,16 @@ void restoreWalletFromSpendKeySync( restoreHeight: restoreHeight, ); - final status = monero.Wallet_status(wptr!); + final status = monero.Wallet_status(newWptr); if (status != 0) { - final err = monero.Wallet_errorString(wptr!); + final err = monero.Wallet_errorString(newWptr); print("err: $err"); throw WalletRestoreFromKeysException(message: err); } + wptr = newWptr; + monero.Wallet_setCacheAttribute(wptr!, key: "cakewallet.seed", value: seed); storeSync(); @@ -203,15 +209,16 @@ void loadWallet( }); } txhistory = null; - wptr = monero.WalletManager_openWallet(wmPtr, + final newWptr = monero.WalletManager_openWallet(wmPtr, path: path, password: password); _lastOpenedWallet = path; - final status = monero.Wallet_status(wptr!); + final status = monero.Wallet_status(newWptr); if (status != 0) { - final err = monero.Wallet_errorString(wptr!); + final err = monero.Wallet_errorString(newWptr); print(err); throw WalletOpeningException(message: err); } + wptr = newWptr; openedWalletsByPath[path] = wptr!; } } diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index 68d0796f9..afcc536e7 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -32,13 +32,14 @@ void createWalletSync( required String language, int nettype = 0}) { txhistory = null; - wptr = wownero.WalletManager_createWallet(wmPtr, + final newWptr = wownero.WalletManager_createWallet(wmPtr, path: path, password: password, language: language, networkType: 0); - final status = wownero.Wallet_status(wptr!); + final status = wownero.Wallet_status(newWptr); if (status != 0) { - throw WalletCreationException(message: wownero.Wallet_errorString(wptr!)); + throw WalletCreationException(message: wownero.Wallet_errorString(newWptr)); } + wptr = newWptr; wownero.Wallet_store(wptr!, path: path); openedWalletsByPath[path] = wptr!; @@ -56,9 +57,10 @@ void restoreWalletFromSeedSync( required String seed, int nettype = 0, int restoreHeight = 0}) { + var newWptr; if (seed.split(" ").length == 14) { txhistory = null; - wptr = wownero.WOWNERO_deprecated_restore14WordSeed( + newWptr = wownero.WOWNERO_deprecated_restore14WordSeed( path: path, password: password, language: seed, // I KNOW - this is supposed to be called seed @@ -70,7 +72,7 @@ void restoreWalletFromSeedSync( ); } else { txhistory = null; - wptr = wownero.WalletManager_recoveryWallet( + newWptr = wownero.WalletManager_recoveryWallet( wmPtr, path: path, password: password, @@ -81,13 +83,15 @@ void restoreWalletFromSeedSync( ); } - final status = wownero.Wallet_status(wptr!); + final status = wownero.Wallet_status(newWptr); if (status != 0) { - final error = wownero.Wallet_errorString(wptr!); + final error = wownero.Wallet_errorString(newWptr); throw WalletRestoreFromSeedException(message: error); } + wptr = newWptr; + openedWalletsByPath[path] = wptr!; } @@ -101,7 +105,7 @@ void restoreWalletFromKeysSync( int nettype = 0, int restoreHeight = 0}) { txhistory = null; - wptr = wownero.WalletManager_createWalletFromKeys( + final newWptr = wownero.WalletManager_createWalletFromKeys( wmPtr, path: path, password: password, @@ -112,12 +116,14 @@ void restoreWalletFromKeysSync( nettype: 0, ); - final status = wownero.Wallet_status(wptr!); + final status = wownero.Wallet_status(newWptr); if (status != 0) { throw WalletRestoreFromKeysException( - message: wownero.Wallet_errorString(wptr!)); + message: wownero.Wallet_errorString(newWptr)); } + wptr = newWptr; + openedWalletsByPath[path] = wptr!; } @@ -142,7 +148,7 @@ void restoreWalletFromSpendKeySync( // ); txhistory = null; - wptr = wownero.WalletManager_createDeterministicWalletFromSpendKey( + final newWptr = wownero.WalletManager_createDeterministicWalletFromSpendKey( wmPtr, path: path, password: password, @@ -152,14 +158,16 @@ void restoreWalletFromSpendKeySync( restoreHeight: restoreHeight, ); - final status = wownero.Wallet_status(wptr!); + final status = wownero.Wallet_status(newWptr); if (status != 0) { - final err = wownero.Wallet_errorString(wptr!); + final err = wownero.Wallet_errorString(newWptr); print("err: $err"); throw WalletRestoreFromKeysException(message: err); } + wptr = newWptr; + wownero.Wallet_setCacheAttribute(wptr!, key: "cakewallet.seed", value: seed); storeSync(); @@ -217,15 +225,16 @@ void loadWallet( }); } txhistory = null; - wptr = wownero.WalletManager_openWallet(wmPtr, + final newWptr = wownero.WalletManager_openWallet(wmPtr, path: path, password: password); _lastOpenedWallet = path; - final status = wownero.Wallet_status(wptr!); + final status = wownero.Wallet_status(newWptr); if (status != 0) { - final err = wownero.Wallet_errorString(wptr!); + final err = wownero.Wallet_errorString(newWptr); print(err); throw WalletOpeningException(message: err); } + wptr = newWptr; openedWalletsByPath[path] = wptr!; } } diff --git a/lib/view_model/wallet_keys_view_model.dart b/lib/view_model/wallet_keys_view_model.dart index 511822601..1d5c27fed 100644 --- a/lib/view_model/wallet_keys_view_model.dart +++ b/lib/view_model/wallet_keys_view_model.dart @@ -83,8 +83,8 @@ abstract class WalletKeysViewModelBase with Store { StandartListItem( title: S.current.view_key_private, value: keys['privateViewKey']!), - StandartListItem( - title: S.current.wallet_seed, value: _appStore.wallet!.seed!), + if (_appStore.wallet!.seed!.isNotEmpty) + StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!), ]); if (_appStore.wallet?.seed != null && @@ -123,8 +123,8 @@ abstract class WalletKeysViewModelBase with Store { StandartListItem( title: S.current.view_key_private, value: keys['privateViewKey']!), - StandartListItem( - title: S.current.wallet_seed, value: _appStore.wallet!.seed!), + if (_appStore.wallet!.seed!.isNotEmpty) + StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!), ]); } @@ -147,8 +147,8 @@ abstract class WalletKeysViewModelBase with Store { StandartListItem( title: S.current.view_key_private, value: keys['privateViewKey']!), - StandartListItem( - title: S.current.wallet_seed, value: _appStore.wallet!.seed!), + if (_appStore.wallet!.seed!.isNotEmpty) + StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!), ]); if (_appStore.wallet?.seed != null && From a2549b42b04fbce33b77dbf3fcdd4d6e711ac192 Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Wed, 31 Jul 2024 02:26:56 +0100 Subject: [PATCH 16/77] CW-680: Fix Wakelock Issue (#1557) * chore: Bump up wakelock_plus dependency version * Fix: try fixing ci failure by bumping jdk version --- .github/workflows/pr_test_build.yml | 2 +- pubspec_base.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index f37919e9d..4c46137ac 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: "11.x" + java-version: "17.x" - name: Configure placeholder git details run: | git config --global user.email "CI@cakewallet.com" diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 2cfeae716..67a162674 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -66,7 +66,7 @@ dependencies: url: https://github.com/cake-tech/device_display_brightness.git ref: master workmanager: ^0.5.1 - wakelock_plus: ^1.1.3 + wakelock_plus: ^1.2.5 flutter_mailer: ^2.0.2 device_info_plus: ^9.1.0 base32: 2.1.3 From 9da9bee384588675dda11cf28b58e74d0ac7a030 Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 6 Aug 2024 13:01:38 +0200 Subject: [PATCH 17/77] make the error more readable when node fails to respond (#1570) --- cw_monero/lib/api/transaction_history.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index 5e33c6c56..c28f162be 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -110,7 +110,10 @@ Future createTransactionSync( })(); if (error != null) { - final message = error; + String message = error; + if (message.contains("RPC error")) { + message = "Invalid node response, please try again or switch node\n\ntrace: $message"; + } throw CreationTransactionException(message: message); } From 5e944a8bf7069f0b083f177c44d1b4e5eb1f265e Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 6 Aug 2024 17:59:44 +0300 Subject: [PATCH 18/77] Try to show seeds if wallet files gets corrupted (#1567) * add litecoin nodes minor ui fix * Try to open the wallet or fetch the seeds and show them to the user * make sure the seeds are only displayed after authentication --- assets/litecoin_electrum_server_list.yml | 17 ++++++- cw_core/lib/wallet_service.dart | 19 +++++++ cw_monero/lib/monero_wallet.dart | 1 - cw_monero/lib/monero_wallet_service.dart | 37 +++++++++++--- lib/core/wallet_loading_service.dart | 31 ++++++++++- lib/di.dart | 14 +++++ .../on_authentication_state_change.dart | 14 +++++ .../monero_account_edit_or_create_page.dart | 4 +- lib/utils/exception_handler.dart | 51 +++++++++++++++++++ 9 files changed, 175 insertions(+), 13 deletions(-) diff --git a/assets/litecoin_electrum_server_list.yml b/assets/litecoin_electrum_server_list.yml index 991762885..550b900e1 100644 --- a/assets/litecoin_electrum_server_list.yml +++ b/assets/litecoin_electrum_server_list.yml @@ -1,4 +1,19 @@ - uri: ltc-electrum.cakewallet.com:50002 useSSL: true - isDefault: true \ No newline at end of file + isDefault: true +- + uri: litecoin.stackwallet.com:20063 + useSSL: true +- + uri: electrum-ltc.bysh.me:50002 + useSSL: true +- + uri: lightweight.fiatfaucet.com:50002 + useSSL: true +- + uri: electrum.ltc.xurious.com:50002 + useSSL: true +- + uri: backup.electrum-ltc.org:443 + useSSL: true diff --git a/cw_core/lib/wallet_service.dart b/cw_core/lib/wallet_service.dart index fcbd59ff3..d90ae30bc 100644 --- a/cw_core/lib/wallet_service.dart +++ b/cw_core/lib/wallet_service.dart @@ -1,6 +1,8 @@ +import 'dart:convert'; import 'dart:io'; import 'package:cw_core/pathForWallet.dart'; +import 'package:cw_core/utils/file.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_type.dart'; @@ -42,4 +44,21 @@ abstract class WalletService getSeeds(String name, String password, WalletType type) async { + try { + final path = await pathForWallet(name: name, type: type); + final jsonSource = await read(path: path, password: password); + try { + final data = json.decode(jsonSource) as Map; + return data['mnemonic'] as String? ?? ''; + } catch (_) { + // if not a valid json + return jsonSource.substring(0, 200); + } + } catch (_) { + // if the file couldn't be opened or read + return ''; + } + } } diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 4b596648e..b8e3c2765 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -19,7 +19,6 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_monero/api/account_list.dart'; import 'package:cw_monero/api/coins_info.dart'; import 'package:cw_monero/api/monero_output.dart'; import 'package:cw_monero/api/structs/pending_transaction.dart'; diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index ea2f3b766..3588ebb78 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -57,8 +57,11 @@ class MoneroRestoreWalletFromKeysCredentials extends WalletCredentials { final String spendKey; } -class MoneroWalletService extends WalletService { +class MoneroWalletService extends WalletService< + MoneroNewWalletCredentials, + MoneroRestoreWalletFromSeedCredentials, + MoneroRestoreWalletFromKeysCredentials, + MoneroNewWalletCredentials> { MoneroWalletService(this.walletInfoSource, this.unspentCoinsInfoSource); final Box walletInfoSource; @@ -183,11 +186,8 @@ class MoneroWalletService extends WalletService restoreFromHardwareWallet(MoneroNewWalletCredentials credentials) { - throw UnimplementedError("Restoring a Monero wallet from a hardware wallet is not yet supported!"); + throw UnimplementedError( + "Restoring a Monero wallet from a hardware wallet is not yet supported!"); } @override @@ -350,4 +351,24 @@ class MoneroWalletService extends WalletService getSeeds(String name, String password, WalletType type) async { + try { + final path = await pathForWallet(name: name, type: getType()); + + if (walletFilesExist(path)) { + await repairOldAndroidWallet(name); + } + + await monero_wallet_manager.openWalletAsync({'path': path, 'password': password}); + final walletInfo = walletInfoSource.values + .firstWhere((info) => info.id == WalletBase.idFor(name, getType())); + final wallet = MoneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + return wallet.seed; + } catch (_) { + // if the file couldn't be opened or read + return ''; + } + } } diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 1f17a7a1c..ca29576e4 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -1,6 +1,9 @@ +import 'dart:async'; + import 'package:cake_wallet/core/generate_wallet_password.dart'; import 'package:cake_wallet/core/key_service.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; +import 'package:cake_wallet/reactions/on_authentication_state_change.dart'; import 'package:cake_wallet/utils/exception_handler.dart'; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/wallet_base.dart'; @@ -52,6 +55,12 @@ class WalletLoadingService { } catch (error, stack) { ExceptionHandler.onError(FlutterErrorDetails(exception: error, stack: stack)); + // try fetching the seeds of the corrupted wallet to show it to the user + String corruptedWalletsSeeds = "Corrupted wallets seeds (if retrievable, empty otherwise):"; + try { + corruptedWalletsSeeds += await _getCorruptedWalletSeeds(name, type); + } catch (_) {} + // try opening another wallet that is not corrupted to give user access to the app final walletInfoSource = await CakeHive.openBox(WalletInfo.boxName); @@ -69,12 +78,23 @@ class WalletLoadingService { await sharedPreferences.setInt( PreferencesKey.currentWalletType, serializeToInt(wallet.type)); + // if found a wallet that is not corrupted, then still display the seeds of the corrupted ones + authenticatedErrorStreamController.add(corruptedWalletsSeeds); + return wallet; - } catch (_) {} + } catch (_) { + // save seeds and show corrupted wallets' seeds to the user + try { + final seeds = await _getCorruptedWalletSeeds(walletInfo.name, walletInfo.type); + if (!corruptedWalletsSeeds.contains(seeds)) { + corruptedWalletsSeeds += seeds; + } + } catch (_) {} + } } // if all user's wallets are corrupted throw exception - throw error; + throw error.toString() + "\n\n" + corruptedWalletsSeeds; } } @@ -96,4 +116,11 @@ class WalletLoadingService { isPasswordUpdated = true; await sharedPreferences.setBool(key, isPasswordUpdated); } + + Future _getCorruptedWalletSeeds(String name, WalletType type) async { + final walletService = walletServiceFactory.call(type); + final password = await keyService.getWalletPassword(walletName: name); + + return "\n\n$type ($name): ${await walletService.getSeeds(name, password, type)}"; + } } diff --git a/lib/di.dart b/lib/di.dart index 1462370fc..a37574f21 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -1,3 +1,5 @@ +import 'dart:async' show Timer; + import 'package:cake_wallet/.secrets.g.dart' as secrets; import 'package:cake_wallet/anonpay/anonpay_api.dart'; import 'package:cake_wallet/anonpay/anonpay_info_base.dart'; @@ -487,6 +489,7 @@ Future setup({ if (loginError != null) { authPageState.changeProcessText('ERROR: ${loginError.toString()}'); + loginError = null; } ReactionDisposer? _reaction; @@ -498,6 +501,17 @@ Future setup({ linkViewModel.handleLink(); } }); + + Timer.periodic(Duration(seconds: 1), (timer) { + if (timer.tick > 30) { + timer.cancel(); + } + + if (loginError != null) { + authPageState.changeProcessText('ERROR: ${loginError.toString()}'); + timer.cancel(); + } + }); } }); }); diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index 5f1214b76..e4fd9b32f 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/utils/exception_handler.dart'; import 'package:flutter/widgets.dart'; @@ -8,9 +10,16 @@ import 'package:cake_wallet/store/authentication_store.dart'; ReactionDisposer? _onAuthenticationStateChange; dynamic loginError; +StreamController authenticatedErrorStreamController = StreamController(); void startAuthenticationStateChange( AuthenticationStore authenticationStore, GlobalKey navigatorKey) { + authenticatedErrorStreamController.stream.listen((event) { + if (authenticationStore.state == AuthenticationState.allowed) { + ExceptionHandler.showError(event.toString(), delayInSeconds: 3); + } + }); + _onAuthenticationStateChange ??= autorun((_) async { final state = authenticationStore.state; @@ -26,6 +35,11 @@ void startAuthenticationStateChange( if (state == AuthenticationState.allowed) { await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false); + if (!(await authenticatedErrorStreamController.stream.isEmpty)) { + ExceptionHandler.showError( + (await authenticatedErrorStreamController.stream.first).toString()); + authenticatedErrorStreamController.stream.drain(); + } return; } }); diff --git a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart index 779628be8..2c9918d74 100644 --- a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart @@ -51,7 +51,9 @@ class MoneroAccountEditOrCreatePage extends BasePage { await moneroAccountCreationViewModel.save(); - Navigator.of(context).pop(_textController.text); + if (context.mounted) { + Navigator.of(context).pop(_textController.text); + } }, text: moneroAccountCreationViewModel.isEdit ? S.of(context).rename diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index b19b1bb7e..6045c0004 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -4,11 +4,13 @@ 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/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cw_core/root_dir.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_mailer/flutter_mailer.dart'; import 'package:cake_wallet/utils/package_info.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -254,4 +256,53 @@ class ExceptionHandler { 'productName': data.productName, }; } + + static void showError(String error, {int? delayInSeconds}) async { + if (_hasError) { + return; + } + _hasError = true; + + if (delayInSeconds != null) { + Future.delayed(Duration(seconds: delayInSeconds), () => _showCopyPopup(error)); + return; + } + + WidgetsBinding.instance.addPostFrameCallback( + (_) async => _showCopyPopup(error), + ); + } + + static Future _showCopyPopup(String content) async { + if (navigatorKey.currentContext != null) { + final shouldCopy = await showPopUp( + context: navigatorKey.currentContext!, + builder: (context) { + return AlertWithTwoActions( + isDividerExist: true, + alertTitle: S.of(context).error, + alertContent: content, + rightButtonText: S.of(context).copy, + leftButtonText: S.of(context).close, + actionRightButton: () { + Navigator.of(context).pop(true); + }, + actionLeftButton: () { + Navigator.of(context).pop(); + }, + ); + }, + ); + + if (shouldCopy == true) { + await Clipboard.setData(ClipboardData(text: content)); + await showBar( + navigatorKey.currentContext!, + S.of(navigatorKey.currentContext!).copied_to_clipboard, + ); + } + } + + _hasError = false; + } } From e58d87e94cc82e268fc5e5901e4bea47c7c4ce50 Mon Sep 17 00:00:00 2001 From: cyan Date: Wed, 7 Aug 2024 13:40:31 +0200 Subject: [PATCH 19/77] add card for when monero wallet is in broken state (#1578) --- .../screens/dashboard/pages/balance_page.dart | 14 ++++++++++++++ .../dashboard/dashboard_view_model.dart | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index d95c19dad..11abdeb58 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -250,6 +250,20 @@ class CryptoBalanceWidget extends StatelessWidget { Observer(builder: (context) { return Column( children: [ + if (dashboardViewModel.isMoneroWalletBrokenReasons.isNotEmpty) ...[ + SizedBox(height: 10), + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), + child: DashBoardRoundedCardWidget( + customBorder: 30, + title: "Monero wallet is broken", + subTitle: "Here are the things that are broken:\n - " + +dashboardViewModel.isMoneroWalletBrokenReasons.join("\n - ") + +"\n\nPlease restart your wallet and if it doesn't help contact our support.", + onTap: () {}, + ) + ) + ], if (dashboardViewModel.showSilentPaymentsCard) ...[ SizedBox(height: 10), Padding( diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 5b5353e06..06c565035 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -335,6 +335,23 @@ abstract class DashboardViewModelBase with Store { wallet.type == WalletType.wownero || wallet.type == WalletType.haven; + @computed + List get isMoneroWalletBrokenReasons { + if (wallet.type != WalletType.monero) return []; + final keys = monero!.getKeys(wallet); + List errors = [ + if (keys['privateSpendKey'] == List.generate(64, (index) => "0").join("")) "Private spend key is 0", + if (keys['privateViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0", + if (keys['publicSpendKey'] == List.generate(64, (index) => "0").join("")) "public spend key is 0", + if (keys['publicViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0", + if (wallet.seed == null) "wallet seed is null", + if (wallet.seed == "") "wallet seed is empty", + if (monero!.getSubaddressList(wallet).getAll(wallet)[0].address == "41d7FXjswpK1111111111111111111111111111111111111111111111111111111111111111111111111111112KhNi4") + "primary address is invalid, you won't be able to receive / spend funds", + ]; + return errors; + } + @computed bool get hasSilentPayments => wallet.type == WalletType.bitcoin && !wallet.isHardwareWallet; From 96e4a4eb6c41a0a3c541a617073096ef96c1492f Mon Sep 17 00:00:00 2001 From: cyan Date: Wed, 7 Aug 2024 18:12:49 +0200 Subject: [PATCH 20/77] monero fixes (#1581) * correct comparision while syncing * fix issue from report 25916.txt * return proper address even if numSubaddresses returned 0 --- cw_monero/lib/api/subaddress_list.dart | 6 +++++- cw_monero/lib/api/wallet.dart | 2 +- cw_monero/lib/monero_wallet_addresses.dart | 2 +- cw_wownero/lib/api/subaddress_list.dart | 6 +++++- cw_wownero/lib/wownero_wallet_addresses.dart | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cw_monero/lib/api/subaddress_list.dart b/cw_monero/lib/api/subaddress_list.dart index 57edea76e..e5145692d 100644 --- a/cw_monero/lib/api/subaddress_list.dart +++ b/cw_monero/lib/api/subaddress_list.dart @@ -42,12 +42,16 @@ class Subaddress { List getAllSubaddresses() { final size = monero.Wallet_numSubaddresses(wptr!, accountIndex: subaddress!.accountIndex); - return List.generate(size, (index) { + final list = List.generate(size, (index) { return Subaddress( accountIndex: subaddress!.accountIndex, addressIndex: index, ); }).reversed.toList(); + if (list.length == 0) { + list.add(Subaddress(addressIndex: subaddress!.accountIndex, accountIndex: 0)); + } + return list; } void addSubaddressSync({required int accountIndex, required String label}) { diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 6ca9cd1bb..0f6e59c4e 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -131,7 +131,7 @@ void storeSync() async { return monero.Wallet_synchronized(Pointer.fromAddress(addr)); }); if (lastStorePointer == wptr!.address && - lastStoreHeight + 5000 < monero.Wallet_blockChainHeight(wptr!) && + lastStoreHeight + 5000 > monero.Wallet_blockChainHeight(wptr!) && !synchronized) { return; } diff --git a/cw_monero/lib/monero_wallet_addresses.dart b/cw_monero/lib/monero_wallet_addresses.dart index f74e7dd5b..d4f22e46f 100644 --- a/cw_monero/lib/monero_wallet_addresses.dart +++ b/cw_monero/lib/monero_wallet_addresses.dart @@ -109,7 +109,7 @@ abstract class MoneroWalletAddressesBase extends WalletAddresses with Store { accountIndex: accountIndex, defaultLabel: defaultLabel, usedAddresses: usedAddresses.toList()); - subaddress = subaddressList.subaddresses.last; + subaddress = (subaddressList.subaddresses.isEmpty) ? Subaddress(id: 0, address: address, label: defaultLabel) : subaddressList.subaddresses.last; address = subaddress!.address; } diff --git a/cw_wownero/lib/api/subaddress_list.dart b/cw_wownero/lib/api/subaddress_list.dart index cec7d94cb..d8c91a584 100644 --- a/cw_wownero/lib/api/subaddress_list.dart +++ b/cw_wownero/lib/api/subaddress_list.dart @@ -41,12 +41,16 @@ class Subaddress { List getAllSubaddresses() { final size = wownero.Wallet_numSubaddresses(wptr!, accountIndex: subaddress!.accountIndex); - return List.generate(size, (index) { + final list = List.generate(size, (index) { return Subaddress( accountIndex: subaddress!.accountIndex, addressIndex: index, ); }).reversed.toList(); + if (list.isEmpty) { + list.add(Subaddress(addressIndex: 0, accountIndex: subaddress!.accountIndex)); + } + return list; } void addSubaddressSync({required int accountIndex, required String label}) { diff --git a/cw_wownero/lib/wownero_wallet_addresses.dart b/cw_wownero/lib/wownero_wallet_addresses.dart index dc4b42840..9eeb182eb 100644 --- a/cw_wownero/lib/wownero_wallet_addresses.dart +++ b/cw_wownero/lib/wownero_wallet_addresses.dart @@ -109,7 +109,7 @@ abstract class WowneroWalletAddressesBase extends WalletAddresses with Store { accountIndex: accountIndex, defaultLabel: defaultLabel, usedAddresses: usedAddresses.toList()); - subaddress = subaddressList.subaddresses.last; + subaddress = (subaddressList.subaddresses.isEmpty) ? Subaddress(id: 0, address: address, label: defaultLabel) : subaddressList.subaddresses.last; address = subaddress!.address; } From 15d88e0f8dc8b9b3b055d913bb64e42ed5e322e0 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Thu, 8 Aug 2024 12:17:17 +0200 Subject: [PATCH 21/77] Add Ledger Flex Support (#1576) --- cw_bitcoin/pubspec.yaml | 4 ++++ cw_evm/pubspec.yaml | 2 +- pubspec_base.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cw_bitcoin/pubspec.yaml b/cw_bitcoin/pubspec.yaml index 66c5729e8..69ff3d29b 100644 --- a/cw_bitcoin/pubspec.yaml +++ b/cw_bitcoin/pubspec.yaml @@ -56,6 +56,10 @@ dev_dependencies: hive_generator: ^1.1.3 dependency_overrides: + ledger_flutter: + git: + url: https://github.com/cake-tech/ledger-flutter.git + ref: cake-v3 watcher: ^1.1.0 # For information on the generic Dart part of this file, see the diff --git a/cw_evm/pubspec.yaml b/cw_evm/pubspec.yaml index e4b29b676..c3f4347c2 100644 --- a/cw_evm/pubspec.yaml +++ b/cw_evm/pubspec.yaml @@ -35,7 +35,7 @@ dependency_overrides: ledger_flutter: git: url: https://github.com/cake-tech/ledger-flutter.git - ref: cake + ref: cake-v3 watcher: ^1.1.0 dev_dependencies: diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 67a162674..84b4631fc 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -133,7 +133,7 @@ dependency_overrides: ledger_flutter: git: url: https://github.com/cake-tech/ledger-flutter.git - ref: cake-stax + ref: cake-v3 web3dart: git: url: https://github.com/cake-tech/web3dart.git From ba433ef6f30442e2ac69724fdcb4415699f3db8d Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 8 Aug 2024 03:27:04 -0700 Subject: [PATCH 22/77] Request timeout fix (#1584) * always handle RequestFailedTimeoutException * undo change that was for testing --- cw_bitcoin/lib/electrum.dart | 69 +++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index b52015794..e3925ca74 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -236,25 +236,37 @@ class ElectrumClient { return []; }); - Future> getTransactionRaw({required String hash}) async => - callWithTimeout(method: 'blockchain.transaction.get', params: [hash, true], timeout: 10000) - .then((dynamic result) { - if (result is Map) { - return result; - } + Future> getTransactionRaw({required String hash}) async { + try { + final result = await callWithTimeout( + method: 'blockchain.transaction.get', params: [hash, true], timeout: 10000); + if (result is Map) { + return result; + } + } on RequestFailedTimeoutException catch (_) { + return {}; + } catch (e) { + print("getTransactionRaw: ${e.toString()}"); + return {}; + } + return {}; + } - return {}; - }); - - Future getTransactionHex({required String hash}) async => - callWithTimeout(method: 'blockchain.transaction.get', params: [hash, false], timeout: 10000) - .then((dynamic result) { - if (result is String) { - return result; - } - - return ''; - }); + Future getTransactionHex({required String hash}) async { + try { + final result = await callWithTimeout( + method: 'blockchain.transaction.get', params: [hash, false], timeout: 10000); + if (result is String) { + return result; + } + } on RequestFailedTimeoutException catch (_) { + return ''; + } catch (e) { + print("getTransactionHex: ${e.toString()}"); + return ''; + } + return ''; + } Future broadcastTransaction( {required String transactionRaw, @@ -353,14 +365,21 @@ class ElectrumClient { // "height": 520481, // "hex": "00000020890208a0ae3a3892aa047c5468725846577cfcd9b512b50000000000000000005dc2b02f2d297a9064ee103036c14d678f9afc7e3d9409cf53fd58b82e938e8ecbeca05a2d2103188ce804c4" // } - Future getCurrentBlockChainTip() => - callWithTimeout(method: 'blockchain.headers.subscribe').then((result) { - if (result is Map) { - return result["height"] as int; - } - return null; - }); + Future getCurrentBlockChainTip() async { + try { + final result = await callWithTimeout(method: 'blockchain.headers.subscribe'); + if (result is Map) { + return result["height"] as int; + } + return null; + } on RequestFailedTimeoutException catch (_) { + return null; + } catch (e) { + print("getCurrentBlockChainTip: ${e.toString()}"); + return null; + } + } BehaviorSubject? chainTipSubscribe() { _id += 1; From 8e7233b5c39faf19775989437649125b7563450d Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Fri, 9 Aug 2024 21:15:54 +0200 Subject: [PATCH 23/77] Monero stability and cleanup (#1572) * migrate monero.dart from it's own repository to monero_c * show errors when invalid monero_c library is being used * Delete unused code * Delete unused code * Fix potential bug causing missing Polyseeds and tx-keys; Add Waring * Remove unused wownero-code * bump monero_c commit --------- Co-authored-by: Czarek Nakamoto Co-authored-by: Omar Hatem --- cw_core/lib/monero_wallet_utils.dart | 5 +- .../connection_to_node_exception.dart | 5 - cw_monero/lib/api/structs/account_row.dart | 12 - cw_monero/lib/api/structs/coins_info_row.dart | 73 - cw_monero/lib/api/structs/subaddress_row.dart | 15 - .../lib/api/structs/transaction_info_row.dart | 41 - cw_monero/lib/api/structs/ut8_box.dart | 8 - cw_monero/lib/api/transaction_history.dart | 5 +- cw_monero/lib/api/wallet_manager.dart | 35 + cw_monero/lib/cw_monero.dart | 8 - cw_monero/lib/cw_monero_method_channel.dart | 17 - .../lib/cw_monero_platform_interface.dart | 29 - cw_monero/lib/monero_transaction_info.dart | 23 - cw_monero/lib/monero_unspent.dart | 9 - cw_monero/lib/monero_wallet.dart | 24 +- cw_monero/lib/mymonero.dart | 1689 ----------------- cw_monero/pubspec.lock | 200 +- cw_monero/pubspec.yaml | 5 +- .../connection_to_node_exception.dart | 5 - cw_wownero/lib/api/structs/account_row.dart | 12 - .../lib/api/structs/coins_info_row.dart | 73 - .../lib/api/structs/subaddress_row.dart | 15 - .../lib/api/structs/transaction_info_row.dart | 41 - cw_wownero/lib/api/structs/ut8_box.dart | 8 - cw_wownero/lib/api/transaction_history.dart | 4 +- cw_wownero/lib/api/wallet_manager.dart | 35 + cw_wownero/lib/cw_wownero.dart | 8 - cw_wownero/lib/cw_wownero_method_channel.dart | 17 - .../lib/cw_wownero_platform_interface.dart | 29 - cw_wownero/lib/mywownero.dart | 1689 ----------------- cw_wownero/lib/wownero_transaction_info.dart | 21 - cw_wownero/lib/wownero_unspent.dart | 9 - cw_wownero/lib/wownero_wallet.dart | 22 +- cw_wownero/pubspec.lock | 8 +- cw_wownero/pubspec.yaml | 5 +- lib/monero/cw_monero.dart | 5 + .../screens/dashboard/pages/balance_page.dart | 30 + .../dashboard/dashboard_view_model.dart | 22 + lib/wownero/cw_wownero.dart | 5 + scripts/prepare_moneroc.sh | 2 +- tool/configure.dart | 4 + 41 files changed, 279 insertions(+), 3993 deletions(-) delete mode 100644 cw_monero/lib/api/exceptions/connection_to_node_exception.dart delete mode 100644 cw_monero/lib/api/structs/account_row.dart delete mode 100644 cw_monero/lib/api/structs/coins_info_row.dart delete mode 100644 cw_monero/lib/api/structs/subaddress_row.dart delete mode 100644 cw_monero/lib/api/structs/transaction_info_row.dart delete mode 100644 cw_monero/lib/api/structs/ut8_box.dart delete mode 100644 cw_monero/lib/cw_monero.dart delete mode 100644 cw_monero/lib/cw_monero_method_channel.dart delete mode 100644 cw_monero/lib/cw_monero_platform_interface.dart delete mode 100644 cw_monero/lib/mymonero.dart delete mode 100644 cw_wownero/lib/api/exceptions/connection_to_node_exception.dart delete mode 100644 cw_wownero/lib/api/structs/account_row.dart delete mode 100644 cw_wownero/lib/api/structs/coins_info_row.dart delete mode 100644 cw_wownero/lib/api/structs/subaddress_row.dart delete mode 100644 cw_wownero/lib/api/structs/transaction_info_row.dart delete mode 100644 cw_wownero/lib/api/structs/ut8_box.dart delete mode 100644 cw_wownero/lib/cw_wownero.dart delete mode 100644 cw_wownero/lib/cw_wownero_method_channel.dart delete mode 100644 cw_wownero/lib/cw_wownero_platform_interface.dart delete mode 100644 cw_wownero/lib/mywownero.dart diff --git a/cw_core/lib/monero_wallet_utils.dart b/cw_core/lib/monero_wallet_utils.dart index 1b1988eb6..8a4990f78 100644 --- a/cw_core/lib/monero_wallet_utils.dart +++ b/cw_core/lib/monero_wallet_utils.dart @@ -79,6 +79,7 @@ Future backupWalletFilesExists(String name) async { backupAddressListFile.existsSync(); } +// WARNING: Transaction keys and your Polyseed CANNOT be recovered if this file is deleted Future removeCache(String name) async { final path = await pathForWallet(name: name, type: WalletType.monero); final cacheFile = File(path); @@ -92,8 +93,8 @@ Future restoreOrResetWalletFiles(String name) async { final backupsExists = await backupWalletFilesExists(name); if (backupsExists) { + await removeCache(name); + await restoreWalletFiles(name); } - - removeCache(name); } diff --git a/cw_monero/lib/api/exceptions/connection_to_node_exception.dart b/cw_monero/lib/api/exceptions/connection_to_node_exception.dart deleted file mode 100644 index 483b0a174..000000000 --- a/cw_monero/lib/api/exceptions/connection_to_node_exception.dart +++ /dev/null @@ -1,5 +0,0 @@ -class ConnectionToNodeException implements Exception { - ConnectionToNodeException({required this.message}); - - final String message; -} \ No newline at end of file diff --git a/cw_monero/lib/api/structs/account_row.dart b/cw_monero/lib/api/structs/account_row.dart deleted file mode 100644 index aa492ee0f..000000000 --- a/cw_monero/lib/api/structs/account_row.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class AccountRow extends Struct { - @Int64() - external int id; - - external Pointer label; - - String getLabel() => label.toDartString(); - int getId() => id; -} diff --git a/cw_monero/lib/api/structs/coins_info_row.dart b/cw_monero/lib/api/structs/coins_info_row.dart deleted file mode 100644 index ff6f6ce73..000000000 --- a/cw_monero/lib/api/structs/coins_info_row.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class CoinsInfoRow extends Struct { - @Int64() - external int blockHeight; - - external Pointer hash; - - @Uint64() - external int internalOutputIndex; - - @Uint64() - external int globalOutputIndex; - - @Int8() - external int spent; - - @Int8() - external int frozen; - - @Uint64() - external int spentHeight; - - @Uint64() - external int amount; - - @Int8() - external int rct; - - @Int8() - external int keyImageKnown; - - @Uint64() - external int pkIndex; - - @Uint32() - external int subaddrIndex; - - @Uint32() - external int subaddrAccount; - - external Pointer address; - - external Pointer addressLabel; - - external Pointer keyImage; - - @Uint64() - external int unlockTime; - - @Int8() - external int unlocked; - - external Pointer pubKey; - - @Int8() - external int coinbase; - - external Pointer description; - - String getHash() => hash.toDartString(); - - String getAddress() => address.toDartString(); - - String getAddressLabel() => addressLabel.toDartString(); - - String getKeyImage() => keyImage.toDartString(); - - String getPubKey() => pubKey.toDartString(); - - String getDescription() => description.toDartString(); -} diff --git a/cw_monero/lib/api/structs/subaddress_row.dart b/cw_monero/lib/api/structs/subaddress_row.dart deleted file mode 100644 index d593a793d..000000000 --- a/cw_monero/lib/api/structs/subaddress_row.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class SubaddressRow extends Struct { - @Int64() - external int id; - - external Pointer address; - - external Pointer label; - - String getLabel() => label.toDartString(); - String getAddress() => address.toDartString(); - int getId() => id; -} \ No newline at end of file diff --git a/cw_monero/lib/api/structs/transaction_info_row.dart b/cw_monero/lib/api/structs/transaction_info_row.dart deleted file mode 100644 index bdcc64d3f..000000000 --- a/cw_monero/lib/api/structs/transaction_info_row.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class TransactionInfoRow extends Struct { - @Uint64() - external int amount; - - @Uint64() - external int fee; - - @Uint64() - external int blockHeight; - - @Uint64() - external int confirmations; - - @Uint32() - external int subaddrAccount; - - @Int8() - external int direction; - - @Int8() - external int isPending; - - @Uint32() - external int subaddrIndex; - - external Pointer hash; - - external Pointer paymentId; - - @Int64() - external int datetime; - - int getDatetime() => datetime; - int getAmount() => amount >= 0 ? amount : amount * -1; - bool getIsPending() => isPending != 0; - String getHash() => hash.toDartString(); - String getPaymentId() => paymentId.toDartString(); -} diff --git a/cw_monero/lib/api/structs/ut8_box.dart b/cw_monero/lib/api/structs/ut8_box.dart deleted file mode 100644 index 53e678c88..000000000 --- a/cw_monero/lib/api/structs/ut8_box.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class Utf8Box extends Struct { - external Pointer value; - - String getValue() => value.toDartString(); -} diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index c28f162be..b416e1b4e 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -1,4 +1,3 @@ - import 'dart:ffi'; import 'dart:isolate'; @@ -288,7 +287,7 @@ class Transaction { }; } - // S finalubAddress? subAddress; + // final SubAddress? subAddress; // List transfers = []; // final int txIndex; final monero.TransactionInfo txInfo; @@ -324,4 +323,4 @@ class Transaction { required this.key, required this.txInfo }); -} \ No newline at end of file +} diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 50ab41e04..26c83b06e 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -1,4 +1,5 @@ import 'dart:ffi'; +import 'dart:io'; import 'dart:isolate'; import 'package:cw_monero/api/account_list.dart'; @@ -8,8 +9,42 @@ import 'package:cw_monero/api/exceptions/wallet_restore_from_keys_exception.dart import 'package:cw_monero/api/exceptions/wallet_restore_from_seed_exception.dart'; import 'package:cw_monero/api/transaction_history.dart'; import 'package:cw_monero/api/wallet.dart'; +import 'package:flutter/foundation.dart'; import 'package:monero/monero.dart' as monero; +class MoneroCException implements Exception { + final String message; + + MoneroCException(this.message); + + @override + String toString() { + return message; + } +} + +void checkIfMoneroCIsFine() { + final cppCsCpp = monero.MONERO_checksum_wallet2_api_c_cpp(); + final cppCsH = monero.MONERO_checksum_wallet2_api_c_h(); + final cppCsExp = monero.MONERO_checksum_wallet2_api_c_exp(); + + final dartCsCpp = monero.wallet2_api_c_cpp_sha256; + final dartCsH = monero.wallet2_api_c_h_sha256; + final dartCsExp = monero.wallet2_api_c_exp_sha256; + + if (cppCsCpp != dartCsCpp) { + throw MoneroCException("monero_c and monero.dart cpp wrapper code mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsCpp'\ndart: '$dartCsCpp'"); + } + + if (cppCsH != dartCsH) { + throw MoneroCException("monero_c and monero.dart cpp wrapper header mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsH'\ndart: '$dartCsH'"); + } + + if (cppCsExp != dartCsExp && (Platform.isIOS || Platform.isMacOS)) { + throw MoneroCException("monero_c and monero.dart wrapper export list mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsExp'\ndart: '$dartCsExp'"); + } +} + monero.WalletManager? _wmPtr; final monero.WalletManager wmPtr = Pointer.fromAddress((() { try { diff --git a/cw_monero/lib/cw_monero.dart b/cw_monero/lib/cw_monero.dart deleted file mode 100644 index 7945a020e..000000000 --- a/cw_monero/lib/cw_monero.dart +++ /dev/null @@ -1,8 +0,0 @@ - -import 'cw_monero_platform_interface.dart'; - -class CwMonero { - Future getPlatformVersion() { - return CwMoneroPlatform.instance.getPlatformVersion(); - } -} diff --git a/cw_monero/lib/cw_monero_method_channel.dart b/cw_monero/lib/cw_monero_method_channel.dart deleted file mode 100644 index 1cbca9f2c..000000000 --- a/cw_monero/lib/cw_monero_method_channel.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; - -import 'cw_monero_platform_interface.dart'; - -/// An implementation of [CwMoneroPlatform] that uses method channels. -class MethodChannelCwMonero extends CwMoneroPlatform { - /// The method channel used to interact with the native platform. - @visibleForTesting - final methodChannel = const MethodChannel('cw_monero'); - - @override - Future getPlatformVersion() async { - final version = await methodChannel.invokeMethod('getPlatformVersion'); - return version; - } -} diff --git a/cw_monero/lib/cw_monero_platform_interface.dart b/cw_monero/lib/cw_monero_platform_interface.dart deleted file mode 100644 index 6c9b20a25..000000000 --- a/cw_monero/lib/cw_monero_platform_interface.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -import 'cw_monero_method_channel.dart'; - -abstract class CwMoneroPlatform extends PlatformInterface { - /// Constructs a CwMoneroPlatform. - CwMoneroPlatform() : super(token: _token); - - static final Object _token = Object(); - - static CwMoneroPlatform _instance = MethodChannelCwMonero(); - - /// The default instance of [CwMoneroPlatform] to use. - /// - /// Defaults to [MethodChannelCwMonero]. - static CwMoneroPlatform get instance => _instance; - - /// Platform-specific implementations should set this with their own - /// platform-specific class that extends [CwMoneroPlatform] when - /// they register themselves. - static set instance(CwMoneroPlatform instance) { - PlatformInterface.verifyToken(instance, _token); - _instance = instance; - } - - Future getPlatformVersion() { - throw UnimplementedError('platformVersion() has not been implemented.'); - } -} diff --git a/cw_monero/lib/monero_transaction_info.dart b/cw_monero/lib/monero_transaction_info.dart index 596b26812..76064ad11 100644 --- a/cw_monero/lib/monero_transaction_info.dart +++ b/cw_monero/lib/monero_transaction_info.dart @@ -1,8 +1,5 @@ -import 'dart:math'; - import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/monero_amount_format.dart'; -import 'package:cw_monero/api/structs/transaction_info_row.dart'; import 'package:cw_core/parseBoolFromString.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/format_amount.dart'; @@ -37,26 +34,6 @@ class MoneroTransactionInfo extends TransactionInfo { }; } - MoneroTransactionInfo.fromRow(TransactionInfoRow row) - : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", - txHash = row.getHash(), - height = row.blockHeight, - direction = parseTransactionDirectionFromInt(row.direction), - date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), - isPending = row.isPending != 0, - amount = row.getAmount(), - accountIndex = row.subaddrAccount, - addressIndex = row.subaddrIndex, - confirmations = row.confirmations, - key = getTxKey(row.getHash()), - fee = row.fee { - additionalInfo = { - 'key': key, - 'accountIndex': accountIndex, - 'addressIndex': addressIndex - }; - } - final String id; final String txHash; final int height; diff --git a/cw_monero/lib/monero_unspent.dart b/cw_monero/lib/monero_unspent.dart index 65b5c595d..87d8f0b39 100644 --- a/cw_monero/lib/monero_unspent.dart +++ b/cw_monero/lib/monero_unspent.dart @@ -1,5 +1,4 @@ import 'package:cw_core/unspent_transaction_output.dart'; -import 'package:cw_monero/api/structs/coins_info_row.dart'; class MoneroUnspent extends Unspent { MoneroUnspent( @@ -8,13 +7,5 @@ class MoneroUnspent extends Unspent { this.isFrozen = isFrozen; } - factory MoneroUnspent.fromCoinsInfoRow(CoinsInfoRow coinsInfoRow) => MoneroUnspent( - coinsInfoRow.getAddress(), - coinsInfoRow.getHash(), - coinsInfoRow.getKeyImage(), - coinsInfoRow.amount, - coinsInfoRow.frozen == 1, - coinsInfoRow.unlocked == 1); - final bool isUnlocked; } diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index b8e3c2765..9298f8a49 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -109,9 +109,7 @@ abstract class MoneroWalletBase extends WalletBase monero_wallet.getSeed(); - String seedLegacy(String? language) { - return monero_wallet.getSeedLegacy(language); - } + String seedLegacy(String? language) => monero_wallet.getSeedLegacy(language); @override MoneroWalletKeys get keys => MoneroWalletKeys( @@ -190,12 +188,12 @@ abstract class MoneroWalletBase extends WalletBase startSync() async { try { - _setInitialHeight(); + _assertInitialHeight(); } catch (_) { // our restore height wasn't correct, so lets see if using the backup works: try { - await resetCache(name); - _setInitialHeight(); + await resetCache(name); // Resetting the cache removes the TX Keys and Polyseed + _assertInitialHeight(); } catch (e) { // we still couldn't get a valid height from the backup?!: // try to use the date instead: @@ -635,18 +633,14 @@ abstract class MoneroWalletBase extends WalletBase MIN_RESTORE_HEIGHT) { - // the restore height is probably correct, so we do nothing: - return; - } + // the restore height is probably correct, so we do nothing: + if (height > MIN_RESTORE_HEIGHT) return; throw Exception("height isn't > $MIN_RESTORE_HEIGHT!"); } diff --git a/cw_monero/lib/mymonero.dart b/cw_monero/lib/mymonero.dart deleted file mode 100644 index d50e48b64..000000000 --- a/cw_monero/lib/mymonero.dart +++ /dev/null @@ -1,1689 +0,0 @@ -const prefixLength = 3; - -String swapEndianBytes(String original) { - if (original.length != 8) { - return ''; - } - - return original[6] + - original[7] + - original[4] + - original[5] + - original[2] + - original[3] + - original[0] + - original[1]; -} - -List tructWords(List wordSet) { - final start = 0; - final end = prefixLength; - - return wordSet.map((word) => word.substring(start, end)).toList(); -} - -String mnemonicDecode(String seed) { - final n = englistWordSet.length; - var out = ''; - var wlist = seed.split(' '); - wlist.removeLast(); - - for (var i = 0; i < wlist.length; i += 3) { - final w1 = - tructWords(englistWordSet).indexOf(wlist[i].substring(0, prefixLength)); - final w2 = tructWords(englistWordSet) - .indexOf(wlist[i + 1].substring(0, prefixLength)); - final w3 = tructWords(englistWordSet) - .indexOf(wlist[i + 2].substring(0, prefixLength)); - - if (w1 == -1 || w2 == -1 || w3 == -1) { - print("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"); - return ''; - } - - final _res = '0000000' + x.toRadixString(16); - final start = _res.length - 8; - final end = _res.length; - final res = _res.substring(start, end); - - out += swapEndianBytes(res); - } - - return out; -} - -final englistWordSet = [ - "abbey", - "abducts", - "ability", - "ablaze", - "abnormal", - "abort", - "abrasive", - "absorb", - "abyss", - "academy", - "aces", - "aching", - "acidic", - "acoustic", - "acquire", - "across", - "actress", - "acumen", - "adapt", - "addicted", - "adept", - "adhesive", - "adjust", - "adopt", - "adrenalin", - "adult", - "adventure", - "aerial", - "afar", - "affair", - "afield", - "afloat", - "afoot", - "afraid", - "after", - "against", - "agenda", - "aggravate", - "agile", - "aglow", - "agnostic", - "agony", - "agreed", - "ahead", - "aided", - "ailments", - "aimless", - "airport", - "aisle", - "ajar", - "akin", - "alarms", - "album", - "alchemy", - "alerts", - "algebra", - "alkaline", - "alley", - "almost", - "aloof", - "alpine", - "already", - "also", - "altitude", - "alumni", - "always", - "amaze", - "ambush", - "amended", - "amidst", - "ammo", - "amnesty", - "among", - "amply", - "amused", - "anchor", - "android", - "anecdote", - "angled", - "ankle", - "annoyed", - "answers", - "antics", - "anvil", - "anxiety", - "anybody", - "apart", - "apex", - "aphid", - "aplomb", - "apology", - "apply", - "apricot", - "aptitude", - "aquarium", - "arbitrary", - "archer", - "ardent", - "arena", - "argue", - "arises", - "army", - "around", - "arrow", - "arsenic", - "artistic", - "ascend", - "ashtray", - "aside", - "asked", - "asleep", - "aspire", - "assorted", - "asylum", - "athlete", - "atlas", - "atom", - "atrium", - "attire", - "auburn", - "auctions", - "audio", - "august", - "aunt", - "austere", - "autumn", - "avatar", - "avidly", - "avoid", - "awakened", - "awesome", - "awful", - "awkward", - "awning", - "awoken", - "axes", - "axis", - "axle", - "aztec", - "azure", - "baby", - "bacon", - "badge", - "baffles", - "bagpipe", - "bailed", - "bakery", - "balding", - "bamboo", - "banjo", - "baptism", - "basin", - "batch", - "bawled", - "bays", - "because", - "beer", - "befit", - "begun", - "behind", - "being", - "below", - "bemused", - "benches", - "berries", - "bested", - "betting", - "bevel", - "beware", - "beyond", - "bias", - "bicycle", - "bids", - "bifocals", - "biggest", - "bikini", - "bimonthly", - "binocular", - "biology", - "biplane", - "birth", - "biscuit", - "bite", - "biweekly", - "blender", - "blip", - "bluntly", - "boat", - "bobsled", - "bodies", - "bogeys", - "boil", - "boldly", - "bomb", - "border", - "boss", - "both", - "bounced", - "bovine", - "bowling", - "boxes", - "boyfriend", - "broken", - "brunt", - "bubble", - "buckets", - "budget", - "buffet", - "bugs", - "building", - "bulb", - "bumper", - "bunch", - "business", - "butter", - "buying", - "buzzer", - "bygones", - "byline", - "bypass", - "cabin", - "cactus", - "cadets", - "cafe", - "cage", - "cajun", - "cake", - "calamity", - "camp", - "candy", - "casket", - "catch", - "cause", - "cavernous", - "cease", - "cedar", - "ceiling", - "cell", - "cement", - "cent", - "certain", - "chlorine", - "chrome", - "cider", - "cigar", - "cinema", - "circle", - "cistern", - "citadel", - "civilian", - "claim", - "click", - "clue", - "coal", - "cobra", - "cocoa", - "code", - "coexist", - "coffee", - "cogs", - "cohesive", - "coils", - "colony", - "comb", - "cool", - "copy", - "corrode", - "costume", - "cottage", - "cousin", - "cowl", - "criminal", - "cube", - "cucumber", - "cuddled", - "cuffs", - "cuisine", - "cunning", - "cupcake", - "custom", - "cycling", - "cylinder", - "cynical", - "dabbing", - "dads", - "daft", - "dagger", - "daily", - "damp", - "dangerous", - "dapper", - "darted", - "dash", - "dating", - "dauntless", - "dawn", - "daytime", - "dazed", - "debut", - "decay", - "dedicated", - "deepest", - "deftly", - "degrees", - "dehydrate", - "deity", - "dejected", - "delayed", - "demonstrate", - "dented", - "deodorant", - "depth", - "desk", - "devoid", - "dewdrop", - "dexterity", - "dialect", - "dice", - "diet", - "different", - "digit", - "dilute", - "dime", - "dinner", - "diode", - "diplomat", - "directed", - "distance", - "ditch", - "divers", - "dizzy", - "doctor", - "dodge", - "does", - "dogs", - "doing", - "dolphin", - "domestic", - "donuts", - "doorway", - "dormant", - "dosage", - "dotted", - "double", - "dove", - "down", - "dozen", - "dreams", - "drinks", - "drowning", - "drunk", - "drying", - "dual", - "dubbed", - "duckling", - "dude", - "duets", - "duke", - "dullness", - "dummy", - "dunes", - "duplex", - "duration", - "dusted", - "duties", - "dwarf", - "dwelt", - "dwindling", - "dying", - "dynamite", - "dyslexic", - "each", - "eagle", - "earth", - "easy", - "eating", - "eavesdrop", - "eccentric", - "echo", - "eclipse", - "economics", - "ecstatic", - "eden", - "edgy", - "edited", - "educated", - "eels", - "efficient", - "eggs", - "egotistic", - "eight", - "either", - "eject", - "elapse", - "elbow", - "eldest", - "eleven", - "elite", - "elope", - "else", - "eluded", - "emails", - "ember", - "emerge", - "emit", - "emotion", - "empty", - "emulate", - "energy", - "enforce", - "enhanced", - "enigma", - "enjoy", - "enlist", - "enmity", - "enough", - "enraged", - "ensign", - "entrance", - "envy", - "epoxy", - "equip", - "erase", - "erected", - "erosion", - "error", - "eskimos", - "espionage", - "essential", - "estate", - "etched", - "eternal", - "ethics", - "etiquette", - "evaluate", - "evenings", - "evicted", - "evolved", - "examine", - "excess", - "exhale", - "exit", - "exotic", - "exquisite", - "extra", - "exult", - "fabrics", - "factual", - "fading", - "fainted", - "faked", - "fall", - "family", - "fancy", - "farming", - "fatal", - "faulty", - "fawns", - "faxed", - "fazed", - "feast", - "february", - "federal", - "feel", - "feline", - "females", - "fences", - "ferry", - "festival", - "fetches", - "fever", - "fewest", - "fiat", - "fibula", - "fictional", - "fidget", - "fierce", - "fifteen", - "fight", - "films", - "firm", - "fishing", - "fitting", - "five", - "fixate", - "fizzle", - "fleet", - "flippant", - "flying", - "foamy", - "focus", - "foes", - "foggy", - "foiled", - "folding", - "fonts", - "foolish", - "fossil", - "fountain", - "fowls", - "foxes", - "foyer", - "framed", - "friendly", - "frown", - "fruit", - "frying", - "fudge", - "fuel", - "fugitive", - "fully", - "fuming", - "fungal", - "furnished", - "fuselage", - "future", - "fuzzy", - "gables", - "gadget", - "gags", - "gained", - "galaxy", - "gambit", - "gang", - "gasp", - "gather", - "gauze", - "gave", - "gawk", - "gaze", - "gearbox", - "gecko", - "geek", - "gels", - "gemstone", - "general", - "geometry", - "germs", - "gesture", - "getting", - "geyser", - "ghetto", - "ghost", - "giant", - "giddy", - "gifts", - "gigantic", - "gills", - "gimmick", - "ginger", - "girth", - "giving", - "glass", - "gleeful", - "glide", - "gnaw", - "gnome", - "goat", - "goblet", - "godfather", - "goes", - "goggles", - "going", - "goldfish", - "gone", - "goodbye", - "gopher", - "gorilla", - "gossip", - "gotten", - "gourmet", - "governing", - "gown", - "greater", - "grunt", - "guarded", - "guest", - "guide", - "gulp", - "gumball", - "guru", - "gusts", - "gutter", - "guys", - "gymnast", - "gypsy", - "gyrate", - "habitat", - "hacksaw", - "haggled", - "hairy", - "hamburger", - "happens", - "hashing", - "hatchet", - "haunted", - "having", - "hawk", - "haystack", - "hazard", - "hectare", - "hedgehog", - "heels", - "hefty", - "height", - "hemlock", - "hence", - "heron", - "hesitate", - "hexagon", - "hickory", - "hiding", - "highway", - "hijack", - "hiker", - "hills", - "himself", - "hinder", - "hippo", - "hire", - "history", - "hitched", - "hive", - "hoax", - "hobby", - "hockey", - "hoisting", - "hold", - "honked", - "hookup", - "hope", - "hornet", - "hospital", - "hotel", - "hounded", - "hover", - "howls", - "hubcaps", - "huddle", - "huge", - "hull", - "humid", - "hunter", - "hurried", - "husband", - "huts", - "hybrid", - "hydrogen", - "hyper", - "iceberg", - "icing", - "icon", - "identity", - "idiom", - "idled", - "idols", - "igloo", - "ignore", - "iguana", - "illness", - "imagine", - "imbalance", - "imitate", - "impel", - "inactive", - "inbound", - "incur", - "industrial", - "inexact", - "inflamed", - "ingested", - "initiate", - "injury", - "inkling", - "inline", - "inmate", - "innocent", - "inorganic", - "input", - "inquest", - "inroads", - "insult", - "intended", - "inundate", - "invoke", - "inwardly", - "ionic", - "irate", - "iris", - "irony", - "irritate", - "island", - "isolated", - "issued", - "italics", - "itches", - "items", - "itinerary", - "itself", - "ivory", - "jabbed", - "jackets", - "jaded", - "jagged", - "jailed", - "jamming", - "january", - "jargon", - "jaunt", - "javelin", - "jaws", - "jazz", - "jeans", - "jeers", - "jellyfish", - "jeopardy", - "jerseys", - "jester", - "jetting", - "jewels", - "jigsaw", - "jingle", - "jittery", - "jive", - "jobs", - "jockey", - "jogger", - "joining", - "joking", - "jolted", - "jostle", - "journal", - "joyous", - "jubilee", - "judge", - "juggled", - "juicy", - "jukebox", - "july", - "jump", - "junk", - "jury", - "justice", - "juvenile", - "kangaroo", - "karate", - "keep", - "kennel", - "kept", - "kernels", - "kettle", - "keyboard", - "kickoff", - "kidneys", - "king", - "kiosk", - "kisses", - "kitchens", - "kiwi", - "knapsack", - "knee", - "knife", - "knowledge", - "knuckle", - "koala", - "laboratory", - "ladder", - "lagoon", - "lair", - "lakes", - "lamb", - "language", - "laptop", - "large", - "last", - "later", - "launching", - "lava", - "lawsuit", - "layout", - "lazy", - "lectures", - "ledge", - "leech", - "left", - "legion", - "leisure", - "lemon", - "lending", - "leopard", - "lesson", - "lettuce", - "lexicon", - "liar", - "library", - "licks", - "lids", - "lied", - "lifestyle", - "light", - "likewise", - "lilac", - "limits", - "linen", - "lion", - "lipstick", - "liquid", - "listen", - "lively", - "loaded", - "lobster", - "locker", - "lodge", - "lofty", - "logic", - "loincloth", - "long", - "looking", - "lopped", - "lordship", - "losing", - "lottery", - "loudly", - "love", - "lower", - "loyal", - "lucky", - "luggage", - "lukewarm", - "lullaby", - "lumber", - "lunar", - "lurk", - "lush", - "luxury", - "lymph", - "lynx", - "lyrics", - "macro", - "madness", - "magically", - "mailed", - "major", - "makeup", - "malady", - "mammal", - "maps", - "masterful", - "match", - "maul", - "maverick", - "maximum", - "mayor", - "maze", - "meant", - "mechanic", - "medicate", - "meeting", - "megabyte", - "melting", - "memoir", - "menu", - "merger", - "mesh", - "metro", - "mews", - "mice", - "midst", - "mighty", - "mime", - "mirror", - "misery", - "mittens", - "mixture", - "moat", - "mobile", - "mocked", - "mohawk", - "moisture", - "molten", - "moment", - "money", - "moon", - "mops", - "morsel", - "mostly", - "motherly", - "mouth", - "movement", - "mowing", - "much", - "muddy", - "muffin", - "mugged", - "mullet", - "mumble", - "mundane", - "muppet", - "mural", - "musical", - "muzzle", - "myriad", - "mystery", - "myth", - "nabbing", - "nagged", - "nail", - "names", - "nanny", - "napkin", - "narrate", - "nasty", - "natural", - "nautical", - "navy", - "nearby", - "necklace", - "needed", - "negative", - "neither", - "neon", - "nephew", - "nerves", - "nestle", - "network", - "neutral", - "never", - "newt", - "nexus", - "nibs", - "niche", - "niece", - "nifty", - "nightly", - "nimbly", - "nineteen", - "nirvana", - "nitrogen", - "nobody", - "nocturnal", - "nodes", - "noises", - "nomad", - "noodles", - "northern", - "nostril", - "noted", - "nouns", - "novelty", - "nowhere", - "nozzle", - "nuance", - "nucleus", - "nudged", - "nugget", - "nuisance", - "null", - "number", - "nuns", - "nurse", - "nutshell", - "nylon", - "oaks", - "oars", - "oasis", - "oatmeal", - "obedient", - "object", - "obliged", - "obnoxious", - "observant", - "obtains", - "obvious", - "occur", - "ocean", - "october", - "odds", - "odometer", - "offend", - "often", - "oilfield", - "ointment", - "okay", - "older", - "olive", - "olympics", - "omega", - "omission", - "omnibus", - "onboard", - "oncoming", - "oneself", - "ongoing", - "onion", - "online", - "onslaught", - "onto", - "onward", - "oozed", - "opacity", - "opened", - "opposite", - "optical", - "opus", - "orange", - "orbit", - "orchid", - "orders", - "organs", - "origin", - "ornament", - "orphans", - "oscar", - "ostrich", - "otherwise", - "otter", - "ouch", - "ought", - "ounce", - "ourselves", - "oust", - "outbreak", - "oval", - "oven", - "owed", - "owls", - "owner", - "oxidant", - "oxygen", - "oyster", - "ozone", - "pact", - "paddles", - "pager", - "pairing", - "palace", - "pamphlet", - "pancakes", - "paper", - "paradise", - "pastry", - "patio", - "pause", - "pavements", - "pawnshop", - "payment", - "peaches", - "pebbles", - "peculiar", - "pedantic", - "peeled", - "pegs", - "pelican", - "pencil", - "people", - "pepper", - "perfect", - "pests", - "petals", - "phase", - "pheasants", - "phone", - "phrases", - "physics", - "piano", - "picked", - "pierce", - "pigment", - "piloted", - "pimple", - "pinched", - "pioneer", - "pipeline", - "pirate", - "pistons", - "pitched", - "pivot", - "pixels", - "pizza", - "playful", - "pledge", - "pliers", - "plotting", - "plus", - "plywood", - "poaching", - "pockets", - "podcast", - "poetry", - "point", - "poker", - "polar", - "ponies", - "pool", - "popular", - "portents", - "possible", - "potato", - "pouch", - "poverty", - "powder", - "pram", - "present", - "pride", - "problems", - "pruned", - "prying", - "psychic", - "public", - "puck", - "puddle", - "puffin", - "pulp", - "pumpkins", - "punch", - "puppy", - "purged", - "push", - "putty", - "puzzled", - "pylons", - "pyramid", - "python", - "queen", - "quick", - "quote", - "rabbits", - "racetrack", - "radar", - "rafts", - "rage", - "railway", - "raking", - "rally", - "ramped", - "randomly", - "rapid", - "rarest", - "rash", - "rated", - "ravine", - "rays", - "razor", - "react", - "rebel", - "recipe", - "reduce", - "reef", - "refer", - "regular", - "reheat", - "reinvest", - "rejoices", - "rekindle", - "relic", - "remedy", - "renting", - "reorder", - "repent", - "request", - "reruns", - "rest", - "return", - "reunion", - "revamp", - "rewind", - "rhino", - "rhythm", - "ribbon", - "richly", - "ridges", - "rift", - "rigid", - "rims", - "ringing", - "riots", - "ripped", - "rising", - "ritual", - "river", - "roared", - "robot", - "rockets", - "rodent", - "rogue", - "roles", - "romance", - "roomy", - "roped", - "roster", - "rotate", - "rounded", - "rover", - "rowboat", - "royal", - "ruby", - "rudely", - "ruffled", - "rugged", - "ruined", - "ruling", - "rumble", - "runway", - "rural", - "rustled", - "ruthless", - "sabotage", - "sack", - "sadness", - "safety", - "saga", - "sailor", - "sake", - "salads", - "sample", - "sanity", - "sapling", - "sarcasm", - "sash", - "satin", - "saucepan", - "saved", - "sawmill", - "saxophone", - "sayings", - "scamper", - "scenic", - "school", - "science", - "scoop", - "scrub", - "scuba", - "seasons", - "second", - "sedan", - "seeded", - "segments", - "seismic", - "selfish", - "semifinal", - "sensible", - "september", - "sequence", - "serving", - "session", - "setup", - "seventh", - "sewage", - "shackles", - "shelter", - "shipped", - "shocking", - "shrugged", - "shuffled", - "shyness", - "siblings", - "sickness", - "sidekick", - "sieve", - "sifting", - "sighting", - "silk", - "simplest", - "sincerely", - "sipped", - "siren", - "situated", - "sixteen", - "sizes", - "skater", - "skew", - "skirting", - "skulls", - "skydive", - "slackens", - "sleepless", - "slid", - "slower", - "slug", - "smash", - "smelting", - "smidgen", - "smog", - "smuggled", - "snake", - "sneeze", - "sniff", - "snout", - "snug", - "soapy", - "sober", - "soccer", - "soda", - "software", - "soggy", - "soil", - "solved", - "somewhere", - "sonic", - "soothe", - "soprano", - "sorry", - "southern", - "sovereign", - "sowed", - "soya", - "space", - "speedy", - "sphere", - "spiders", - "splendid", - "spout", - "sprig", - "spud", - "spying", - "square", - "stacking", - "stellar", - "stick", - "stockpile", - "strained", - "stunning", - "stylishly", - "subtly", - "succeed", - "suddenly", - "suede", - "suffice", - "sugar", - "suitcase", - "sulking", - "summon", - "sunken", - "superior", - "surfer", - "sushi", - "suture", - "swagger", - "swept", - "swiftly", - "sword", - "swung", - "syllabus", - "symptoms", - "syndrome", - "syringe", - "system", - "taboo", - "tacit", - "tadpoles", - "tagged", - "tail", - "taken", - "talent", - "tamper", - "tanks", - "tapestry", - "tarnished", - "tasked", - "tattoo", - "taunts", - "tavern", - "tawny", - "taxi", - "teardrop", - "technical", - "tedious", - "teeming", - "tell", - "template", - "tender", - "tepid", - "tequila", - "terminal", - "testing", - "tether", - "textbook", - "thaw", - "theatrics", - "thirsty", - "thorn", - "threaten", - "thumbs", - "thwart", - "ticket", - "tidy", - "tiers", - "tiger", - "tilt", - "timber", - "tinted", - "tipsy", - "tirade", - "tissue", - "titans", - "toaster", - "tobacco", - "today", - "toenail", - "toffee", - "together", - "toilet", - "token", - "tolerant", - "tomorrow", - "tonic", - "toolbox", - "topic", - "torch", - "tossed", - "total", - "touchy", - "towel", - "toxic", - "toyed", - "trash", - "trendy", - "tribal", - "trolling", - "truth", - "trying", - "tsunami", - "tubes", - "tucks", - "tudor", - "tuesday", - "tufts", - "tugs", - "tuition", - "tulips", - "tumbling", - "tunnel", - "turnip", - "tusks", - "tutor", - "tuxedo", - "twang", - "tweezers", - "twice", - "twofold", - "tycoon", - "typist", - "tyrant", - "ugly", - "ulcers", - "ultimate", - "umbrella", - "umpire", - "unafraid", - "unbending", - "uncle", - "under", - "uneven", - "unfit", - "ungainly", - "unhappy", - "union", - "unjustly", - "unknown", - "unlikely", - "unmask", - "unnoticed", - "unopened", - "unplugs", - "unquoted", - "unrest", - "unsafe", - "until", - "unusual", - "unveil", - "unwind", - "unzip", - "upbeat", - "upcoming", - "update", - "upgrade", - "uphill", - "upkeep", - "upload", - "upon", - "upper", - "upright", - "upstairs", - "uptight", - "upwards", - "urban", - "urchins", - "urgent", - "usage", - "useful", - "usher", - "using", - "usual", - "utensils", - "utility", - "utmost", - "utopia", - "uttered", - "vacation", - "vague", - "vain", - "value", - "vampire", - "vane", - "vapidly", - "vary", - "vastness", - "vats", - "vaults", - "vector", - "veered", - "vegan", - "vehicle", - "vein", - "velvet", - "venomous", - "verification", - "vessel", - "veteran", - "vexed", - "vials", - "vibrate", - "victim", - "video", - "viewpoint", - "vigilant", - "viking", - "village", - "vinegar", - "violin", - "vipers", - "virtual", - "visited", - "vitals", - "vivid", - "vixen", - "vocal", - "vogue", - "voice", - "volcano", - "vortex", - "voted", - "voucher", - "vowels", - "voyage", - "vulture", - "wade", - "waffle", - "wagtail", - "waist", - "waking", - "wallets", - "wanted", - "warped", - "washing", - "water", - "waveform", - "waxing", - "wayside", - "weavers", - "website", - "wedge", - "weekday", - "weird", - "welders", - "went", - "wept", - "were", - "western", - "wetsuit", - "whale", - "when", - "whipped", - "whole", - "wickets", - "width", - "wield", - "wife", - "wiggle", - "wildly", - "winter", - "wipeout", - "wiring", - "wise", - "withdrawn", - "wives", - "wizard", - "wobbly", - "woes", - "woken", - "wolf", - "womanly", - "wonders", - "woozy", - "worry", - "wounded", - "woven", - "wrap", - "wrist", - "wrong", - "yacht", - "yahoo", - "yanks", - "yard", - "yawning", - "yearbook", - "yellow", - "yesterday", - "yeti", - "yields", - "yodel", - "yoga", - "younger", - "yoyo", - "zapped", - "zeal", - "zebra", - "zero", - "zesty", - "zigzags", - "zinger", - "zippers", - "zodiac", - "zombie", - "zones", - "zoom" -]; diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 011fed169..838f7224c 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -21,18 +21,18 @@ packages: dependency: transitive description: name: args - sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.5.0" asn1lib: dependency: transitive description: name: asn1lib - sha256: ab96a1cb3beeccf8145c52e449233fe68364c9641623acd3adad66f8184f1039 + sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.3" async: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: "direct dev" description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.10" built_collection: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.4.3" + version: "8.9.2" characters: dependency: transitive description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" clock: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" cw_core: dependency: "direct main" description: @@ -188,10 +188,10 @@ packages: dependency: "direct main" description: name: encrypt - sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb" + sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.3" fake_async: dependency: transitive description: @@ -204,10 +204,10 @@ packages: dependency: "direct main" description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -233,10 +233,10 @@ packages: dependency: "direct main" description: name: flutter_mobx - sha256: "0da4add0016387a7bf309a0d0c41d36c6b3ae25ed7a176409267f166509e723e" + sha256: "859fbf452fa9c2519d2700b125dd7fb14c508bbdd7fb65e26ca8ff6c92280e2e" url: "https://pub.dev" source: hosted - version: "2.0.6+5" + version: "2.2.1+1" flutter_test: dependency: "direct dev" description: flutter @@ -246,42 +246,42 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" hashlib: dependency: transitive description: name: hashlib - sha256: "71bf102329ddb8e50c8a995ee4645ae7f1728bb65e575c17196b4d8262121a96" + sha256: "5037d3b8c36384c03a728543ae67d962a56970c5432a50862279fe68ee4c8411" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.19.1" hashlib_codecs: dependency: transitive description: name: hashlib_codecs - sha256: "49e2a471f74b15f1854263e58c2ac11f2b631b5b12c836f9708a35397d36d626" + sha256: "2b570061f5a4b378425be28a576c1e11783450355ad4345a19f606ff3d96db0f" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.5.0" hive: dependency: transitive description: @@ -302,10 +302,10 @@ packages: dependency: "direct main" description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -342,18 +342,18 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -382,10 +382,10 @@ packages: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: @@ -414,33 +414,33 @@ packages: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" mobx: dependency: "direct main" description: name: mobx - sha256: f1862bd92c6a903fab67338f27e2f731117c3cb9ea37cee1a487f9e4e0de314a + sha256: "63920b27b32ad1910adfe767ab1750e4c212e8923232a1f891597b362074ea5e" url: "https://pub.dev" source: hosted - version: "2.1.3+1" + version: "2.3.3+2" mobx_codegen: dependency: "direct dev" description: name: mobx_codegen - sha256: "86122e410d8ea24dda0c69adb5c2a6ccadd5ce02ad46e144764e0d0184a06181" + sha256: d4beb9cea4b7b014321235f8fdc7c2193ee0fe1d1198e9da7403f8bc85c4407c url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.3.0" monero: dependency: "direct main" description: - path: "." - ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 - resolved-ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 - url: "https://github.com/mrcyjanek/monero.dart" + path: "impls/monero.dart" + ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + resolved-ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" mutex: @@ -451,6 +451,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" package_config: dependency: transitive description: @@ -471,26 +479,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.4" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -503,10 +511,10 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: @@ -519,26 +527,26 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.9.1" polyseed: dependency: "direct main" description: @@ -555,46 +563,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: + provider: dependency: transitive description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "6.1.2" pub_semver: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" shelf: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -604,10 +612,10 @@ packages: dependency: transitive description: name: socks5_proxy - sha256: "1d21b5606169654bbf4cfb904e8e6ed897e9f763358709f87310c757096d909a" + sha256: "616818a0ea1064a4823b53c9f7eaf8da64ed82dcd51ed71371c7e54751ed5053" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.6" source_gen: dependency: transitive description: @@ -692,10 +700,10 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" unorm_dart: dependency: transitive description: @@ -728,38 +736,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.5" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.5.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.0.4" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=3.7.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.16.6" diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 53e50877f..b5a13a126 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -24,8 +24,9 @@ dependencies: path: ../cw_core monero: git: - url: https://github.com/mrcyjanek/monero.dart - ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 + url: https://github.com/mrcyjanek/monero_c + ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b # monero_c hash + path: impls/monero.dart mutex: ^3.1.0 dev_dependencies: diff --git a/cw_wownero/lib/api/exceptions/connection_to_node_exception.dart b/cw_wownero/lib/api/exceptions/connection_to_node_exception.dart deleted file mode 100644 index 483b0a174..000000000 --- a/cw_wownero/lib/api/exceptions/connection_to_node_exception.dart +++ /dev/null @@ -1,5 +0,0 @@ -class ConnectionToNodeException implements Exception { - ConnectionToNodeException({required this.message}); - - final String message; -} \ No newline at end of file diff --git a/cw_wownero/lib/api/structs/account_row.dart b/cw_wownero/lib/api/structs/account_row.dart deleted file mode 100644 index aa492ee0f..000000000 --- a/cw_wownero/lib/api/structs/account_row.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class AccountRow extends Struct { - @Int64() - external int id; - - external Pointer label; - - String getLabel() => label.toDartString(); - int getId() => id; -} diff --git a/cw_wownero/lib/api/structs/coins_info_row.dart b/cw_wownero/lib/api/structs/coins_info_row.dart deleted file mode 100644 index ff6f6ce73..000000000 --- a/cw_wownero/lib/api/structs/coins_info_row.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class CoinsInfoRow extends Struct { - @Int64() - external int blockHeight; - - external Pointer hash; - - @Uint64() - external int internalOutputIndex; - - @Uint64() - external int globalOutputIndex; - - @Int8() - external int spent; - - @Int8() - external int frozen; - - @Uint64() - external int spentHeight; - - @Uint64() - external int amount; - - @Int8() - external int rct; - - @Int8() - external int keyImageKnown; - - @Uint64() - external int pkIndex; - - @Uint32() - external int subaddrIndex; - - @Uint32() - external int subaddrAccount; - - external Pointer address; - - external Pointer addressLabel; - - external Pointer keyImage; - - @Uint64() - external int unlockTime; - - @Int8() - external int unlocked; - - external Pointer pubKey; - - @Int8() - external int coinbase; - - external Pointer description; - - String getHash() => hash.toDartString(); - - String getAddress() => address.toDartString(); - - String getAddressLabel() => addressLabel.toDartString(); - - String getKeyImage() => keyImage.toDartString(); - - String getPubKey() => pubKey.toDartString(); - - String getDescription() => description.toDartString(); -} diff --git a/cw_wownero/lib/api/structs/subaddress_row.dart b/cw_wownero/lib/api/structs/subaddress_row.dart deleted file mode 100644 index d593a793d..000000000 --- a/cw_wownero/lib/api/structs/subaddress_row.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class SubaddressRow extends Struct { - @Int64() - external int id; - - external Pointer address; - - external Pointer label; - - String getLabel() => label.toDartString(); - String getAddress() => address.toDartString(); - int getId() => id; -} \ No newline at end of file diff --git a/cw_wownero/lib/api/structs/transaction_info_row.dart b/cw_wownero/lib/api/structs/transaction_info_row.dart deleted file mode 100644 index bdcc64d3f..000000000 --- a/cw_wownero/lib/api/structs/transaction_info_row.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class TransactionInfoRow extends Struct { - @Uint64() - external int amount; - - @Uint64() - external int fee; - - @Uint64() - external int blockHeight; - - @Uint64() - external int confirmations; - - @Uint32() - external int subaddrAccount; - - @Int8() - external int direction; - - @Int8() - external int isPending; - - @Uint32() - external int subaddrIndex; - - external Pointer hash; - - external Pointer paymentId; - - @Int64() - external int datetime; - - int getDatetime() => datetime; - int getAmount() => amount >= 0 ? amount : amount * -1; - bool getIsPending() => isPending != 0; - String getHash() => hash.toDartString(); - String getPaymentId() => paymentId.toDartString(); -} diff --git a/cw_wownero/lib/api/structs/ut8_box.dart b/cw_wownero/lib/api/structs/ut8_box.dart deleted file mode 100644 index 53e678c88..000000000 --- a/cw_wownero/lib/api/structs/ut8_box.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'dart:ffi'; -import 'package:ffi/ffi.dart'; - -class Utf8Box extends Struct { - external Pointer value; - - String getValue() => value.toDartString(); -} diff --git a/cw_wownero/lib/api/transaction_history.dart b/cw_wownero/lib/api/transaction_history.dart index 3ccd0b3c6..a1e1e3c9b 100644 --- a/cw_wownero/lib/api/transaction_history.dart +++ b/cw_wownero/lib/api/transaction_history.dart @@ -285,7 +285,7 @@ class Transaction { }; } - // S finalubAddress? subAddress; + // final SubAddress? subAddress; // List transfers = []; // final int txIndex; final wownero.TransactionInfo txInfo; @@ -321,4 +321,4 @@ class Transaction { required this.key, required this.txInfo }); -} \ No newline at end of file +} diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index afcc536e7..7915373bb 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -1,4 +1,5 @@ import 'dart:ffi'; +import 'dart:io'; import 'dart:isolate'; import 'package:cw_wownero/api/account_list.dart'; @@ -8,8 +9,42 @@ import 'package:cw_wownero/api/exceptions/wallet_restore_from_keys_exception.dar import 'package:cw_wownero/api/exceptions/wallet_restore_from_seed_exception.dart'; import 'package:cw_wownero/api/transaction_history.dart'; import 'package:cw_wownero/api/wallet.dart'; +import 'package:flutter/foundation.dart'; import 'package:monero/wownero.dart' as wownero; +class MoneroCException implements Exception { + final String message; + + MoneroCException(this.message); + + @override + String toString() { + return message; + } +} + +void checkIfMoneroCIsFine() { + final cppCsCpp = wownero.WOWNERO_checksum_wallet2_api_c_cpp(); + final cppCsH = wownero.WOWNERO_checksum_wallet2_api_c_h(); + final cppCsExp = wownero.WOWNERO_checksum_wallet2_api_c_exp(); + + final dartCsCpp = wownero.wallet2_api_c_cpp_sha256; + final dartCsH = wownero.wallet2_api_c_h_sha256; + final dartCsExp = wownero.wallet2_api_c_exp_sha256; + + if (cppCsCpp != dartCsCpp) { + throw MoneroCException("monero_c and monero.dart cpp wrapper code mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsCpp'\ndart: '$dartCsCpp'"); + } + + if (cppCsH != dartCsH) { + throw MoneroCException("monero_c and monero.dart cpp wrapper header mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsH'\ndart: '$dartCsH'"); + } + + if (cppCsExp != dartCsExp && (Platform.isIOS || Platform.isMacOS)) { + throw MoneroCException("monero_c and monero.dart wrapper export list mismatch.\nLogic errors can occur.\nRefusing to run in release mode.\ncpp: '$cppCsExp'\ndart: '$dartCsExp'"); + } +} + wownero.WalletManager? _wmPtr; final wownero.WalletManager wmPtr = Pointer.fromAddress((() { try { diff --git a/cw_wownero/lib/cw_wownero.dart b/cw_wownero/lib/cw_wownero.dart deleted file mode 100644 index 33a55e305..000000000 --- a/cw_wownero/lib/cw_wownero.dart +++ /dev/null @@ -1,8 +0,0 @@ - -import 'cw_wownero_platform_interface.dart'; - -class CwWownero { - Future getPlatformVersion() { - return CwWowneroPlatform.instance.getPlatformVersion(); - } -} diff --git a/cw_wownero/lib/cw_wownero_method_channel.dart b/cw_wownero/lib/cw_wownero_method_channel.dart deleted file mode 100644 index d797f5f81..000000000 --- a/cw_wownero/lib/cw_wownero_method_channel.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; - -import 'cw_wownero_platform_interface.dart'; - -/// An implementation of [CwWowneroPlatform] that uses method channels. -class MethodChannelCwWownero extends CwWowneroPlatform { - /// The method channel used to interact with the native platform. - @visibleForTesting - final methodChannel = const MethodChannel('cw_wownero'); - - @override - Future getPlatformVersion() async { - final version = await methodChannel.invokeMethod('getPlatformVersion'); - return version; - } -} diff --git a/cw_wownero/lib/cw_wownero_platform_interface.dart b/cw_wownero/lib/cw_wownero_platform_interface.dart deleted file mode 100644 index 78b21592c..000000000 --- a/cw_wownero/lib/cw_wownero_platform_interface.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -import 'cw_wownero_method_channel.dart'; - -abstract class CwWowneroPlatform extends PlatformInterface { - /// Constructs a CwWowneroPlatform. - CwWowneroPlatform() : super(token: _token); - - static final Object _token = Object(); - - static CwWowneroPlatform _instance = MethodChannelCwWownero(); - - /// The default instance of [CwWowneroPlatform] to use. - /// - /// Defaults to [MethodChannelCwWownero]. - static CwWowneroPlatform get instance => _instance; - - /// Platform-specific implementations should set this with their own - /// platform-specific class that extends [CwWowneroPlatform] when - /// they register themselves. - static set instance(CwWowneroPlatform instance) { - PlatformInterface.verifyToken(instance, _token); - _instance = instance; - } - - Future getPlatformVersion() { - throw UnimplementedError('platformVersion() has not been implemented.'); - } -} diff --git a/cw_wownero/lib/mywownero.dart b/cw_wownero/lib/mywownero.dart deleted file mode 100644 index d50e48b64..000000000 --- a/cw_wownero/lib/mywownero.dart +++ /dev/null @@ -1,1689 +0,0 @@ -const prefixLength = 3; - -String swapEndianBytes(String original) { - if (original.length != 8) { - return ''; - } - - return original[6] + - original[7] + - original[4] + - original[5] + - original[2] + - original[3] + - original[0] + - original[1]; -} - -List tructWords(List wordSet) { - final start = 0; - final end = prefixLength; - - return wordSet.map((word) => word.substring(start, end)).toList(); -} - -String mnemonicDecode(String seed) { - final n = englistWordSet.length; - var out = ''; - var wlist = seed.split(' '); - wlist.removeLast(); - - for (var i = 0; i < wlist.length; i += 3) { - final w1 = - tructWords(englistWordSet).indexOf(wlist[i].substring(0, prefixLength)); - final w2 = tructWords(englistWordSet) - .indexOf(wlist[i + 1].substring(0, prefixLength)); - final w3 = tructWords(englistWordSet) - .indexOf(wlist[i + 2].substring(0, prefixLength)); - - if (w1 == -1 || w2 == -1 || w3 == -1) { - print("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"); - return ''; - } - - final _res = '0000000' + x.toRadixString(16); - final start = _res.length - 8; - final end = _res.length; - final res = _res.substring(start, end); - - out += swapEndianBytes(res); - } - - return out; -} - -final englistWordSet = [ - "abbey", - "abducts", - "ability", - "ablaze", - "abnormal", - "abort", - "abrasive", - "absorb", - "abyss", - "academy", - "aces", - "aching", - "acidic", - "acoustic", - "acquire", - "across", - "actress", - "acumen", - "adapt", - "addicted", - "adept", - "adhesive", - "adjust", - "adopt", - "adrenalin", - "adult", - "adventure", - "aerial", - "afar", - "affair", - "afield", - "afloat", - "afoot", - "afraid", - "after", - "against", - "agenda", - "aggravate", - "agile", - "aglow", - "agnostic", - "agony", - "agreed", - "ahead", - "aided", - "ailments", - "aimless", - "airport", - "aisle", - "ajar", - "akin", - "alarms", - "album", - "alchemy", - "alerts", - "algebra", - "alkaline", - "alley", - "almost", - "aloof", - "alpine", - "already", - "also", - "altitude", - "alumni", - "always", - "amaze", - "ambush", - "amended", - "amidst", - "ammo", - "amnesty", - "among", - "amply", - "amused", - "anchor", - "android", - "anecdote", - "angled", - "ankle", - "annoyed", - "answers", - "antics", - "anvil", - "anxiety", - "anybody", - "apart", - "apex", - "aphid", - "aplomb", - "apology", - "apply", - "apricot", - "aptitude", - "aquarium", - "arbitrary", - "archer", - "ardent", - "arena", - "argue", - "arises", - "army", - "around", - "arrow", - "arsenic", - "artistic", - "ascend", - "ashtray", - "aside", - "asked", - "asleep", - "aspire", - "assorted", - "asylum", - "athlete", - "atlas", - "atom", - "atrium", - "attire", - "auburn", - "auctions", - "audio", - "august", - "aunt", - "austere", - "autumn", - "avatar", - "avidly", - "avoid", - "awakened", - "awesome", - "awful", - "awkward", - "awning", - "awoken", - "axes", - "axis", - "axle", - "aztec", - "azure", - "baby", - "bacon", - "badge", - "baffles", - "bagpipe", - "bailed", - "bakery", - "balding", - "bamboo", - "banjo", - "baptism", - "basin", - "batch", - "bawled", - "bays", - "because", - "beer", - "befit", - "begun", - "behind", - "being", - "below", - "bemused", - "benches", - "berries", - "bested", - "betting", - "bevel", - "beware", - "beyond", - "bias", - "bicycle", - "bids", - "bifocals", - "biggest", - "bikini", - "bimonthly", - "binocular", - "biology", - "biplane", - "birth", - "biscuit", - "bite", - "biweekly", - "blender", - "blip", - "bluntly", - "boat", - "bobsled", - "bodies", - "bogeys", - "boil", - "boldly", - "bomb", - "border", - "boss", - "both", - "bounced", - "bovine", - "bowling", - "boxes", - "boyfriend", - "broken", - "brunt", - "bubble", - "buckets", - "budget", - "buffet", - "bugs", - "building", - "bulb", - "bumper", - "bunch", - "business", - "butter", - "buying", - "buzzer", - "bygones", - "byline", - "bypass", - "cabin", - "cactus", - "cadets", - "cafe", - "cage", - "cajun", - "cake", - "calamity", - "camp", - "candy", - "casket", - "catch", - "cause", - "cavernous", - "cease", - "cedar", - "ceiling", - "cell", - "cement", - "cent", - "certain", - "chlorine", - "chrome", - "cider", - "cigar", - "cinema", - "circle", - "cistern", - "citadel", - "civilian", - "claim", - "click", - "clue", - "coal", - "cobra", - "cocoa", - "code", - "coexist", - "coffee", - "cogs", - "cohesive", - "coils", - "colony", - "comb", - "cool", - "copy", - "corrode", - "costume", - "cottage", - "cousin", - "cowl", - "criminal", - "cube", - "cucumber", - "cuddled", - "cuffs", - "cuisine", - "cunning", - "cupcake", - "custom", - "cycling", - "cylinder", - "cynical", - "dabbing", - "dads", - "daft", - "dagger", - "daily", - "damp", - "dangerous", - "dapper", - "darted", - "dash", - "dating", - "dauntless", - "dawn", - "daytime", - "dazed", - "debut", - "decay", - "dedicated", - "deepest", - "deftly", - "degrees", - "dehydrate", - "deity", - "dejected", - "delayed", - "demonstrate", - "dented", - "deodorant", - "depth", - "desk", - "devoid", - "dewdrop", - "dexterity", - "dialect", - "dice", - "diet", - "different", - "digit", - "dilute", - "dime", - "dinner", - "diode", - "diplomat", - "directed", - "distance", - "ditch", - "divers", - "dizzy", - "doctor", - "dodge", - "does", - "dogs", - "doing", - "dolphin", - "domestic", - "donuts", - "doorway", - "dormant", - "dosage", - "dotted", - "double", - "dove", - "down", - "dozen", - "dreams", - "drinks", - "drowning", - "drunk", - "drying", - "dual", - "dubbed", - "duckling", - "dude", - "duets", - "duke", - "dullness", - "dummy", - "dunes", - "duplex", - "duration", - "dusted", - "duties", - "dwarf", - "dwelt", - "dwindling", - "dying", - "dynamite", - "dyslexic", - "each", - "eagle", - "earth", - "easy", - "eating", - "eavesdrop", - "eccentric", - "echo", - "eclipse", - "economics", - "ecstatic", - "eden", - "edgy", - "edited", - "educated", - "eels", - "efficient", - "eggs", - "egotistic", - "eight", - "either", - "eject", - "elapse", - "elbow", - "eldest", - "eleven", - "elite", - "elope", - "else", - "eluded", - "emails", - "ember", - "emerge", - "emit", - "emotion", - "empty", - "emulate", - "energy", - "enforce", - "enhanced", - "enigma", - "enjoy", - "enlist", - "enmity", - "enough", - "enraged", - "ensign", - "entrance", - "envy", - "epoxy", - "equip", - "erase", - "erected", - "erosion", - "error", - "eskimos", - "espionage", - "essential", - "estate", - "etched", - "eternal", - "ethics", - "etiquette", - "evaluate", - "evenings", - "evicted", - "evolved", - "examine", - "excess", - "exhale", - "exit", - "exotic", - "exquisite", - "extra", - "exult", - "fabrics", - "factual", - "fading", - "fainted", - "faked", - "fall", - "family", - "fancy", - "farming", - "fatal", - "faulty", - "fawns", - "faxed", - "fazed", - "feast", - "february", - "federal", - "feel", - "feline", - "females", - "fences", - "ferry", - "festival", - "fetches", - "fever", - "fewest", - "fiat", - "fibula", - "fictional", - "fidget", - "fierce", - "fifteen", - "fight", - "films", - "firm", - "fishing", - "fitting", - "five", - "fixate", - "fizzle", - "fleet", - "flippant", - "flying", - "foamy", - "focus", - "foes", - "foggy", - "foiled", - "folding", - "fonts", - "foolish", - "fossil", - "fountain", - "fowls", - "foxes", - "foyer", - "framed", - "friendly", - "frown", - "fruit", - "frying", - "fudge", - "fuel", - "fugitive", - "fully", - "fuming", - "fungal", - "furnished", - "fuselage", - "future", - "fuzzy", - "gables", - "gadget", - "gags", - "gained", - "galaxy", - "gambit", - "gang", - "gasp", - "gather", - "gauze", - "gave", - "gawk", - "gaze", - "gearbox", - "gecko", - "geek", - "gels", - "gemstone", - "general", - "geometry", - "germs", - "gesture", - "getting", - "geyser", - "ghetto", - "ghost", - "giant", - "giddy", - "gifts", - "gigantic", - "gills", - "gimmick", - "ginger", - "girth", - "giving", - "glass", - "gleeful", - "glide", - "gnaw", - "gnome", - "goat", - "goblet", - "godfather", - "goes", - "goggles", - "going", - "goldfish", - "gone", - "goodbye", - "gopher", - "gorilla", - "gossip", - "gotten", - "gourmet", - "governing", - "gown", - "greater", - "grunt", - "guarded", - "guest", - "guide", - "gulp", - "gumball", - "guru", - "gusts", - "gutter", - "guys", - "gymnast", - "gypsy", - "gyrate", - "habitat", - "hacksaw", - "haggled", - "hairy", - "hamburger", - "happens", - "hashing", - "hatchet", - "haunted", - "having", - "hawk", - "haystack", - "hazard", - "hectare", - "hedgehog", - "heels", - "hefty", - "height", - "hemlock", - "hence", - "heron", - "hesitate", - "hexagon", - "hickory", - "hiding", - "highway", - "hijack", - "hiker", - "hills", - "himself", - "hinder", - "hippo", - "hire", - "history", - "hitched", - "hive", - "hoax", - "hobby", - "hockey", - "hoisting", - "hold", - "honked", - "hookup", - "hope", - "hornet", - "hospital", - "hotel", - "hounded", - "hover", - "howls", - "hubcaps", - "huddle", - "huge", - "hull", - "humid", - "hunter", - "hurried", - "husband", - "huts", - "hybrid", - "hydrogen", - "hyper", - "iceberg", - "icing", - "icon", - "identity", - "idiom", - "idled", - "idols", - "igloo", - "ignore", - "iguana", - "illness", - "imagine", - "imbalance", - "imitate", - "impel", - "inactive", - "inbound", - "incur", - "industrial", - "inexact", - "inflamed", - "ingested", - "initiate", - "injury", - "inkling", - "inline", - "inmate", - "innocent", - "inorganic", - "input", - "inquest", - "inroads", - "insult", - "intended", - "inundate", - "invoke", - "inwardly", - "ionic", - "irate", - "iris", - "irony", - "irritate", - "island", - "isolated", - "issued", - "italics", - "itches", - "items", - "itinerary", - "itself", - "ivory", - "jabbed", - "jackets", - "jaded", - "jagged", - "jailed", - "jamming", - "january", - "jargon", - "jaunt", - "javelin", - "jaws", - "jazz", - "jeans", - "jeers", - "jellyfish", - "jeopardy", - "jerseys", - "jester", - "jetting", - "jewels", - "jigsaw", - "jingle", - "jittery", - "jive", - "jobs", - "jockey", - "jogger", - "joining", - "joking", - "jolted", - "jostle", - "journal", - "joyous", - "jubilee", - "judge", - "juggled", - "juicy", - "jukebox", - "july", - "jump", - "junk", - "jury", - "justice", - "juvenile", - "kangaroo", - "karate", - "keep", - "kennel", - "kept", - "kernels", - "kettle", - "keyboard", - "kickoff", - "kidneys", - "king", - "kiosk", - "kisses", - "kitchens", - "kiwi", - "knapsack", - "knee", - "knife", - "knowledge", - "knuckle", - "koala", - "laboratory", - "ladder", - "lagoon", - "lair", - "lakes", - "lamb", - "language", - "laptop", - "large", - "last", - "later", - "launching", - "lava", - "lawsuit", - "layout", - "lazy", - "lectures", - "ledge", - "leech", - "left", - "legion", - "leisure", - "lemon", - "lending", - "leopard", - "lesson", - "lettuce", - "lexicon", - "liar", - "library", - "licks", - "lids", - "lied", - "lifestyle", - "light", - "likewise", - "lilac", - "limits", - "linen", - "lion", - "lipstick", - "liquid", - "listen", - "lively", - "loaded", - "lobster", - "locker", - "lodge", - "lofty", - "logic", - "loincloth", - "long", - "looking", - "lopped", - "lordship", - "losing", - "lottery", - "loudly", - "love", - "lower", - "loyal", - "lucky", - "luggage", - "lukewarm", - "lullaby", - "lumber", - "lunar", - "lurk", - "lush", - "luxury", - "lymph", - "lynx", - "lyrics", - "macro", - "madness", - "magically", - "mailed", - "major", - "makeup", - "malady", - "mammal", - "maps", - "masterful", - "match", - "maul", - "maverick", - "maximum", - "mayor", - "maze", - "meant", - "mechanic", - "medicate", - "meeting", - "megabyte", - "melting", - "memoir", - "menu", - "merger", - "mesh", - "metro", - "mews", - "mice", - "midst", - "mighty", - "mime", - "mirror", - "misery", - "mittens", - "mixture", - "moat", - "mobile", - "mocked", - "mohawk", - "moisture", - "molten", - "moment", - "money", - "moon", - "mops", - "morsel", - "mostly", - "motherly", - "mouth", - "movement", - "mowing", - "much", - "muddy", - "muffin", - "mugged", - "mullet", - "mumble", - "mundane", - "muppet", - "mural", - "musical", - "muzzle", - "myriad", - "mystery", - "myth", - "nabbing", - "nagged", - "nail", - "names", - "nanny", - "napkin", - "narrate", - "nasty", - "natural", - "nautical", - "navy", - "nearby", - "necklace", - "needed", - "negative", - "neither", - "neon", - "nephew", - "nerves", - "nestle", - "network", - "neutral", - "never", - "newt", - "nexus", - "nibs", - "niche", - "niece", - "nifty", - "nightly", - "nimbly", - "nineteen", - "nirvana", - "nitrogen", - "nobody", - "nocturnal", - "nodes", - "noises", - "nomad", - "noodles", - "northern", - "nostril", - "noted", - "nouns", - "novelty", - "nowhere", - "nozzle", - "nuance", - "nucleus", - "nudged", - "nugget", - "nuisance", - "null", - "number", - "nuns", - "nurse", - "nutshell", - "nylon", - "oaks", - "oars", - "oasis", - "oatmeal", - "obedient", - "object", - "obliged", - "obnoxious", - "observant", - "obtains", - "obvious", - "occur", - "ocean", - "october", - "odds", - "odometer", - "offend", - "often", - "oilfield", - "ointment", - "okay", - "older", - "olive", - "olympics", - "omega", - "omission", - "omnibus", - "onboard", - "oncoming", - "oneself", - "ongoing", - "onion", - "online", - "onslaught", - "onto", - "onward", - "oozed", - "opacity", - "opened", - "opposite", - "optical", - "opus", - "orange", - "orbit", - "orchid", - "orders", - "organs", - "origin", - "ornament", - "orphans", - "oscar", - "ostrich", - "otherwise", - "otter", - "ouch", - "ought", - "ounce", - "ourselves", - "oust", - "outbreak", - "oval", - "oven", - "owed", - "owls", - "owner", - "oxidant", - "oxygen", - "oyster", - "ozone", - "pact", - "paddles", - "pager", - "pairing", - "palace", - "pamphlet", - "pancakes", - "paper", - "paradise", - "pastry", - "patio", - "pause", - "pavements", - "pawnshop", - "payment", - "peaches", - "pebbles", - "peculiar", - "pedantic", - "peeled", - "pegs", - "pelican", - "pencil", - "people", - "pepper", - "perfect", - "pests", - "petals", - "phase", - "pheasants", - "phone", - "phrases", - "physics", - "piano", - "picked", - "pierce", - "pigment", - "piloted", - "pimple", - "pinched", - "pioneer", - "pipeline", - "pirate", - "pistons", - "pitched", - "pivot", - "pixels", - "pizza", - "playful", - "pledge", - "pliers", - "plotting", - "plus", - "plywood", - "poaching", - "pockets", - "podcast", - "poetry", - "point", - "poker", - "polar", - "ponies", - "pool", - "popular", - "portents", - "possible", - "potato", - "pouch", - "poverty", - "powder", - "pram", - "present", - "pride", - "problems", - "pruned", - "prying", - "psychic", - "public", - "puck", - "puddle", - "puffin", - "pulp", - "pumpkins", - "punch", - "puppy", - "purged", - "push", - "putty", - "puzzled", - "pylons", - "pyramid", - "python", - "queen", - "quick", - "quote", - "rabbits", - "racetrack", - "radar", - "rafts", - "rage", - "railway", - "raking", - "rally", - "ramped", - "randomly", - "rapid", - "rarest", - "rash", - "rated", - "ravine", - "rays", - "razor", - "react", - "rebel", - "recipe", - "reduce", - "reef", - "refer", - "regular", - "reheat", - "reinvest", - "rejoices", - "rekindle", - "relic", - "remedy", - "renting", - "reorder", - "repent", - "request", - "reruns", - "rest", - "return", - "reunion", - "revamp", - "rewind", - "rhino", - "rhythm", - "ribbon", - "richly", - "ridges", - "rift", - "rigid", - "rims", - "ringing", - "riots", - "ripped", - "rising", - "ritual", - "river", - "roared", - "robot", - "rockets", - "rodent", - "rogue", - "roles", - "romance", - "roomy", - "roped", - "roster", - "rotate", - "rounded", - "rover", - "rowboat", - "royal", - "ruby", - "rudely", - "ruffled", - "rugged", - "ruined", - "ruling", - "rumble", - "runway", - "rural", - "rustled", - "ruthless", - "sabotage", - "sack", - "sadness", - "safety", - "saga", - "sailor", - "sake", - "salads", - "sample", - "sanity", - "sapling", - "sarcasm", - "sash", - "satin", - "saucepan", - "saved", - "sawmill", - "saxophone", - "sayings", - "scamper", - "scenic", - "school", - "science", - "scoop", - "scrub", - "scuba", - "seasons", - "second", - "sedan", - "seeded", - "segments", - "seismic", - "selfish", - "semifinal", - "sensible", - "september", - "sequence", - "serving", - "session", - "setup", - "seventh", - "sewage", - "shackles", - "shelter", - "shipped", - "shocking", - "shrugged", - "shuffled", - "shyness", - "siblings", - "sickness", - "sidekick", - "sieve", - "sifting", - "sighting", - "silk", - "simplest", - "sincerely", - "sipped", - "siren", - "situated", - "sixteen", - "sizes", - "skater", - "skew", - "skirting", - "skulls", - "skydive", - "slackens", - "sleepless", - "slid", - "slower", - "slug", - "smash", - "smelting", - "smidgen", - "smog", - "smuggled", - "snake", - "sneeze", - "sniff", - "snout", - "snug", - "soapy", - "sober", - "soccer", - "soda", - "software", - "soggy", - "soil", - "solved", - "somewhere", - "sonic", - "soothe", - "soprano", - "sorry", - "southern", - "sovereign", - "sowed", - "soya", - "space", - "speedy", - "sphere", - "spiders", - "splendid", - "spout", - "sprig", - "spud", - "spying", - "square", - "stacking", - "stellar", - "stick", - "stockpile", - "strained", - "stunning", - "stylishly", - "subtly", - "succeed", - "suddenly", - "suede", - "suffice", - "sugar", - "suitcase", - "sulking", - "summon", - "sunken", - "superior", - "surfer", - "sushi", - "suture", - "swagger", - "swept", - "swiftly", - "sword", - "swung", - "syllabus", - "symptoms", - "syndrome", - "syringe", - "system", - "taboo", - "tacit", - "tadpoles", - "tagged", - "tail", - "taken", - "talent", - "tamper", - "tanks", - "tapestry", - "tarnished", - "tasked", - "tattoo", - "taunts", - "tavern", - "tawny", - "taxi", - "teardrop", - "technical", - "tedious", - "teeming", - "tell", - "template", - "tender", - "tepid", - "tequila", - "terminal", - "testing", - "tether", - "textbook", - "thaw", - "theatrics", - "thirsty", - "thorn", - "threaten", - "thumbs", - "thwart", - "ticket", - "tidy", - "tiers", - "tiger", - "tilt", - "timber", - "tinted", - "tipsy", - "tirade", - "tissue", - "titans", - "toaster", - "tobacco", - "today", - "toenail", - "toffee", - "together", - "toilet", - "token", - "tolerant", - "tomorrow", - "tonic", - "toolbox", - "topic", - "torch", - "tossed", - "total", - "touchy", - "towel", - "toxic", - "toyed", - "trash", - "trendy", - "tribal", - "trolling", - "truth", - "trying", - "tsunami", - "tubes", - "tucks", - "tudor", - "tuesday", - "tufts", - "tugs", - "tuition", - "tulips", - "tumbling", - "tunnel", - "turnip", - "tusks", - "tutor", - "tuxedo", - "twang", - "tweezers", - "twice", - "twofold", - "tycoon", - "typist", - "tyrant", - "ugly", - "ulcers", - "ultimate", - "umbrella", - "umpire", - "unafraid", - "unbending", - "uncle", - "under", - "uneven", - "unfit", - "ungainly", - "unhappy", - "union", - "unjustly", - "unknown", - "unlikely", - "unmask", - "unnoticed", - "unopened", - "unplugs", - "unquoted", - "unrest", - "unsafe", - "until", - "unusual", - "unveil", - "unwind", - "unzip", - "upbeat", - "upcoming", - "update", - "upgrade", - "uphill", - "upkeep", - "upload", - "upon", - "upper", - "upright", - "upstairs", - "uptight", - "upwards", - "urban", - "urchins", - "urgent", - "usage", - "useful", - "usher", - "using", - "usual", - "utensils", - "utility", - "utmost", - "utopia", - "uttered", - "vacation", - "vague", - "vain", - "value", - "vampire", - "vane", - "vapidly", - "vary", - "vastness", - "vats", - "vaults", - "vector", - "veered", - "vegan", - "vehicle", - "vein", - "velvet", - "venomous", - "verification", - "vessel", - "veteran", - "vexed", - "vials", - "vibrate", - "victim", - "video", - "viewpoint", - "vigilant", - "viking", - "village", - "vinegar", - "violin", - "vipers", - "virtual", - "visited", - "vitals", - "vivid", - "vixen", - "vocal", - "vogue", - "voice", - "volcano", - "vortex", - "voted", - "voucher", - "vowels", - "voyage", - "vulture", - "wade", - "waffle", - "wagtail", - "waist", - "waking", - "wallets", - "wanted", - "warped", - "washing", - "water", - "waveform", - "waxing", - "wayside", - "weavers", - "website", - "wedge", - "weekday", - "weird", - "welders", - "went", - "wept", - "were", - "western", - "wetsuit", - "whale", - "when", - "whipped", - "whole", - "wickets", - "width", - "wield", - "wife", - "wiggle", - "wildly", - "winter", - "wipeout", - "wiring", - "wise", - "withdrawn", - "wives", - "wizard", - "wobbly", - "woes", - "woken", - "wolf", - "womanly", - "wonders", - "woozy", - "worry", - "wounded", - "woven", - "wrap", - "wrist", - "wrong", - "yacht", - "yahoo", - "yanks", - "yard", - "yawning", - "yearbook", - "yellow", - "yesterday", - "yeti", - "yields", - "yodel", - "yoga", - "younger", - "yoyo", - "zapped", - "zeal", - "zebra", - "zero", - "zesty", - "zigzags", - "zinger", - "zippers", - "zodiac", - "zombie", - "zones", - "zoom" -]; diff --git a/cw_wownero/lib/wownero_transaction_info.dart b/cw_wownero/lib/wownero_transaction_info.dart index 7b0073452..db5345e5d 100644 --- a/cw_wownero/lib/wownero_transaction_info.dart +++ b/cw_wownero/lib/wownero_transaction_info.dart @@ -1,6 +1,5 @@ import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/wownero_amount_format.dart'; -import 'package:cw_wownero/api/structs/transaction_info_row.dart'; import 'package:cw_core/parseBoolFromString.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/format_amount.dart'; @@ -35,26 +34,6 @@ class WowneroTransactionInfo extends TransactionInfo { }; } - WowneroTransactionInfo.fromRow(TransactionInfoRow row) - : id = "${row.getHash()}_${row.getAmount()}_${row.subaddrAccount}_${row.subaddrIndex}", - txHash = row.getHash(), - height = row.blockHeight, - direction = parseTransactionDirectionFromInt(row.direction), - date = DateTime.fromMillisecondsSinceEpoch(row.getDatetime() * 1000), - isPending = row.isPending != 0, - amount = row.getAmount(), - accountIndex = row.subaddrAccount, - addressIndex = row.subaddrIndex, - confirmations = row.confirmations, - key = getTxKey(row.getHash()), - fee = row.fee { - additionalInfo = { - 'key': key, - 'accountIndex': accountIndex, - 'addressIndex': addressIndex - }; - } - final String id; final String txHash; final int height; diff --git a/cw_wownero/lib/wownero_unspent.dart b/cw_wownero/lib/wownero_unspent.dart index a79106886..fdfdfc7a4 100644 --- a/cw_wownero/lib/wownero_unspent.dart +++ b/cw_wownero/lib/wownero_unspent.dart @@ -1,5 +1,4 @@ import 'package:cw_core/unspent_transaction_output.dart'; -import 'package:cw_wownero/api/structs/coins_info_row.dart'; class WowneroUnspent extends Unspent { WowneroUnspent( @@ -8,13 +7,5 @@ class WowneroUnspent extends Unspent { this.isFrozen = isFrozen; } - factory WowneroUnspent.fromCoinsInfoRow(CoinsInfoRow coinsInfoRow) => WowneroUnspent( - coinsInfoRow.getAddress(), - coinsInfoRow.getHash(), - coinsInfoRow.getKeyImage(), - coinsInfoRow.amount, - coinsInfoRow.frozen == 1, - coinsInfoRow.unlocked == 1); - final bool isUnlocked; } diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index 52f84e26a..e02c0ec2e 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -107,9 +107,7 @@ abstract class WowneroWalletBase @override String get seed => wownero_wallet.getSeed(); - String seedLegacy(String? language) { - return wownero_wallet.getSeedLegacy(language); - } + String seedLegacy(String? language) => wownero_wallet.getSeedLegacy(language); @override MoneroWalletKeys get keys => MoneroWalletKeys( @@ -182,12 +180,12 @@ abstract class WowneroWalletBase @override Future startSync() async { try { - _setInitialHeight(); + _assertInitialHeight(); } catch (_) { // our restore height wasn't correct, so lets see if using the backup works: try { await resetCache(name); - _setInitialHeight(); + _assertInitialHeight(); } catch (e) { // we still couldn't get a valid height from the backup?!: // try to use the date instead: @@ -604,18 +602,14 @@ abstract class WowneroWalletBase _listener = wownero_wallet.setListeners(_onNewBlock, _onNewTransaction); } - // check if the height is correct: - void _setInitialHeight() { - if (walletInfo.isRecovery) { - return; - } + /// Asserts the current height to be above [MIN_RESTORE_HEIGHT] + void _assertInitialHeight() { + if (walletInfo.isRecovery) return; final height = wownero_wallet.getCurrentHeight(); - if (height > MIN_RESTORE_HEIGHT) { - // the restore height is probably correct, so we do nothing: - return; - } + // the restore height is probably correct, so we do nothing: + if (height > MIN_RESTORE_HEIGHT) return; throw Exception("height isn't > $MIN_RESTORE_HEIGHT!"); } diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index 011fed169..d91922ac9 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -437,10 +437,10 @@ packages: monero: dependency: "direct main" description: - path: "." - ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 - resolved-ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 - url: "https://github.com/mrcyjanek/monero.dart" + path: "impls/monero.dart" + ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + resolved-ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" mutex: diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index 4537955ab..7a45eb628 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -24,8 +24,9 @@ dependencies: path: ../cw_core monero: git: - url: https://github.com/mrcyjanek/monero.dart - ref: d46753eca865e9e56c2f0ef6fe485c42e11982c5 + url: https://github.com/mrcyjanek/monero_c + ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b # monero_c hash + path: impls/monero.dart mutex: ^3.1.0 dev_dependencies: diff --git a/lib/monero/cw_monero.dart b/lib/monero/cw_monero.dart index c1384a3df..1f1888b44 100644 --- a/lib/monero/cw_monero.dart +++ b/lib/monero/cw_monero.dart @@ -346,4 +346,9 @@ class CWMonero extends Monero { Future getCurrentHeight() async { return monero_wallet_api.getCurrentHeight(); } + + @override + void monerocCheck() { + checkIfMoneroCIsFine(); + } } diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 11abdeb58..1cf3e3e0c 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -124,6 +124,36 @@ class CryptoBalanceWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ + Observer( + builder: (_) { + if (dashboardViewModel.getMoneroError != null) { + return Padding( + padding: const EdgeInsets.fromLTRB(16,0,16,16), + child: DashBoardRoundedCardWidget( + title: "Invalid monero bindings", + subTitle: dashboardViewModel.getMoneroError.toString(), + onTap: () {}, + ), + ); + } + return Container(); + }, + ), + Observer( + builder: (_) { + if (dashboardViewModel.getWowneroError != null) { + return Padding( + padding: const EdgeInsets.fromLTRB(16,0,16,16), + child: DashBoardRoundedCardWidget( + title: "Invalid wownero bindings", + subTitle: dashboardViewModel.getWowneroError.toString(), + onTap: () {}, + ) + ); + } + return Container(); + }, + ), Observer( builder: (_) => dashboardViewModel.balanceViewModel.hasAccounts ? HomeScreenAccountWidget( diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 06c565035..1baea76cd 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/entities/service_status.dart'; import 'package:cake_wallet/exchange/exchange_provider_description.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/monero/monero.dart'; +import 'package:cake_wallet/wownero/wownero.dart' as wow; import 'package:cake_wallet/nano/nano.dart'; import 'package:cake_wallet/store/anonpay/anonpay_transactions_store.dart'; import 'package:cake_wallet/store/app_store.dart'; @@ -336,6 +337,27 @@ abstract class DashboardViewModelBase with Store { wallet.type == WalletType.haven; @computed + String? get getMoneroError { + if (wallet.type != WalletType.monero) return null; + try { + monero!.monerocCheck(); + } catch (e) { + return e.toString(); + } + return null; + } + + @computed + String? get getWowneroError { + if (wallet.type != WalletType.wownero) return null; + try { + wow.wownero!.wownerocCheck(); + } catch (e) { + return e.toString(); + } + return null; + } + List get isMoneroWalletBrokenReasons { if (wallet.type != WalletType.monero) return []; final keys = monero!.getKeys(wallet); diff --git a/lib/wownero/cw_wownero.dart b/lib/wownero/cw_wownero.dart index 03bebc463..0e0b00fd4 100644 --- a/lib/wownero/cw_wownero.dart +++ b/lib/wownero/cw_wownero.dart @@ -347,4 +347,9 @@ class CWWownero extends Wownero { String getLegacySeed(Object wallet, String langName) => (wallet as WowneroWalletBase).seedLegacy(langName); + + @override + void wownerocCheck() { + checkIfMoneroCIsFine(); + } } diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index cac5d3ad2..2e53a54ea 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -8,7 +8,7 @@ if [[ ! -d "monero_c" ]]; then git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip cd monero_c - git checkout c094ed5da69d2274747bf6edd7ca24124487bd34 + git checkout bcb328a4956105dc182afd0ce2e48fe263f5f20b git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero diff --git a/tool/configure.dart b/tool/configure.dart index 853d06448..32b470979 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -262,6 +262,7 @@ import 'package:cw_core/monero_amount_format.dart'; import 'package:cw_core/monero_transaction_priority.dart'; import 'package:cw_monero/monero_unspent.dart'; import 'package:cw_monero/monero_wallet_service.dart'; +import 'package:cw_monero/api/wallet_manager.dart'; import 'package:cw_monero/monero_wallet.dart'; import 'package:cw_monero/monero_transaction_info.dart'; import 'package:cw_monero/monero_transaction_creation_credentials.dart'; @@ -377,6 +378,7 @@ abstract class Monero { double formatterMoneroAmountToDouble({required int amount}); int formatterMoneroParseAmount({required String amount}); Account getCurrentAccount(Object wallet); + void monerocCheck(); void setCurrentAccount(Object wallet, int id, String label, String? balance); void onStartup(); int getTransactionInfoAccountId(TransactionInfo tx); @@ -449,6 +451,7 @@ import 'package:cw_wownero/wownero_transaction_info.dart'; import 'package:cw_wownero/wownero_transaction_creation_credentials.dart'; import 'package:cw_core/account.dart' as wownero_account; import 'package:cw_wownero/api/wallet.dart' as wownero_wallet_api; +import 'package:cw_wownero/api/wallet_manager.dart'; import 'package:cw_wownero/mnemonics/english.dart'; import 'package:cw_wownero/mnemonics/chinese_simplified.dart'; import 'package:cw_wownero/mnemonics/dutch.dart'; @@ -540,6 +543,7 @@ abstract class Wownero { Future updateUnspents(Object wallet); Future getCurrentHeight(); + void wownerocCheck(); WalletCredentials createWowneroRestoreWalletFromKeysCredentials({ required String name, From 8e4082d6806a89a256f827952036952a9ed21b47 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 9 Aug 2024 22:18:32 +0300 Subject: [PATCH 24/77] Generic fixes (#1583) * add litecoin nodes minor ui fix * update build macos to build universal archs [skip ci] * minor fix [skip ci] * update share package * change trocador onion url --- lib/anonpay/anonpay_api.dart | 2 +- .../screens/new_wallet/new_wallet_page.dart | 30 ++++++++++--------- .../address_edit_or_create_page.dart | 6 ++-- macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- pubspec_base.yaml | 2 +- scripts/macos/build_all.sh | 2 +- .../flutter/generated_plugin_registrant.cc | 3 ++ windows/flutter/generated_plugins.cmake | 1 + 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/lib/anonpay/anonpay_api.dart b/lib/anonpay/anonpay_api.dart index e46499407..acab662d1 100644 --- a/lib/anonpay/anonpay_api.dart +++ b/lib/anonpay/anonpay_api.dart @@ -20,7 +20,7 @@ class AnonPayApi { final WalletBase wallet; static const anonpayRef = secrets.anonPayReferralCode; - static const onionApiAuthority = 'trocadorfyhlu27aefre5u7zri66gudtzdyelymftvr4yjwcxhfaqsid.onion'; + static const onionApiAuthority = 'tqzngtf2hybjbexznel6dhgsvbynjzezoybvtv6iofomx7gchqfssgqd.onion'; static const clearNetAuthority = 'trocador.app'; static const markup = secrets.trocadorExchangeMarkup; static const anonPayPath = '/anonpay'; diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index 306c41479..d9427af0a 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -40,11 +40,11 @@ class NewWalletPage extends BasePage { @override Function(BuildContext)? get pushToNextWidget => (context) { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.focusedChild?.unfocus(); - } - }; + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.focusedChild?.unfocus(); + } + }; @override Widget body(BuildContext context) => WalletNameForm( @@ -88,15 +88,17 @@ class _WalletNameFormState extends State { if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) { - showPopUp( - context: context, - builder: (_) { - return AlertWithOneAction( - alertTitle: S.current.new_wallet, - alertContent: state.error, - buttonText: S.of(context).ok, - buttonAction: () => Navigator.of(context).pop()); - }); + if (context.mounted) { + showPopUp( + context: context, + builder: (_) { + return AlertWithOneAction( + alertTitle: S.current.new_wallet, + alertContent: state.error, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop()); + }); + } }); } }); diff --git a/lib/src/screens/subaddress/address_edit_or_create_page.dart b/lib/src/screens/subaddress/address_edit_or_create_page.dart index e067c78d0..b69a6d8df 100644 --- a/lib/src/screens/subaddress/address_edit_or_create_page.dart +++ b/lib/src/screens/subaddress/address_edit_or_create_page.dart @@ -58,7 +58,7 @@ class AddressEditOrCreatePage extends BasePage { isLoading: addressEditOrCreateViewModel.state is AddressIsSaving, isDisabled: - addressEditOrCreateViewModel.label?.isEmpty ?? true, + addressEditOrCreateViewModel.label.isEmpty, ), ) ], @@ -74,7 +74,9 @@ class AddressEditOrCreatePage extends BasePage { (AddressEditOrCreateState state) { if (state is AddressSavedSuccessfully) { WidgetsBinding.instance - .addPostFrameCallback((_) => Navigator.of(context).pop()); + .addPostFrameCallback((_) { + if (context.mounted) Navigator.of(context).pop(); + }); } }); diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 873d50649..338ece4ce 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -15,7 +15,7 @@ import in_app_review import package_info import package_info_plus import path_provider_foundation -import share_plus_macos +import share_plus import shared_preferences_foundation import url_launcher_macos import wakelock_plus diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 84b4631fc..463c04988 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -21,7 +21,7 @@ dependencies: mobx: ^2.1.4 flutter_mobx: ^2.0.6+5 flutter_slidable: ^3.0.1 - share_plus: ^4.0.10 + share_plus: ^10.0.0 # date_range_picker: ^1.0.6 #https://api.flutter.dev/flutter/material/showDateRangePicker.html dio: ^4.0.6 diff --git a/scripts/macos/build_all.sh b/scripts/macos/build_all.sh index 4116704bf..030617f7d 100755 --- a/scripts/macos/build_all.sh +++ b/scripts/macos/build_all.sh @@ -1,3 +1,3 @@ #!/bin/sh -./build_monero_all.sh \ No newline at end of file +./build_monero_all.sh universal \ No newline at end of file diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 323f53c9f..c6444e09c 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -21,6 +22,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index d6d9b0a49..0a0b2f9eb 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST flutter_local_authentication flutter_secure_storage_windows permission_handler_windows + share_plus url_launcher_windows ) From fb33a6f23dce32172d9b80f343972dc4e07289c3 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 9 Aug 2024 23:15:30 +0300 Subject: [PATCH 25/77] Cw 688 avoid wallet file corruption (#1582) * CW-688 Store Seed and keys in .keys file * CW-688 Open wallet from keys in .keys file and migrate wallets using the old file * CW-688 Open wallet from keys in .keys file and migrate wallets using the old file * CW-688 Restore .keys file from .keys.backup * CW-688 Restore .keys file from .keys.backup * CW-688 Move saving .keys files into the save function instead of the service * CW-688 Handle corrupt wallets * CW-688 Handle corrupt wallets * CW-688 Remove code duplication * CW-688 Reduce cache dependency * wrap any file reading/writing function with try/catch [skip ci] --------- Co-authored-by: Konstantin Ullrich --- cw_bitcoin/lib/bitcoin_wallet.dart | 66 +++++++---- cw_bitcoin/lib/bitcoin_wallet_service.dart | 2 + cw_bitcoin/lib/electrum_wallet.dart | 14 ++- cw_bitcoin/lib/electrum_wallet_snapshot.dart | 8 +- cw_bitcoin/lib/litecoin_wallet.dart | 55 ++++++--- cw_bitcoin/lib/litecoin_wallet_service.dart | 1 + .../lib/src/bitcoin_cash_wallet.dart | 35 ++++-- .../lib/src/bitcoin_cash_wallet_service.dart | 2 + cw_core/lib/wallet_keys_file.dart | 110 ++++++++++++++++++ cw_ethereum/lib/ethereum_wallet.dart | 33 ++++-- cw_evm/lib/evm_chain_wallet.dart | 11 +- cw_nano/lib/nano_wallet.dart | 81 ++++++++----- cw_nano/lib/nano_wallet_service.dart | 2 +- cw_polygon/lib/polygon_wallet.dart | 37 ++++-- cw_polygon/lib/polygon_wallet_service.dart | 2 - cw_solana/lib/solana_wallet.dart | 47 ++++++-- cw_tron/lib/tron_wallet.dart | 66 +++++++---- cw_tron/lib/tron_wallet_service.dart | 5 +- 18 files changed, 433 insertions(+), 144 deletions(-) create mode 100644 cw_core/lib/wallet_keys_file.dart diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index d061480ed..ce3e2caa8 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -6,15 +6,16 @@ import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; import 'package:convert/convert.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; -import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/bitcoin_wallet_addresses.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; +import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; import 'package:cw_bitcoin/psbt_transaction_builder.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:ledger_bitcoin/ledger_bitcoin.dart'; @@ -143,49 +144,66 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { final network = walletInfo.network != null ? BasedUtxoNetwork.fromName(walletInfo.network!) : BitcoinNetwork.mainnet; - final snp = await ElectrumWalletSnapshot.load(name, walletInfo.type, password, network); - walletInfo.derivationInfo ??= DerivationInfo( - derivationType: snp.derivationType ?? DerivationType.electrum, - derivationPath: snp.derivationPath, - ); + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); + + ElectrumWalletSnapshot? snp = null; + + try { + snp = await ElectrumWalletSnapshot.load(name, walletInfo.type, password, network); + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + keysData = + WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + + walletInfo.derivationInfo ??= DerivationInfo(); // set the default if not present: - walletInfo.derivationInfo!.derivationPath = snp.derivationPath ?? electrum_path; - walletInfo.derivationInfo!.derivationType = snp.derivationType ?? DerivationType.electrum; + walletInfo.derivationInfo!.derivationPath ??= snp?.derivationPath ?? electrum_path; + walletInfo.derivationInfo!.derivationType ??= snp?.derivationType ?? DerivationType.electrum; Uint8List? seedBytes = null; + final mnemonic = keysData.mnemonic; + final passphrase = keysData.passphrase; - if (snp.mnemonic != null) { + if (mnemonic != null) { switch (walletInfo.derivationInfo!.derivationType) { case DerivationType.electrum: - seedBytes = await mnemonicToSeedBytes(snp.mnemonic!); + seedBytes = await mnemonicToSeedBytes(mnemonic); break; case DerivationType.bip39: default: seedBytes = await bip39.mnemonicToSeed( - snp.mnemonic!, - passphrase: snp.passphrase ?? '', + mnemonic, + passphrase: passphrase ?? '', ); break; } } return BitcoinWallet( - mnemonic: snp.mnemonic, - xpub: snp.xpub, + mnemonic: mnemonic, + xpub: keysData.xPub, password: password, - passphrase: snp.passphrase, + passphrase: passphrase, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - initialAddresses: snp.addresses, - initialSilentAddresses: snp.silentAddresses, - initialSilentAddressIndex: snp.silentAddressIndex, - initialBalance: snp.balance, + initialAddresses: snp?.addresses, + initialSilentAddresses: snp?.silentAddresses, + initialSilentAddressIndex: snp?.silentAddressIndex ?? 0, + initialBalance: snp?.balance, seedBytes: seedBytes, - initialRegularAddressIndex: snp.regularAddressIndex, - initialChangeAddressIndex: snp.changeAddressIndex, - addressPageType: snp.addressPageType, + initialRegularAddressIndex: snp?.regularAddressIndex, + initialChangeAddressIndex: snp?.changeAddressIndex, + addressPageType: snp?.addressPageType, networkParam: network, alwaysScan: alwaysScan, ); @@ -249,8 +267,8 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { final accountPath = walletInfo.derivationInfo?.derivationPath; final derivationPath = accountPath != null ? "$accountPath/$isChange/$index" : null; - final signature = await _bitcoinLedgerApp! - .signMessage(_ledgerDevice!, message: ascii.encode(message), signDerivationPath: derivationPath); + final signature = await _bitcoinLedgerApp!.signMessage(_ledgerDevice!, + message: ascii.encode(message), signDerivationPath: derivationPath); return base64Encode(signature); } diff --git a/cw_bitcoin/lib/bitcoin_wallet_service.dart b/cw_bitcoin/lib/bitcoin_wallet_service.dart index a9a6d96db..cf93aa29d 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_service.dart @@ -41,8 +41,10 @@ class BitcoinWalletService extends WalletService< unspentCoinsInfo: unspentCoinsInfoSource, network: network, ); + await wallet.save(); await wallet.init(); + return wallet; } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 39cf95009..e55e5ed0e 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -37,6 +37,7 @@ import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/utils/file.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/get_height_by_date.dart'; import 'package:flutter/foundation.dart'; @@ -54,7 +55,7 @@ const int TWEAKS_COUNT = 25; abstract class ElectrumWalletBase extends WalletBase - with Store { + with Store, WalletKeysFile { ElectrumWalletBase({ required String password, required WalletInfo walletInfo, @@ -169,6 +170,10 @@ abstract class ElectrumWalletBase @override String? get seed => _mnemonic; + @override + WalletKeysData get walletKeysData => + WalletKeysData(mnemonic: _mnemonic, xPub: xpub, passphrase: passphrase); + bitcoin.NetworkType networkType; BasedUtxoNetwork network; @@ -1076,6 +1081,11 @@ abstract class ElectrumWalletBase @override Future save() async { + if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { + await saveKeysFile(_password); + saveKeysFile(_password, true); + } + final path = await makePath(); await write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); @@ -1131,8 +1141,6 @@ abstract class ElectrumWalletBase _autoSaveTimer?.cancel(); } - Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); - @action Future updateAllUnspents() async { List updatedUnspentCoins = []; diff --git a/cw_bitcoin/lib/electrum_wallet_snapshot.dart b/cw_bitcoin/lib/electrum_wallet_snapshot.dart index 15ad1cf63..082460f72 100644 --- a/cw_bitcoin/lib/electrum_wallet_snapshot.dart +++ b/cw_bitcoin/lib/electrum_wallet_snapshot.dart @@ -32,15 +32,21 @@ class ElectrumWalletSnapshot { final WalletType type; final String? addressPageType; + @deprecated String? mnemonic; + + @deprecated String? xpub; + + @deprecated + String? passphrase; + List addresses; List silentAddresses; ElectrumBalance balance; Map regularAddressIndex; Map changeAddressIndex; int silentAddressIndex; - String? passphrase; DerivationType? derivationType; String? derivationPath; diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 209ddc774..bfb9a1b16 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -1,20 +1,21 @@ +import 'package:bip39/bip39.dart' as bip39; import 'package:bitcoin_base/bitcoin_base.dart'; +import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; -import 'package:cw_core/crypto_currency.dart'; -import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_bitcoin/electrum_balance.dart'; +import 'package:cw_bitcoin/electrum_wallet.dart'; +import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; +import 'package:cw_bitcoin/litecoin_network.dart'; import 'package:cw_bitcoin/litecoin_wallet_addresses.dart'; +import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; -import 'package:cw_core/wallet_info.dart'; -import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; -import 'package:cw_bitcoin/electrum_wallet.dart'; -import 'package:cw_bitcoin/bitcoin_address_record.dart'; -import 'package:cw_bitcoin/electrum_balance.dart'; -import 'package:cw_bitcoin/litecoin_network.dart'; -import 'package:bip39/bip39.dart' as bip39; part 'litecoin_wallet.g.dart'; @@ -101,19 +102,37 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { required Box unspentCoinsInfo, required String password, }) async { - final snp = - await ElectrumWalletSnapshot.load(name, walletInfo.type, password, LitecoinNetwork.mainnet); + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); + + ElectrumWalletSnapshot? snp = null; + + try { + snp = await ElectrumWalletSnapshot.load( + name, walletInfo.type, password, LitecoinNetwork.mainnet); + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + keysData = + WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + return LitecoinWallet( - mnemonic: snp.mnemonic!, + mnemonic: keysData.mnemonic!, password: password, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - initialAddresses: snp.addresses, - initialBalance: snp.balance, - seedBytes: await mnemonicToSeedBytes(snp.mnemonic!), - initialRegularAddressIndex: snp.regularAddressIndex, - initialChangeAddressIndex: snp.changeAddressIndex, - addressPageType: snp.addressPageType, + initialAddresses: snp?.addresses, + initialBalance: snp?.balance, + seedBytes: await mnemonicToSeedBytes(keysData.mnemonic!), + initialRegularAddressIndex: snp?.regularAddressIndex, + initialChangeAddressIndex: snp?.changeAddressIndex, + addressPageType: snp?.addressPageType, ); } diff --git a/cw_bitcoin/lib/litecoin_wallet_service.dart b/cw_bitcoin/lib/litecoin_wallet_service.dart index bb51a4eaa..7025b72e5 100644 --- a/cw_bitcoin/lib/litecoin_wallet_service.dart +++ b/cw_bitcoin/lib/litecoin_wallet_service.dart @@ -33,6 +33,7 @@ class LitecoinWalletService extends WalletService< passphrase: credentials.passphrase, walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + await wallet.save(); await wallet.init(); diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart index 51bd3612d..f15eed10d 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart @@ -12,6 +12,7 @@ import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -89,14 +90,32 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required Box unspentCoinsInfo, required String password, }) async { - final snp = await ElectrumWalletSnapshot.load( - name, walletInfo.type, password, BitcoinCashNetwork.mainnet); + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); + + ElectrumWalletSnapshot? snp = null; + + try { + snp = await ElectrumWalletSnapshot.load( + name, walletInfo.type, password, BitcoinCashNetwork.mainnet); + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + keysData = + WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + return BitcoinCashWallet( - mnemonic: snp.mnemonic!, + mnemonic: keysData.mnemonic!, password: password, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - initialAddresses: snp.addresses.map((addr) { + initialAddresses: snp?.addresses.map((addr) { try { BitcoinCashAddress(addr.address); return BitcoinAddressRecord( @@ -116,10 +135,10 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { ); } }).toList(), - initialBalance: snp.balance, - seedBytes: await Mnemonic.toSeed(snp.mnemonic!), - initialRegularAddressIndex: snp.regularAddressIndex, - initialChangeAddressIndex: snp.changeAddressIndex, + initialBalance: snp?.balance, + seedBytes: await Mnemonic.toSeed(keysData.mnemonic!), + initialRegularAddressIndex: snp?.regularAddressIndex, + initialChangeAddressIndex: snp?.changeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, ); } diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart index e6c0cad07..01ae8ace3 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart @@ -34,8 +34,10 @@ class BitcoinCashWalletService extends WalletService + on WalletBase { + Future makePath() => pathForWallet(name: walletInfo.name, type: walletInfo.type); + + // this needs to be overridden + WalletKeysData get walletKeysData; + + Future makeKeysFilePath() async => "${await makePath()}.keys"; + + Future saveKeysFile(String password, [bool isBackup = false]) async { + try { + final rootPath = await makeKeysFilePath(); + final path = "$rootPath${isBackup ? ".backup" : ""}"; + dev.log("Saving .keys file '$path'"); + await write(path: path, password: password, data: walletKeysData.toJSON()); + } catch (_) {} + } + + static Future createKeysFile( + String name, WalletType type, String password, WalletKeysData walletKeysData, + [bool withBackup = true]) async { + try { + final rootPath = await pathForWallet(name: name, type: type); + final path = "$rootPath.keys"; + + dev.log("Saving .keys file '$path'"); + await write(path: path, password: password, data: walletKeysData.toJSON()); + + if (withBackup) { + dev.log("Saving .keys.backup file '$path.backup'"); + await write(path: "$path.backup", password: password, data: walletKeysData.toJSON()); + } + } catch (_) {} + } + + static Future hasKeysFile(String name, WalletType type) async { + try { + final path = await pathForWallet(name: name, type: type); + return File("$path.keys").existsSync() || File("$path.keys.backup").existsSync(); + } catch (_) { + return false; + } + } + + static Future readKeysFile(String name, WalletType type, String password) async { + final path = await pathForWallet(name: name, type: type); + + var readPath = "$path.keys"; + try { + if (!File(readPath).existsSync()) throw Exception("No .keys file found for $name $type"); + + final jsonSource = await read(path: readPath, password: password); + final data = json.decode(jsonSource) as Map; + return WalletKeysData.fromJSON(data); + } catch (e) { + dev.log("Failed to read .keys file. Trying .keys.backup file..."); + + readPath = "$readPath.backup"; + if (!File(readPath).existsSync()) + throw Exception("No .keys nor a .keys.backup file found for $name $type"); + + final jsonSource = await read(path: readPath, password: password); + final data = json.decode(jsonSource) as Map; + final keysData = WalletKeysData.fromJSON(data); + + dev.log("Restoring .keys from .keys.backup"); + createKeysFile(name, type, password, keysData, false); + return keysData; + } + } +} + +class WalletKeysData { + final String? privateKey; + final String? mnemonic; + final String? altMnemonic; + final String? passphrase; + final String? xPub; + + WalletKeysData({this.privateKey, this.mnemonic, this.altMnemonic, this.passphrase, this.xPub}); + + String toJSON() => jsonEncode({ + "privateKey": privateKey, + "mnemonic": mnemonic, + if (altMnemonic != null) "altMnemonic": altMnemonic, + if (passphrase != null) "passphrase": passphrase, + if (xPub != null) "xPub": xPub + }); + + static WalletKeysData fromJSON(Map json) => WalletKeysData( + privateKey: json["privateKey"] as String?, + mnemonic: json["mnemonic"] as String?, + altMnemonic: json["altMnemonic"] as String?, + passphrase: json["passphrase"] as String?, + xPub: json["xPub"] as String?, + ); +} diff --git a/cw_ethereum/lib/ethereum_wallet.dart b/cw_ethereum/lib/ethereum_wallet.dart index 2c58cd31d..7bcd55cf4 100644 --- a/cw_ethereum/lib/ethereum_wallet.dart +++ b/cw_ethereum/lib/ethereum_wallet.dart @@ -6,6 +6,7 @@ import 'package:cw_core/erc20_token.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_ethereum/default_ethereum_erc20_tokens.dart'; import 'package:cw_ethereum/ethereum_client.dart'; import 'package:cw_ethereum/ethereum_transaction_history.dart'; @@ -122,19 +123,37 @@ class EthereumWallet extends EVMChainWallet { static Future open( {required String name, required String password, required WalletInfo walletInfo}) async { + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); - final jsonSource = await read(path: path, password: password); - final data = json.decode(jsonSource) as Map; - final mnemonic = data['mnemonic'] as String?; - final privateKey = data['private_key'] as String?; - final balance = EVMChainERC20Balance.fromJSON(data['balance'] as String) ?? + + Map? data; + try { + final jsonSource = await read(path: path, password: password); + + data = json.decode(jsonSource) as Map; + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final balance = EVMChainERC20Balance.fromJSON(data?['balance'] as String) ?? EVMChainERC20Balance(BigInt.zero); + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + final mnemonic = data!['mnemonic'] as String?; + final privateKey = data['private_key'] as String?; + + keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + return EthereumWallet( walletInfo: walletInfo, password: password, - mnemonic: mnemonic, - privateKey: privateKey, + mnemonic: keysData.mnemonic, + privateKey: keysData.privateKey, initialBalance: balance, client: EthereumClient(), ); diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index 760c50a04..55dcea959 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -16,6 +16,7 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cw_evm/evm_chain_client.dart'; import 'package:cw_evm/evm_chain_exceptions.dart'; @@ -58,7 +59,7 @@ abstract class EVMChainWallet = EVMChainWalletBase with _$EVMChainWallet; abstract class EVMChainWalletBase extends WalletBase - with Store { + with Store, WalletKeysFile { EVMChainWalletBase({ required WalletInfo walletInfo, required EVMChainClient client, @@ -508,6 +509,11 @@ abstract class EVMChainWalletBase @override Future save() async { + if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { + await saveKeysFile(_password); + saveKeysFile(_password, true); + } + await walletAddresses.updateAddressesInBox(); final path = await makePath(); await write(path: path, password: _password, data: toJSON()); @@ -522,7 +528,8 @@ abstract class EVMChainWalletBase ? HEX.encode((evmChainPrivateKey as EthPrivateKey).privateKey) : null; - Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); + @override + WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, privateKey: privateKey); String toJSON() => json.encode({ 'mnemonic': _mnemonic, diff --git a/cw_nano/lib/nano_wallet.dart b/cw_nano/lib/nano_wallet.dart index 5efe3006d..55e01d10b 100644 --- a/cw_nano/lib/nano_wallet.dart +++ b/cw_nano/lib/nano_wallet.dart @@ -1,8 +1,12 @@ +import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:bip39/bip39.dart' as bip39; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/n2_node.dart'; +import 'package:cw_core/nano_account.dart'; import 'package:cw_core/nano_account_info_response.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/pathForWallet.dart'; @@ -10,23 +14,20 @@ 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/transaction_priority.dart'; +import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_nano/file.dart'; -import 'package:cw_core/nano_account.dart'; -import 'package:cw_core/n2_node.dart'; import 'package:cw_nano/nano_balance.dart'; import 'package:cw_nano/nano_client.dart'; import 'package:cw_nano/nano_transaction_credentials.dart'; import 'package:cw_nano/nano_transaction_history.dart'; import 'package:cw_nano/nano_transaction_info.dart'; +import 'package:cw_nano/nano_wallet_addresses.dart'; import 'package:cw_nano/nano_wallet_keys.dart'; import 'package:cw_nano/pending_nano_transaction.dart'; import 'package:mobx/mobx.dart'; -import 'dart:async'; -import 'package:cw_nano/nano_wallet_addresses.dart'; -import 'package:cw_core/wallet_base.dart'; import 'package:nanodart/nanodart.dart'; -import 'package:bip39/bip39.dart' as bip39; import 'package:nanoutil/nanoutil.dart'; part 'nano_wallet.g.dart'; @@ -34,7 +35,8 @@ part 'nano_wallet.g.dart'; class NanoWallet = NanoWalletBase with _$NanoWallet; abstract class NanoWalletBase - extends WalletBase with Store { + extends WalletBase + with Store, WalletKeysFile { NanoWalletBase({ required WalletInfo walletInfo, required String mnemonic, @@ -70,6 +72,7 @@ abstract class NanoWalletBase String? _representativeAddress; int repScore = 100; + bool get isRepOk => repScore >= 90; late final NanoClient _client; @@ -128,14 +131,10 @@ abstract class NanoWalletBase } @override - int calculateEstimatedFee(TransactionPriority priority, int? amount) { - return 0; // always 0 :) - } + int calculateEstimatedFee(TransactionPriority priority, int? amount) => 0; // always 0 :) @override - Future changePassword(String password) { - throw UnimplementedError("changePassword"); - } + Future changePassword(String password) => throw UnimplementedError("changePassword"); @override void close() { @@ -170,9 +169,7 @@ abstract class NanoWalletBase } @override - Future connectToPowNode({required Node node}) async { - _client.connectPow(node); - } + Future connectToPowNode({required Node node}) async => _client.connectPow(node); @override Future createTransaction(Object credentials) async { @@ -296,9 +293,7 @@ abstract class NanoWalletBase } @override - NanoWalletKeys get keys { - return NanoWalletKeys(seedKey: _hexSeed!); - } + NanoWalletKeys get keys => NanoWalletKeys(seedKey: _hexSeed!); @override String? get privateKey => _privateKey!; @@ -312,6 +307,11 @@ abstract class NanoWalletBase @override Future save() async { + if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { + await saveKeysFile(_password); + saveKeysFile(_password, true); + } + await walletAddresses.updateAddressesInBox(); final path = await makePath(); await write(path: path, password: _password, data: toJSON()); @@ -323,6 +323,9 @@ abstract class NanoWalletBase String get hexSeed => _hexSeed!; + @override + WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, altMnemonic: hexSeed); + String get representative => _representativeAddress ?? ""; @action @@ -358,8 +361,6 @@ abstract class NanoWalletBase } } - Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); - String toJSON() => json.encode({ 'seedKey': _hexSeed, 'mnemonic': _mnemonic, @@ -373,31 +374,47 @@ abstract class NanoWalletBase required String password, required WalletInfo walletInfo, }) async { + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); - final jsonSource = await read(path: path, password: password); - final data = json.decode(jsonSource) as Map; - final mnemonic = data['mnemonic'] as String; + Map? data = null; + try { + final jsonSource = await read(path: path, password: password); + + data = json.decode(jsonSource) as Map; + } catch (e) { + if (!hasKeysFile) rethrow; + } final balance = NanoBalance.fromRawString( - currentBalance: data['currentBalance'] as String? ?? "0", - receivableBalance: data['receivableBalance'] as String? ?? "0", + currentBalance: data?['currentBalance'] as String? ?? "0", + receivableBalance: data?['receivableBalance'] as String? ?? "0", ); + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + final mnemonic = data!['mnemonic'] as String; + final isHexSeed = !mnemonic.contains(' '); + + keysData = WalletKeysData( + mnemonic: isHexSeed ? null : mnemonic, altMnemonic: isHexSeed ? mnemonic : null); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + DerivationType derivationType = DerivationType.nano; - if (data['derivationType'] == "DerivationType.bip39") { + if (data?['derivationType'] == "DerivationType.bip39") { derivationType = DerivationType.bip39; } walletInfo.derivationInfo ??= DerivationInfo(derivationType: derivationType); - if (walletInfo.derivationInfo!.derivationType == null) { - walletInfo.derivationInfo!.derivationType = derivationType; - } + walletInfo.derivationInfo!.derivationType ??= derivationType; return NanoWallet( walletInfo: walletInfo, password: password, - mnemonic: mnemonic, + mnemonic: keysData.mnemonic!, initialBalance: balance, ); // init() should always be run after this! @@ -435,7 +452,7 @@ abstract class NanoWalletBase _representativeAddress = await _client.getRepFromPrefs(); throw Exception("Failed to get representative address $e"); } - + repScore = await _client.getRepScore(_representativeAddress!); } diff --git a/cw_nano/lib/nano_wallet_service.dart b/cw_nano/lib/nano_wallet_service.dart index a1af3c872..755598705 100644 --- a/cw_nano/lib/nano_wallet_service.dart +++ b/cw_nano/lib/nano_wallet_service.dart @@ -39,7 +39,7 @@ class NanoWalletService extends WalletService open( {required String name, required String password, required WalletInfo walletInfo}) async { + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); - final jsonSource = await read(path: path, password: password); - final data = json.decode(jsonSource) as Map; - final mnemonic = data['mnemonic'] as String?; - final privateKey = data['private_key'] as String?; - final balance = EVMChainERC20Balance.fromJSON(data['balance'] as String) ?? + + Map? data; + try { + final jsonSource = await read(path: path, password: password); + + data = json.decode(jsonSource) as Map; + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final balance = EVMChainERC20Balance.fromJSON(data?['balance'] as String) ?? EVMChainERC20Balance(BigInt.zero); + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + final mnemonic = data!['mnemonic'] as String?; + final privateKey = data['private_key'] as String?; + + keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } + return PolygonWallet( walletInfo: walletInfo, password: password, - mnemonic: mnemonic, - privateKey: privateKey, + mnemonic: keysData.mnemonic, + privateKey: keysData.privateKey, initialBalance: balance, client: PolygonClient(), ); diff --git a/cw_polygon/lib/polygon_wallet_service.dart b/cw_polygon/lib/polygon_wallet_service.dart index ee84a014e..14baffc44 100644 --- a/cw_polygon/lib/polygon_wallet_service.dart +++ b/cw_polygon/lib/polygon_wallet_service.dart @@ -35,7 +35,6 @@ class PolygonWalletService extends EVMChainWalletService { await wallet.init(); wallet.addInitialTokens(); await wallet.save(); - return wallet; } @@ -83,7 +82,6 @@ class PolygonWalletService extends EVMChainWalletService { await wallet.init(); wallet.addInitialTokens(); await wallet.save(); - return wallet; } diff --git a/cw_solana/lib/solana_wallet.dart b/cw_solana/lib/solana_wallet.dart index 401968698..2b30a204c 100644 --- a/cw_solana/lib/solana_wallet.dart +++ b/cw_solana/lib/solana_wallet.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; + import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/node.dart'; @@ -12,6 +13,7 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_solana/default_spl_tokens.dart'; import 'package:cw_solana/file.dart'; import 'package:cw_solana/solana_balance.dart'; @@ -36,7 +38,8 @@ part 'solana_wallet.g.dart'; class SolanaWallet = SolanaWalletBase with _$SolanaWallet; abstract class SolanaWalletBase - extends WalletBase with Store { + extends WalletBase + with Store, WalletKeysFile { SolanaWalletBase({ required WalletInfo walletInfo, String? mnemonic, @@ -121,6 +124,9 @@ abstract class SolanaWalletBase return privateKey; } + @override + WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, privateKey: privateKey); + Future init() async { final boxName = "${walletInfo.name.replaceAll(" ", "_")}_${SPLToken.boxName}"; @@ -336,6 +342,11 @@ abstract class SolanaWalletBase @override Future save() async { + if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { + await saveKeysFile(_password); + saveKeysFile(_password, true); + } + await walletAddresses.updateAddressesInBox(); final path = await makePath(); await write(path: path, password: _password, data: toJSON()); @@ -361,8 +372,6 @@ abstract class SolanaWalletBase } } - Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); - String toJSON() => json.encode({ 'mnemonic': _mnemonic, 'private_key': _hexPrivateKey, @@ -374,18 +383,36 @@ abstract class SolanaWalletBase required String password, required WalletInfo walletInfo, }) async { + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); - final jsonSource = await read(path: path, password: password); - final data = json.decode(jsonSource) as Map; - final mnemonic = data['mnemonic'] as String?; - final privateKey = data['private_key'] as String?; - final balance = SolanaBalance.fromJSON(data['balance'] as String) ?? SolanaBalance(0.0); + + Map? data; + try { + final jsonSource = await read(path: path, password: password); + + data = json.decode(jsonSource) as Map; + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final balance = SolanaBalance.fromJSON(data?['balance'] as String) ?? SolanaBalance(0.0); + + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + final mnemonic = data!['mnemonic'] as String?; + final privateKey = data['private_key'] as String?; + + keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } return SolanaWallet( walletInfo: walletInfo, password: password, - mnemonic: mnemonic, - privateKey: privateKey, + mnemonic: keysData.mnemonic, + privateKey: keysData.privateKey, initialBalance: balance, ); } diff --git a/cw_tron/lib/tron_wallet.dart b/cw_tron/lib/tron_wallet.dart index 96f92e450..cb4c9c024 100644 --- a/cw_tron/lib/tron_wallet.dart +++ b/cw_tron/lib/tron_wallet.dart @@ -16,6 +16,7 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cw_tron/default_tron_tokens.dart'; import 'package:cw_tron/file.dart'; @@ -37,7 +38,8 @@ part 'tron_wallet.g.dart'; class TronWallet = TronWalletBase with _$TronWallet; abstract class TronWalletBase - extends WalletBase with Store { + extends WalletBase + with Store, WalletKeysFile { TronWalletBase({ required WalletInfo walletInfo, String? mnemonic, @@ -124,18 +126,36 @@ abstract class TronWalletBase required String password, required WalletInfo walletInfo, }) async { + final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); - final jsonSource = await read(path: path, password: password); - final data = json.decode(jsonSource) as Map; - final mnemonic = data['mnemonic'] as String?; - final privateKey = data['private_key'] as String?; - final balance = TronBalance.fromJSON(data['balance'] as String) ?? TronBalance(BigInt.zero); + + Map? data; + try { + final jsonSource = await read(path: path, password: password); + + data = json.decode(jsonSource) as Map; + } catch (e) { + if (!hasKeysFile) rethrow; + } + + final balance = TronBalance.fromJSON(data?['balance'] as String) ?? TronBalance(BigInt.zero); + + final WalletKeysData keysData; + // Migrate wallet from the old scheme to then new .keys file scheme + if (!hasKeysFile) { + final mnemonic = data!['mnemonic'] as String?; + final privateKey = data['private_key'] as String?; + + keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); + } else { + keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + } return TronWallet( walletInfo: walletInfo, password: password, - mnemonic: mnemonic, - privateKey: privateKey, + mnemonic: keysData.mnemonic, + privateKey: keysData.privateKey, initialBalance: balance, ); } @@ -163,9 +183,7 @@ abstract class TronWalletBase }) async { assert(mnemonic != null || privateKey != null); - if (privateKey != null) { - return TronPrivateKey(privateKey); - } + if (privateKey != null) return TronPrivateKey(privateKey); final seed = bip39.mnemonicToSeed(mnemonic!); @@ -181,14 +199,10 @@ abstract class TronWalletBase int calculateEstimatedFee(TransactionPriority priority, int? amount) => 0; @override - Future changePassword(String password) { - throw UnimplementedError("changePassword"); - } + Future changePassword(String password) => throw UnimplementedError("changePassword"); @override - void close() { - _transactionsUpdateTimer?.cancel(); - } + void close() => _transactionsUpdateTimer?.cancel(); @action @override @@ -406,12 +420,15 @@ abstract class TronWalletBase Object get keys => throw UnimplementedError("keys"); @override - Future rescan({required int height}) { - throw UnimplementedError("rescan"); - } + Future rescan({required int height}) => throw UnimplementedError("rescan"); @override Future save() async { + if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { + await saveKeysFile(_password); + saveKeysFile(_password, true); + } + await walletAddresses.updateAddressesInBox(); final path = await makePath(); await write(path: path, password: _password, data: toJSON()); @@ -424,7 +441,8 @@ abstract class TronWalletBase @override String get privateKey => _tronPrivateKey.toHex(); - Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); + @override + WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, privateKey: privateKey); String toJSON() => json.encode({ 'mnemonic': _mnemonic, @@ -512,7 +530,7 @@ abstract class TronWalletBase @override Future renameWalletFiles(String newWalletName) async { - String transactionHistoryFileNameForWallet = 'tron_transactions.json'; + const transactionHistoryFileNameForWallet = 'tron_transactions.json'; final currentWalletPath = await pathForWallet(name: walletInfo.name, type: type); final currentWalletFile = File(currentWalletPath); @@ -550,9 +568,7 @@ abstract class TronWalletBase Future signMessage(String message, {String? address}) async => _tronPrivateKey.signPersonalMessage(ascii.encode(message)); - String getTronBase58AddressFromHex(String hexAddress) { - return TronAddress(hexAddress).toAddress(); - } + String getTronBase58AddressFromHex(String hexAddress) => TronAddress(hexAddress).toAddress(); void updateScanProviderUsageState(bool isEnabled) { if (isEnabled) { diff --git a/cw_tron/lib/tron_wallet_service.dart b/cw_tron/lib/tron_wallet_service.dart index c8344d5f4..ba217a265 100644 --- a/cw_tron/lib/tron_wallet_service.dart +++ b/cw_tron/lib/tron_wallet_service.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:bip39/bip39.dart' as bip39; +import 'package:collection/collection.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_history.dart'; @@ -14,7 +15,6 @@ import 'package:cw_tron/tron_exception.dart'; import 'package:cw_tron/tron_wallet.dart'; import 'package:cw_tron/tron_wallet_creation_credentials.dart'; import 'package:hive/hive.dart'; -import 'package:collection/collection.dart'; class TronWalletService extends WalletService< TronNewWalletCredentials, @@ -153,7 +153,8 @@ class TronWalletService extends WalletService< } @override - Future, TransactionInfo>> restoreFromHardwareWallet(TronNewWalletCredentials credentials) { + Future, TransactionInfo>> + restoreFromHardwareWallet(TronNewWalletCredentials credentials) { // TODO: implement restoreFromHardwareWallet throw UnimplementedError(); } From 14e99daa7398791cff5dbb9134e66f86f2142043 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Aug 2024 00:48:36 +0300 Subject: [PATCH 26/77] align the hint with the prefix in the text field (#1571) * Update send_card.dart * update currency amount text field widget * Update qr_widget.dart --- lib/src/screens/exchange/exchange_page.dart | 39 +-- .../exchange/widgets/exchange_card.dart | 131 +------- .../receive/widgets/currency_input_field.dart | 301 +++++++++++------- .../screens/receive/widgets/qr_widget.dart | 44 ++- lib/src/screens/send/send_template_page.dart | 2 +- .../widgets/prefix_currency_icon_widget.dart | 65 ---- lib/src/screens/send/widgets/send_card.dart | 228 ++----------- .../send/widgets/send_template_card.dart | 183 +++++------ .../send/send_template_view_model.dart | 5 + lib/view_model/send/template_view_model.dart | 23 +- 10 files changed, 371 insertions(+), 650 deletions(-) delete mode 100644 lib/src/screens/send/widgets/prefix_currency_icon_widget.dart diff --git a/lib/src/screens/exchange/exchange_page.dart b/lib/src/screens/exchange/exchange_page.dart index 5c064df27..2c717a3c8 100644 --- a/lib/src/screens/exchange/exchange_page.dart +++ b/lib/src/screens/exchange/exchange_page.dart @@ -67,17 +67,6 @@ class ExchangePage extends BasePage { Debounce _depositAmountDebounce = Debounce(Duration(milliseconds: 500)); var _isReactionsSet = false; - final arrowBottomPurple = Image.asset( - 'assets/images/arrow_bottom_purple_icon.png', - color: Colors.white, - height: 8, - ); - final arrowBottomCakeGreen = Image.asset( - 'assets/images/arrow_bottom_cake_green.png', - color: Colors.white, - height: 8, - ); - late final String? depositWalletName; late final String? receiveWalletName; @@ -101,11 +90,11 @@ class ExchangePage extends BasePage { @override Function(BuildContext)? get pushToNextWidget => (context) { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.focusedChild?.unfocus(); - } - }; + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.focusedChild?.unfocus(); + } + }; @override Widget middle(BuildContext context) => Row( @@ -340,7 +329,6 @@ class ExchangePage extends BasePage { void applyTemplate( BuildContext context, ExchangeViewModel exchangeViewModel, ExchangeTemplate template) async { - final depositCryptoCurrency = CryptoCurrency.fromString(template.depositCurrency); final receiveCryptoCurrency = CryptoCurrency.fromString(template.receiveCurrency); @@ -354,10 +342,12 @@ class ExchangePage extends BasePage { exchangeViewModel.isFixedRateMode = false; var domain = template.depositAddress; - exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, depositCryptoCurrency); + exchangeViewModel.depositAddress = + await fetchParsedAddress(context, domain, depositCryptoCurrency); domain = template.receiveAddress; - exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, receiveCryptoCurrency); + exchangeViewModel.receiveAddress = + await fetchParsedAddress(context, domain, receiveCryptoCurrency); } void _setReactions(BuildContext context, ExchangeViewModel exchangeViewModel) { @@ -529,14 +519,16 @@ class ExchangePage extends BasePage { _depositAddressFocus.addListener(() async { if (!_depositAddressFocus.hasFocus && depositAddressController.text.isNotEmpty) { final domain = depositAddressController.text; - exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, exchangeViewModel.depositCurrency); + exchangeViewModel.depositAddress = + await fetchParsedAddress(context, domain, exchangeViewModel.depositCurrency); } }); _receiveAddressFocus.addListener(() async { if (!_receiveAddressFocus.hasFocus && receiveAddressController.text.isNotEmpty) { final domain = receiveAddressController.text; - exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, exchangeViewModel.receiveCurrency); + exchangeViewModel.receiveAddress = + await fetchParsedAddress(context, domain, exchangeViewModel.receiveCurrency); } }); @@ -589,7 +581,8 @@ class ExchangePage extends BasePage { } } - Future fetchParsedAddress(BuildContext context, String domain, CryptoCurrency currency) async { + Future fetchParsedAddress( + BuildContext context, String domain, CryptoCurrency currency) async { final parsedAddress = await getIt.get().resolve(context, domain, currency); final address = await extractAddressFromParsed(context, parsedAddress); return address; @@ -658,7 +651,6 @@ class ExchangePage extends BasePage { exchangeViewModel.changeDepositCurrency(currency: currency); }, - imageArrow: arrowBottomPurple, currencyButtonColor: Colors.transparent, addressButtonsColor: Theme.of(context).extension()!.textFieldButtonColor, @@ -705,7 +697,6 @@ class ExchangePage extends BasePage { currencies: exchangeViewModel.receiveCurrencies, onCurrencySelected: (currency) => exchangeViewModel.changeReceiveCurrency(currency: currency), - imageArrow: arrowBottomCakeGreen, currencyButtonColor: Colors.transparent, addressButtonsColor: Theme.of(context).extension()!.textFieldButtonColor, diff --git a/lib/src/screens/exchange/widgets/exchange_card.dart b/lib/src/screens/exchange/widgets/exchange_card.dart index 760b0c137..02218f848 100644 --- a/lib/src/screens/exchange/widgets/exchange_card.dart +++ b/lib/src/screens/exchange/widgets/exchange_card.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/core/amount_validator.dart'; import 'package:cake_wallet/entities/contact_base.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart'; import 'package:cake_wallet/themes/extensions/qr_code_theme.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; @@ -27,7 +28,7 @@ class ExchangeCard extends StatefulWidget { required this.isAmountEstimated, required this.currencies, required this.onCurrencySelected, - required this.imageArrow, + this.imageArrow, this.currencyValueValidator, this.addressTextFieldValidator, this.title = '', @@ -58,7 +59,7 @@ class ExchangeCard extends StatefulWidget { final bool isAmountEstimated; final bool hasRefundAddress; final bool isMoneroWallet; - final Image imageArrow; + final Image? imageArrow; final Color currencyButtonColor; final Color? addressButtonsColor; final Color borderColor; @@ -191,120 +192,18 @@ class ExchangeCardState extends State { ) ], ), - Padding( - padding: EdgeInsets.only(top: 20), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(right: 8), - height: 32, - color: widget.currencyButtonColor, - child: InkWell( - onTap: () => _presentPicker(context), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: EdgeInsets.only(right: 5), - child: widget.imageArrow, - ), - Text(_selectedCurrency.toString(), - style: TextStyle( - fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white)) - ]), - ), - ), - if (_selectedCurrency.tag != null) - Padding( - padding: const EdgeInsets.only(right: 3.0), - child: Container( - height: 32, - decoration: BoxDecoration( - color: widget.addressButtonsColor ?? - Theme.of(context).extension()!.textFieldButtonColor, - borderRadius: BorderRadius.all(Radius.circular(6))), - child: Center( - child: Padding( - padding: const EdgeInsets.all(6.0), - child: Text(_selectedCurrency.tag!, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Theme.of(context) - .extension()! - .textFieldButtonIconColor)), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(right: 4.0), - child: Text(':', - style: TextStyle( - fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white)), - ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: FocusTraversalOrder( - order: NumericFocusOrder(1), - child: BaseTextFormField( - focusNode: widget.amountFocusNode, - controller: amountController, - enabled: _isAmountEditable, - textAlign: TextAlign.left, - keyboardType: - TextInputType.numberWithOptions(signed: false, decimal: true), - inputFormatters: [ - FilteringTextInputFormatter.deny(RegExp('[\\-|\\ ]')) - ], - hintText: '0.0000', - borderColor: Colors.transparent, - //widget.borderColor, - textStyle: TextStyle( - fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white), - placeholderTextStyle: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: Theme.of(context) - .extension()! - .hintTextColor), - validator: _isAmountEditable - ? widget.currencyValueValidator - : null), - ), - ), - if (widget.hasAllAmount) - Container( - height: 32, - width: 32, - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldButtonColor, - borderRadius: BorderRadius.all(Radius.circular(6))), - child: InkWell( - onTap: () => widget.allAmount?.call(), - child: Center( - child: Text(S.of(context).all, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Theme.of(context) - .extension()! - .textFieldButtonIconColor)), - ), - ), - ) - ], - ), - ), - ], - )), + CurrencyAmountTextField( + imageArrow: widget.imageArrow, + selectedCurrency: _selectedCurrency.toString(), + amountFocusNode: widget.amountFocusNode, + amountController: amountController, + onTapPicker: () => _presentPicker(context), + isAmountEditable: _isAmountEditable, + isPickerEnable: true, + allAmountButton: widget.hasAllAmount, + currencyValueValidator: widget.currencyValueValidator, + tag: _selectedCurrency.tag, + allAmountCallback: widget.allAmount), Divider(height: 1, color: Theme.of(context).extension()!.textFieldHintColor), Padding( padding: EdgeInsets.only(top: 5), diff --git a/lib/src/screens/receive/widgets/currency_input_field.dart b/lib/src/screens/receive/widgets/currency_input_field.dart index 84b2a7bca..ce3de9a6c 100644 --- a/lib/src/screens/receive/widgets/currency_input_field.dart +++ b/lib/src/screens/receive/widgets/currency_input_field.dart @@ -1,135 +1,210 @@ +import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; -import 'package:cake_wallet/utils/responsive_layout_util.dart'; -import 'package:cw_core/crypto_currency.dart'; -import 'package:cw_core/currency.dart'; +import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; +import 'package:cake_wallet/themes/theme_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; -import 'package:cake_wallet/themes/extensions/picker_theme.dart'; -import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; -class CurrencyInputField extends StatelessWidget { - const CurrencyInputField({ - super.key, - required this.onTapPicker, +class CurrencyAmountTextField extends StatelessWidget { + const CurrencyAmountTextField({ required this.selectedCurrency, - this.focusNode, - required this.controller, - required this.isLight, + required this.amountFocusNode, + required this.amountController, + required this.isAmountEditable, + this.allAmountButton = false, + this.isPickerEnable = false, + this.isSelected = false, + this.currentTheme = ThemeType.dark, + this.onTapPicker, + this.padding, + this.imageArrow, + this.hintText, + this.tag, + this.tagBackgroundColor, + this.currencyValueValidator, + this.allAmountCallback, }); - final Function() onTapPicker; - final Currency selectedCurrency; - final FocusNode? focusNode; - final TextEditingController controller; - final bool isLight; - - String get _currencyName { - if (selectedCurrency is CryptoCurrency) { - return (selectedCurrency as CryptoCurrency).title.toUpperCase(); - } - return selectedCurrency.name.toUpperCase(); - } + final Widget? imageArrow; + final String selectedCurrency; + final String? tag; + final String? hintText; + final Color? tagBackgroundColor; + final EdgeInsets? padding; + final FocusNode? amountFocusNode; + final TextEditingController amountController; + final bool isAmountEditable; + final FormFieldValidator? currencyValueValidator; + final bool isPickerEnable; + final ThemeType currentTheme; + final bool isSelected; + final bool allAmountButton; + final VoidCallback? allAmountCallback; + final VoidCallback? onTapPicker; @override Widget build(BuildContext context) { - final arrowBottomPurple = Image.asset( - 'assets/images/arrow_bottom_purple_icon.png', - color: Theme.of(context).extension()!.textColor, - height: 8, - ); - // This magic number for wider screen sets the text input focus at center of the inputfield - final _width = - responsiveLayoutUtil.shouldRenderMobileUI ? MediaQuery.of(context).size.width : 500; - - return Column( + final textColor = currentTheme == ThemeType.light + ? Theme.of(context).appBarTheme.titleTextStyle!.color! + : Colors.white; + final _prefixContent = Row( children: [ - Padding( - padding: EdgeInsets.only(top: 20), - child: SizedBox( - height: 40, - child: BaseTextFormField( - focusNode: focusNode, - controller: controller, - keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true), - inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.|\,)?\d{0,8}'))], - hintText: '0.000', - placeholderTextStyle: isLight - ? null - : TextStyle( - color: Theme.of(context).extension()!.textFieldBorderColor, - fontWeight: FontWeight.w600, - ), - borderColor: Theme.of(context).extension()!.dividerColor, - textColor: Theme.of(context).extension()!.textColor, - textStyle: TextStyle( - color: Theme.of(context).extension()!.textColor, - ), - prefixIcon: Padding( - padding: EdgeInsets.only( - left: _width / 4, + isPickerEnable + ? Container( + height: 32, + child: InkWell( + onTap: onTapPicker, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(right: 5), + child: imageArrow ?? + Image.asset('assets/images/arrow_bottom_purple_icon.png', + color: textColor, height: 8)), + Text( + selectedCurrency, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + color: textColor, + ), + ), + ], + ), ), - child: Container( - padding: EdgeInsets.only(right: 8), - child: InkWell( - onTap: onTapPicker, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: EdgeInsets.only(right: 5), - child: arrowBottomPurple, - ), - Text( - _currencyName, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 16, - color: Theme.of(context).extension()!.textColor, - ), - ), - if (selectedCurrency.tag != null) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 3.0), - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).extension()!.textFieldButtonColor, - borderRadius: BorderRadius.all( - Radius.circular(6), - ), - ), - child: Center( - child: Text( - selectedCurrency.tag!, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Theme.of(context).extension()!.textFieldButtonIconColor, - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 3.0), - child: Text( - ':', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 20, - color: Theme.of(context).extension()!.textColor, - ), - ), - ), - ]), + ) + : Text( + selectedCurrency, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + color: textColor, + ), + ), + if (tag != null) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 3.0), + child: Container( + height: 32, + decoration: BoxDecoration( + color: tagBackgroundColor ?? + Theme.of(context).extension()!.textFieldButtonColor, + borderRadius: const BorderRadius.all(Radius.circular(6)), + ), + child: Center( + child: Padding( + padding: const EdgeInsets.all(6.0), + child: Text( + tag!, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Theme.of(context).extension()!.textFieldButtonIconColor, + ), ), ), ), ), ), + Padding( + padding: EdgeInsets.only(right: 4.0), + child: Text( + ':', + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + color: textColor, + ), + ), ), ], ); + return Padding( + padding: padding ?? const EdgeInsets.only(top: 20), + child: Row( + children: [ + isSelected + ? Container( + child: _prefixContent, + padding: EdgeInsets.symmetric(vertical: 4, horizontal: 8), + margin: const EdgeInsets.only(right: 3), + decoration: BoxDecoration( + border: Border.all( + color: textColor, + ), + borderRadius: BorderRadius.circular(26), + color: Theme.of(context).primaryColor)) + : _prefixContent, + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: FocusTraversalOrder( + order: NumericFocusOrder(1), + child: BaseTextFormField( + focusNode: amountFocusNode, + controller: amountController, + enabled: isAmountEditable, + textAlign: TextAlign.left, + keyboardType: const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), + inputFormatters: [ + FilteringTextInputFormatter.deny(RegExp('[\\-|\\ ]')), + ], + hintText: hintText ?? '0.0000', + borderColor: Colors.transparent, + textStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: textColor, + ), + placeholderTextStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: currentTheme == ThemeType.light + ? Theme.of(context).appBarTheme.titleTextStyle!.color! + : Theme.of(context).extension()!.hintTextColor, + ), + validator: isAmountEditable ? currencyValueValidator : null, + ), + ), + ), + if (allAmountButton) + Container( + height: 32, + width: 32, + decoration: BoxDecoration( + color: Theme.of(context).extension()!.textFieldButtonColor, + borderRadius: const BorderRadius.all(Radius.circular(6)), + ), + child: InkWell( + onTap: allAmountCallback, + child: Center( + child: Text( + S.of(context).all, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Theme.of(context) + .extension()! + .textFieldButtonIconColor, + ), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ); } } diff --git a/lib/src/screens/receive/widgets/qr_widget.dart b/lib/src/screens/receive/widgets/qr_widget.dart index bbfd4d5c1..9f0db059a 100644 --- a/lib/src/screens/receive/widgets/qr_widget.dart +++ b/lib/src/screens/receive/widgets/qr_widget.dart @@ -1,11 +1,15 @@ import 'package:cake_wallet/entities/qr_view_data.dart'; +import 'package:cake_wallet/themes/extensions/picker_theme.dart'; import 'package:cake_wallet/themes/extensions/qr_code_theme.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart'; import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart'; +import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/utils/brightness_util.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cw_core/crypto_currency.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -38,6 +42,10 @@ class QRWidget extends StatelessWidget { final copyImage = Image.asset('assets/images/copy_address.png', color: Theme.of(context).extension()!.qrWidgetCopyButtonColor); + // This magic number for wider screen sets the text input focus at center of the inputfield + final _width = + responsiveLayoutUtil.shouldRenderMobileUI ? MediaQuery.of(context).size.width : 500; + return Center( child: SingleChildScrollView( child: Column( @@ -85,8 +93,9 @@ class QRWidget extends StatelessWidget { decoration: BoxDecoration( border: Border.all( width: 3, - color: - Theme.of(context).extension()!.textColor, + color: Theme.of(context) + .extension()! + .textColor, ), ), child: Container( @@ -116,20 +125,23 @@ class QRWidget extends StatelessWidget { children: [ Expanded( child: Form( - key: formKey, - child: CurrencyInputField( - focusNode: amountTextFieldFocusNode, - controller: amountController, - onTapPicker: () => _presentPicker(context), - selectedCurrency: addressListViewModel.selectedCurrency, - isLight: isLight, - ), - ), + key: formKey, + child: CurrencyAmountTextField( + selectedCurrency: _currencyName, + amountFocusNode: amountTextFieldFocusNode, + amountController: amountController, + padding: EdgeInsets.only(top: 20, left: _width / 4), + currentTheme: isLight ? ThemeType.light : ThemeType.dark, + isAmountEditable: true, + tag: addressListViewModel.selectedCurrency.tag, + onTapPicker: () => _presentPicker(context), + isPickerEnable: true)), ), ], ), ); }), + Divider(height: 1, color: Theme.of(context).extension()!.dividerColor), Padding( padding: EdgeInsets.only(top: 20, bottom: 8), child: Builder( @@ -150,7 +162,8 @@ class QRWidget extends StatelessWidget { style: TextStyle( fontSize: 15, fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.textColor), + color: + Theme.of(context).extension()!.textColor), ), ), Padding( @@ -169,6 +182,13 @@ class QRWidget extends StatelessWidget { ); } + String get _currencyName { + if (addressListViewModel.selectedCurrency is CryptoCurrency) { + return (addressListViewModel.selectedCurrency as CryptoCurrency).title.toUpperCase(); + } + return addressListViewModel.selectedCurrency.name.toUpperCase(); + } + void _presentPicker(BuildContext context) async { await showPopUp( builder: (_) => CurrencyPicker( diff --git a/lib/src/screens/send/send_template_page.dart b/lib/src/screens/send/send_template_page.dart index 76414ecb2..f7c9da082 100644 --- a/lib/src/screens/send/send_template_page.dart +++ b/lib/src/screens/send/send_template_page.dart @@ -144,7 +144,7 @@ class SendTemplatePage extends BasePage { .toList(); sendTemplateViewModel.addTemplate( - isCurrencySelected: mainTemplate.isCurrencySelected, + isCurrencySelected: mainTemplate.isCryptoSelected, name: mainTemplate.name, address: mainTemplate.address, cryptoCurrency: mainTemplate.selectedCurrency.title, diff --git a/lib/src/screens/send/widgets/prefix_currency_icon_widget.dart b/lib/src/screens/send/widgets/prefix_currency_icon_widget.dart deleted file mode 100644 index d30349066..000000000 --- a/lib/src/screens/send/widgets/prefix_currency_icon_widget.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; -import 'package:flutter/material.dart'; - -class PrefixCurrencyIcon extends StatelessWidget { - PrefixCurrencyIcon({ - required this.isSelected, - required this.title, - this.onTap, - }); - - final bool isSelected; - final String title; - final Function()? onTap; - - @override - Widget build(BuildContext context) { - return GestureDetector( - onTap: onTap, - child: Padding( - padding: EdgeInsets.fromLTRB(0, 6.0, 8.0, 0), - child: Column( - children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 4, horizontal: 8), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(26), - color: isSelected - ? Theme.of(context) - .extension()! - .templateSelectedCurrencyBackgroundColor - : Colors.transparent, - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (onTap != null) - Padding( - padding: EdgeInsets.only(right: 5), - child: Image.asset( - 'assets/images/arrow_bottom_purple_icon.png', - color: Colors.white, - height: 8, - ), - ), - Text( - title + ':', - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: isSelected - ? Theme.of(context) - .extension()! - .templateSelectedCurrencyTitleColor - : Colors.white, - ), - ), - ], - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index ec833159f..e2e7f25da 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/entities/priority_for_wallet_type.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart'; @@ -207,166 +208,19 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin Padding( - padding: const EdgeInsets.only(top: 20), - child: Row( - children: [ - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: Row( - children: [ - sendViewModel.hasMultipleTokens - ? Container( - padding: EdgeInsets.only(right: 8), - height: 32, - child: InkWell( - onTap: () => _presentPicker(context), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: EdgeInsets.only(right: 5), - child: Image.asset( - 'assets/images/arrow_bottom_purple_icon.png', - color: Colors.white, - height: 8, - ), - ), - Text( - sendViewModel.selectedCryptoCurrency.title, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 16, - color: Colors.white), - ), - ], - ), - ), - ) - : Text( - sendViewModel.selectedCryptoCurrency.title, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 16, - color: Colors.white), - ), - sendViewModel.selectedCryptoCurrency.tag != null - ? Padding( - padding: const EdgeInsets.fromLTRB(3.0, 0, 3.0, 0), - child: Container( - height: 32, - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldButtonColor, - borderRadius: BorderRadius.all( - Radius.circular(6), - )), - child: Center( - child: Padding( - padding: const EdgeInsets.all(6.0), - child: Text( - sendViewModel.selectedCryptoCurrency.tag!, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Theme.of(context) - .extension()! - .textFieldButtonIconColor), - ), - ), - ), - ), - ) - : Container(), - Padding( - padding: const EdgeInsets.only(right: 10.0), - child: Text( - ':', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 16, - color: Colors.white), - ), - ), - ], - ), - ), - Expanded( - child: Stack( - children: [ - BaseTextFormField( - focusNode: cryptoAmountFocus, - controller: cryptoAmountController, - keyboardType: TextInputType.numberWithOptions( - signed: false, decimal: true), - inputFormatters: [ - FilteringTextInputFormatter.deny(RegExp('[\\-|\\ ]')) - ], - suffixIcon: SizedBox( - width: prefixIconWidth, - ), - hintText: '0.0000', - borderColor: Colors.transparent, - textStyle: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: Colors.white), - placeholderTextStyle: TextStyle( - color: Theme.of(context) - .extension()! - .textFieldHintColor, - fontWeight: FontWeight.w500, - fontSize: 14), - validator: output.sendAll - ? sendViewModel.allAmountValidator - : sendViewModel.amountValidator, - ), - if (!sendViewModel.isBatchSending) - Positioned( - top: 2, - right: 0, - child: Container( - width: prefixIconWidth, - height: prefixIconHeight, - child: InkWell( - onTap: () async { - output.setSendAll(sendViewModel.balance); - }, - child: Container( - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldButtonColor, - borderRadius: BorderRadius.all( - Radius.circular(6), - ), - ), - child: Center( - child: Text( - S.of(context).all, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Theme.of(context) - .extension()! - .textFieldButtonIconColor, - ), - ), - ), - ), - ), - ), - ), - ], - ), - ), - ], - )), - ), + CurrencyAmountTextField( + selectedCurrency: sendViewModel.selectedCryptoCurrency.title, + amountFocusNode: cryptoAmountFocus, + amountController: cryptoAmountController, + isAmountEditable: true, + onTapPicker: () => _presentPicker(context), + isPickerEnable: sendViewModel.hasMultipleTokens, + tag: sendViewModel.selectedCryptoCurrency.tag, + allAmountButton: !sendViewModel.isBatchSending, + currencyValueValidator: output.sendAll + ? sendViewModel.allAmountValidator + : sendViewModel.amountValidator, + allAmountCallback: () async => output.setSendAll(sendViewModel.balance)), Divider( height: 1, color: Theme.of(context).extension()!.textFieldHintColor), @@ -402,41 +256,16 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin()!.textFieldBorderColor, - textStyle: TextStyle( - fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), - placeholderTextStyle: TextStyle( - color: - Theme.of(context).extension()!.textFieldHintColor, - fontWeight: FontWeight.w500, - fontSize: 14), - ), - ), + isAmountEditable: true, + allAmountButton: false), + Divider( + height: 1, + color: Theme.of(context).extension()!.textFieldHintColor), Padding( padding: EdgeInsets.only(top: 20), child: BaseTextFormField( @@ -715,12 +544,11 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin( context: context, builder: (_) => CurrencyPicker( - selectedAtIndex: sendViewModel.currencies.indexOf(sendViewModel.selectedCryptoCurrency), - items: sendViewModel.currencies, - hintText: S.of(context).search_currency, - onItemSelected: (Currency cur) => - sendViewModel.selectedCryptoCurrency = (cur as CryptoCurrency), - ), + selectedAtIndex: sendViewModel.currencies.indexOf(sendViewModel.selectedCryptoCurrency), + items: sendViewModel.currencies, + hintText: S.of(context).search_currency, + onItemSelected: (Currency cur) => + sendViewModel.selectedCryptoCurrency = (cur as CryptoCurrency)), ); } diff --git a/lib/src/screens/send/widgets/send_template_card.dart b/lib/src/screens/send/widgets/send_template_card.dart index 4f62616e3..bf2a66b73 100644 --- a/lib/src/screens/send/widgets/send_template_card.dart +++ b/lib/src/screens/send/widgets/send_template_card.dart @@ -1,5 +1,5 @@ import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart'; -import 'package:cake_wallet/src/screens/send/widgets/prefix_currency_icon_widget.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; @@ -59,7 +59,8 @@ class SendTemplateCard extends StatelessWidget { hintText: sendTemplateViewModel.recipients.length > 1 ? S.of(context).template_name : S.of(context).send_name, - borderColor: Theme.of(context).extension()!.textFieldBorderColor, + borderColor: + Theme.of(context).extension()!.textFieldBorderColor, textStyle: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), placeholderTextStyle: TextStyle( @@ -69,107 +70,87 @@ class SendTemplateCard extends StatelessWidget { validator: sendTemplateViewModel.templateValidator), Padding( padding: EdgeInsets.only(top: 20), - child: Observer( - builder: (context) { - return AddressTextField( - selectedCurrency: template.selectedCurrency, - controller: _addressController, - onURIScanned: (uri) { - final paymentRequest = PaymentRequest.fromUri(uri); - _addressController.text = paymentRequest.address; - _cryptoAmountController.text = paymentRequest.amount; - }, - options: [ - AddressTextFieldOption.paste, - AddressTextFieldOption.qrCode, - AddressTextFieldOption.addressBook - ], - onPushPasteButton: (context) async { - template.output.resetParsedAddress(); - await template.output.fetchParsedAddress(context); - }, - onPushAddressBookButton: (context) async { - template.output.resetParsedAddress(); - await template.output.fetchParsedAddress(context); - }, - buttonColor: Theme.of(context).extension()!.textFieldButtonColor, - borderColor: Theme.of(context).extension()!.textFieldBorderColor, - textStyle: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: Colors.white, - ), - hintStyle: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.textFieldHintColor, - ), - validator: sendTemplateViewModel.addressValidator, - ); - } - ), - ), - Padding( - padding: const EdgeInsets.only(top: 20), - child: Focus( - onFocusChange: (hasFocus) { - if (hasFocus) { - template.selectCurrency(); - } - }, - child: BaseTextFormField( - focusNode: _cryptoAmountFocus, - controller: _cryptoAmountController, - keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true), - inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\\-|\\ ]'))], - prefixIcon: Observer( - builder: (_) => PrefixCurrencyIcon( - title: template.selectedCurrency.title, - isSelected: template.isCurrencySelected, - onTap: sendTemplateViewModel.walletCurrencies.length > 1 - ? () => _presentPicker(context) - : null, - ), - ), - hintText: '0.0000', - borderColor: Theme.of(context).extension()!.textFieldBorderColor, - textStyle: - TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), - placeholderTextStyle: TextStyle( - color: Theme.of(context).extension()!.textFieldHintColor, - fontWeight: FontWeight.w500, - fontSize: 14), - validator: sendTemplateViewModel.amountValidator, - ), - ), - ), - Padding( - padding: const EdgeInsets.only(top: 20), - child: Focus( - onFocusChange: (hasFocus) { - if (hasFocus) { - template.selectFiat(); - } - }, - child: BaseTextFormField( - focusNode: _fiatAmountFocus, - controller: _fiatAmountController, - keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true), - inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\\-|\\ ]'))], - prefixIcon: Observer( - builder: (_) => PrefixCurrencyIcon( - title: sendTemplateViewModel.fiatCurrency, - isSelected: template.isFiatSelected)), - hintText: '0.00', - borderColor: Theme.of(context).extension()!.textFieldBorderColor, - textStyle: - TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), - placeholderTextStyle: TextStyle( - color: Theme.of(context).extension()!.textFieldHintColor, - fontWeight: FontWeight.w500, + child: Observer(builder: (context) { + return AddressTextField( + selectedCurrency: template.selectedCurrency, + controller: _addressController, + onURIScanned: (uri) { + final paymentRequest = PaymentRequest.fromUri(uri); + _addressController.text = paymentRequest.address; + _cryptoAmountController.text = paymentRequest.amount; + }, + options: [ + AddressTextFieldOption.paste, + AddressTextFieldOption.qrCode, + AddressTextFieldOption.addressBook + ], + onPushPasteButton: (context) async { + template.output.resetParsedAddress(); + await template.output.fetchParsedAddress(context); + }, + onPushAddressBookButton: (context) async { + template.output.resetParsedAddress(); + await template.output.fetchParsedAddress(context); + }, + buttonColor: + Theme.of(context).extension()!.textFieldButtonColor, + borderColor: + Theme.of(context).extension()!.textFieldBorderColor, + textStyle: TextStyle( fontSize: 14, + fontWeight: FontWeight.w500, + color: Colors.white, ), - ), + hintStyle: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.textFieldHintColor, + ), + validator: sendTemplateViewModel.addressValidator, + ); + }), + ), + Focus( + onFocusChange: (hasFocus) { + if (hasFocus) template.setCryptoCurrency(true); + }, + child: Column( + children: [ + Observer( + builder: (context) => CurrencyAmountTextField( + selectedCurrency: template.selectedCurrency.title, + amountFocusNode: _cryptoAmountFocus, + amountController: _cryptoAmountController, + isSelected: template.isCryptoSelected, + tag: template.selectedCurrency.tag, + isPickerEnable: sendTemplateViewModel.hasMultipleTokens, + onTapPicker: () => _presentPicker(context), + currencyValueValidator: sendTemplateViewModel.amountValidator, + isAmountEditable: true)), + Divider( + height: 1, + color: Theme.of(context).extension()!.textFieldBorderColor) + ], + ), + ), + Focus( + onFocusChange: (hasFocus) { + if (hasFocus) template.setCryptoCurrency(false); + }, + child: Column( + children: [ + Observer( + builder: (context) => CurrencyAmountTextField( + selectedCurrency: sendTemplateViewModel.fiatCurrency, + amountFocusNode: _fiatAmountFocus, + amountController: _fiatAmountController, + isSelected: !template.isCryptoSelected, + hintText: '0.00', + isAmountEditable: true)), + Divider( + height: 1, + color: Theme.of(context).extension()!.textFieldBorderColor) + ], ), ), ], diff --git a/lib/view_model/send/send_template_view_model.dart b/lib/view_model/send/send_template_view_model.dart index 66a3c37c8..3c78f3000 100644 --- a/lib/view_model/send/send_template_view_model.dart +++ b/lib/view_model/send/send_template_view_model.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/reactions/wallet_connect.dart'; import 'package:cake_wallet/view_model/send/template_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/wallet_type.dart'; @@ -97,4 +98,8 @@ abstract class SendTemplateViewModelBase with Store { @computed List get walletCurrencies => _wallet.balance.keys.toList(); + + bool get hasMultipleTokens => isEVMCompatibleChain(_wallet.type) || + _wallet.type == WalletType.solana || + _wallet.type == WalletType.tron; } diff --git a/lib/view_model/send/template_view_model.dart b/lib/view_model/send/template_view_model.dart index 5b799c343..fcd40bd43 100644 --- a/lib/view_model/send/template_view_model.dart +++ b/lib/view_model/send/template_view_model.dart @@ -40,35 +40,22 @@ abstract class TemplateViewModelBase with Store { CryptoCurrency _currency; @observable - bool isCurrencySelected = true; - - @observable - bool isFiatSelected = false; + bool isCryptoSelected = true; @action - void selectCurrency() { - isCurrencySelected = true; - isFiatSelected = false; - } - - @action - void selectFiat() { - isFiatSelected = true; - isCurrencySelected = false; - } + void setCryptoCurrency(bool value) => isCryptoSelected = value; @action void reset() { name = ''; address = ''; - isCurrencySelected = true; - isFiatSelected = false; + isCryptoSelected = true; output.reset(); } Template toTemplate({required String cryptoCurrency, required String fiatCurrency}) { return Template( - isCurrencySelectedRaw: isCurrencySelected, + isCurrencySelectedRaw: isCryptoSelected, nameRaw: name, addressRaw: address, cryptoCurrencyRaw: cryptoCurrency, @@ -79,7 +66,7 @@ abstract class TemplateViewModelBase with Store { @action void changeSelectedCurrency(CryptoCurrency currency) { - isCurrencySelected = true; + isCryptoSelected = true; _currency = currency; } From acadee6ed54f58c8001b136ff4cf439894a8aed5 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Aug 2024 00:49:27 +0300 Subject: [PATCH 27/77] fix custom rate issue (#1579) Co-authored-by: Omar Hatem --- lib/bitcoin/cw_bitcoin.dart | 7 +++++++ .../rbf_details_list_fee_picker_item.dart | 2 +- lib/src/widgets/standard_picker_list.dart | 5 +++-- lib/view_model/transaction_details_view_model.dart | 10 +++++++--- tool/configure.dart | 1 + 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index efb1211bc..a92aaad74 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -435,6 +435,13 @@ class CWBitcoin extends Bitcoin { ); } + @override + int feeAmountWithFeeRate(Object wallet, int feeRate, int inputsCount, int outputsCount, + {int? size}) { + final bitcoinWallet = wallet as ElectrumWallet; + return bitcoinWallet.feeAmountWithFeeRate(feeRate, inputsCount, outputsCount, size: size); + } + @override int getMaxCustomFeeRate(Object wallet) { final bitcoinWallet = wallet as ElectrumWallet; diff --git a/lib/src/screens/transaction_details/rbf_details_list_fee_picker_item.dart b/lib/src/screens/transaction_details/rbf_details_list_fee_picker_item.dart index 7615065d7..db3d94500 100644 --- a/lib/src/screens/transaction_details/rbf_details_list_fee_picker_item.dart +++ b/lib/src/screens/transaction_details/rbf_details_list_fee_picker_item.dart @@ -17,7 +17,7 @@ class StandardPickerListItem extends TransactionDetailsListItem { final List items; final String Function(T item, double sliderValue) displayItem; final Function(double) onSliderChanged; - final Function(T) onItemSelected; + final Function(T item, double sliderValue) onItemSelected; final int selectedIdx; final double? maxValue; final int customItemIndex; diff --git a/lib/src/widgets/standard_picker_list.dart b/lib/src/widgets/standard_picker_list.dart index ea8b07097..0e9831420 100644 --- a/lib/src/widgets/standard_picker_list.dart +++ b/lib/src/widgets/standard_picker_list.dart @@ -23,7 +23,7 @@ class StandardPickerList extends StatefulWidget { final int customItemIndex; final String Function(T item, double sliderValue) displayItem; final Function(double) onSliderChanged; - final Function(T) onItemSelected; + final Function(T item, double sliderValue) onItemSelected; final String value; final int selectedIdx; final double customValue; @@ -50,6 +50,7 @@ class _StandardPickerListState extends State> { @override Widget build(BuildContext context) { String adaptedDisplayItem(T item) => widget.displayItem(item, customValue); + String adaptedOnItemSelected(T item) => widget.onItemSelected(item, customValue).toString(); return Column( children: [ @@ -74,7 +75,7 @@ class _StandardPickerListState extends State> { }, onItemSelected: (T item) { setState(() => selectedIdx = widget.items.indexOf(item)); - value = widget.onItemSelected(item).toString(); + value = adaptedOnItemSelected(item); }, ), ), diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index 9e71837a7..ef6474974 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -378,9 +378,9 @@ abstract class TransactionDetailsViewModelBase with Store { sendViewModel.displayFeeRate(priority, sliderValue.round()), onSliderChanged: (double newValue) => setNewFee(value: newValue, priority: transactionPriority!), - onItemSelected: (dynamic item) { + onItemSelected: (dynamic item, double sliderValue) { transactionPriority = item as TransactionPriority; - return setNewFee(priority: transactionPriority!); + return setNewFee(value: sliderValue, priority: transactionPriority!); })); if (transactionInfo.inputAddresses != null) { @@ -427,7 +427,11 @@ abstract class TransactionDetailsViewModelBase with Store { String setNewFee({double? value, required TransactionPriority priority}) { newFee = priority == bitcoin!.getBitcoinTransactionPriorityCustom() && value != null - ? bitcoin!.getEstimatedFeeWithFeeRate(wallet, value.round(), transactionInfo.amount) + ? bitcoin!.feeAmountWithFeeRate( + wallet, + value.round(), + transactionInfo.inputAddresses?.length ?? 1, + transactionInfo.outputAddresses?.length ?? 1) : bitcoin!.getFeeAmountForPriority( wallet, priority, diff --git a/tool/configure.dart b/tool/configure.dart index 32b470979..8b5af92b2 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -210,6 +210,7 @@ abstract class Bitcoin { int getFeeAmountForPriority(Object wallet, TransactionPriority priority, int inputsCount, int outputsCount, {int? size}); int getEstimatedFeeWithFeeRate(Object wallet, int feeRate, int? amount, {int? outputsCount, int? size}); + int feeAmountWithFeeRate(Object wallet, int feeRate, int inputsCount, int outputsCount, {int? size}); int getHeightByDate({required DateTime date}); Future rescan(Object wallet, {required int height, bool? doSingleScan}); Future getNodeIsElectrsSPEnabled(Object wallet); From 9c29dbd6fd7823e4deb5da871b752087ca8ef06f Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Aug 2024 01:18:55 +0300 Subject: [PATCH 28/77] fix zero initial fee rates in RBF rate picker (#1585) * fix zero initial fee rates in RBF rate picker * fix for other settings page[skip ci] --- lib/di.dart | 4 ++-- lib/src/screens/settings/other_settings_page.dart | 7 ++++++- .../transaction_details/transaction_details_page.dart | 7 ++++++- lib/src/widgets/picker.dart | 4 ++-- lib/view_model/settings/other_settings_view_model.dart | 4 +++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index a37574f21..a64270f6d 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -759,8 +759,8 @@ Future setup({ getIt.registerFactory(() => TrocadorProvidersViewModel(getIt.get())); getIt.registerFactory(() { - return OtherSettingsViewModel(getIt.get(), getIt.get().wallet!); - }); + return OtherSettingsViewModel(getIt.get(), getIt.get().wallet!, + getIt.get());}); getIt.registerFactory(() { return SecuritySettingsViewModel(getIt.get()); diff --git a/lib/src/screens/settings/other_settings_page.dart b/lib/src/screens/settings/other_settings_page.dart index 9bba51944..137f699f5 100644 --- a/lib/src/screens/settings/other_settings_page.dart +++ b/lib/src/screens/settings/other_settings_page.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/entities/priority_for_wallet_type.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; @@ -12,7 +13,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; class OtherSettingsPage extends BasePage { - OtherSettingsPage(this._otherSettingsViewModel); + OtherSettingsPage(this._otherSettingsViewModel) { + if (_otherSettingsViewModel.sendViewModel.isElectrumWallet) { + bitcoin!.updateFeeRates(_otherSettingsViewModel.sendViewModel.wallet); + } + } @override String get title => S.current.other_settings; diff --git a/lib/src/screens/transaction_details/transaction_details_page.dart b/lib/src/screens/transaction_details/transaction_details_page.dart index 7734f37ed..d06b935dd 100644 --- a/lib/src/screens/transaction_details/transaction_details_page.dart +++ b/lib/src/screens/transaction_details/transaction_details_page.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; @@ -15,7 +16,11 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; class TransactionDetailsPage extends BasePage { - TransactionDetailsPage({required this.transactionDetailsViewModel}); + TransactionDetailsPage({required this.transactionDetailsViewModel}) { + if (transactionDetailsViewModel.sendViewModel.isElectrumWallet) { + bitcoin!.updateFeeRates(transactionDetailsViewModel.sendViewModel.wallet); + } + } @override String get title => S.current.transaction_details_title; diff --git a/lib/src/widgets/picker.dart b/lib/src/widgets/picker.dart index b744d1db0..a7cb03a4e 100644 --- a/lib/src/widgets/picker.dart +++ b/lib/src/widgets/picker.dart @@ -499,10 +499,10 @@ class _PickerState extends State> { children: [ Expanded( child: Slider( - value: widget.sliderValue ?? 1, + value: widget.sliderValue == null || widget.sliderValue! < 1 ? 1 : widget.sliderValue!, onChanged: isActivated ? widget.onSliderChanged : null, min: widget.minValue ?? 1, - max: widget.maxValue ?? 100, + max: (widget.maxValue == null || widget.maxValue! < 1) ? 100 : widget.maxValue!, divisions: 100, ), ), diff --git a/lib/view_model/settings/other_settings_view_model.dart b/lib/view_model/settings/other_settings_view_model.dart index bd04755fa..9af8c67cf 100644 --- a/lib/view_model/settings/other_settings_view_model.dart +++ b/lib/view_model/settings/other_settings_view_model.dart @@ -4,6 +4,7 @@ import 'package:cake_wallet/entities/provider_types.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/package_info.dart'; +import 'package:cake_wallet/view_model/send/send_view_model.dart'; // import 'package:package_info/package_info.dart'; import 'package:collection/collection.dart'; import 'package:cw_core/balance.dart'; @@ -20,7 +21,7 @@ class OtherSettingsViewModel = OtherSettingsViewModelBase with _$OtherSettingsViewModel; abstract class OtherSettingsViewModelBase with Store { - OtherSettingsViewModelBase(this._settingsStore, this._wallet) + OtherSettingsViewModelBase(this._settingsStore, this._wallet, this.sendViewModel) : walletType = _wallet.type, currentVersion = '' { PackageInfo.fromPlatform().then( @@ -42,6 +43,7 @@ abstract class OtherSettingsViewModelBase with Store { String currentVersion; final SettingsStore _settingsStore; + final SendViewModel sendViewModel; @computed TransactionPriority get transactionPriority { From b412d45f0e3a97758aa5b438c90979f2a39bb324 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Aug 2024 01:21:26 +0300 Subject: [PATCH 29/77] Cw 567 cant swipe through menus on desktop builds (#1563) * MaterialApp scrollBehavior * accessibility improvements --- lib/app_scroll_behavior.dart | 9 +++++ lib/main.dart | 3 ++ lib/src/screens/dashboard/dashboard_page.dart | 6 +++- .../screens/dashboard/pages/balance_page.dart | 23 +++++++----- .../screens/restore/wallet_restore_page.dart | 26 ++++++++------ lib/src/screens/send/send_page.dart | 9 +++-- lib/src/screens/send/send_template_page.dart | 36 +++++++++++-------- 7 files changed, 75 insertions(+), 37 deletions(-) create mode 100644 lib/app_scroll_behavior.dart diff --git a/lib/app_scroll_behavior.dart b/lib/app_scroll_behavior.dart new file mode 100644 index 000000000..d5abd5688 --- /dev/null +++ b/lib/app_scroll_behavior.dart @@ -0,0 +1,9 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; + +class AppScrollBehavior extends MaterialScrollBehavior { + @override + Set get dragDevices => + {PointerDeviceKind.touch, PointerDeviceKind.mouse, PointerDeviceKind.trackpad}; +} diff --git a/lib/main.dart b/lib/main.dart index 014d5f011..1c0078e16 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart'; +import 'package:cake_wallet/app_scroll_behavior.dart'; import 'package:cake_wallet/buy/order.dart'; import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/di.dart'; @@ -75,6 +76,7 @@ Future main() async { runApp( MaterialApp( debugShowCheckedModeBanner: false, + scrollBehavior: AppScrollBehavior(), home: Scaffold( body: SingleChildScrollView( child: Container( @@ -297,6 +299,7 @@ class AppState extends State with SingleTickerProviderStateMixin { locale: Locale(settingsStore.languageCode), onGenerateRoute: (settings) => Router.createRoute(settings), initialRoute: initialRoute, + scrollBehavior: AppScrollBehavior(), home: _Home(), )); }); diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 7a2055930..ad6e68cd8 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -237,7 +237,11 @@ class _DashboardPageView extends BasePage { padding: EdgeInsets.only(bottom: 24, top: 10), child: Observer( builder: (context) { - return ExcludeSemantics( + return Semantics( + button: false, + label: 'Page Indicator', + hint: 'Swipe to change page', + excludeSemantics: true, child: SmoothPageIndicator( controller: controller, count: pages.length, diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 1cf3e3e0c..770cda6f9 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -23,6 +23,7 @@ import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/nft_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -469,15 +470,19 @@ class BalanceRowWidget extends StatelessWidget { children: [ Row( children: [ - Text('${availableBalanceLabel}', - style: TextStyle( - fontSize: 12, - fontFamily: 'Lato', - fontWeight: FontWeight.w400, - color: Theme.of(context) - .extension()! - .labelTextColor, - height: 1)), + Semantics( + hint: 'Double tap to see more information', + container: true, + child: Text('${availableBalanceLabel}', + style: TextStyle( + fontSize: 12, + fontFamily: 'Lato', + fontWeight: FontWeight.w400, + color: Theme.of(context) + .extension()! + .labelTextColor, + height: 1)), + ), if (hasAdditionalBalance) Padding( padding: const EdgeInsets.symmetric(horizontal: 4), diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index a9bd52b26..746b73dca 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -177,16 +177,22 @@ class WalletRestorePage extends BasePage { if (_pages.length > 1) Padding( padding: EdgeInsets.only(top: 10), - child: SmoothPageIndicator( - controller: _controller, - count: _pages.length, - effect: ColorTransitionEffect( - spacing: 6.0, - radius: 6.0, - dotWidth: 6.0, - dotHeight: 6.0, - dotColor: Theme.of(context).hintColor.withOpacity(0.5), - activeDotColor: Theme.of(context).hintColor, + child: Semantics( + button: false, + label: 'Page Indicator', + hint: 'Swipe to change restore mode', + excludeSemantics: true, + child: SmoothPageIndicator( + controller: _controller, + count: _pages.length, + effect: ColorTransitionEffect( + spacing: 6.0, + radius: 6.0, + dotWidth: 6.0, + dotHeight: 6.0, + dotColor: Theme.of(context).hintColor.withOpacity(0.5), + activeDotColor: Theme.of(context).hintColor, + ), ), ), ), diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index b46a7f3db..97a7ad88d 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -212,7 +212,12 @@ class SendPage extends BasePage { final count = sendViewModel.outputs.length; return count > 1 - ? SmoothPageIndicator( + ? Semantics ( + label: 'Page Indicator', + hint: 'Swipe to change receiver', + excludeSemantics: true, + child: + SmoothPageIndicator( controller: controller, count: count, effect: ScrollingDotsEffect( @@ -226,7 +231,7 @@ class SendPage extends BasePage { activeDotColor: Theme.of(context) .extension()! .templateBackgroundColor), - ) + )) : Offstage(); }, ), diff --git a/lib/src/screens/send/send_template_page.dart b/lib/src/screens/send/send_template_page.dart index f7c9da082..5db70c0eb 100644 --- a/lib/src/screens/send/send_template_page.dart +++ b/lib/src/screens/send/send_template_page.dart @@ -94,21 +94,27 @@ class SendTemplatePage extends BasePage { final count = sendTemplateViewModel.recipients.length; return count > 1 - ? SmoothPageIndicator( - controller: controller, - count: count, - effect: ScrollingDotsEffect( - spacing: 6.0, - radius: 6.0, - dotWidth: 6.0, - dotHeight: 6.0, - dotColor: Theme.of(context) - .extension()! - .indicatorDotColor, - activeDotColor: Theme.of(context) - .extension()! - .indicatorDotTheme - .activeIndicatorColor)) + ? Semantics( + button: false, + label: 'Page Indicator', + hint: 'Swipe to change receiver', + excludeSemantics: true, + child: SmoothPageIndicator( + controller: controller, + count: count, + effect: ScrollingDotsEffect( + spacing: 6.0, + radius: 6.0, + dotWidth: 6.0, + dotHeight: 6.0, + dotColor: Theme.of(context) + .extension()! + .indicatorDotColor, + activeDotColor: Theme.of(context) + .extension()! + .indicatorDotTheme + .activeIndicatorColor)), + ) : Offstage(); }, ), From 96baf460f3492d1d5e4320b581bae79180b33790 Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Sat, 10 Aug 2024 00:02:47 +0100 Subject: [PATCH 30/77] Filters out TRC10 spam transactions and modifies Solana error messages (#1587) * fix: Tron and solana fixes * fix: Disable send all for solana wallets * fix: Add localization and add tostring to get more info on error * fix: Fix spelling for comment --------- Co-authored-by: Omar Hatem --- cw_solana/lib/solana_client.dart | 2 +- cw_solana/pubspec.yaml | 2 +- cw_tron/lib/tron_wallet.dart | 5 +++++ lib/src/screens/send/widgets/send_card.dart | 2 +- lib/view_model/send/send_view_model.dart | 10 ++++++++-- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 1 + res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + 31 files changed, 42 insertions(+), 5 deletions(-) diff --git a/cw_solana/lib/solana_client.dart b/cw_solana/lib/solana_client.dart index 38f2864df..23e88fe5e 100644 --- a/cw_solana/lib/solana_client.dart +++ b/cw_solana/lib/solana_client.dart @@ -456,7 +456,7 @@ class SolanaWalletClient { funder: ownerKeypair, ); } catch (e) { - throw Exception('Insufficient SOL balance to complete this transaction'); + throw Exception('Insufficient SOL balance to complete this transaction: ${e.toString()}'); } // Input by the user diff --git a/cw_solana/pubspec.yaml b/cw_solana/pubspec.yaml index 6b59282b4..6fd5cd97c 100644 --- a/cw_solana/pubspec.yaml +++ b/cw_solana/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - solana: ^0.30.1 + solana: ^0.30.4 cw_core: path: ../cw_core http: ^1.1.0 diff --git a/cw_tron/lib/tron_wallet.dart b/cw_tron/lib/tron_wallet.dart index cb4c9c024..3566dcd94 100644 --- a/cw_tron/lib/tron_wallet.dart +++ b/cw_tron/lib/tron_wallet.dart @@ -349,6 +349,11 @@ abstract class TronWalletBase continue; } + // Filter out spam transaactions that involve receiving TRC10 assets transaction, we deal with TRX and TRC20 transactions + if (transactionModel.contracts?.first.type == "TransferAssetContract") { + continue; + } + String? tokenSymbol; if (transactionModel.contractAddress != null) { final tokenAddress = TronAddress(transactionModel.contractAddress!); diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index e2e7f25da..0a3de3e58 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -216,7 +216,7 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin _presentPicker(context), isPickerEnable: sendViewModel.hasMultipleTokens, tag: sendViewModel.selectedCryptoCurrency.tag, - allAmountButton: !sendViewModel.isBatchSending, + allAmountButton: !sendViewModel.isBatchSending && sendViewModel.shouldDisplaySendALL, currencyValueValidator: output.sendAll ? sendViewModel.allAmountValidator : sendViewModel.amountValidator, diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index a1997e81d..d0514bb19 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -118,7 +118,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor @computed bool get isBatchSending => outputs.length > 1; - bool get shouldDisplaySendALL => walletType != WalletType.solana || walletType != WalletType.tron; + bool get shouldDisplaySendALL => walletType != WalletType.solana; @computed String get pendingTransactionFiatAmount { @@ -582,9 +582,15 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor ) { String errorMessage = error.toString(); + if (walletType == WalletType.solana) { + if (errorMessage.contains('insufficient funds for rent')) { + return S.current.insufficientFundsForRentError; + } + + return errorMessage; + } if (walletType == WalletType.ethereum || walletType == WalletType.polygon || - walletType == WalletType.solana || walletType == WalletType.haven) { if (errorMessage.contains('gas required exceeds allowance') || errorMessage.contains('insufficient funds')) { diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 435c7ccde..d543706fc 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -337,6 +337,7 @@ "incoming": "الواردة", "incorrect_seed": "النص الذي تم إدخاله غير صالح.", "inputs": "المدخلات", + "insufficientFundsForRentError": "ليس لديك ما يكفي من SOL لتغطية رسوم المعاملة والإيجار للحساب. يرجى إضافة المزيد من sol إلى محفظتك أو تقليل مبلغ sol الذي ترسله", "introducing_cake_pay": "نقدم لكم Cake Pay!", "invalid_input": "مدخل غير صالح", "invoice_details": "تفاصيل الفاتورة", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 84bcabf9f..ede60567d 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -337,6 +337,7 @@ "incoming": "Входящи", "incorrect_seed": "Въведеният текст е невалиден.", "inputs": "Входове", + "insufficientFundsForRentError": "Нямате достатъчно SOL, за да покриете таксата за транзакцията и наемането на сметката. Моля, добавете повече SOL към портфейла си или намалете сумата на SOL, която изпращате", "introducing_cake_pay": "Запознайте се с Cake Pay!", "invalid_input": "Невалиден вход", "invoice_details": "IДанни за фактура", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 731513bd7..8f2cda1e0 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -337,6 +337,7 @@ "incoming": "Příchozí", "incorrect_seed": "Zadaný text není správný.", "inputs": "Vstupy", + "insufficientFundsForRentError": "Nemáte dostatek SOL na pokrytí transakčního poplatku a nájemného za účet. Laskavě přidejte do své peněženky více SOL nebo snižte množství Sol, kterou odesíláte", "introducing_cake_pay": "Představujeme Cake Pay!", "invalid_input": "Neplatný vstup", "invoice_details": "detaily faktury", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 0f43e831d..59a23222c 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -337,6 +337,7 @@ "incoming": "Eingehend", "incorrect_seed": "Der eingegebene Text ist ungültig.", "inputs": "Eingänge", + "insufficientFundsForRentError": "Sie haben nicht genug SOL, um die Transaktionsgebühr und die Miete für das Konto zu decken. Bitte fügen Sie mehr Sol zu Ihrer Brieftasche hinzu oder reduzieren Sie den von Ihnen gesendeten Sol -Betrag", "introducing_cake_pay": "Einführung von Cake Pay!", "invalid_input": "Ungültige Eingabe", "invoice_details": "Rechnungs-Details", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index e4ef2119d..1bd3fc241 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -337,6 +337,7 @@ "incoming": "Incoming", "incorrect_seed": "The text entered is not valid.", "inputs": "Inputs", + "insufficientFundsForRentError": "You do not have enough SOL to cover the transaction fee and rent for the account. Kindly add more SOL to your wallet or reduce the SOL amount you\\'re sending", "introducing_cake_pay": "Introducing Cake Pay!", "invalid_input": "Invalid input", "invoice_details": "Invoice details", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 0b7dc4a28..dc8aa3b95 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -337,6 +337,7 @@ "incoming": "Entrante", "incorrect_seed": "El texto ingresado no es válido.", "inputs": "Entradas", + "insufficientFundsForRentError": "No tiene suficiente SOL para cubrir la tarifa de transacción y alquilar para la cuenta. Por favor, agregue más sol a su billetera o reduzca la cantidad de sol que está enviando", "introducing_cake_pay": "¡Presentamos Cake Pay!", "invalid_input": "Entrada inválida", "invoice_details": "Detalles de la factura", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index fad9576e8..f7c45f7ef 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -337,6 +337,7 @@ "incoming": "Entrantes", "incorrect_seed": "Le texte entré est invalide.", "inputs": "Contributions", + "insufficientFundsForRentError": "Vous n'avez pas assez de SOL pour couvrir les frais de transaction et le loyer pour le compte. Veuillez ajouter plus de Sol à votre portefeuille ou réduire la quantité de sol que vous envoyez", "introducing_cake_pay": "Présentation de Cake Pay !", "invalid_input": "Entrée invalide", "invoice_details": "Détails de la facture", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index de963a52d..a5805bbb8 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -337,6 +337,7 @@ "incoming": "Mai shigowa", "incorrect_seed": "rubutun da aka shigar ba shi da inganci.", "inputs": "Abubuwan da ke ciki", + "insufficientFundsForRentError": "Ba ku da isasshen Sol don rufe kuɗin ma'amala da haya don asusun. Da kyau ƙara ƙarin sool zuwa walat ɗinku ko rage adadin Sol ɗin da kuke aikawa", "introducing_cake_pay": "Gabatar da Cake Pay!", "invalid_input": "Shigar da ba daidai ba", "invoice_details": "Bayanin wadannan", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index edc301efe..4ab8e7534 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -337,6 +337,7 @@ "incoming": "आने वाली", "incorrect_seed": "दर्ज किया गया पाठ मान्य नहीं है।", "inputs": "इनपुट", + "insufficientFundsForRentError": "आपके पास लेन -देन शुल्क और खाते के लिए किराए को कवर करने के लिए पर्याप्त सोल नहीं है। कृपया अपने बटुए में अधिक सोल जोड़ें या सोल राशि को कम करें जिसे आप भेज रहे हैं", "introducing_cake_pay": "परिचय Cake Pay!", "invalid_input": "अमान्य निवेश", "invoice_details": "चालान विवरण", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 03dfcd2a1..67095ba8f 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -337,6 +337,7 @@ "incoming": "Dolazno", "incorrect_seed": "Uneseni tekst nije valjan.", "inputs": "Unosi", + "insufficientFundsForRentError": "Nemate dovoljno SOL -a za pokrivanje naknade za transakciju i najamninu za račun. Ljubazno dodajte više sol u svoj novčanik ili smanjite količinu SOL -a koju šaljete", "introducing_cake_pay": "Predstavljamo Cake Pay!", "invalid_input": "Pogrešan unos", "invoice_details": "Podaci o fakturi", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index f3276ff6c..939b938fe 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -337,6 +337,7 @@ "incoming": "Masuk", "incorrect_seed": "Teks yang dimasukkan tidak valid.", "inputs": "Input", + "insufficientFundsForRentError": "Anda tidak memiliki cukup SOL untuk menutupi biaya transaksi dan menyewa untuk akun tersebut. Mohon tambahkan lebih banyak sol ke dompet Anda atau kurangi jumlah sol yang Anda kirim", "introducing_cake_pay": "Perkenalkan Cake Pay!", "invalid_input": "Masukan tidak valid", "invoice_details": "Detail faktur", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index d021e37a3..29a142d1e 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -338,6 +338,7 @@ "incoming": "In arrivo", "incorrect_seed": "Il testo inserito non è valido.", "inputs": "Input", + "insufficientFundsForRentError": "Non hai abbastanza SOL per coprire la tassa di transazione e l'affitto per il conto. Si prega di aggiungere più SOL al tuo portafoglio o ridurre l'importo SOL che stai inviando", "introducing_cake_pay": "Presentazione di Cake Pay!", "invalid_input": "Inserimento non valido", "invoice_details": "Dettagli della fattura", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index dd28f9688..3009aa115 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -338,6 +338,7 @@ "incoming": "着信", "incorrect_seed": "入力されたテキストは無効です。", "inputs": "入力", + "insufficientFundsForRentError": "アカウントの取引料金とレンタルをカバーするのに十分なソルがありません。財布にソルを追加するか、送信するソル量を減らしてください", "introducing_cake_pay": "序章Cake Pay!", "invalid_input": "無効入力", "invoice_details": "請求の詳細", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 8b86c04c6..53b3cc875 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -337,6 +337,7 @@ "incoming": "들어오는", "incorrect_seed": "입력하신 텍스트가 유효하지 않습니다.", "inputs": "입력", + "insufficientFundsForRentError": "거래 수수료와 계좌 임대료를 충당하기에 충분한 SOL이 없습니다. 지갑에 더 많은 솔을 추가하거나 보내는 솔을 줄이십시오.", "introducing_cake_pay": "소개 Cake Pay!", "invalid_input": "잘못된 입력", "invoice_details": "인보이스 세부정보", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 42eb54f21..64a7a1ad1 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -337,6 +337,7 @@ "incoming": "ဝင်လာ", "incorrect_seed": "ထည့်သွင်းထားသော စာသားသည် မမှန်ကန်ပါ။", "inputs": "သွင်းငေှ", + "insufficientFundsForRentError": "သင်ငွေပေးချေမှုအခကြေးငွေကိုဖုံးအုပ်ရန်နှင့်အကောင့်ငှားရန်လုံလောက်သော sol ရှိသည်မဟုတ်ကြဘူး။ ကြင်နာစွာသင်၏ပိုက်ဆံအိတ်သို့ပိုမို sol ကိုပိုမိုထည့်ပါသို့မဟုတ်သင်ပို့ခြင်း sol ပမာဏကိုလျှော့ချပါ", "introducing_cake_pay": "Cake Pay ကို မိတ်ဆက်ခြင်း။", "invalid_input": "ထည့်သွင်းမှု မမှန်ကန်ပါ။", "invoice_details": "ပြေစာအသေးစိတ်", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 53db56332..86f6b8c0b 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -337,6 +337,7 @@ "incoming": "inkomend", "incorrect_seed": "De ingevoerde tekst is niet geldig.", "inputs": "Invoer", + "insufficientFundsForRentError": "U hebt niet genoeg SOL om de transactiekosten en huur voor de rekening te dekken. Voeg vriendelijk meer SOL toe aan uw portemonnee of verminder de SOL -hoeveelheid die u verzendt", "introducing_cake_pay": "Introductie van Cake Pay!", "invalid_input": "Ongeldige invoer", "invoice_details": "Factuurgegevens", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 898756982..34a8d57fe 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -337,6 +337,7 @@ "incoming": "Przychodzące", "incorrect_seed": "Wprowadzony seed jest nieprawidłowy.", "inputs": "Wejścia", + "insufficientFundsForRentError": "Nie masz wystarczającej ilości SOL, aby pokryć opłatę za transakcję i czynsz za konto. Uprzejmie dodaj więcej sol do portfela lub zmniejsz solę, którą wysyłasz", "introducing_cake_pay": "Przedstawiamy Cake Pay!", "invalid_input": "Nieprawidłowe dane wejściowe", "invoice_details": "Dane do faktury", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 9e99866cb..67d68988f 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -337,6 +337,7 @@ "incoming": "Recebidas", "incorrect_seed": "O texto digitado não é válido.", "inputs": "Entradas", + "insufficientFundsForRentError": "Você não tem Sol suficiente para cobrir a taxa de transação e o aluguel da conta. Por favor, adicione mais sol à sua carteira ou reduza a quantidade de sol que você envia", "introducing_cake_pay": "Apresentando o Cake Pay!", "invalid_input": "Entrada inválida", "invoice_details": "Detalhes da fatura", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 8d3892ace..521cda83d 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -337,6 +337,7 @@ "incoming": "Входящие", "incorrect_seed": "Введённый текст некорректный.", "inputs": "Входы", + "insufficientFundsForRentError": "У вас недостаточно Sol, чтобы покрыть плату за транзакцию и аренду для счета. Пожалуйста, добавьте больше Sol в свой кошелек или уменьшите сумму Sol, которую вы отправляете", "introducing_cake_pay": "Представляем Cake Pay!", "invalid_input": "Неверный Ввод", "invoice_details": "Детали счета", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 9db9caa68..996472f47 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -337,6 +337,7 @@ "incoming": "ขาเข้า", "incorrect_seed": "ข้อความที่ป้อนไม่ถูกต้อง", "inputs": "อินพุต", + "insufficientFundsForRentError": "คุณไม่มีโซลเพียงพอที่จะครอบคลุมค่าธรรมเนียมการทำธุรกรรมและค่าเช่าสำหรับบัญชี กรุณาเพิ่มโซลให้มากขึ้นลงในกระเป๋าเงินของคุณหรือลดจำนวนโซลที่คุณส่งมา", "introducing_cake_pay": "ยินดีต้อนรับสู่ Cake Pay!", "invalid_input": "อินพุตไม่ถูกต้อง", "invoice_details": "รายละเอียดใบแจ้งหนี้", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 0f77f4813..27e4974bb 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -337,6 +337,7 @@ "incoming": "Papasok", "incorrect_seed": "Ang teksto na ipinasok ay hindi wasto.", "inputs": "Mga input", + "insufficientFundsForRentError": "Wala kang sapat na sol upang masakop ang bayad sa transaksyon at upa para sa account. Mabait na magdagdag ng higit pa sa iyong pitaka o bawasan ang halaga ng sol na iyong ipinapadala", "introducing_cake_pay": "Ipinakikilala ang cake pay!", "invalid_input": "Di -wastong input", "invoice_details": "Mga detalye ng invoice", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 961f0cf77..74b72581e 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -337,6 +337,7 @@ "incoming": "Gelen", "incorrect_seed": "Girilen metin geçerli değil.", "inputs": "Girişler", + "insufficientFundsForRentError": "İşlem ücretini karşılamak ve hesap için kiralamak için yeterli SOL'nuz yok. Lütfen cüzdanınıza daha fazla sol ekleyin veya gönderdiğiniz sol miktarını azaltın", "introducing_cake_pay": "Cake Pay ile tanışın!", "invalid_input": "Geçersiz Giriş", "invoice_details": "fatura detayları", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index c9cda0854..74b2e4703 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -337,6 +337,7 @@ "incoming": "Вхідні", "incorrect_seed": "Введений текст невірний.", "inputs": "Вхoди", + "insufficientFundsForRentError": "У вас недостатньо SOL, щоб покрити плату за транзакцію та оренду на рахунок. Будь ласка, додайте до свого гаманця більше SOL або зменшіть суму, яку ви надсилаєте", "introducing_cake_pay": "Представляємо Cake Pay!", "invalid_input": "Неправильні дані", "invoice_details": "Реквізити рахунку-фактури", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 43cab6370..35d024188 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -337,6 +337,7 @@ "incoming": "آنے والا", "incorrect_seed": "درج کردہ متن درست نہیں ہے۔", "inputs": "آدانوں", + "insufficientFundsForRentError": "آپ کے پاس ٹرانزیکشن فیس اور اکاؤنٹ کے لئے کرایہ لینے کے ل enough اتنا SOL نہیں ہے۔ برائے مہربانی اپنے بٹوے میں مزید سول شامل کریں یا آپ کو بھیجنے والی سول رقم کو کم کریں", "introducing_cake_pay": "Cake پے کا تعارف!", "invalid_input": "غلط ان پٹ", "invoice_details": "رسید کی تفصیلات", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index b7d8ad828..29b8d9b71 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -338,6 +338,7 @@ "incoming": "Wọ́n tó ń bọ̀", "incorrect_seed": "Ọ̀rọ̀ tí a tẹ̀ kì í ṣe èyí.", "inputs": "Igbewọle", + "insufficientFundsForRentError": "O ko ni Sol kan lati bo owo isanwo naa ki o yalo fun iroyin naa. Fi agbara kun Sol diẹ sii si apamọwọ rẹ tabi dinku soso naa ti o \\ 'tun n firanṣẹ", "introducing_cake_pay": "Ẹ bá Cake Pay!", "invalid_input": "Iṣawọle ti ko tọ", "invoice_details": "Iru awọn ẹya ọrọ", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 389cf6c24..a30acad70 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -337,6 +337,7 @@ "incoming": "收到", "incorrect_seed": "输入的文字无效。", "inputs": "输入", + "insufficientFundsForRentError": "您没有足够的溶胶来支付该帐户的交易费和租金。请在钱包中添加更多溶胶或减少您发送的溶胶量", "introducing_cake_pay": "介绍 Cake Pay!", "invalid_input": "输入无效", "invoice_details": "发票明细", From bbba41396d32b0fde52b6d676ee310c9fa26f639 Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 11 Aug 2024 20:49:45 -0300 Subject: [PATCH 31/77] Fixes node connection, and sp, and electrum (#1577) * refactor: remove bitcoin_flutter, update deps, electrs node improvements * feat: connecting/disconnecting improvements, fix rescan by date, scanning message * chore: print * Update pubspec.yaml * Update pubspec.yaml * handle null sockets, retry connection on connect failure * fix imports * fix transaction history * fix RBF * minor fixes/readability enhancements [skip ci] --------- Co-authored-by: Omar Hatem Co-authored-by: Matthew Fosse --- .../lib/bitcoin_hardware_wallet_service.dart | 5 +- cw_bitcoin/lib/bitcoin_wallet.dart | 18 +- cw_bitcoin/lib/bitcoin_wallet_addresses.dart | 5 +- cw_bitcoin/lib/electrum.dart | 111 ++++--- cw_bitcoin/lib/electrum_transaction_info.dart | 4 +- cw_bitcoin/lib/electrum_wallet.dart | 295 +++++++++++------- cw_bitcoin/lib/electrum_wallet_addresses.dart | 30 +- cw_bitcoin/lib/litecoin_network.dart | 9 - cw_bitcoin/lib/litecoin_wallet.dart | 6 +- cw_bitcoin/lib/litecoin_wallet_addresses.dart | 6 +- cw_bitcoin/lib/utils.dart | 72 ++--- cw_bitcoin/pubspec.lock | 79 ++--- cw_bitcoin/pubspec.yaml | 12 +- .../lib/src/bitcoin_cash_wallet.dart | 26 +- .../src/bitcoin_cash_wallet_addresses.dart | 6 +- .../lib/src/bitcoin_cash_wallet_service.dart | 12 +- cw_bitcoin_cash/lib/src/mnemonic.dart | 2 +- cw_bitcoin_cash/pubspec.yaml | 8 +- cw_core/lib/get_height_by_date.dart | 7 +- cw_core/lib/node.dart | 9 +- cw_core/lib/sync_status.dart | 5 + cw_core/lib/transaction_info.dart | 5 +- cw_haven/pubspec.lock | 16 +- cw_monero/pubspec.lock | 4 +- cw_nano/pubspec.lock | 54 ++-- cw_nano/pubspec.yaml | 1 + cw_tron/pubspec.yaml | 4 +- cw_wownero/pubspec.lock | 20 +- ios/Podfile.lock | 12 +- lib/bitcoin/cw_bitcoin.dart | 50 +-- lib/core/sync_status_title.dart | 4 + .../cake_pay_confirm_purchase_card_page.dart | 48 +-- pubspec_base.yaml | 6 +- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 1 + res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + tool/configure.dart | 3 +- 60 files changed, 525 insertions(+), 455 deletions(-) delete mode 100644 cw_bitcoin/lib/litecoin_network.dart diff --git a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart index 345d645d1..de339175d 100644 --- a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart'; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; import 'package:ledger_bitcoin/ledger_bitcoin.dart'; @@ -25,7 +25,8 @@ class BitcoinHardwareWalletService { for (final i in indexRange) { final derivationPath = "m/84'/0'/$i'"; final xpub = await bitcoinLedgerApp.getXPubKey(device, derivationPath: derivationPath); - HDWallet hd = HDWallet.fromBase58(xpub).derive(0); + Bip32Slip10Secp256k1 hd = + Bip32Slip10Secp256k1.fromExtendedKey(xpub).childKey(Bip32KeyIndex(0)); final address = generateP2WPKHAddress(hd: hd, index: 0, network: BitcoinNetwork.mainnet); diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index ce3e2caa8..7b8250541 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -2,8 +2,7 @@ import 'dart:convert'; import 'package:bip39/bip39.dart' as bip39; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; -import 'package:convert/convert.dart'; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_wallet_addresses.dart'; @@ -51,11 +50,11 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { password: password, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - networkType: networkParam == null - ? bitcoin.bitcoin + network: networkParam == null + ? BitcoinNetwork.mainnet : networkParam == BitcoinNetwork.mainnet - ? bitcoin.bitcoin - : bitcoin.testnet, + ? BitcoinNetwork.mainnet + : BitcoinNetwork.testnet, initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, @@ -76,10 +75,9 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { initialSilentAddresses: initialSilentAddresses, initialSilentAddressIndex: initialSilentAddressIndex, mainHd: hd, - sideHd: accountHD.derive(1), + sideHd: accountHD.childKey(Bip32KeyIndex(1)), network: networkParam ?? network, - masterHd: - seedBytes != null ? bitcoin.HDWallet.fromSeed(seedBytes, network: networkType) : null, + masterHd: seedBytes != null ? Bip32Slip10Secp256k1.fromSeed(seedBytes) : null, ); autorun((_) { @@ -253,7 +251,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { PSBTTransactionBuild(inputs: psbtReadyInputs, outputs: outputs, enableRBF: enableRBF); final rawHex = await _bitcoinLedgerApp!.signPsbt(_ledgerDevice!, psbt: psbt.psbt); - return BtcTransaction.fromRaw(hex.encode(rawHex)); + return BtcTransaction.fromRaw(BytesUtils.toHexString(rawHex)); } @override diff --git a/cw_bitcoin/lib/bitcoin_wallet_addresses.dart b/cw_bitcoin/lib/bitcoin_wallet_addresses.dart index 486e69b11..697719894 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_addresses.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_addresses.dart @@ -1,5 +1,5 @@ import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart'; +import 'package:blockchain_utils/bip/bip/bip32/bip32.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_core/wallet_info.dart'; @@ -24,7 +24,8 @@ abstract class BitcoinWalletAddressesBase extends ElectrumWalletAddresses with S }) : super(walletInfo); @override - String getAddress({required int index, required HDWallet hd, BitcoinAddressType? addressType}) { + String getAddress( + {required int index, required Bip32Slip10Secp256k1 hd, BitcoinAddressType? addressType}) { if (addressType == P2pkhAddressType.p2pkh) return generateP2PKHAddress(hd: hd, index: index, network: network); diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index e3925ca74..69b07d7c1 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -8,6 +8,8 @@ import 'package:cw_bitcoin/script_hash.dart'; import 'package:flutter/foundation.dart'; import 'package:rxdart/rxdart.dart'; +enum ConnectionStatus { connected, disconnected, connecting, failed } + String jsonrpcparams(List params) { final _params = params.map((val) => '"${val.toString()}"').join(','); return '[$_params]'; @@ -41,7 +43,7 @@ class ElectrumClient { bool get isConnected => _isConnected; Socket? socket; - void Function(bool?)? onConnectionStatusChange; + void Function(ConnectionStatus)? onConnectionStatusChange; int _id; final Map _tasks; Map get tasks => _tasks; @@ -60,17 +62,33 @@ class ElectrumClient { } Future connect({required String host, required int port, bool? useSSL}) async { + _setConnectionStatus(ConnectionStatus.connecting); + try { await socket?.close(); } catch (_) {} - if (useSSL == false || (useSSL == null && uri.toString().contains("btc-electrum"))) { - socket = await Socket.connect(host, port, timeout: connectionTimeout); - } else { - socket = await SecureSocket.connect(host, port, - timeout: connectionTimeout, onBadCertificate: (_) => true); + try { + if (useSSL == false || (useSSL == null && uri.toString().contains("btc-electrum"))) { + socket = await Socket.connect(host, port, timeout: connectionTimeout); + } else { + socket = await SecureSocket.connect( + host, + port, + timeout: connectionTimeout, + onBadCertificate: (_) => true, + ); + } + } catch (_) { + _setConnectionStatus(ConnectionStatus.failed); + return; } - _setIsConnected(true); + + if (socket == null) { + _setConnectionStatus(ConnectionStatus.failed); + return; + } + _setConnectionStatus(ConnectionStatus.connected); socket!.listen((Uint8List event) { try { @@ -86,13 +104,20 @@ class ElectrumClient { print(e.toString()); } }, onError: (Object error) { - print(error.toString()); + final errorMsg = error.toString(); + print(errorMsg); unterminatedString = ''; - _setIsConnected(false); + + final currentHost = socket?.address.host; + final isErrorForCurrentHost = errorMsg.contains(" ${currentHost} "); + + if (currentHost != null && isErrorForCurrentHost) + _setConnectionStatus(ConnectionStatus.failed); }, onDone: () { unterminatedString = ''; - _setIsConnected(null); + if (host == socket?.address.host) _setConnectionStatus(ConnectionStatus.disconnected); }); + keepAlive(); } @@ -144,9 +169,9 @@ class ElectrumClient { Future ping() async { try { await callWithTimeout(method: 'server.ping'); - _setIsConnected(true); + _setConnectionStatus(ConnectionStatus.connected); } on RequestFailedTimeoutException catch (_) { - _setIsConnected(null); + _setConnectionStatus(ConnectionStatus.disconnected); } } @@ -236,37 +261,39 @@ class ElectrumClient { return []; }); - Future> getTransactionRaw({required String hash}) async { + Future getTransaction({required String hash, required bool verbose}) async { try { final result = await callWithTimeout( - method: 'blockchain.transaction.get', params: [hash, true], timeout: 10000); + method: 'blockchain.transaction.get', params: [hash, verbose], timeout: 10000); if (result is Map) { return result; } } on RequestFailedTimeoutException catch (_) { return {}; } catch (e) { - print("getTransactionRaw: ${e.toString()}"); + print("getTransaction: ${e.toString()}"); return {}; } return {}; } - Future getTransactionHex({required String hash}) async { - try { - final result = await callWithTimeout( - method: 'blockchain.transaction.get', params: [hash, false], timeout: 10000); - if (result is String) { - return result; - } - } on RequestFailedTimeoutException catch (_) { - return ''; - } catch (e) { - print("getTransactionHex: ${e.toString()}"); - return ''; - } - return ''; - } + Future> getTransactionVerbose({required String hash}) => + getTransaction(hash: hash, verbose: true).then((dynamic result) { + if (result is Map) { + return result; + } + + return {}; + }); + + Future getTransactionHex({required String hash}) => + getTransaction(hash: hash, verbose: false).then((dynamic result) { + if (result is String) { + return result; + } + + return ''; + }); Future broadcastTransaction( {required String transactionRaw, @@ -348,7 +375,7 @@ class ElectrumClient { try { final topDoubleString = await estimatefee(p: 1); final middleDoubleString = await estimatefee(p: 5); - final bottomDoubleString = await estimatefee(p: 100); + final bottomDoubleString = await estimatefee(p: 10); final top = (stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000).round(); final middle = (stringDoubleToBitcoinAmount(middleDoubleString.toString()) / 1000).round(); final bottom = (stringDoubleToBitcoinAmount(bottomDoubleString.toString()) / 1000).round(); @@ -398,6 +425,10 @@ class ElectrumClient { BehaviorSubject? subscribe( {required String id, required String method, List params = const []}) { try { + if (socket == null) { + _setConnectionStatus(ConnectionStatus.failed); + return null; + } final subscription = BehaviorSubject(); _regisrySubscription(id, subscription); socket!.write(jsonrpc(method: method, id: _id, params: params)); @@ -411,6 +442,10 @@ class ElectrumClient { Future call( {required String method, List params = const [], Function(int)? idCallback}) async { + if (socket == null) { + _setConnectionStatus(ConnectionStatus.failed); + return null; + } final completer = Completer(); _id += 1; final id = _id; @@ -424,6 +459,10 @@ class ElectrumClient { Future callWithTimeout( {required String method, List params = const [], int timeout = 4000}) async { try { + if (socket == null) { + _setConnectionStatus(ConnectionStatus.failed); + return null; + } final completer = Completer(); _id += 1; final id = _id; @@ -445,6 +484,7 @@ class ElectrumClient { _aliveTimer?.cancel(); try { await socket?.close(); + socket = null; } catch (_) {} onConnectionStatusChange = null; } @@ -493,12 +533,9 @@ class ElectrumClient { } } - void _setIsConnected(bool? isConnected) { - if (_isConnected != isConnected) { - onConnectionStatusChange?.call(isConnected); - } - - _isConnected = isConnected ?? false; + void _setConnectionStatus(ConnectionStatus status) { + onConnectionStatusChange?.call(status); + _isConnected = status == ConnectionStatus.connected; } void _handleResponse(Map response) { diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index d06cfe9de..ea4a3de33 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -22,7 +22,7 @@ class ElectrumTransactionInfo extends TransactionInfo { ElectrumTransactionInfo(this.type, {required String id, - required int height, + int? height, required int amount, int? fee, List? inputAddresses, @@ -99,7 +99,7 @@ class ElectrumTransactionInfo extends TransactionInfo { factory ElectrumTransactionInfo.fromElectrumBundle( ElectrumTransactionBundle bundle, WalletType type, BasedUtxoNetwork network, - {required Set addresses, required int height}) { + {required Set addresses, int? height}) { final date = bundle.time != null ? DateTime.fromMillisecondsSinceEpoch(bundle.time! * 1000) : DateTime.now(); diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index e55e5ed0e..e1b038beb 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -5,7 +5,6 @@ import 'dart:isolate'; import 'dart:math'; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:collection/collection.dart'; import 'package:cw_bitcoin/address_from_output.dart'; @@ -22,7 +21,6 @@ import 'package:cw_bitcoin/electrum_transaction_history.dart'; import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; import 'package:cw_bitcoin/exceptions.dart'; -import 'package:cw_bitcoin/litecoin_network.dart'; import 'package:cw_bitcoin/pending_bitcoin_transaction.dart'; import 'package:cw_bitcoin/script_hash.dart'; import 'package:cw_bitcoin/utils.dart'; @@ -42,7 +40,6 @@ import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/get_height_by_date.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; -import 'package:http/http.dart' as http; import 'package:mobx/mobx.dart'; import 'package:rxdart/subjects.dart'; import 'package:sp_scanner/sp_scanner.dart'; @@ -60,7 +57,7 @@ abstract class ElectrumWalletBase required String password, required WalletInfo walletInfo, required Box unspentCoinsInfo, - required this.networkType, + required this.network, String? xpub, String? mnemonic, Uint8List? seedBytes, @@ -71,7 +68,7 @@ abstract class ElectrumWalletBase CryptoCurrency? currency, this.alwaysScan, }) : accountHD = - getAccountHDWallet(currency, networkType, seedBytes, xpub, walletInfo.derivationInfo), + getAccountHDWallet(currency, network, seedBytes, xpub, walletInfo.derivationInfo), syncStatus = NotConnectedSyncStatus(), _password = password, _feeRates = [], @@ -90,8 +87,7 @@ abstract class ElectrumWalletBase } : {}), this.unspentCoinsInfo = unspentCoinsInfo, - this.network = _getNetwork(networkType, currency), - this.isTestnet = networkType == bitcoin.testnet, + this.isTestnet = network == BitcoinNetwork.testnet, this._mnemonic = mnemonic, super(walletInfo) { this.electrumClient = electrumClient ?? ElectrumClient(); @@ -101,12 +97,8 @@ abstract class ElectrumWalletBase reaction((_) => syncStatus, _syncStatusReaction); } - static bitcoin.HDWallet getAccountHDWallet( - CryptoCurrency? currency, - bitcoin.NetworkType networkType, - Uint8List? seedBytes, - String? xpub, - DerivationInfo? derivationInfo) { + static Bip32Slip10Secp256k1 getAccountHDWallet(CryptoCurrency? currency, BasedUtxoNetwork network, + Uint8List? seedBytes, String? xpub, DerivationInfo? derivationInfo) { if (seedBytes == null && xpub == null) { throw Exception( "To create a Wallet you need either a seed or an xpub. This should not happen"); @@ -115,25 +107,26 @@ abstract class ElectrumWalletBase if (seedBytes != null) { return currency == CryptoCurrency.bch ? bitcoinCashHDWallet(seedBytes) - : bitcoin.HDWallet.fromSeed(seedBytes, network: networkType) - .derivePath(_hardenedDerivationPath(derivationInfo?.derivationPath ?? electrum_path)); + : Bip32Slip10Secp256k1.fromSeed(seedBytes).derivePath( + _hardenedDerivationPath(derivationInfo?.derivationPath ?? electrum_path)) + as Bip32Slip10Secp256k1; } - return bitcoin.HDWallet.fromBase58(xpub!); + return Bip32Slip10Secp256k1.fromExtendedKey(xpub!); } - static bitcoin.HDWallet bitcoinCashHDWallet(Uint8List seedBytes) => - bitcoin.HDWallet.fromSeed(seedBytes).derivePath("m/44'/145'/0'"); + static Bip32Slip10Secp256k1 bitcoinCashHDWallet(Uint8List seedBytes) => + Bip32Slip10Secp256k1.fromSeed(seedBytes).derivePath("m/44'/145'/0'") as Bip32Slip10Secp256k1; static int estimatedTransactionSize(int inputsCount, int outputsCounts) => inputsCount * 68 + outputsCounts * 34 + 10; bool? alwaysScan; - final bitcoin.HDWallet accountHD; + final Bip32Slip10Secp256k1 accountHD; final String? _mnemonic; - bitcoin.HDWallet get hd => accountHD.derive(0); + Bip32Slip10Secp256k1 get hd => accountHD.childKey(Bip32KeyIndex(0)); final String? passphrase; @override @@ -165,7 +158,7 @@ abstract class ElectrumWalletBase .map((addr) => scriptHash(addr.address, network: network)) .toList(); - String get xpub => accountHD.base58!; + String get xpub => accountHD.publicKey.toExtended; @override String? get seed => _mnemonic; @@ -174,7 +167,6 @@ abstract class ElectrumWalletBase WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, xPub: xpub, passphrase: passphrase); - bitcoin.NetworkType networkType; BasedUtxoNetwork network; @override @@ -190,24 +182,21 @@ abstract class ElectrumWalletBase bool _isTryingToConnect = false; @action - Future setSilentPaymentsScanning(bool active, bool usingElectrs) async { + Future setSilentPaymentsScanning(bool active) async { silentPaymentsScanningActive = active; if (active) { - syncStatus = AttemptingSyncStatus(); + syncStatus = StartingScanSyncStatus(); final tip = await getUpdatedChainTip(); if (tip == walletInfo.restoreHeight) { syncStatus = SyncedTipSyncStatus(tip); + return; } if (tip > walletInfo.restoreHeight) { - _setListeners( - walletInfo.restoreHeight, - chainTipParam: _currentChainTip, - usingElectrs: usingElectrs, - ); + _setListeners(walletInfo.restoreHeight, chainTipParam: _currentChainTip); } } else { alwaysScan = false; @@ -245,8 +234,11 @@ abstract class ElectrumWalletBase } @override - BitcoinWalletKeys get keys => - BitcoinWalletKeys(wif: hd.wif!, privateKey: hd.privKey!, publicKey: hd.pubKey!); + BitcoinWalletKeys get keys => BitcoinWalletKeys( + wif: WifEncoder.encode(hd.privateKey.raw, netVer: network.wifNetVer), + privateKey: hd.privateKey.toHex(), + publicKey: hd.publicKey.toHex(), + ); String _password; List unspentCoins; @@ -278,7 +270,7 @@ abstract class ElectrumWalletBase int height, { int? chainTipParam, bool? doSingleScan, - bool? usingElectrs, + bool? usingSupportedNode, }) async { final chainTip = chainTipParam ?? await getUpdatedChainTip(); @@ -287,7 +279,7 @@ abstract class ElectrumWalletBase return; } - syncStatus = AttemptingSyncStatus(); + syncStatus = StartingScanSyncStatus(); if (_isolate != null) { final runningIsolate = await _isolate!; @@ -305,7 +297,9 @@ abstract class ElectrumWalletBase chainTip: chainTip, electrumClient: ElectrumClient(), transactionHistoryIds: transactionHistory.transactions.keys.toList(), - node: usingElectrs == true ? ScanNode(node!.uri, node!.useSSL) : null, + node: (await getNodeSupportsSilentPayments()) == true + ? ScanNode(node!.uri, node!.useSSL) + : null, labels: walletAddresses.labels, labelIndexes: walletAddresses.silentAddresses .where((addr) => addr.type == SilentPaymentsAddresType.p2sp && addr.index >= 1) @@ -393,7 +387,7 @@ abstract class ElectrumWalletBase BigintUtils.fromBytes(BytesUtils.fromHexString(unspent.silentPaymentLabel!)), ) : silentAddress.B_spend, - hrp: silentAddress.hrp, + network: network, ); final addressRecord = walletAddresses.silentAddresses @@ -422,8 +416,6 @@ abstract class ElectrumWalletBase await updateAllUnspents(); await updateBalance(); - Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates()); - if (alwaysScan == true) { _setListeners(walletInfo.restoreHeight); } else { @@ -446,6 +438,58 @@ abstract class ElectrumWalletBase Node? node; + Future getNodeIsElectrs() async { + if (node == null) { + return false; + } + + final version = await electrumClient.version(); + + if (version.isNotEmpty) { + final server = version[0]; + + if (server.toLowerCase().contains('electrs')) { + node!.isElectrs = true; + node!.save(); + return node!.isElectrs!; + } + } + + + node!.isElectrs = false; + node!.save(); + return node!.isElectrs!; + } + + Future getNodeSupportsSilentPayments() async { + // As of today (august 2024), only ElectrumRS supports silent payments + if (!(await getNodeIsElectrs())) { + return false; + } + + if (node == null) { + return false; + } + + try { + final tweaksResponse = await electrumClient.getTweaks(height: 0); + + if (tweaksResponse != null) { + node!.supportsSilentPayments = true; + node!.save(); + return node!.supportsSilentPayments!; + } + } on RequestFailedTimeoutException catch (_) { + node!.supportsSilentPayments = false; + node!.save(); + return node!.supportsSilentPayments!; + } catch (_) {} + + node!.supportsSilentPayments = false; + node!.save(); + return node!.supportsSilentPayments!; + } + @action @override Future connectToNode({required Node node}) async { @@ -507,13 +551,6 @@ abstract class ElectrumWalletBase final hd = utx.bitcoinAddressRecord.isHidden ? walletAddresses.sideHd : walletAddresses.mainHd; - final derivationPath = - "${_hardenedDerivationPath(walletInfo.derivationInfo?.derivationPath ?? "m/0'")}" - "/${utx.bitcoinAddressRecord.isHidden ? "1" : "0"}" - "/${utx.bitcoinAddressRecord.index}"; - final pubKeyHex = hd.derive(utx.bitcoinAddressRecord.index).pubKey!; - - publicKeys[address.pubKeyHash()] = PublicKeyWithDerivationPath(pubKeyHex, derivationPath); if (utx.bitcoinAddressRecord is BitcoinSilentPaymentAddressRecord) { final unspentAddress = utx.bitcoinAddressRecord as BitcoinSilentPaymentAddressRecord; @@ -530,6 +567,7 @@ abstract class ElectrumWalletBase } vinOutpoints.add(Outpoint(txid: utx.hash, index: utx.vout)); + String pubKeyHex; if (privkey != null) { inputPrivKeyInfos.add(ECPrivateInfo( @@ -537,8 +575,18 @@ abstract class ElectrumWalletBase address.type == SegwitAddresType.p2tr, tweak: !isSilentPayment, )); + + pubKeyHex = privkey.getPublic().toHex(); + } else { + pubKeyHex = hd.childKey(Bip32KeyIndex(utx.bitcoinAddressRecord.index)).publicKey.toHex(); } + final derivationPath = + "${_hardenedDerivationPath(walletInfo.derivationInfo?.derivationPath ?? "m/0'")}" + "/${utx.bitcoinAddressRecord.isHidden ? "1" : "0"}" + "/${utx.bitcoinAddressRecord.index}"; + publicKeys[address.pubKeyHash()] = PublicKeyWithDerivationPath(pubKeyHex, derivationPath); + utxos.add( UtxoWithAddress( utxo: BitcoinUtxo( @@ -1127,10 +1175,9 @@ abstract class ElectrumWalletBase int? chainTip, ScanData? scanData, bool? doSingleScan, - bool? usingElectrs, }) async { silentPaymentsScanningActive = true; - _setListeners(height, doSingleScan: doSingleScan, usingElectrs: usingElectrs); + _setListeners(height, doSingleScan: doSingleScan); } @override @@ -1228,7 +1275,7 @@ abstract class ElectrumWalletBase await Future.wait(unspents.map((unspent) async { try { final coin = BitcoinUnspent.fromJSON(address, unspent); - final tx = await fetchTransactionInfo(hash: coin.hash, height: 0); + final tx = await fetchTransactionInfo(hash: coin.hash); coin.isChange = address.isHidden; coin.confirmations = tx?.confirmations; @@ -1283,9 +1330,17 @@ abstract class ElectrumWalletBase } Future canReplaceByFee(String hash) async { - final verboseTransaction = await electrumClient.getTransactionRaw(hash: hash); - final confirmations = verboseTransaction['confirmations'] as int? ?? 0; - final transactionHex = verboseTransaction['hex'] as String?; + final verboseTransaction = await electrumClient.getTransactionVerbose(hash: hash); + + final String? transactionHex; + int confirmations = 0; + + if (verboseTransaction.isEmpty) { + transactionHex = await electrumClient.getTransactionHex(hash: hash); + } else { + confirmations = verboseTransaction['confirmations'] as int? ?? 0; + transactionHex = verboseTransaction['hex'] as String?; + } if (confirmations > 0) return false; @@ -1293,10 +1348,7 @@ abstract class ElectrumWalletBase return false; } - final original = bitcoin.Transaction.fromHex(transactionHex); - - return original.ins - .any((element) => element.sequence != null && element.sequence! < 4294967293); + return BtcTransaction.fromRaw(transactionHex).canReplaceByFee; } Future isChangeSufficientForFee(String txId, int newFee) async { @@ -1455,50 +1507,73 @@ abstract class ElectrumWalletBase } } - Future getTransactionExpanded({required String hash}) async { + Future getTransactionExpanded( + {required String hash, int? height}) async { String transactionHex; + // TODO: time is not always available, and calculating it from height is not always accurate. + // Add settings to choose API provider and use and http server instead of electrum for this. int? time; - int confirmations = 0; - if (network == BitcoinNetwork.testnet) { - // Testnet public electrum server does not support verbose transaction fetching + int? confirmations; + + final verboseTransaction = await electrumClient.getTransactionVerbose(hash: hash); + + if (verboseTransaction.isEmpty) { transactionHex = await electrumClient.getTransactionHex(hash: hash); - - final status = json.decode( - (await http.get(Uri.parse("https://blockstream.info/testnet/api/tx/$hash/status"))).body); - - time = status["block_time"] as int?; - final height = status["block_height"] as int? ?? 0; - final tip = await getUpdatedChainTip(); - if (tip > 0) confirmations = height > 0 ? tip - height + 1 : 0; } else { - final verboseTransaction = await electrumClient.getTransactionRaw(hash: hash); - transactionHex = verboseTransaction['hex'] as String; time = verboseTransaction['time'] as int?; - confirmations = verboseTransaction['confirmations'] as int? ?? 0; + confirmations = verboseTransaction['confirmations'] as int?; + } + + if (height != null) { + if (time == null) { + time = (getDateByBitcoinHeight(height).millisecondsSinceEpoch / 1000).round(); + } + + if (confirmations == null) { + final tip = await getUpdatedChainTip(); + if (tip > 0 && height > 0) { + // Add one because the block itself is the first confirmation + confirmations = tip - height + 1; + } + } } final original = BtcTransaction.fromRaw(transactionHex); final ins = []; for (final vin in original.inputs) { - ins.add(BtcTransaction.fromRaw(await electrumClient.getTransactionHex(hash: vin.txId))); + final verboseTransaction = await electrumClient.getTransactionVerbose(hash: vin.txId); + + final String inputTransactionHex; + + if (verboseTransaction.isEmpty) { + inputTransactionHex = await electrumClient.getTransactionHex(hash: hash); + } else { + inputTransactionHex = verboseTransaction['hex'] as String; + } + + ins.add(BtcTransaction.fromRaw(inputTransactionHex)); } return ElectrumTransactionBundle( original, ins: ins, time: time, - confirmations: confirmations, + confirmations: confirmations ?? 0, ); } Future fetchTransactionInfo( - {required String hash, required int height, bool? retryOnFailure}) async { + {required String hash, int? height, bool? retryOnFailure}) async { try { return ElectrumTransactionInfo.fromElectrumBundle( - await getTransactionExpanded(hash: hash), walletInfo.type, network, - addresses: addressesSet, height: height); + await getTransactionExpanded(hash: hash, height: height), + walletInfo.type, + network, + addresses: addressesSet, + height: height, + ); } catch (e) { if (e is FormatException && retryOnFailure == true) { await Future.delayed(const Duration(seconds: 2)); @@ -1649,8 +1724,8 @@ abstract class ElectrumWalletBase await getCurrentChainTip(); transactionHistory.transactions.values.forEach((tx) async { - if (tx.unspents != null && tx.unspents!.isNotEmpty && tx.height > 0) { - tx.confirmations = await getCurrentChainTip() - tx.height + 1; + if (tx.unspents != null && tx.unspents!.isNotEmpty && tx.height != null && tx.height! > 0) { + tx.confirmations = await getCurrentChainTip() - tx.height! + 1; } }); @@ -1766,8 +1841,12 @@ abstract class ElectrumWalletBase final index = address != null ? walletAddresses.allAddresses.firstWhere((element) => element.address == address).index : null; - final HD = index == null ? hd : hd.derive(index); - return base64Encode(HD.signMessage(message)); + final HD = index == null ? hd : hd.childKey(Bip32KeyIndex(index)); + final priv = ECPrivate.fromWif( + WifEncoder.encode(HD.privateKey.raw, netVer: network.wifNetVer), + netVersion: network.wifNetVer, + ); + return priv.signMessage(StringUtils.encode(message)); } Future _setInitialHeight() async { @@ -1793,43 +1872,42 @@ abstract class ElectrumWalletBase }); } - static BasedUtxoNetwork _getNetwork(bitcoin.NetworkType networkType, CryptoCurrency? currency) { - if (networkType == bitcoin.bitcoin && currency == CryptoCurrency.bch) { - return BitcoinCashNetwork.mainnet; - } - - if (networkType == litecoinNetwork) { - return LitecoinNetwork.mainnet; - } - - if (networkType == bitcoin.testnet) { - return BitcoinNetwork.testnet; - } - - return BitcoinNetwork.mainnet; - } - static String _hardenedDerivationPath(String derivationPath) => derivationPath.substring(0, derivationPath.lastIndexOf("'") + 1); @action - void _onConnectionStatusChange(bool? isConnected) { - if (syncStatus is SyncingSyncStatus) return; + void _onConnectionStatusChange(ConnectionStatus status) { + switch (status) { + case ConnectionStatus.connected: + if (syncStatus is NotConnectedSyncStatus || + syncStatus is LostConnectionSyncStatus || + syncStatus is ConnectingSyncStatus) { + syncStatus = AttemptingSyncStatus(); + startSync(); + } - if (isConnected == true && syncStatus is! SyncedSyncStatus) { - syncStatus = ConnectedSyncStatus(); - } else if (isConnected == false) { - syncStatus = LostConnectionSyncStatus(); - } else if (isConnected != true && syncStatus is! ConnectingSyncStatus) { - syncStatus = NotConnectedSyncStatus(); + break; + case ConnectionStatus.disconnected: + syncStatus = NotConnectedSyncStatus(); + break; + case ConnectionStatus.failed: + syncStatus = LostConnectionSyncStatus(); + // wait for 5 seconds and then try to reconnect: + Future.delayed(Duration(seconds: 5), () { + electrumClient.connectToUri( + node!.uri, + useSSL: node!.useSSL ?? false, + ); + }); + break; + case ConnectionStatus.connecting: + syncStatus = ConnectingSyncStatus(); + break; + default: } } void _syncStatusReaction(SyncStatus syncStatus) async { - if (syncStatus is! AttemptingSyncStatus && syncStatus is! SyncedTipSyncStatus) { - silentPaymentsScanningActive = syncStatus is SyncingSyncStatus; - } - if (syncStatus is NotConnectedSyncStatus) { // Needs to re-subscribe to all scripthashes when reconnected _scripthashesUpdateSubject = {}; @@ -1950,8 +2028,8 @@ Future startRefresh(ScanData scanData) async { final tweaks = t as Map; if (tweaks["message"] != null) { - // re-subscribe to continue receiving messages - electrumClient.tweaksSubscribe(height: syncHeight, count: count); + // re-subscribe to continue receiving messages, starting from the next unscanned height + electrumClient.tweaksSubscribe(height: syncHeight + 1, count: count); return; } @@ -2180,3 +2258,4 @@ class UtxoDetails { required this.spendsUnconfirmedTX, }); } + diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart index b39821dbb..a0424c934 100644 --- a/cw_bitcoin/lib/electrum_wallet_addresses.dart +++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart @@ -1,5 +1,4 @@ import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_core/wallet_addresses.dart'; @@ -30,7 +29,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { Map? initialChangeAddressIndex, List? initialSilentAddresses, int initialSilentAddressIndex = 0, - bitcoin.HDWallet? masterHd, + Bip32Slip10Secp256k1? masterHd, BitcoinAddressType? initialAddressPageType, }) : _addresses = ObservableList.of((initialAddresses ?? []).toSet()), addressesByReceiveType = @@ -53,9 +52,10 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { super(walletInfo) { if (masterHd != null) { silentAddress = SilentPaymentOwner.fromPrivateKeys( - b_scan: ECPrivate.fromHex(masterHd.derivePath(SCAN_PATH).privKey!), - b_spend: ECPrivate.fromHex(masterHd.derivePath(SPEND_PATH).privKey!), - hrp: network == BitcoinNetwork.testnet ? 'tsp' : 'sp'); + b_scan: ECPrivate.fromHex(masterHd.derivePath(SCAN_PATH).privateKey.toHex()), + b_spend: ECPrivate.fromHex(masterHd.derivePath(SPEND_PATH).privateKey.toHex()), + network: network, + ); if (silentAddresses.length == 0) { silentAddresses.add(BitcoinSilentPaymentAddressRecord( @@ -92,8 +92,8 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { final ObservableList changeAddresses; final ObservableList silentAddresses; final BasedUtxoNetwork network; - final bitcoin.HDWallet mainHd; - final bitcoin.HDWallet sideHd; + final Bip32Slip10Secp256k1 mainHd; + final Bip32Slip10Secp256k1 sideHd; @observable SilentPaymentOwner? silentAddress; @@ -318,7 +318,9 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } String getAddress( - {required int index, required bitcoin.HDWallet hd, BitcoinAddressType? addressType}) => + {required int index, + required Bip32Slip10Secp256k1 hd, + BitcoinAddressType? addressType}) => ''; @override @@ -540,11 +542,13 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { void _validateAddresses() { _addresses.forEach((element) { - if (!element.isHidden && element.address != - getAddress(index: element.index, hd: mainHd, addressType: element.type)) { + if (!element.isHidden && + element.address != + getAddress(index: element.index, hd: mainHd, addressType: element.type)) { element.isHidden = true; - } else if (element.isHidden && element.address != - getAddress(index: element.index, hd: sideHd, addressType: element.type)) { + } else if (element.isHidden && + element.address != + getAddress(index: element.index, hd: sideHd, addressType: element.type)) { element.isHidden = false; } }); @@ -562,7 +566,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { return _isAddressByType(addressRecord, addressPageType); } - bitcoin.HDWallet _getHd(bool isHidden) => isHidden ? sideHd : mainHd; + Bip32Slip10Secp256k1 _getHd(bool isHidden) => isHidden ? sideHd : mainHd; bool _isAddressByType(BitcoinAddressRecord addr, BitcoinAddressType type) => addr.type == type; bool _isUnusedReceiveAddressByType(BitcoinAddressRecord addr, BitcoinAddressType type) => !addr.isHidden && !addr.isUsed && addr.type == type; diff --git a/cw_bitcoin/lib/litecoin_network.dart b/cw_bitcoin/lib/litecoin_network.dart deleted file mode 100644 index d7ad2f837..000000000 --- a/cw_bitcoin/lib/litecoin_network.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:bitcoin_flutter/bitcoin_flutter.dart'; - -final litecoinNetwork = NetworkType( - messagePrefix: '\x19Litecoin Signed Message:\n', - bech32: 'ltc', - bip32: Bip32Type(public: 0x0488b21e, private: 0x0488ade4), - pubKeyHash: 0x30, - scriptHash: 0x32, - wif: 0xb0); diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index bfb9a1b16..64e53ca5d 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -1,12 +1,12 @@ import 'package:bip39/bip39.dart' as bip39; 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/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; -import 'package:cw_bitcoin/litecoin_network.dart'; import 'package:cw_bitcoin/litecoin_wallet_addresses.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_priority.dart'; @@ -38,7 +38,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { password: password, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - networkType: litecoinNetwork, + network: LitecoinNetwork.mainnet, initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, @@ -49,7 +49,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, mainHd: hd, - sideHd: accountHD.derive(1), + sideHd: accountHD.childKey(Bip32KeyIndex(1)), network: network, ); autorun((_) { diff --git a/cw_bitcoin/lib/litecoin_wallet_addresses.dart b/cw_bitcoin/lib/litecoin_wallet_addresses.dart index 99b7445fc..6945db445 100644 --- a/cw_bitcoin/lib/litecoin_wallet_addresses.dart +++ b/cw_bitcoin/lib/litecoin_wallet_addresses.dart @@ -1,5 +1,5 @@ import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; @@ -22,6 +22,8 @@ abstract class LitecoinWalletAddressesBase extends ElectrumWalletAddresses with @override String getAddress( - {required int index, required bitcoin.HDWallet hd, BitcoinAddressType? addressType}) => + {required int index, + required Bip32Slip10Secp256k1 hd, + BitcoinAddressType? addressType}) => generateP2WPKHAddress(hd: hd, index: index, network: network); } diff --git a/cw_bitcoin/lib/utils.dart b/cw_bitcoin/lib/utils.dart index e3ebc00db..29d7a9bf3 100644 --- a/cw_bitcoin/lib/utils.dart +++ b/cw_bitcoin/lib/utils.dart @@ -1,68 +1,54 @@ -import 'dart:typed_data'; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:flutter/foundation.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; -import 'package:bitcoin_flutter/src/payments/index.dart' show PaymentData; -import 'package:hex/hex.dart'; - -bitcoin.PaymentData generatePaymentData({ - required bitcoin.HDWallet hd, - required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return PaymentData(pubkey: Uint8List.fromList(HEX.decode(pubKey))); -} +import 'package:blockchain_utils/blockchain_utils.dart'; ECPrivate generateECPrivate({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final wif = hd.derive(index).wif!; - return ECPrivate.fromWif(wif, netVersion: network.wifNetVer); -} +}) => + ECPrivate(hd.childKey(Bip32KeyIndex(index)).privateKey); String generateP2WPKHAddress({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return ECPublic.fromHex(pubKey).toP2wpkhAddress().toAddress(network); -} +}) => + ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) + .toP2wpkhAddress() + .toAddress(network); String generateP2SHAddress({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return ECPublic.fromHex(pubKey).toP2wpkhInP2sh().toAddress(network); -} +}) => + ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) + .toP2wshInP2sh() + .toAddress(network); String generateP2WSHAddress({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return ECPublic.fromHex(pubKey).toP2wshAddress().toAddress(network); -} +}) => + ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) + .toP2wshAddress() + .toAddress(network); String generateP2PKHAddress({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return ECPublic.fromHex(pubKey).toP2pkhAddress().toAddress(network); -} +}) => + ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) + .toP2pkhAddress() + .toAddress(network); String generateP2TRAddress({ - required bitcoin.HDWallet hd, + required Bip32Slip10Secp256k1 hd, required BasedUtxoNetwork network, required int index, -}) { - final pubKey = hd.derive(index).pubKey!; - return ECPublic.fromHex(pubKey).toTaprootAddress().toAddress(network); -} +}) => + ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) + .toTaprootAddress() + .toAddress(network); diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index 15f7cdb43..be7862e26 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -41,15 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - bech32: - dependency: transitive - description: - path: "." - ref: "cake-0.2.2" - resolved-ref: "05755063b593aa6cca0a4820a318e0ce17de6192" - url: "https://github.com/cake-tech/bech32.git" - source: git - version: "0.2.2" bip32: dependency: transitive description: @@ -79,29 +70,20 @@ packages: dependency: "direct main" description: path: "." - ref: cake-update-v3 - resolved-ref: cc99eedb1d28ee9376dda0465ef72aa627ac6149 + ref: cake-update-v4 + resolved-ref: "574486bfcdbbaf978dcd006b46fc8716f880da29" url: "https://github.com/cake-tech/bitcoin_base" source: git - version: "4.2.1" - bitcoin_flutter: - dependency: "direct main" - description: - path: "." - ref: cake-update-v4 - resolved-ref: e19ffb7e7977278a75b27e0479b3c6f4034223b3 - url: "https://github.com/cake-tech/bitcoin_flutter.git" - source: git - version: "2.1.0" + version: "4.7.0" blockchain_utils: dependency: "direct main" description: path: "." - ref: cake-update-v1 - resolved-ref: cabd7e0e16c4da9920338c76eff3aeb8af0211f3 + ref: cake-update-v2 + resolved-ref: "59fdf29d72068e0522a96a8953ed7272833a9f57" url: "https://github.com/cake-tech/blockchain_utils" source: git - version: "2.1.2" + version: "3.3.0" boolean_selector: dependency: transitive description: @@ -411,10 +393,10 @@ packages: dependency: "direct main" description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -499,11 +481,12 @@ packages: ledger_flutter: dependency: "direct main" description: - name: ledger_flutter - sha256: f1680060ed6ff78f275837e0024ccaf667715a59ba7aa29fa7354bc7752e71c8 - url: "https://pub.dev" - source: hosted - version: "1.0.1" + path: "." + ref: cake-v3 + resolved-ref: "66469ff9dffe2417c70ae7287c9d76d2fe7157a4" + url: "https://github.com/cake-tech/ledger-flutter.git" + source: git + version: "1.0.2" ledger_usb: dependency: transitive description: @@ -596,10 +579,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -636,18 +619,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" platform: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -700,10 +683,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" quiver: dependency: transitive description: @@ -761,10 +744,10 @@ packages: dependency: transitive description: name: socks5_proxy - sha256: "045cbba84f6e2b01c1c77634a63e926352bf110ef5f07fc462c6d43bbd4b6a83" + sha256: "616818a0ea1064a4823b53c9f7eaf8da64ed82dcd51ed71371c7e54751ed5053" url: "https://pub.dev" source: hosted - version: "1.0.5+dev.2" + version: "1.0.6" source_gen: dependency: transitive description: @@ -793,9 +776,9 @@ packages: dependency: "direct main" description: path: "." - ref: "sp_v2.0.0" - resolved-ref: "62c152b9086cd968019128845371072f7e1168de" - url: "https://github.com/cake-tech/sp_scanner" + ref: "sp_v4.0.0" + resolved-ref: "3b8ae38592c0584f53560071dc18bc570758fe13" + url: "https://github.com/rafael-xmr/sp_scanner" source: git version: "0.0.1" stack_trace: @@ -910,14 +893,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.5" - win32: - dependency: transitive - description: - name: win32 - sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" - url: "https://pub.dev" - source: hosted - version: "5.5.0" xdg_directories: dependency: transitive description: diff --git a/cw_bitcoin/pubspec.yaml b/cw_bitcoin/pubspec.yaml index 69ff3d29b..449833220 100644 --- a/cw_bitcoin/pubspec.yaml +++ b/cw_bitcoin/pubspec.yaml @@ -19,10 +19,6 @@ dependencies: intl: ^0.18.0 cw_core: path: ../cw_core - bitcoin_flutter: - git: - url: https://github.com/cake-tech/bitcoin_flutter.git - ref: cake-update-v4 bitbox: git: url: https://github.com/cake-tech/bitbox-flutter.git @@ -32,19 +28,19 @@ dependencies: bitcoin_base: git: url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v3 + ref: cake-update-v4 blockchain_utils: git: url: https://github.com/cake-tech/blockchain_utils - ref: cake-update-v1 + ref: cake-update-v2 ledger_flutter: ^1.0.1 ledger_bitcoin: git: url: https://github.com/cake-tech/ledger-bitcoin sp_scanner: git: - url: https://github.com/cake-tech/sp_scanner - ref: sp_v2.0.0 + url: https://github.com/rafael-xmr/sp_scanner + ref: sp_v4.0.0 dev_dependencies: diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart index f15eed10d..8323c01a8 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart @@ -1,8 +1,6 @@ -import 'dart:convert'; - import 'package:bitbox/bitbox.dart' as bitbox; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; @@ -40,7 +38,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { password: password, walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfo, - networkType: bitcoin.bitcoin, + network: BitcoinCashNetwork.mainnet, initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, @@ -51,7 +49,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, mainHd: hd, - sideHd: accountHD.derive(1), + sideHd: accountHD.childKey(Bip32KeyIndex(1)), network: network, initialAddressPageType: addressPageType, ); @@ -77,7 +75,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { unspentCoinsInfo: unspentCoinsInfo, initialAddresses: initialAddresses, initialBalance: initialBalance, - seedBytes: await Mnemonic.toSeed(mnemonic), + seedBytes: await MnemonicBip39.toSeed(mnemonic), initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, @@ -136,15 +134,17 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { } }).toList(), initialBalance: snp?.balance, - seedBytes: await Mnemonic.toSeed(keysData.mnemonic!), + seedBytes: await MnemonicBip39.toSeed(keysData.mnemonic!), initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, ); } - bitbox.ECPair generateKeyPair({required bitcoin.HDWallet hd, required int index}) => - bitbox.ECPair.fromWIF(hd.derive(index).wif!); + bitbox.ECPair generateKeyPair({required Bip32Slip10Secp256k1 hd, required int index}) => + bitbox.ECPair.fromPrivateKey( + Uint8List.fromList(hd.childKey(Bip32KeyIndex(index)).privateKey.raw), + ); int calculateEstimatedFeeWithFeeRate(int feeRate, int? amount, {int? outputsCount, int? size}) { int inputsCount = 0; @@ -190,7 +190,11 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { .firstWhere((element) => element.address == AddressUtils.toLegacyAddress(address)) .index : null; - final HD = index == null ? hd : hd.derive(index); - return base64Encode(HD.signMessage(message)); + final HD = index == null ? hd : hd.childKey(Bip32KeyIndex(index)); + final priv = ECPrivate.fromWif( + WifEncoder.encode(HD.privateKey.raw, netVer: network.wifNetVer), + netVersion: network.wifNetVer, + ); + return priv.signMessage(StringUtils.encode(message)); } } diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_addresses.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_addresses.dart index d543e944c..7342dc7f5 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_addresses.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_addresses.dart @@ -1,5 +1,5 @@ import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_core/wallet_info.dart'; @@ -23,6 +23,8 @@ abstract class BitcoinCashWalletAddressesBase extends ElectrumWalletAddresses wi @override String getAddress( - {required int index, required bitcoin.HDWallet hd, BitcoinAddressType? addressType}) => + {required int index, + required Bip32Slip10Secp256k1 hd, + BitcoinAddressType? addressType}) => generateP2PKHAddress(hd: hd, index: index, network: network); } diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart index 01ae8ace3..002e52c4f 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart @@ -11,8 +11,11 @@ import 'package:cw_core/wallet_type.dart'; import 'package:collection/collection.dart'; import 'package:hive/hive.dart'; -class BitcoinCashWalletService extends WalletService { +class BitcoinCashWalletService extends WalletService< + BitcoinCashNewWalletCredentials, + BitcoinCashRestoreWalletFromSeedCredentials, + BitcoinCashRestoreWalletFromWIFCredentials, + BitcoinCashNewWalletCredentials> { BitcoinCashWalletService(this.walletInfoSource, this.unspentCoinsInfoSource); final Box walletInfoSource; @@ -30,7 +33,7 @@ class BitcoinCashWalletService extends WalletService restoreFromHardwareWallet(BitcoinCashNewWalletCredentials credentials) { - throw UnimplementedError("Restoring a Bitcoin Cash wallet from a hardware wallet is not yet supported!"); + throw UnimplementedError( + "Restoring a Bitcoin Cash wallet from a hardware wallet is not yet supported!"); } @override diff --git a/cw_bitcoin_cash/lib/src/mnemonic.dart b/cw_bitcoin_cash/lib/src/mnemonic.dart index b1f1ee984..7aac1d5c4 100644 --- a/cw_bitcoin_cash/lib/src/mnemonic.dart +++ b/cw_bitcoin_cash/lib/src/mnemonic.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:bip39/bip39.dart' as bip39; -class Mnemonic { +class MnemonicBip39 { /// Generate bip39 mnemonic static String generate({int strength = 128}) => bip39.generateMnemonic(strength: strength); diff --git a/cw_bitcoin_cash/pubspec.yaml b/cw_bitcoin_cash/pubspec.yaml index a0ce889c1..3728bafc5 100644 --- a/cw_bitcoin_cash/pubspec.yaml +++ b/cw_bitcoin_cash/pubspec.yaml @@ -21,10 +21,6 @@ dependencies: path: ../cw_core cw_bitcoin: path: ../cw_bitcoin - bitcoin_flutter: - git: - url: https://github.com/cake-tech/bitcoin_flutter.git - ref: cake-update-v4 bitbox: git: url: https://github.com/cake-tech/bitbox-flutter.git @@ -32,11 +28,11 @@ dependencies: bitcoin_base: git: url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v3 + ref: cake-update-v4 blockchain_utils: git: url: https://github.com/cake-tech/blockchain_utils - ref: cake-update-v1 + ref: cake-update-v2 dev_dependencies: flutter_test: diff --git a/cw_core/lib/get_height_by_date.dart b/cw_core/lib/get_height_by_date.dart index 6f1b4078b..204f03d62 100644 --- a/cw_core/lib/get_height_by_date.dart +++ b/cw_core/lib/get_height_by_date.dart @@ -245,6 +245,8 @@ Future getHavenCurrentHeight() async { // Data taken from https://timechaincalendar.com/ const bitcoinDates = { + "2024-08": 854889, + "2024-07": 850182, "2024-06": 846005, "2024-05": 841590, "2024-04": 837182, @@ -371,7 +373,8 @@ const wowDates = { int getWowneroHeightByDate({required DateTime date}) { String closestKey = - wowDates.keys.firstWhere((key) => formatMapKey(key).isBefore(date), orElse: () => ''); + wowDates.keys.firstWhere((key) => formatMapKey(key).isBefore(date), orElse: () => ''); return wowDates[closestKey] ?? 0; -} \ No newline at end of file +} + diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index f35ea589f..85c61de15 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -11,7 +11,8 @@ import 'package:http/io_client.dart' as ioc; part 'node.g.dart'; -Uri createUriFromElectrumAddress(String address, String path) => Uri.tryParse('tcp://$address$path')!; +Uri createUriFromElectrumAddress(String address, String path) => + Uri.tryParse('tcp://$address$path')!; @HiveType(typeId: Node.typeId) class Node extends HiveObject with Keyable { @@ -72,6 +73,12 @@ class Node extends HiveObject with Keyable { @HiveField(7, defaultValue: '') String? path; + @HiveField(8) + bool? isElectrs; + + @HiveField(9) + bool? supportsSilentPayments; + bool get isSSL => useSSL ?? false; bool get useSocksProxy => socksProxyAddress == null ? false : socksProxyAddress!.isNotEmpty; diff --git a/cw_core/lib/sync_status.dart b/cw_core/lib/sync_status.dart index 55c31877f..ea015340c 100644 --- a/cw_core/lib/sync_status.dart +++ b/cw_core/lib/sync_status.dart @@ -3,6 +3,11 @@ abstract class SyncStatus { double progress(); } +class StartingScanSyncStatus extends SyncStatus { + @override + double progress() => 0.0; +} + class SyncingSyncStatus extends SyncStatus { SyncingSyncStatus(this.blocksLeft, this.ptc); diff --git a/cw_core/lib/transaction_info.dart b/cw_core/lib/transaction_info.dart index e363d88db..971e4ecdb 100644 --- a/cw_core/lib/transaction_info.dart +++ b/cw_core/lib/transaction_info.dart @@ -9,7 +9,7 @@ abstract class TransactionInfo extends Object with Keyable { late TransactionDirection direction; late bool isPending; late DateTime date; - late int height; + int? height; late int confirmations; String amountFormatted(); String fiatAmount(); @@ -25,4 +25,5 @@ abstract class TransactionInfo extends Object with Keyable { dynamic get keyIndex => id; late Map additionalInfo; -} \ No newline at end of file +} + diff --git a/cw_haven/pubspec.lock b/cw_haven/pubspec.lock index b8583d219..c34e164f4 100644 --- a/cw_haven/pubspec.lock +++ b/cw_haven/pubspec.lock @@ -254,10 +254,10 @@ packages: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: @@ -514,14 +514,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" pub_semver: dependency: transitive description: @@ -707,10 +699,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.0.4" yaml: dependency: transitive description: diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 838f7224c..38299b2dc 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -438,8 +438,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" - resolved-ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b + resolved-ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_nano/pubspec.lock b/cw_nano/pubspec.lock index 70f2f6f0b..c3d4b26b6 100644 --- a/cw_nano/pubspec.lock +++ b/cw_nano/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: asn1lib - sha256: b74e3842a52c61f8819a1ec8444b4de5419b41a7465e69d4aa681445377398b0 + sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.5.3" async: dependency: transitive description: @@ -114,7 +114,7 @@ packages: source: hosted version: "2.4.9" build_runner_core: - dependency: transitive + dependency: "direct overridden" description: name: build_runner_core sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" @@ -133,10 +133,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.9.2" characters: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.10.0" collection: dependency: transitive description: @@ -220,10 +220,10 @@ packages: dependency: "direct main" description: name: ed25519_hd_key - sha256: "326608234e986ea826a5db4cf4cd6826058d860875a3fff7926c0725fe1a604d" + sha256: c5c9f11a03f5789bf9dcd9ae88d641571c802640851f1cacdb13123f171b3a26 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" encrypt: dependency: transitive description: @@ -244,10 +244,10 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.2" file: dependency: transitive description: @@ -475,10 +475,10 @@ packages: dependency: "direct main" description: name: mobx - sha256: "0afcf88b3ee9d6819890bf16c11a727fc8c62cf736fda8e5d3b9b4eace4e62ea" + sha256: "63920b27b32ad1910adfe767ab1750e4c212e8923232a1f891597b362074ea5e" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.3+2" mobx_codegen: dependency: "direct dev" description: @@ -572,10 +572,10 @@ packages: dependency: transitive description: name: pinenacl - sha256: e5fb0bce1717b7f136f35ee98b5c02b3e6383211f8a77ca882fa7812232a07b9 + sha256: "3a5503637587d635647c93ea9a8fecf48a420cc7deebe6f1fc85c2a5637ab327" url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "0.5.1" platform: dependency: transitive description: @@ -588,10 +588,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.8" pointycastle: dependency: transitive description: @@ -652,10 +652,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + sha256: "671e7a931f55a08aa45be2a13fe7247f2a41237897df434b30d2012388191833" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.5.0" shared_preferences_linux: dependency: transitive description: @@ -668,10 +668,10 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" shared_preferences_web: dependency: transitive description: @@ -849,18 +849,18 @@ packages: dependency: transitive description: name: win32 - sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" url: "https://pub.dev" source: hosted - version: "4.1.4" + version: "5.5.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: e0b1147eec179d3911f1f19b59206448f78195ca1d20514134e10641b7d7fbff + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.4" yaml: dependency: transitive description: @@ -870,5 +870,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=3.7.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.16.6" diff --git a/cw_nano/pubspec.yaml b/cw_nano/pubspec.yaml index 768c1bb4e..6fae6a895 100644 --- a/cw_nano/pubspec.yaml +++ b/cw_nano/pubspec.yaml @@ -38,6 +38,7 @@ dev_dependencies: dependency_overrides: watcher: ^1.1.0 + build_runner_core: 7.2.7+1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/cw_tron/pubspec.yaml b/cw_tron/pubspec.yaml index f27e1b460..e69fd7ca0 100644 --- a/cw_tron/pubspec.yaml +++ b/cw_tron/pubspec.yaml @@ -18,11 +18,11 @@ dependencies: on_chain: git: url: https://github.com/cake-tech/On_chain - ref: cake-update-v1 + ref: cake-update-v2 blockchain_utils: git: url: https://github.com/cake-tech/blockchain_utils - ref: cake-update-v1 + ref: cake-update-v2 mobx: ^2.3.0+1 bip39: ^1.0.6 hive: ^2.2.3 diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index d91922ac9..737743925 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -254,10 +254,10 @@ packages: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: @@ -438,8 +438,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" - resolved-ref: "bcb328a4956105dc182afd0ce2e48fe263f5f20b" + ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b + resolved-ref: bcb328a4956105dc182afd0ce2e48fe263f5f20b url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" @@ -555,14 +555,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" pub_semver: dependency: transitive description: @@ -748,10 +740,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.0.4" yaml: dependency: transitive description: diff --git a/ios/Podfile.lock b/ios/Podfile.lock index fddf6e24f..fb6dc4ecf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -94,6 +94,8 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS + - sp_scanner (0.0.1): + - Flutter - SwiftProtobuf (1.26.0) - SwiftyGif (5.4.5) - Toast (4.1.1) @@ -132,6 +134,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`) - UnstoppableDomainsResolution (~> 4.0.0) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) @@ -197,6 +200,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" url_launcher_ios: @@ -227,7 +232,7 @@ SPEC CHECKSUMS: MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 + package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 Protobuf: fb2c13674723f76ff6eede14f78847a776455fa2 @@ -235,15 +240,16 @@ SPEC CHECKSUMS: reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 - share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 + share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12 SwiftProtobuf: 5e8349171e7c2f88f5b9e683cb3cb79d1dc780b3 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e uni_links: d97da20c7701486ba192624d99bffaaffcfc298a UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe - wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47 + wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1 workmanager: 0afdcf5628bbde6924c21af7836fed07b42e30e6 PODFILE CHECKSUM: a2fe518be61cdbdc5b0e2da085ab543d556af2d3 diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index a92aaad74..edfc77acb 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -302,16 +302,13 @@ class CWBitcoin extends Bitcoin { await electrumClient.connectToUri(node.uri, useSSL: node.useSSL); late BasedUtxoNetwork network; - btc.NetworkType networkType; switch (node.type) { case WalletType.litecoin: network = LitecoinNetwork.mainnet; - networkType = litecoinNetwork; break; case WalletType.bitcoin: default: network = BitcoinNetwork.mainnet; - networkType = btc.bitcoin; break; } @@ -341,10 +338,8 @@ class CWBitcoin extends Bitcoin { balancePath += "/0"; } - final hd = btc.HDWallet.fromSeed( - seedBytes, - network: networkType, - ).derivePath(balancePath); + final hd = Bip32Slip10Secp256k1.fromSeed(seedBytes).derivePath(balancePath) + as Bip32Slip10Secp256k1; // derive address at index 0: String? address; @@ -515,10 +510,7 @@ class CWBitcoin extends Bitcoin { @override Future setScanningActive(Object wallet, bool active) async { final bitcoinWallet = wallet as ElectrumWallet; - bitcoinWallet.setSilentPaymentsScanning( - active, - active && (await getNodeIsElectrsSPEnabled(wallet)), - ); + bitcoinWallet.setSilentPaymentsScanning(active); } @override @@ -536,44 +528,10 @@ class CWBitcoin extends Bitcoin { bitcoinWallet.rescan(height: height, doSingleScan: doSingleScan); } - Future getNodeIsElectrs(Object wallet) async { - final bitcoinWallet = wallet as ElectrumWallet; - - final version = await bitcoinWallet.electrumClient.version(); - - if (version.isEmpty) { - return false; - } - - final server = version[0]; - - if (server.toLowerCase().contains('electrs')) { - return true; - } - - return false; - } - @override Future getNodeIsElectrsSPEnabled(Object wallet) async { - if (!(await getNodeIsElectrs(wallet))) { - return false; - } - final bitcoinWallet = wallet as ElectrumWallet; - try { - final tweaksResponse = await bitcoinWallet.electrumClient.getTweaks(height: 0); - - if (tweaksResponse != null) { - return true; - } - } on RequestFailedTimeoutException catch (_) { - return false; - } catch (_) { - rethrow; - } - - return false; + return bitcoinWallet.getNodeSupportsSilentPayments(); } @override diff --git a/lib/core/sync_status_title.dart b/lib/core/sync_status_title.dart index c4cc3929f..465211f23 100644 --- a/lib/core/sync_status_title.dart +++ b/lib/core/sync_status_title.dart @@ -52,5 +52,9 @@ String syncStatusTitle(SyncStatus syncStatus) { return S.current.sync_status_syncronizing; } + if (syncStatus is StartingScanSyncStatus) { + return S.current.sync_status_starting_scan; + } + return ''; } diff --git a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart index fd8dce103..02ddf037d 100644 --- a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart +++ b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart @@ -34,7 +34,7 @@ class CakePayBuyCardDetailPage extends BasePage { @override Widget? middle(BuildContext context) { - return Text( + return Text( title, textAlign: TextAlign.center, maxLines: 2, @@ -359,7 +359,7 @@ class CakePayBuyCardDetailPage extends BasePage { reaction((_) => cakePayPurchaseViewModel.sendViewModel.state, (ExecutionState state) { if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) { - showStateAlert(context, S.of(context).error, state.error); + if (context.mounted) showStateAlert(context, S.of(context).error, state.error); }); } @@ -381,31 +381,35 @@ class CakePayBuyCardDetailPage extends BasePage { } void showStateAlert(BuildContext context, String title, String content) { - showPopUp( - context: context, - builder: (BuildContext context) { - return AlertWithOneAction( - alertTitle: title, - alertContent: content, - buttonText: S.of(context).ok, - buttonAction: () => Navigator.of(context).pop()); - }); + if (context.mounted) { + showPopUp( + context: context, + builder: (BuildContext context) { + return AlertWithOneAction( + alertTitle: title, + alertContent: content, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop()); + }); + } } Future showSentAlert(BuildContext context) async { + if (!context.mounted) { + return; + } final order = cakePayPurchaseViewModel.order!.orderId; final isCopy = await showPopUp( - context: context, - builder: (BuildContext context) { - return AlertWithTwoActions( - alertTitle: S.of(context).transaction_sent, - alertContent: - S.of(context).cake_pay_save_order + '\n${order}', - leftButtonText: S.of(context).ignor, - rightButtonText: S.of(context).copy, - actionLeftButton: () => Navigator.of(context).pop(false), - actionRightButton: () => Navigator.of(context).pop(true)); - }) ?? + context: context, + builder: (BuildContext context) { + return AlertWithTwoActions( + alertTitle: S.of(context).transaction_sent, + alertContent: S.of(context).cake_pay_save_order + '\n${order}', + leftButtonText: S.of(context).ignor, + rightButtonText: S.of(context).copy, + actionLeftButton: () => Navigator.of(context).pop(false), + actionRightButton: () => Navigator.of(context).pop(true)); + }) ?? false; if (isCopy) { diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 463c04988..90072a7c1 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -87,10 +87,6 @@ dependencies: git: url: https://github.com/cake-tech/ens_dart.git ref: main - bitcoin_flutter: - git: - url: https://github.com/cake-tech/bitcoin_flutter.git - ref: cake-update-v4 fluttertoast: 8.1.4 # tor: # git: @@ -104,7 +100,7 @@ dependencies: bitcoin_base: git: url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v3 + ref: cake-update-v4 ledger_flutter: ^1.0.1 hashlib: 1.12.0 diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index d543706fc..4cf9509f8 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "يتم التوصيل", "sync_status_failed_connect": "انقطع الاتصال", "sync_status_not_connected": "غير متصل", + "sync_status_starting_scan": "بدء المسح", "sync_status_starting_sync": "بدء المزامنة", "sync_status_syncronized": "متزامن", "sync_status_syncronizing": "يتم المزامنة", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index ede60567d..b76401cf4 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "СВЪРЗВАНЕ", "sync_status_failed_connect": "НЕУСПЕШНО СВЪРЗВАНЕ", "sync_status_not_connected": "НЯМА ВРЪЗКА", + "sync_status_starting_scan": "Стартово сканиране", "sync_status_starting_sync": "ЗАПОЧВАНЕ НА СИНХРОНИЗАЦИЯ", "sync_status_syncronized": "СИНХРОНИЗИРАНО", "sync_status_syncronizing": "СИНХРОНИЗИРАНЕ", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 8f2cda1e0..c5d374dd0 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "PŘIPOJOVÁNÍ", "sync_status_failed_connect": "ODPOJENO", "sync_status_not_connected": "NEPŘIPOJENO", + "sync_status_starting_scan": "Počáteční skenování", "sync_status_starting_sync": "SPOUŠTĚNÍ SYNCHRONIZACE", "sync_status_syncronized": "SYNCHRONIZOVÁNO", "sync_status_syncronizing": "SYNCHRONIZUJI", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 59a23222c..7b6613dd6 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "VERBINDEN", "sync_status_failed_connect": "GETRENNT", "sync_status_not_connected": "NICHT VERBUNDEN", + "sync_status_starting_scan": "Scan beginnen", "sync_status_starting_sync": "STARTE SYNCHRONISIERUNG", "sync_status_syncronized": "SYNCHRONISIERT", "sync_status_syncronizing": "SYNCHRONISIERE", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 1bd3fc241..35712a780 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "CONNECTING", "sync_status_failed_connect": "DISCONNECTED", "sync_status_not_connected": "NOT CONNECTED", + "sync_status_starting_scan": "STARTING SCAN", "sync_status_starting_sync": "STARTING SYNC", "sync_status_syncronized": "SYNCHRONIZED", "sync_status_syncronizing": "SYNCHRONIZING", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index dc8aa3b95..31a6e6865 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "CONECTANDO", "sync_status_failed_connect": "DESCONECTADO", "sync_status_not_connected": "NO CONECTADO", + "sync_status_starting_scan": "Escaneo inicial", "sync_status_starting_sync": "EMPEZANDO A SINCRONIZAR", "sync_status_syncronized": "SINCRONIZADO", "sync_status_syncronizing": "SINCRONIZANDO", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index f7c45f7ef..03d4a73dd 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "CONNEXION EN COURS", "sync_status_failed_connect": "DÉCONNECTÉ", "sync_status_not_connected": "NON CONNECTÉ", + "sync_status_starting_scan": "Démarrage", "sync_status_starting_sync": "DÉBUT DE SYNCHRO", "sync_status_syncronized": "SYNCHRONISÉ", "sync_status_syncronizing": "SYNCHRONISATION EN COURS", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index a5805bbb8..922f9a51b 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -697,6 +697,7 @@ "sync_status_connecting": "HADA", "sync_status_failed_connect": "BABU INTERNET", "sync_status_not_connected": "BABU INTERNET", + "sync_status_starting_scan": "Fara scan", "sync_status_starting_sync": "KWAFI", "sync_status_syncronized": "KYAU", "sync_status_syncronizing": "KWAFI", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 4ab8e7534..db6940e8b 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -697,6 +697,7 @@ "sync_status_connecting": "कनेक्ट", "sync_status_failed_connect": "डिस्कनेक्ट किया गया", "sync_status_not_connected": "जुड़े नहीं हैं", + "sync_status_starting_scan": "स्कैन शुरू करना", "sync_status_starting_sync": "सिताज़ा करना", "sync_status_syncronized": "सिंक्रनाइज़", "sync_status_syncronizing": "सिंक्रनाइज़ करने", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 67095ba8f..57cf1361e 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "SPAJANJE", "sync_status_failed_connect": "ISKLJUČENO", "sync_status_not_connected": "NIJE POVEZANO", + "sync_status_starting_scan": "Početno skeniranje", "sync_status_starting_sync": "ZAPOČINJEMO SINKRONIZIRANJE", "sync_status_syncronized": "SINKRONIZIRANO", "sync_status_syncronizing": "SINKRONIZIRANJE", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 939b938fe..97a4afd3f 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -698,6 +698,7 @@ "sync_status_connecting": "MENGHUBUNGKAN", "sync_status_failed_connect": "GAGAL TERHUBUNG", "sync_status_not_connected": "TIDAK TERHUBUNG", + "sync_status_starting_scan": "Mulai pindai", "sync_status_starting_sync": "MULAI SINKRONISASI", "sync_status_syncronized": "SUDAH TERSINKRONISASI", "sync_status_syncronizing": "SEDANG SINKRONISASI", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 29a142d1e..42c2e628d 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -697,6 +697,7 @@ "sync_status_connecting": "CONNESSIONE", "sync_status_failed_connect": "DISCONNESSO", "sync_status_not_connected": "NON CONNESSO", + "sync_status_starting_scan": "Scansione di partenza", "sync_status_starting_sync": "INIZIO SINC", "sync_status_syncronized": "SINCRONIZZATO", "sync_status_syncronizing": "SINCRONIZZAZIONE", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 3009aa115..72b1f7d09 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "接続中", "sync_status_failed_connect": "切断されました", "sync_status_not_connected": "接続されていません", + "sync_status_starting_scan": "スキャンを開始します", "sync_status_starting_sync": "同期の開始", "sync_status_syncronized": "同期された", "sync_status_syncronizing": "同期", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 53b3cc875..b8cfee1b5 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "연결 중", "sync_status_failed_connect": "연결 해제", "sync_status_not_connected": "연결되지 않은", + "sync_status_starting_scan": "스캔 시작", "sync_status_starting_sync": "동기화 시작", "sync_status_syncronized": "동기화", "sync_status_syncronizing": "동기화", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 64a7a1ad1..52fe72ea6 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "ချိတ်ဆက်ခြင်း။", "sync_status_failed_connect": "အဆက်အသွယ်ဖြတ်ထားသည်။", "sync_status_not_connected": "မချိတ်ဆက်ပါ။", + "sync_status_starting_scan": "စကင်ဖတ်စစ်ဆေးမှု", "sync_status_starting_sync": "စင့်ခ်လုပ်ခြင်း။", "sync_status_syncronized": "ထပ်တူပြုထားသည်။", "sync_status_syncronizing": "ထပ်တူပြုခြင်း။", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 86f6b8c0b..cde10506f 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "AANSLUITING", "sync_status_failed_connect": "LOSGEKOPPELD", "sync_status_not_connected": "NIET VERBONDEN", + "sync_status_starting_scan": "Startscan", "sync_status_starting_sync": "BEGINNEN MET SYNCHRONISEREN", "sync_status_syncronized": "SYNCHRONIZED", "sync_status_syncronizing": "SYNCHRONISEREN", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 34a8d57fe..a22034c96 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "ŁĄCZENIE", "sync_status_failed_connect": "POŁĄCZENIE NIEUDANE", "sync_status_not_connected": "NIE POŁĄCZONY", + "sync_status_starting_scan": "Rozpoczęcie skanowania", "sync_status_starting_sync": "ROZPOCZĘCIE SYNCHRONIZACJI", "sync_status_syncronized": "ZSYNCHRONIZOWANO", "sync_status_syncronizing": "SYNCHRONIZACJA", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 67d68988f..8f87ca59f 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -697,6 +697,7 @@ "sync_status_connecting": "CONECTANDO", "sync_status_failed_connect": "DESCONECTADO", "sync_status_not_connected": "DESCONECTADO", + "sync_status_starting_scan": "Diretor inicial", "sync_status_starting_sync": "INICIANDO SINCRONIZAÇÃO", "sync_status_syncronized": "SINCRONIZADO", "sync_status_syncronizing": "SINCRONIZANDO", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 521cda83d..9f360137f 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "ПОДКЛЮЧЕНИЕ", "sync_status_failed_connect": "ОТКЛЮЧЕНО", "sync_status_not_connected": "НЕ ПОДКЛЮЧЁН", + "sync_status_starting_scan": "Начальное сканирование", "sync_status_starting_sync": "НАЧАЛО СИНХРОНИЗАЦИИ", "sync_status_syncronized": "СИНХРОНИЗИРОВАН", "sync_status_syncronizing": "СИНХРОНИЗАЦИЯ", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 996472f47..a178d2452 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "กำลังเชื่อมต่อ", "sync_status_failed_connect": "การเชื่อมต่อล้มเหลว", "sync_status_not_connected": "ไม่ได้เชื่อมต่อ", + "sync_status_starting_scan": "เริ่มการสแกน", "sync_status_starting_sync": "กำลังเริ่มซิงโครไนซ์", "sync_status_syncronized": "ซิงโครไนซ์แล้ว", "sync_status_syncronizing": "กำลังซิงโครไนซ์", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 27e4974bb..f49d3ddee 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "Pagkonekta", "sync_status_failed_connect": "Naka -disconnect", "sync_status_not_connected": "HINDI KONEKTADO", + "sync_status_starting_scan": "Simula sa pag -scan", "sync_status_starting_sync": "Simula sa pag -sync", "sync_status_syncronized": "Naka -synchronize", "sync_status_syncronizing": "Pag -synchronize", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 74b72581e..c73765f64 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "BAĞLANILIYOR", "sync_status_failed_connect": "BAĞLANTI KESİLDİ", "sync_status_not_connected": "BAĞLI DEĞİL", + "sync_status_starting_scan": "Başlangıç ​​taraması", "sync_status_starting_sync": "SENKRONİZE BAŞLATILIYOR", "sync_status_syncronized": "SENKRONİZE EDİLDİ", "sync_status_syncronizing": "SENKRONİZE EDİLİYOR", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 74b2e4703..d088dd1b2 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "ПІДКЛЮЧЕННЯ", "sync_status_failed_connect": "ВІДКЛЮЧЕНО", "sync_status_not_connected": "НЕ ПІДКЛЮЧЕННИЙ", + "sync_status_starting_scan": "Початок сканування", "sync_status_starting_sync": "ПОЧАТОК СИНХРОНІЗАЦІЇ", "sync_status_syncronized": "СИНХРОНІЗОВАНИЙ", "sync_status_syncronizing": "СИНХРОНІЗАЦІЯ", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 35d024188..0694463de 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -697,6 +697,7 @@ "sync_status_connecting": "جڑ رہا ہے۔", "sync_status_failed_connect": "منقطع", "sync_status_not_connected": "منسلک نہیں", + "sync_status_starting_scan": "اسکین شروع کرنا", "sync_status_starting_sync": "مطابقت پذیری شروع کر رہا ہے۔", "sync_status_syncronized": "مطابقت پذیر", "sync_status_syncronizing": "مطابقت پذیری", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 29b8d9b71..87df87aca 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -696,6 +696,7 @@ "sync_status_connecting": "Ń DÁRAPỌ̀ MỌ́", "sync_status_failed_connect": "ÌKÀNPỌ̀ TI KÚ", "sync_status_not_connected": "KÒ TI DÁRAPỌ̀ MỌ́ Ọ", + "sync_status_starting_scan": "Bibẹrẹ ọlọjẹ", "sync_status_starting_sync": "Ń BẸ̀RẸ̀ RẸ́", "sync_status_syncronized": "TI MÚDỌ́GBA", "sync_status_syncronizing": "Ń MÚDỌ́GBA", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index a30acad70..89eca2073 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -695,6 +695,7 @@ "sync_status_connecting": "连接中", "sync_status_failed_connect": "断线", "sync_status_not_connected": "未连接", + "sync_status_starting_scan": "开始扫描", "sync_status_starting_sync": "开始同步", "sync_status_syncronized": "已同步", "sync_status_syncronizing": "正在同步", diff --git a/tool/configure.dart b/tool/configure.dart index 8b5af92b2..c37946476 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -94,12 +94,11 @@ import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:hive/hive.dart'; import 'package:ledger_flutter/ledger_flutter.dart'; -import 'package:bitcoin_flutter/bitcoin_flutter.dart' as btc; +import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:bip39/bip39.dart' as bip39; """; const bitcoinCWHeaders = """ import 'package:cw_bitcoin/utils.dart'; -import 'package:cw_bitcoin/litecoin_network.dart'; import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/electrum.dart'; import 'package:cw_bitcoin/pending_bitcoin_transaction.dart'; From 88a57c1541e06264a3f690c4d83bb8918e29621d Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Mon, 12 Aug 2024 02:53:13 +0300 Subject: [PATCH 32/77] V4.19.2 v1.16.2 (#1591) * refactor: remove bitcoin_flutter, update deps, electrs node improvements * feat: connecting/disconnecting improvements, fix rescan by date, scanning message * chore: print * Update pubspec.yaml * Update pubspec.yaml * handle null sockets, retry connection on connect failure * fix imports * update app versions * fix transaction history * fix RBF * update android build number [skip ci] --------- Co-authored-by: Rafael Saes Co-authored-by: Matthew Fosse --- assets/text/Monerocom_Release_Notes.txt | 5 +++-- assets/text/Release_Notes.txt | 9 +++++---- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- scripts/macos/app_env.sh | 8 ++++---- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 2a6c07abe..c90d54524 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,3 +1,4 @@ -Monero enhancements -Synchronization improvements +Monero synchronization improvements +Enhance error handling +UI enhancements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index d17a22c84..34bca2e5e 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,5 +1,6 @@ -Monero and Ethereum enhancements -Synchronization improvements -Exchange flow enhancements -Ledger improvements +Wallets enhancements +Monero synchronization improvements +Improve wallet backups +Enhance error handling +UI enhancements Bug fixes \ No newline at end of file diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index a270afab0..35444dcd5 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.16.1" -MONERO_COM_BUILD_NUMBER=95 +MONERO_COM_VERSION="1.16.2" +MONERO_COM_BUILD_NUMBER=96 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.19.1" -CAKEWALLET_BUILD_NUMBER=221 +CAKEWALLET_VERSION="4.19.2" +CAKEWALLET_BUILD_NUMBER=223 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 22daba5de..30573035a 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.16.1" -MONERO_COM_BUILD_NUMBER=93 +MONERO_COM_VERSION="1.16.2" +MONERO_COM_BUILD_NUMBER=94 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.1" -CAKEWALLET_BUILD_NUMBER=256 +CAKEWALLET_VERSION="4.19.2" +CAKEWALLET_BUILD_NUMBER=261 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index d46900405..2f6d51a93 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.6.1" -MONERO_COM_BUILD_NUMBER=26 +MONERO_COM_VERSION="1.6.2" +MONERO_COM_BUILD_NUMBER=27 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.12.1" -CAKEWALLET_BUILD_NUMBER=82 +CAKEWALLET_VERSION="1.12.2" +CAKEWALLET_BUILD_NUMBER=83 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then From 1809f91f0122fd4e3726da2edf2aecb2d6d7244c Mon Sep 17 00:00:00 2001 From: tuxsudo Date: Mon, 12 Aug 2024 15:17:01 -0400 Subject: [PATCH 33/77] Fix logo sizing (#1592) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7823734fb..6e507bfcd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- +![logo](.github/assets/Logo_CakeWallet.png)
From 3b635218a5bee77e9f267b1504e78cd8d786b311 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 13 Aug 2024 01:04:05 +0300 Subject: [PATCH 34/77] minor fix (#1597) --- ios/Podfile.lock | 38 +++++++++++++++++++++++++ ios/Runner.xcodeproj/project.pbxproj | 6 ++-- lib/utils/exception_handler.dart | 1 + scripts/android/app_env.sh | 8 +++--- scripts/ios/app_env.sh | 8 +++--- scripts/windows/build_exe_installer.iss | 2 +- 6 files changed, 51 insertions(+), 12 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index fb6dc4ecf..212d1ec1c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -8,6 +8,36 @@ PODS: - Flutter - ReachabilitySwift - CryptoSwift (1.8.2) + - 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_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): @@ -115,6 +145,8 @@ DEPENDENCIES: - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - CryptoSwift + - cw_haven (from `.symlinks/plugins/cw_haven/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`) @@ -162,6 +194,10 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/barcode_scan2/ios" connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" + cw_haven: + :path: ".symlinks/plugins/cw_haven/ios" + cw_shared_external: + :path: ".symlinks/plugins/cw_shared_external/ios" device_display_brightness: :path: ".symlinks/plugins/device_display_brightness/ios" device_info_plus: @@ -216,6 +252,8 @@ SPEC CHECKSUMS: BigInt: f668a80089607f521586bbe29513d708491ef2f7 connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d CryptoSwift: c63a805d8bb5e5538e88af4e44bb537776af11ea + cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a + cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 devicelocale: b22617f40038496deffba44747101255cee005b0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 417c522a6..688fa2c39 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -483,7 +483,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.1; - PRODUCT_BUNDLE_IDENTIFIER = "com.fotolockr.cakewallet"; + PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -629,7 +629,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.1; - PRODUCT_BUNDLE_IDENTIFIER = "com.fotolockr.cakewallet"; + PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -667,7 +667,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.1; - PRODUCT_BUNDLE_IDENTIFIER = "com.fotolockr.cakewallet"; + PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 6045c0004..5e0c83f88 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -173,6 +173,7 @@ class ExceptionHandler { "OS Error: Network is unreachable", "ClientException: Write failed, uri=http", "Connection terminated during handshake", + "Corrupted wallets seeds", ]; static Future _addDeviceInfo(File file) async { diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 35444dcd5..c91f24622 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.16.2" -MONERO_COM_BUILD_NUMBER=96 +MONERO_COM_VERSION="1.16.3" +MONERO_COM_BUILD_NUMBER=97 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.19.2" -CAKEWALLET_BUILD_NUMBER=223 +CAKEWALLET_VERSION="4.19.3" +CAKEWALLET_BUILD_NUMBER=224 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 30573035a..e32b3e9f3 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.16.2" -MONERO_COM_BUILD_NUMBER=94 +MONERO_COM_VERSION="1.16.3" +MONERO_COM_BUILD_NUMBER=95 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.2" -CAKEWALLET_BUILD_NUMBER=261 +CAKEWALLET_VERSION="4.19.3" +CAKEWALLET_BUILD_NUMBER=262 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/windows/build_exe_installer.iss b/scripts/windows/build_exe_installer.iss index ef26941d7..216f367ca 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.0.3" +#define MyAppVersion "0.0.4" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe" From 1ce60d62b3121cfbd6b882c041283556c2c7bca7 Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 13 Aug 2024 00:18:14 +0200 Subject: [PATCH 35/77] CW-676 Add Linux scripts to build monero_c for linux platform (#1527) * Revert "Revert btc address types" This reverts commit a49e57e3 * Re-add Bitcoin Address types Fix conflicts with main * fix: label issues, clear spent utxo * chore: deps * fix: build * fix: missing types * feat: new electrs API & changes, fixes for last block scanning * Update Monero * not sure why it's failing * Enable Exolix Improve service updates indicator New versions * Add exolix Api token to limits api * Ignore reporting network issues * Change default bitcoin node * Merge main and update linux version * Update app version [skip ci] * New versions * Fix conflicts and update linux version * minor fix * feat: Scan Silent Payments homepage toggle * chore: build configure * feat: generic fixes, testnet UI improvements, useSSL on bitcoin nodes * fix: invalid Object in sendData * feat: improve addresses page & address book displays * feat: silent payments labeled addresses disclaimer * fix: missing i18n * chore: print * feat: single block scan, rescan by date working for btc mainnet * feat: new cake features page replace market page, move sp scan toggle, auto switch node pop up alert * feat: delete silent addresses * fix: red dot in non ssl nodes * fix: inconsistent connection states, fix tx history * fix: tx & balance displays, cpfp sending * feat: new rust lib * chore: node path * fix: check node based on network * fix: missing txcount from addresses * style: padding in feature page cards * fix: restore not getting all wallet addresses by type * fix: auto switch node broken * fix: silent payment txs not being restored * update linux version * feat: change scanning to subscription model, sync improvements * fix: scan re-subscription * fix: default nodes * fix: improve scanning by date, fix single block scan * refactor: common function for input tx selection * various fixes for build issues * initial monero.dart implementation * ... * multiple wallets new lib minor fixes * other fixes from monero.dart and monero_c * fix: nodes & build * update build scripts fix polyseed * remove unnecessary code * Add windows app, build scripts and build guide for it. * Minor fix in generated monero configs * Merge and fix main * fix: send all with multiple outs * add missing monero_c command * add android build script * update version * Merge and fix main * undo android ndk removal * Fix modified exception_handler.dart * Temporarily remove haven * fix build issues * fix pr script * Fixes for build monero.dart (monero_c) for windows. * monero build script * wip: ios build script * refactor: unchanged file * Added build guides for iOS and macOS. Replaced nproc call on macOS. Added macOS configuration for configure_cake_wallet.sh script. * Update monero.dart and monero_c versions. * Add missed windows build scripts * Update the application configuration for windows build script. * Update cw_monero pubspec lock file for monero.dart * Update pr_test_build.yml * chore: upgrade * chore: merge changes * refactor: unchanged files [skip ci] * Fix conflicts with main * fix for multiple wallets * update app version [skip ci] * Add tron to windows application configuration. * Add macOS option for description message in configure_cake_wallet.sh * fix missing encryption utils in hardware wallet functions [skip ci] * fix conflicts * Include missed monero dll for windows. * reformatting [skip ci] * fix conflicts with main * Disable haven configuration for iOS as default. Add ability to configure cakewallet for iOS with for configuration script. Remove cw_shared configuration for cw_monero. * fix: scan fixes, add date, allow sending while scanning * add missing nano secrets file [skip ci] * ios library * don't pull prebuilds android * Add auto generation of manifest file for android project even for iOS, macOS, Windows. * remove tron * feat: sync fixes, sp settings * feat: fix resyncing * store crash fix * make init async so it won't lag disable print starts * fix monero_c build issues * libstdc++ * merge main and update version * Fix MacOS saving wallet file issue Fix Secure Storage issue (somehow) * update pubspec.lock * fix build script * Use dylib as iOS framework. Use custom path for loading of iOS framework for monero.dart. Add script for generate iOS framework for monero wallet. * fix: date from height logic, status disconnected & chain tip get * fix: params * feat: electrum migration if using cake electrum * fix nodes update versions * re-enable tron * update sp_scanner to work on iOS [skip ci] * bump monero_c hash * bump monero_c commit * bump moneroc version * bump monero_c commit * Add ability to build monero wallet lib as universal lib. Update macOS build guide. Change default arch for macOS project to . * fix: wrong socket for old electrum nodes * update version * Fix unchecked wallet type call * get App Dir correctly in default_settings_migration.dart * handle previous issue with fetching linux documents directory [skip ci] * backup fix * fix NTFS issues * Add Tron Update Linux version * Close the wallet when the wallet gets changed * fix: double balance * feat: node domain * fix: menu name * bump monero_c commit * fix: update tip on set scanning * fix: connection switching back and forth * feat: check if node is electrs, and supports sp * chore: fix build * minor enhancements * fixes and enhancements * solve conflicts with main * Only stop wallet on rename and delete * fix: status toggle * minor enhancement * Monero.com fixes * bump monero_c commit * update sp_scanner to include windows and linux * merge main * Update macOS build guide. Change brew dependencies for build unbound locally. * fix: Tron file write, build scripts * - merge linux with Monero Dart - Temporarily disable Monero * fix other issues with linux * linux ci fix build script * Update pr_test_build_linux.yml install required packages * add linux desktop dependencies * don't use apk in linux build releases * don't copy the file to test-apk * fix linux runtime issues * remove libc++_shared.so * fix issues with linux * prepare both android and linux (because otherwise it will fail) * ci script updates * run apt update * bump image to ubuntu 22.04 note: remember to put it down later * bump python version * remove some dependencies * remove unused import * add missing dependencies * fix dependencies * some fixes * remove print [skip ci] * Add back RunnerBase.entitlements minor fixes [skip ci] * fix memory leak / infinite recurrsion when opening xmr wallet * url_launcher_linux: 3.1.1 # https://github.com/flutter/flutter/issues/153083 * fix conflicts with main * handle walletKeysFile with encryptionUtils * update app version [skip ci] * add wownero [skip ci] --------- Co-authored-by: OmarHatem Co-authored-by: Rafael Saes Co-authored-by: M Co-authored-by: Konstantin Ullrich --- .github/workflows/cache_dependencies.yml | 2 +- ...st_build.yml => pr_test_build_android.yml} | 4 +- .github/workflows/pr_test_build_linux.yml | 186 ++++++++++++ .gitignore | 2 + .metadata | 6 + build-guide-linux.md | 176 ++++++++++++ com.cakewallet.CakeWallet.yml | 35 +++ configure_cake_wallet.sh | 14 +- cw_bitcoin/lib/bitcoin_wallet.dart | 31 +- .../bitcoin_wallet_creation_credentials.dart | 2 + cw_bitcoin/lib/bitcoin_wallet_service.dart | 10 +- .../lib/electrum_transaction_history.dart | 11 +- cw_bitcoin/lib/electrum_wallet.dart | 22 +- cw_bitcoin/lib/electrum_wallet_snapshot.dart | 5 +- cw_bitcoin/lib/litecoin_wallet.dart | 36 ++- cw_bitcoin/lib/litecoin_wallet_service.dart | 84 +++--- cw_bitcoin/pubspec.lock | 25 ++ .../lib/src/bitcoin_cash_wallet.dart | 23 +- ...coin_cash_wallet_creation_credentials.dart | 4 +- .../lib/src/bitcoin_cash_wallet_service.dart | 27 +- cw_core/lib/encryption_file_utils.dart | 42 +++ cw_core/lib/wallet_base.dart | 2 + cw_core/lib/wallet_keys_file.dart | 31 +- cw_core/pubspec.lock | 33 +++ cw_core/pubspec.yaml | 5 + .../lib/ethereum_transaction_history.dart | 1 + cw_ethereum/lib/ethereum_wallet.dart | 27 +- cw_ethereum/lib/ethereum_wallet_service.dart | 15 +- cw_evm/lib/evm_chain_transaction_history.dart | 10 +- cw_evm/lib/evm_chain_wallet.dart | 21 +- ...evm_chain_wallet_creation_credentials.dart | 4 +- cw_evm/lib/evm_chain_wallet_service.dart | 3 +- cw_evm/lib/file.dart | 39 --- cw_evm/pubspec.yaml | 1 + cw_haven/lib/haven_wallet.dart | 9 +- cw_haven/pubspec.lock | 33 +++ cw_monero/.metadata | 3 + cw_monero/example/linux/.gitignore | 1 + cw_monero/example/linux/CMakeLists.txt | 138 +++++++++ .../example/linux/flutter/CMakeLists.txt | 88 ++++++ .../flutter/generated_plugin_registrant.cc | 15 + .../flutter/generated_plugin_registrant.h | 15 + .../linux/flutter/generated_plugins.cmake | 24 ++ cw_monero/example/linux/main.cc | 6 + cw_monero/example/linux/my_application.cc | 104 +++++++ cw_monero/example/linux/my_application.h | 18 ++ cw_monero/lib/api/account_list.dart | 1 - cw_monero/lib/api/wallet_manager.dart | 2 + cw_monero/lib/monero_wallet.dart | 10 +- cw_monero/lib/monero_wallet_service.dart | 57 +++- cw_monero/linux/CMakeLists.txt | 270 ++++++++++++++++++ cw_monero/linux/cw_monero_plugin.cc | 70 +++++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../linux/flutter/generated_plugins.cmake | 23 ++ .../include/cw_monero/cw_monero_plugin.h | 26 ++ cw_monero/pubspec.lock | 37 ++- cw_nano/lib/file.dart | 39 --- cw_nano/lib/nano_transaction_history.dart | 22 +- cw_nano/lib/nano_wallet.dart | 32 ++- cw_nano/lib/nano_wallet_service.dart | 17 +- cw_nano/pubspec.lock | 33 +++ .../lib/polygon_transaction_history.dart | 1 + cw_polygon/lib/polygon_wallet.dart | 30 +- cw_polygon/lib/polygon_wallet_service.dart | 15 +- cw_solana/lib/file.dart | 39 --- cw_solana/lib/solana_transaction_history.dart | 10 +- cw_solana/lib/solana_wallet.dart | 34 ++- .../solana_wallet_creation_credentials.dart | 4 +- cw_solana/lib/solana_wallet_service.dart | 15 +- cw_tron/lib/file.dart | 39 --- cw_tron/lib/tron_transaction_history.dart | 10 +- cw_tron/lib/tron_wallet.dart | 27 +- .../lib/tron_wallet_creation_credentials.dart | 4 +- cw_tron/lib/tron_wallet_service.dart | 15 +- cw_wownero/lib/wownero_wallet.dart | 7 +- cw_wownero/lib/wownero_wallet_service.dart | 12 +- cw_wownero/pubspec.lock | 33 +++ lib/bitcoin/cw_bitcoin.dart | 12 +- lib/bitcoin_cash/cw_bitcoin_cash.dart | 7 +- lib/core/backup_service.dart | 2 +- lib/core/wallet_creation_service.dart | 32 ++- lib/core/wallet_loading_service.dart | 19 +- lib/di.dart | 86 +++++- lib/entities/load_current_wallet.dart | 7 +- lib/ethereum/cw_ethereum.dart | 7 +- lib/main.dart | 4 +- lib/nano/cw_nano.dart | 4 +- lib/polygon/cw_polygon.dart | 7 +- .../on_authentication_state_change.dart | 3 +- lib/router.dart | 79 +++-- lib/routes.dart | 2 + lib/solana/cw_solana.dart | 7 +- lib/src/screens/auth/auth_page.dart | 15 +- .../desktop_action_button.dart | 78 ++--- .../desktop_wallet_selection_dropdown.dart | 28 +- .../screens/new_wallet/new_wallet_page.dart | 94 +++++- .../wallet_restore_from_keys_form.dart | 49 +++- .../wallet_restore_from_seed_form.dart | 49 +++- .../screens/restore/wallet_restore_page.dart | 10 +- lib/src/screens/root/root.dart | 1 + .../settings/security_backup_page.dart | 19 +- lib/src/screens/wallet/wallet_edit_page.dart | 49 +++- .../screens/wallet_list/wallet_list_page.dart | 17 ++ .../wallet_unlock_arguments.dart | 17 ++ .../wallet_unlock/wallet_unlock_page.dart | 238 +++++++++++++++ lib/src/widgets/address_text_field.dart | 7 +- lib/store/settings_store.dart | 1 + lib/tron/cw_tron.dart | 8 +- lib/utils/package_info.dart | 2 +- lib/view_model/wallet_creation_vm.dart | 18 ++ .../wallet_list/wallet_edit_view_model.dart | 5 +- lib/view_model/wallet_new_vm.dart | 18 +- lib/view_model/wallet_restore_view_model.dart | 2 +- .../wallet_unlock_loadable_view_model.dart | 63 ++++ .../wallet_unlock_verifiable_view_model.dart | 60 ++++ lib/view_model/wallet_unlock_view_model.dart | 11 + linux/.gitignore | 1 + linux/CMakeLists.txt | 144 ++++++++++ linux/com.cakewallet.CakeWallet.desktop | 9 + linux/flutter/CMakeLists.txt | 88 ++++++ linux/flutter/generated_plugin_registrant.cc | 27 ++ linux/flutter/generated_plugin_registrant.h | 15 + linux/flutter/generated_plugins.cmake | 28 ++ linux/main.cc | 6 + linux/my_application.cc | 104 +++++++ linux/my_application.h | 18 ++ macos/CakeWallet/decrypt.swift | 16 ++ macos/Flutter/GeneratedPluginRegistrant.swift | 2 - macos/Runner/RunnerBase.entitlements | 2 +- model_generator.sh | 1 + pubspec_base.yaml | 4 +- res/values/strings_ar.arb | 6 + res/values/strings_bg.arb | 6 + res/values/strings_cs.arb | 6 + res/values/strings_de.arb | 6 + res/values/strings_en.arb | 6 + res/values/strings_es.arb | 6 + res/values/strings_fr.arb | 6 + res/values/strings_ha.arb | 6 + res/values/strings_hi.arb | 6 + res/values/strings_hr.arb | 6 + res/values/strings_id.arb | 6 + res/values/strings_it.arb | 6 + res/values/strings_ja.arb | 6 + res/values/strings_ko.arb | 6 + res/values/strings_my.arb | 6 + res/values/strings_nl.arb | 6 + res/values/strings_pl.arb | 6 + res/values/strings_pt.arb | 6 + res/values/strings_ru.arb | 6 + res/values/strings_th.arb | 6 + res/values/strings_tl.arb | 6 + res/values/strings_tr.arb | 6 + res/values/strings_uk.arb | 6 + res/values/strings_ur.arb | 6 + res/values/strings_yo.arb | 6 + res/values/strings_zh.arb | 6 + scripts/android/shell.nix | 16 -- scripts/ios/gen_framework.sh | 2 +- scripts/linux/app_config.sh | 25 ++ scripts/linux/app_env.fish | 35 +++ scripts/linux/app_env.sh | 35 +++ scripts/linux/build_all.sh | 3 + scripts/linux/build_boost.sh | 36 +++ scripts/linux/build_expat.sh | 20 ++ scripts/linux/build_iconv.sh | 22 ++ scripts/linux/build_monero.sh | 40 +++ scripts/linux/build_monero_all.sh | 21 ++ scripts/linux/build_openssl.sh | 19 ++ scripts/linux/build_sodium.sh | 19 ++ scripts/linux/build_unbound.sh | 25 ++ scripts/linux/build_zmq.sh | 17 ++ scripts/linux/cakewallet.sh | 4 + scripts/linux/config.sh | 13 + scripts/linux/gcc10.nix | 12 + scripts/linux/setup.sh | 9 + tool/configure.dart | 34 +-- 178 files changed, 3955 insertions(+), 563 deletions(-) rename .github/workflows/{pr_test_build.yml => pr_test_build_android.yml} (98%) create mode 100644 .github/workflows/pr_test_build_linux.yml create mode 100644 build-guide-linux.md create mode 100644 com.cakewallet.CakeWallet.yml create mode 100644 cw_core/lib/encryption_file_utils.dart delete mode 100644 cw_evm/lib/file.dart create mode 100644 cw_monero/example/linux/.gitignore create mode 100644 cw_monero/example/linux/CMakeLists.txt create mode 100644 cw_monero/example/linux/flutter/CMakeLists.txt create mode 100644 cw_monero/example/linux/flutter/generated_plugin_registrant.cc create mode 100644 cw_monero/example/linux/flutter/generated_plugin_registrant.h create mode 100644 cw_monero/example/linux/flutter/generated_plugins.cmake create mode 100644 cw_monero/example/linux/main.cc create mode 100644 cw_monero/example/linux/my_application.cc create mode 100644 cw_monero/example/linux/my_application.h create mode 100644 cw_monero/linux/CMakeLists.txt create mode 100644 cw_monero/linux/cw_monero_plugin.cc create mode 100644 cw_monero/linux/flutter/generated_plugin_registrant.cc create mode 100644 cw_monero/linux/flutter/generated_plugin_registrant.h create mode 100644 cw_monero/linux/flutter/generated_plugins.cmake create mode 100644 cw_monero/linux/include/cw_monero/cw_monero_plugin.h delete mode 100644 cw_nano/lib/file.dart delete mode 100644 cw_solana/lib/file.dart delete mode 100644 cw_tron/lib/file.dart create mode 100644 lib/src/screens/wallet_unlock/wallet_unlock_arguments.dart create mode 100644 lib/src/screens/wallet_unlock/wallet_unlock_page.dart create mode 100644 lib/view_model/wallet_unlock_loadable_view_model.dart create mode 100644 lib/view_model/wallet_unlock_verifiable_view_model.dart create mode 100644 lib/view_model/wallet_unlock_view_model.dart create mode 100644 linux/.gitignore create mode 100644 linux/CMakeLists.txt create mode 100644 linux/com.cakewallet.CakeWallet.desktop create mode 100644 linux/flutter/CMakeLists.txt create mode 100644 linux/flutter/generated_plugin_registrant.cc create mode 100644 linux/flutter/generated_plugin_registrant.h create mode 100644 linux/flutter/generated_plugins.cmake create mode 100644 linux/main.cc create mode 100644 linux/my_application.cc create mode 100644 linux/my_application.h create mode 100644 macos/CakeWallet/decrypt.swift delete mode 100644 scripts/android/shell.nix create mode 100755 scripts/linux/app_config.sh create mode 100644 scripts/linux/app_env.fish create mode 100755 scripts/linux/app_env.sh create mode 100755 scripts/linux/build_all.sh create mode 100755 scripts/linux/build_boost.sh create mode 100755 scripts/linux/build_expat.sh create mode 100755 scripts/linux/build_iconv.sh create mode 100755 scripts/linux/build_monero.sh create mode 100755 scripts/linux/build_monero_all.sh create mode 100755 scripts/linux/build_openssl.sh create mode 100755 scripts/linux/build_sodium.sh create mode 100755 scripts/linux/build_unbound.sh create mode 100755 scripts/linux/build_zmq.sh create mode 100755 scripts/linux/cakewallet.sh create mode 100755 scripts/linux/config.sh create mode 100644 scripts/linux/gcc10.nix create mode 100755 scripts/linux/setup.sh diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index e9c53c00f..cca5bb4bf 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: "11.x" + java-version: "17.x" - name: Configure placeholder git details run: | git config --global user.email "CI@cakewallet.com" diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build_android.yml similarity index 98% rename from .github/workflows/pr_test_build.yml rename to .github/workflows/pr_test_build_android.yml index 4c46137ac..ea8770860 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -53,7 +53,9 @@ jobs: channel: stable - name: Install package dependencies - run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang + run: | + sudo apt update + sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang - name: Execute Build and Setup Commands run: | diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml new file mode 100644 index 000000000..12c930120 --- /dev/null +++ b/.github/workflows/pr_test_build_linux.yml @@ -0,0 +1,186 @@ +name: PR Test Build linux + +on: + pull_request: + branches: [main] + workflow_dispatch: + inputs: + branch: + description: "Branch name to build" + required: true + default: "main" + +jobs: + PR_test_build: + runs-on: ubuntu-20.04 + env: + STORE_PASS: test@cake_wallet + KEY_PASS: test@cake_wallet + PR_NUMBER: ${{ github.event.number }} + + steps: + - name: is pr + if: github.event_name == 'pull_request' + run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV + + - name: is not pr + if: github.event_name != 'pull_request' + run: echo "BRANCH_NAME=${{ github.event.inputs.branch }}" >> $GITHUB_ENVg + + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: "17.x" + - name: Configure placeholder git details + run: | + git config --global user.email "CI@cakewallet.com" + git config --global user.name "Cake Github Actions" + - name: Flutter action + uses: subosito/flutter-action@v1 + with: + flutter-version: "3.19.6" + channel: stable + + - name: Install package dependencies + run: | + sudo apt update + sudo apt-get install -y curl unzip automake build-essential file pkg-config git python-is-python3 libtool libtinfo5 cmake clang + + - name: Install desktop dependencies + run: | + sudo apt update + sudo apt install -y ninja-build libgtk-3-dev gperf + - name: Execute Build and Setup Commands + run: | + sudo mkdir -p /opt/android + sudo chown $USER /opt/android + 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 scripts && ./gen_android_manifest.sh && cd .. + cd cake_wallet/scripts/android/ + source ./app_env.sh cakewallet + ./app_config.sh + cd ../../.. + cd cake_wallet/scripts/linux/ + source ./app_env.sh cakewallet + ./app_config.sh + cd ../../.. + + - name: Cache Externals + id: cache-externals + uses: actions/cache@v3 + with: + path: | + /opt/android/cake_wallet/cw_haven/android/.cxx + /opt/android/cake_wallet/scripts/monero_c/release + key: linux-${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh') }} + + - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} + name: Generate Externals + run: | + cd /opt/android/cake_wallet/scripts/linux/ + source ./app_env.sh cakewallet + ./build_monero_all.sh + + - name: Install Flutter dependencies + run: | + cd /opt/android/cake_wallet + flutter pub get + + - name: Generate localization + run: | + cd /opt/android/cake_wallet + flutter packages pub run tool/generate_localization.dart + + - name: Build generated code + run: | + cd /opt/android/cake_wallet + ./model_generator.sh + + - name: Add secrets + run: | + cd /opt/android/cake_wallet + touch lib/.secrets.g.dart + touch cw_evm/lib/.secrets.g.dart + touch cw_solana/lib/.secrets.g.dart + touch cw_core/lib/.secrets.g.dart + touch cw_nano/lib/.secrets.g.dart + touch cw_tron/lib/.secrets.g.dart + echo "const salt = '${{ secrets.SALT }}';" > lib/.secrets.g.dart + echo "const keychainSalt = '${{ secrets.KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart + echo "const key = '${{ secrets.KEY }}';" >> lib/.secrets.g.dart + echo "const walletSalt = '${{ secrets.WALLET_SALT }}';" >> lib/.secrets.g.dart + echo "const shortKey = '${{ secrets.SHORT_KEY }}';" >> lib/.secrets.g.dart + echo "const backupSalt = '${{ secrets.BACKUP_SALT }}';" >> lib/.secrets.g.dart + echo "const backupKeychainSalt = '${{ secrets.BACKUP_KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart + echo "const changeNowApiKey = '${{ secrets.CHANGE_NOW_API_KEY }}';" >> lib/.secrets.g.dart + echo "const changeNowApiKeyDesktop = '${{ secrets.CHANGE_NOW_API_KEY_DESKTOP }}';" >> lib/.secrets.g.dart + echo "const wyreSecretKey = '${{ secrets.WYRE_SECRET_KEY }}';" >> lib/.secrets.g.dart + echo "const wyreApiKey = '${{ secrets.WYRE_API_KEY }}';" >> lib/.secrets.g.dart + echo "const wyreAccountId = '${{ secrets.WYRE_ACCOUNT_ID }}';" >> lib/.secrets.g.dart + echo "const moonPayApiKey = '${{ secrets.MOON_PAY_API_KEY }}';" >> lib/.secrets.g.dart + echo "const moonPaySecretKey = '${{ secrets.MOON_PAY_SECRET_KEY }}';" >> lib/.secrets.g.dart + echo "const sideShiftAffiliateId = '${{ secrets.SIDE_SHIFT_AFFILIATE_ID }}';" >> lib/.secrets.g.dart + echo "const simpleSwapApiKey = '${{ secrets.SIMPLE_SWAP_API_KEY }}';" >> lib/.secrets.g.dart + echo "const simpleSwapApiKeyDesktop = '${{ secrets.SIMPLE_SWAP_API_KEY_DESKTOP }}';" >> lib/.secrets.g.dart + echo "const onramperApiKey = '${{ secrets.ONRAMPER_API_KEY }}';" >> lib/.secrets.g.dart + echo "const anypayToken = '${{ secrets.ANY_PAY_TOKEN }}';" >> lib/.secrets.g.dart + echo "const ioniaClientId = '${{ secrets.IONIA_CLIENT_ID }}';" >> lib/.secrets.g.dart + echo "const twitterBearerToken = '${{ secrets.TWITTER_BEARER_TOKEN }}';" >> lib/.secrets.g.dart + echo "const trocadorApiKey = '${{ secrets.TROCADOR_API_KEY }}';" >> lib/.secrets.g.dart + echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart + echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart + echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart + echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart + echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> lib/.secrets.g.dart + echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart + echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart + echo "const chatwootWebsiteToken = '${{ secrets.CHATWOOT_WEBSITE_TOKEN }}';" >> lib/.secrets.g.dart + echo "const exolixApiKey = '${{ secrets.EXOLIX_API_KEY }}';" >> lib/.secrets.g.dart + echo "const robinhoodApplicationId = '${{ secrets.ROBINHOOD_APPLICATION_ID }}';" >> lib/.secrets.g.dart + echo "const exchangeHelperApiKey = '${{ secrets.ROBINHOOD_CID_CLIENT_SECRET }}';" >> lib/.secrets.g.dart + echo "const walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart + echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> lib/.secrets.g.dart + echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart + echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> cw_solana/lib/.secrets.g.dart + echo "const testCakePayApiKey = '${{ secrets.TEST_CAKE_PAY_API_KEY }}';" >> lib/.secrets.g.dart + echo "const cakePayApiKey = '${{ secrets.CAKE_PAY_API_KEY }}';" >> lib/.secrets.g.dart + echo "const authorization = '${{ secrets.CAKE_PAY_AUTHORIZATION }}';" >> lib/.secrets.g.dart + echo "const CSRFToken = '${{ secrets.CSRF_TOKEN }}';" >> lib/.secrets.g.dart + echo "const quantexExchangeMarkup = '${{ secrets.QUANTEX_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart + echo "const nano2ApiKey = '${{ secrets.NANO2_API_KEY }}';" >> cw_nano/lib/.secrets.g.dart + echo "const nanoNowNodesApiKey = '${{ secrets.NANO_NOW_NODES_API_KEY }}';" >> cw_nano/lib/.secrets.g.dart + echo "const tronGridApiKey = '${{ secrets.TRON_GRID_API_KEY }}';" >> cw_tron/lib/.secrets.g.dart + echo "const tronNowNodesApiKey = '${{ secrets.TRON_NOW_NODES_API_KEY }}';" >> cw_tron/lib/.secrets.g.dart + + - name: Rename app + run: | + echo -e "id=com.cakewallet.test_${{ env.PR_NUMBER }}\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties + + - name: Build + run: | + cd /opt/android/cake_wallet + flutter build linux --release + + - name: Prepare release zip file + run: | + cd /opt/android/cake_wallet/build/linux/x64/release + zip -r ${{env.BRANCH_NAME}}.zip bundle + + - name: Upload Artifact + uses: kittaakos/upload-artifact-as-is@v0 + with: + path: /opt/android/cake_wallet/build/linux/x64/release/${{env.BRANCH_NAME}}.zip + + - name: Send Test APK + continue-on-error: true + uses: adrey/slack-file-upload-action@1.0.5 + with: + token: ${{ secrets.SLACK_APP_TOKEN }} + path: /opt/android/cake_wallet/build/linux/x64/release/${{env.BRANCH_NAME}}.zip + channel: ${{ secrets.SLACK_APK_CHANNEL }} + title: "${{ env.BRANCH_NAME }}_linux.zip" + filename: ${{ env.BRANCH_NAME }}_linux.zip + initial_comment: ${{ github.event.head_commit.message }} diff --git a/.gitignore b/.gitignore index 77441e66f..8336ca512 100644 --- a/.gitignore +++ b/.gitignore @@ -160,6 +160,8 @@ macos/Runner/Release.entitlements macos/Runner/Runner.entitlements lib/core/secure_storage.dart +lib/core/secure_storage.dart + macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png diff --git a/.metadata b/.metadata index 7d00ca21a..c7b8dc9f8 100644 --- a/.metadata +++ b/.metadata @@ -18,6 +18,12 @@ migration: - platform: windows create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: macos + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: linux + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 # User provided section diff --git a/build-guide-linux.md b/build-guide-linux.md new file mode 100644 index 000000000..e0158945b --- /dev/null +++ b/build-guide-linux.md @@ -0,0 +1,176 @@ +# Building CakeWallet for Linux + +## Requirements and Setup + +The following are the system requirements to build CakeWallet for your Linux device. + +``` +Ubuntu >= 16.04 +Flutter 3.10.x +``` + +## Building CakeWallet on Linux + +These steps will help you configure and execute a build of CakeWallet from its source code. + +### 1. Installing Package Dependencies + +CakeWallet requires some packages to be install on your build system. You may easily install them on your build system with the following command: + +`$ sudo apt install build-essential cmake pkg-config git curl autoconf libtool` + +> [!WARNING] +> +> ### Check gcc version +> +> It is needed to use gcc 10 or 9 to successfully link dependencies with flutter.\ +> To check what gcc version you are using: +> +> ```bash +> $ gcc --version +> $ g++ --version +> ``` +> +> If you are using gcc version newer than 10, then you need to downgrade to version 10.4.0: +> +> ```bash +> $ sudo apt install gcc-10 g++-10 +> $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 +> $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 +> ``` + +> [!NOTE] +> +> Alternatively, you can use the [nix-shell](https://nixos.org/) with the `gcc10.nix` file\ +> present on `scripts/linux` like so: +> ```bash +> $ nix-shell gcc10.nix +> ``` +> This will get you in a nix environment with all the required dependencies that you can use to build the software from,\ +> and it works in any linux distro. + +### 2. Installing Flutter + +Need to install flutter. For this please check section [How to install flutter on Linux](https://docs.flutter.dev/get-started/install/linux). + +### 3. Verify Installations + +Verify that the Flutter have been correctly installed on your system with the following command: + +`$ flutter doctor` + +The output of this command will appear like this, indicating successful installations. If there are problems with your installation, they **must** be corrected before proceeding. + +``` +Doctor summary (to see all details, run flutter doctor -v): +[✓] Flutter (Channel stable, 3.10.x, on Linux, locale en_US.UTF-8) +``` + +### 4. Acquiring the CakeWallet Source Code + +Download CakeWallet source code + +`$ git clone https://github.com/cake-tech/cake_wallet.git --branch linux/password-direct-input` + +Proceed into the source code before proceeding with the next steps: + +`$ cd cake_wallet/scripts/linux/` + +To configure some project properties run: + +`$ ./cakewallet.sh` + +Build the Monero libraries and their dependencies: + +`$ ./build_all.sh` + +Now the dependencies need to be copied into the CakeWallet project with this command: + +`$ ./setup.sh` + +It is now time to change back to the base directory of the CakeWallet source code: + +`$ cd ../../` + +Install Flutter package dependencies with this command: + +`$ flutter pub get` + +> #### If you will get an error like: +> +> ``` +> The plugin `cw_shared_external` requires your app to be migrated to the Android embedding v2. Follow the steps on the migration doc above and re-run +> this command. +> ``` +> +> Then need to config Android project settings. For this open `scripts/android` (`$ cd scripts/android`) directory and run followed commands: +> +> ``` +> $ source ./app_env.sh cakewallet +> $ ./app_config.sh +> $ cd ../.. +> ``` +> +> Then re-configure Linux project again. For this open `scripts/linux` (`$cd scripts/linux`) directory and run: +> `$ ./cakewallet.sh` +> and back to project root directory: +> `$ cd ../..` +> and fetch dependecies again +> `$ flutter pub get` + +Your CakeWallet binary will be built with some specific keys for iterate with 3rd party services. You may generate these secret keys placeholders with the following command: + +`$ flutter packages pub run tool/generate_new_secrets.dart` + +We will generate mobx models for the project. + +`$ ./model_generator.sh` + +Then we need to generate localization files. + +`$ flutter packages pub run tool/generate_localization.dart` + +### 5. Build! + +`$ flutter build linux --release` + +Path to executable file will be: + +`build/linux/x64/release/bundle/cake_wallet` + +> ### Troubleshooting +> +> If you got an error while building the application with `$ flutter build linux --release` command, add `-v` argument to the command (`$ flutter build linux -v --release`) to get details.\ +> If you got in flutter build logs: undefined reference to `hid_free_enumeration`, or another error with undefined reference to `hid_*`, then rebuild monero lib without hidapi lib. Check does exists `libhidapi-dev` in your scope and remove it from your scope for build without it. + +# Flatpak + +For package the built application into flatpak you need fistly to install `flatpak` and `flatpak-builder`: + +`$ sudo apt install flatpak flatpak-builder` + +Then need to [add flathub](https://flatpak.org/setup/Ubuntu) (or just `$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`). Then need to install freedesktop runtime and sdk: + +`$ flatpak install flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08` + +To build with using of `flatpak-build` directory run next: + +`$ flatpak-builder --force-clean flatpak-build com.cakewallet.CakeWallet.yml` + +And then export bundle: + +`$ flatpak build-export export flatpak-build` + +`$ flatpak build-bundle export cake_wallet.flatpak com.cakewallet.CakeWallet` + +Result file: `cake_wallet.flatpak` should be generated in current directory. + +For install generated flatpak file use: + +`$ flatpak --user install cake_wallet.flatpak` + +For run the installed application run: + +`$ flatpak run com.cakewallet.CakeWallet` + +Copyright (c) 2023 Cake Technologies LLC. diff --git a/com.cakewallet.CakeWallet.yml b/com.cakewallet.CakeWallet.yml new file mode 100644 index 000000000..83efa1388 --- /dev/null +++ b/com.cakewallet.CakeWallet.yml @@ -0,0 +1,35 @@ +app-id: com.cakewallet.CakeWallet +runtime: org.freedesktop.Platform +runtime-version: '22.08' +sdk: org.freedesktop.Sdk +command: cake_wallet +separate-locales: false +finish-args: + - --share=ipc + - --socket=fallback-x11 + - --socket=wayland + - --device=dri + - --socket=pulseaudio + - --share=network + - --filesystem=home +modules: + - name: cake_wallet + buildsystem: simple + only-arches: + - x86_64 + build-commands: + - "cp -R bundle /app/cake_wallet" + - "chmod +x /app/cake_wallet/cake_wallet" + - "mkdir -p /app/bin" + - "ln -s /app/cake_wallet/cake_wallet /app/bin/cake_wallet" + - "mkdir -p /app/share/icons/hicolor/scalable/apps" + - "cp cakewallet_icon_180.png /app/share/icons/hicolor/scalable/apps/com.cakewallet.CakeWallet.png" + - "mkdir -p /app/share/applications" + - "cp com.cakewallet.CakeWallet.desktop /app/share/applications" + sources: + - type: dir + path: build/linux/x64/release + - type: file + path: assets/images/cakewallet_icon_180.png + - type: file + path: linux/com.cakewallet.CakeWallet.desktop diff --git a/configure_cake_wallet.sh b/configure_cake_wallet.sh index 0539221a3..90ce1c446 100755 --- a/configure_cake_wallet.sh +++ b/configure_cake_wallet.sh @@ -3,12 +3,13 @@ IOS="ios" ANDROID="android" MACOS="macos" +LINUX="linux" -PLATFORMS=($IOS $ANDROID $MACOS) +PLATFORMS=($IOS $ANDROID $MACOS $LINUX) PLATFORM=$1 if ! [[ " ${PLATFORMS[*]} " =~ " ${PLATFORM} " ]]; then - echo "specify platform: ./configure_cake_wallet.sh ios|android|macos" + echo "specify platform: ./configure_cake_wallet.sh ios|android|macos|linux" exit 1 fi @@ -27,9 +28,14 @@ if [ "$PLATFORM" == "$ANDROID" ]; then cd scripts/android fi +if [ "$PLATFORM" == "$LINUX" ]; then + echo "Configuring for linux" + cd scripts/linux +fi + source ./app_env.sh cakewallet ./app_config.sh cd ../.. && flutter pub get -#flutter packages pub run tool/generate_localization.dart +flutter packages pub run tool/generate_localization.dart ./model_generator.sh -#cd macos && pod install \ No newline at end of file +#cd macos && pod install diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index 7b8250541..e2e537ee8 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -5,9 +5,10 @@ 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/bitcoin_mnemonic.dart'; +import 'package:cw_core/encryption_file_utils.dart'; +import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/bitcoin_wallet_addresses.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; -import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; import 'package:cw_bitcoin/psbt_transaction_builder.dart'; @@ -30,6 +31,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { required String password, required WalletInfo walletInfo, required Box unspentCoinsInfo, + required EncryptionFileUtils encryptionFileUtils, Uint8List? seedBytes, String? mnemonic, String? xpub, @@ -58,6 +60,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, + encryptionFileUtils: encryptionFileUtils, currency: networkParam == BitcoinNetwork.testnet ? CryptoCurrency.tbtc : CryptoCurrency.btc, alwaysScan: alwaysScan, @@ -90,6 +93,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { required String password, required WalletInfo walletInfo, required Box unspentCoinsInfo, + required EncryptionFileUtils encryptionFileUtils, String? passphrase, String? addressPageType, BasedUtxoNetwork? network, @@ -124,6 +128,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { initialSilentAddresses: initialSilentAddresses, initialSilentAddressIndex: initialSilentAddressIndex, initialBalance: initialBalance, + encryptionFileUtils: encryptionFileUtils, seedBytes: seedBytes, initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, @@ -137,6 +142,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { required WalletInfo walletInfo, required Box unspentCoinsInfo, required String password, + required EncryptionFileUtils encryptionFileUtils, required bool alwaysScan, }) async { final network = walletInfo.network != null @@ -148,7 +154,13 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { ElectrumWalletSnapshot? snp = null; try { - snp = await ElectrumWalletSnapshot.load(name, walletInfo.type, password, network); + snp = await ElectrumWalletSnapshot.load( + encryptionFileUtils, + name, + walletInfo.type, + password, + network, + ); } catch (e) { if (!hasKeysFile) rethrow; } @@ -156,10 +168,18 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { final WalletKeysData keysData; // Migrate wallet from the old scheme to then new .keys file scheme if (!hasKeysFile) { - keysData = - WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); + keysData = WalletKeysData( + mnemonic: snp!.mnemonic, + xPub: snp.xpub, + passphrase: snp.passphrase, + ); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } walletInfo.derivationInfo ??= DerivationInfo(); @@ -198,6 +218,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { initialSilentAddresses: snp?.silentAddresses, initialSilentAddressIndex: snp?.silentAddressIndex ?? 0, initialBalance: snp?.balance, + encryptionFileUtils: encryptionFileUtils, seedBytes: seedBytes, initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, diff --git a/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart b/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart index 915d7cc10..91b8e4ae2 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart @@ -6,11 +6,13 @@ class BitcoinNewWalletCredentials extends WalletCredentials { BitcoinNewWalletCredentials( {required String name, WalletInfo? walletInfo, + String? password, DerivationType? derivationType, String? derivationPath}) : super( name: name, walletInfo: walletInfo, + password: password, ); } diff --git a/cw_bitcoin/lib/bitcoin_wallet_service.dart b/cw_bitcoin/lib/bitcoin_wallet_service.dart index cf93aa29d..d6d97f3de 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_service.dart @@ -3,6 +3,7 @@ import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/mnemonic_is_incorrect_exception.dart'; import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_service.dart'; @@ -19,11 +20,12 @@ class BitcoinWalletService extends WalletService< BitcoinRestoreWalletFromSeedCredentials, BitcoinRestoreWalletFromWIFCredentials, BitcoinRestoreWalletFromHardware> { - BitcoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource, this.alwaysScan); + BitcoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource, this.alwaysScan, this.isDirect); final Box walletInfoSource; final Box unspentCoinsInfoSource; final bool alwaysScan; + final bool isDirect; @override WalletType getType() => WalletType.bitcoin; @@ -40,6 +42,7 @@ class BitcoinWalletService extends WalletService< walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, network: network, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.save(); @@ -63,6 +66,7 @@ class BitcoinWalletService extends WalletService< walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource, alwaysScan: alwaysScan, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); saveBackup(name); @@ -75,6 +79,7 @@ class BitcoinWalletService extends WalletService< walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource, alwaysScan: alwaysScan, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); return wallet; @@ -99,6 +104,7 @@ class BitcoinWalletService extends WalletService< walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource, alwaysScan: alwaysScan, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await currentWallet.renameWalletFiles(newName); @@ -125,6 +131,7 @@ class BitcoinWalletService extends WalletService< walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, networkParam: network, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.save(); await wallet.init(); @@ -153,6 +160,7 @@ class BitcoinWalletService extends WalletService< walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, network: network, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.save(); await wallet.init(); diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index a7de414e4..806f813dd 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_core/pathForWallet.dart'; @@ -6,6 +7,8 @@ import 'package:cw_core/transaction_history.dart'; import 'package:cw_core/utils/file.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:mobx/mobx.dart'; +import 'package:cw_core/transaction_history.dart'; +import 'package:cw_bitcoin/electrum_transaction_info.dart'; part 'electrum_transaction_history.g.dart'; @@ -15,13 +18,15 @@ class ElectrumTransactionHistory = ElectrumTransactionHistoryBase with _$Electru abstract class ElectrumTransactionHistoryBase extends TransactionHistoryBase with Store { - ElectrumTransactionHistoryBase({required this.walletInfo, required String password}) + ElectrumTransactionHistoryBase( + {required this.walletInfo, required String password, required this.encryptionFileUtils}) : _password = password, _height = 0 { transactions = ObservableMap(); } final WalletInfo walletInfo; + final EncryptionFileUtils encryptionFileUtils; String _password; int _height; @@ -44,7 +49,7 @@ abstract class ElectrumTransactionHistoryBase txjson[tx.key] = tx.value.toJson(); } final data = json.encode({'height': _height, 'transactions': txjson}); - await writeData(path: path, password: _password, data: data); + await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e) { print('Error while save bitcoin transaction history: ${e.toString()}'); } @@ -58,7 +63,7 @@ abstract class ElectrumTransactionHistoryBase Future> _read() async { final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); final path = '$dirPath/$transactionsHistoryFileName'; - final content = await read(path: path, password: _password); + final content = await encryptionFileUtils.read(path: path, password: _password); return json.decode(content) as Map; } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index e1b038beb..501d94e54 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -5,6 +5,7 @@ import 'dart:isolate'; import 'dart:math'; import 'package:bitcoin_base/bitcoin_base.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:collection/collection.dart'; import 'package:cw_bitcoin/address_from_output.dart'; @@ -32,7 +33,6 @@ 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/file.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_keys_file.dart'; @@ -58,6 +58,7 @@ abstract class ElectrumWalletBase required WalletInfo walletInfo, required Box unspentCoinsInfo, required this.network, + required this.encryptionFileUtils, String? xpub, String? mnemonic, Uint8List? seedBytes, @@ -92,7 +93,11 @@ abstract class ElectrumWalletBase super(walletInfo) { this.electrumClient = electrumClient ?? ElectrumClient(); this.walletInfo = walletInfo; - transactionHistory = ElectrumTransactionHistory(walletInfo: walletInfo, password: password); + transactionHistory = ElectrumTransactionHistory( + walletInfo: walletInfo, + password: password, + encryptionFileUtils: encryptionFileUtils, + ); reaction((_) => syncStatus, _syncStatusReaction); } @@ -127,6 +132,8 @@ abstract class ElectrumWalletBase final String? _mnemonic; Bip32Slip10Secp256k1 get hd => accountHD.childKey(Bip32KeyIndex(0)); + + final EncryptionFileUtils encryptionFileUtils; final String? passphrase; @override @@ -167,6 +174,9 @@ abstract class ElectrumWalletBase WalletKeysData get walletKeysData => WalletKeysData(mnemonic: _mnemonic, xPub: xpub, passphrase: passphrase); + @override + String get password => _password; + BasedUtxoNetwork network; @override @@ -455,7 +465,6 @@ abstract class ElectrumWalletBase } } - node!.isElectrs = false; node!.save(); return node!.isElectrs!; @@ -1130,12 +1139,12 @@ abstract class ElectrumWalletBase @override Future save() async { if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { - await saveKeysFile(_password); - saveKeysFile(_password, true); + await saveKeysFile(_password, encryptionFileUtils); + saveKeysFile(_password, encryptionFileUtils, true); } final path = await makePath(); - await write(path: path, password: _password, data: toJSON()); + await encryptionFileUtils.write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); } @@ -2258,4 +2267,3 @@ class UtxoDetails { required this.spendsUnconfirmedTX, }); } - diff --git a/cw_bitcoin/lib/electrum_wallet_snapshot.dart b/cw_bitcoin/lib/electrum_wallet_snapshot.dart index 082460f72..fa58be238 100644 --- a/cw_bitcoin/lib/electrum_wallet_snapshot.dart +++ b/cw_bitcoin/lib/electrum_wallet_snapshot.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; @@ -51,9 +52,9 @@ class ElectrumWalletSnapshot { String? derivationPath; static Future load( - String name, WalletType type, String password, BasedUtxoNetwork network) async { + EncryptionFileUtils encryptionFileUtils, String name, WalletType type, String password, BasedUtxoNetwork network) async { final path = await pathForWallet(name: name, type: type); - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); final data = json.decode(jsonSource) as Map; final addressesTmp = data['addresses'] as List? ?? []; final mnemonic = data['mnemonic'] as String?; diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 64e53ca5d..d8c04dba6 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -4,13 +4,14 @@ import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; +import 'package:cw_core/encryption_file_utils.dart'; +import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; import 'package:cw_bitcoin/litecoin_wallet_addresses.dart'; -import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_priority.dart'; -import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_keys_file.dart'; import 'package:flutter/foundation.dart'; @@ -28,6 +29,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { required WalletInfo walletInfo, required Box unspentCoinsInfo, required Uint8List seedBytes, + required EncryptionFileUtils encryptionFileUtils, String? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -42,6 +44,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, + encryptionFileUtils: encryptionFileUtils, currency: CryptoCurrency.ltc) { walletAddresses = LitecoinWalletAddresses( walletInfo, @@ -62,6 +65,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { required String password, required WalletInfo walletInfo, required Box unspentCoinsInfo, + required EncryptionFileUtils encryptionFileUtils, String? passphrase, String? addressPageType, List? initialAddresses, @@ -89,6 +93,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { unspentCoinsInfo: unspentCoinsInfo, initialAddresses: initialAddresses, initialBalance: initialBalance, + encryptionFileUtils: encryptionFileUtils, seedBytes: seedBytes, initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, @@ -96,19 +101,24 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { ); } - static Future open({ - required String name, - required WalletInfo walletInfo, - required Box unspentCoinsInfo, - required String password, - }) async { + static Future open( + {required String name, + required WalletInfo walletInfo, + required Box unspentCoinsInfo, + required String password, + required EncryptionFileUtils encryptionFileUtils}) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); ElectrumWalletSnapshot? snp = null; try { snp = await ElectrumWalletSnapshot.load( - name, walletInfo.type, password, LitecoinNetwork.mainnet); + encryptionFileUtils, + name, + walletInfo.type, + password, + LitecoinNetwork.mainnet, + ); } catch (e) { if (!hasKeysFile) rethrow; } @@ -119,7 +129,12 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { keysData = WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return LitecoinWallet( @@ -130,6 +145,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { initialAddresses: snp?.addresses, initialBalance: snp?.balance, seedBytes: await mnemonicToSeedBytes(keysData.mnemonic!), + encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, addressPageType: snp?.addressPageType, diff --git a/cw_bitcoin/lib/litecoin_wallet_service.dart b/cw_bitcoin/lib/litecoin_wallet_service.dart index 7025b72e5..a46b12a2e 100644 --- a/cw_bitcoin/lib/litecoin_wallet_service.dart +++ b/cw_bitcoin/lib/litecoin_wallet_service.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:hive/hive.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; @@ -16,11 +17,13 @@ import 'package:bip39/bip39.dart' as bip39; class LitecoinWalletService extends WalletService< BitcoinNewWalletCredentials, BitcoinRestoreWalletFromSeedCredentials, - BitcoinRestoreWalletFromWIFCredentials,BitcoinNewWalletCredentials> { - LitecoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource); + BitcoinRestoreWalletFromWIFCredentials, + BitcoinNewWalletCredentials> { + LitecoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource, this.isDirect); final Box walletInfoSource; final Box unspentCoinsInfoSource; + final bool isDirect; @override WalletType getType() => WalletType.litecoin; @@ -28,12 +31,13 @@ class LitecoinWalletService extends WalletService< @override Future create(BitcoinNewWalletCredentials credentials, {bool? isTestnet}) async { final wallet = await LitecoinWalletBase.create( - mnemonic: await generateElectrumMnemonic(), - password: credentials.password!, - passphrase: credentials.passphrase, - walletInfo: credentials.walletInfo!, - unspentCoinsInfo: unspentCoinsInfoSource); - + mnemonic: await generateElectrumMnemonic(), + password: credentials.password!, + passphrase: credentials.passphrase, + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.save(); await wallet.init(); @@ -46,21 +50,29 @@ class LitecoinWalletService extends WalletService< @override Future openWallet(String name, String password) async { - final walletInfo = walletInfoSource.values.firstWhereOrNull( - (info) => info.id == WalletBase.idFor(name, getType()))!; + final walletInfo = walletInfoSource.values + .firstWhereOrNull((info) => info.id == WalletBase.idFor(name, getType()))!; try { final wallet = await LitecoinWalletBase.open( - password: password, name: name, walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + password: password, + name: name, + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.init(); saveBackup(name); return wallet; } catch (_) { await restoreWalletFilesFromBackup(name); final wallet = await LitecoinWalletBase.open( - password: password, name: name, walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + password: password, + name: name, + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.init(); return wallet; } @@ -68,22 +80,23 @@ class LitecoinWalletService extends WalletService< @override Future remove(String wallet) async { - File(await pathForWalletDir(name: wallet, type: getType())) - .delete(recursive: true); - final walletInfo = walletInfoSource.values.firstWhereOrNull( - (info) => info.id == WalletBase.idFor(wallet, getType()))!; + File(await pathForWalletDir(name: wallet, type: getType())).delete(recursive: true); + final walletInfo = walletInfoSource.values + .firstWhereOrNull((info) => info.id == WalletBase.idFor(wallet, getType()))!; await walletInfoSource.delete(walletInfo.key); } @override Future rename(String currentName, String password, String newName) async { - final currentWalletInfo = walletInfoSource.values.firstWhereOrNull( - (info) => info.id == WalletBase.idFor(currentName, getType()))!; + final currentWalletInfo = walletInfoSource.values + .firstWhereOrNull((info) => info.id == WalletBase.idFor(currentName, getType()))!; final currentWallet = await LitecoinWalletBase.open( - password: password, - name: currentName, - walletInfo: currentWalletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + password: password, + name: currentName, + walletInfo: currentWalletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); @@ -97,27 +110,30 @@ class LitecoinWalletService extends WalletService< @override Future restoreFromHardwareWallet(BitcoinNewWalletCredentials credentials) { - throw UnimplementedError("Restoring a Litecoin wallet from a hardware wallet is not yet supported!"); + throw UnimplementedError( + "Restoring a Litecoin wallet from a hardware wallet is not yet supported!"); } @override - Future restoreFromKeys( - BitcoinRestoreWalletFromWIFCredentials credentials, {bool? isTestnet}) async => + Future restoreFromKeys(BitcoinRestoreWalletFromWIFCredentials credentials, + {bool? isTestnet}) async => throw UnimplementedError(); @override - Future restoreFromSeed( - BitcoinRestoreWalletFromSeedCredentials credentials, {bool? isTestnet}) async { + Future restoreFromSeed(BitcoinRestoreWalletFromSeedCredentials credentials, + {bool? isTestnet}) async { if (!validateMnemonic(credentials.mnemonic) && !bip39.validateMnemonic(credentials.mnemonic)) { throw LitecoinMnemonicIsIncorrectException(); } final wallet = await LitecoinWalletBase.create( - password: credentials.password!, - passphrase: credentials.passphrase, - mnemonic: credentials.mnemonic, - walletInfo: credentials.walletInfo!, - unspentCoinsInfo: unspentCoinsInfoSource); + password: credentials.password!, + passphrase: credentials.passphrase, + mnemonic: credentials.mnemonic, + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.save(); await wallet.init(); return wallet; diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index be7862e26..12274c1e6 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -164,6 +164,15 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + cake_backup: + dependency: transitive + description: + path: "." + ref: main + resolved-ref: "3aba867dcab6737f6707782f5db15d71f303db38" + url: "https://github.com/cake-tech/cake_backup.git" + source: git + version: "1.0.0+1" characters: dependency: transitive description: @@ -236,6 +245,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.7.0" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" cw_core: dependency: "direct main" description: @@ -837,6 +854,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart index 8323c01a8..a59569ae6 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart @@ -1,6 +1,7 @@ import 'package:bitbox/bitbox.dart' as bitbox; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; @@ -28,6 +29,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required WalletInfo walletInfo, required Box unspentCoinsInfo, required Uint8List seedBytes, + required EncryptionFileUtils encryptionFileUtils, BitcoinAddressType? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -42,7 +44,8 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: seedBytes, - currency: CryptoCurrency.bch) { + currency: CryptoCurrency.bch, + encryptionFileUtils: encryptionFileUtils) { walletAddresses = BitcoinCashWalletAddresses( walletInfo, initialAddresses: initialAddresses, @@ -63,6 +66,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required String password, required WalletInfo walletInfo, required Box unspentCoinsInfo, + required EncryptionFileUtils encryptionFileUtils, String? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -76,6 +80,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { initialAddresses: initialAddresses, initialBalance: initialBalance, seedBytes: await MnemonicBip39.toSeed(mnemonic), + encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, @@ -87,6 +92,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required WalletInfo walletInfo, required Box unspentCoinsInfo, required String password, + required EncryptionFileUtils encryptionFileUtils, }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); @@ -94,7 +100,12 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { try { snp = await ElectrumWalletSnapshot.load( - name, walletInfo.type, password, BitcoinCashNetwork.mainnet); + encryptionFileUtils, + name, + walletInfo.type, + password, + BitcoinCashNetwork.mainnet, + ); } catch (e) { if (!hasKeysFile) rethrow; } @@ -105,7 +116,12 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { keysData = WalletKeysData(mnemonic: snp!.mnemonic, xPub: snp.xpub, passphrase: snp.passphrase); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return BitcoinCashWallet( @@ -135,6 +151,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { }).toList(), initialBalance: snp?.balance, seedBytes: await MnemonicBip39.toSeed(keysData.mnemonic!), + encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart index 72caa6c58..017040c5d 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart @@ -2,8 +2,8 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class BitcoinCashNewWalletCredentials extends WalletCredentials { - BitcoinCashNewWalletCredentials({required String name, WalletInfo? walletInfo}) - : super(name: name, walletInfo: walletInfo); + BitcoinCashNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}) + : super(name: name, walletInfo: walletInfo, password: password); } class BitcoinCashRestoreWalletFromSeedCredentials extends WalletCredentials { diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart index 002e52c4f..a970be261 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:bip39/bip39.dart'; import 'package:cw_bitcoin_cash/cw_bitcoin_cash.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_base.dart'; @@ -16,10 +17,11 @@ class BitcoinCashWalletService extends WalletService< BitcoinCashRestoreWalletFromSeedCredentials, BitcoinCashRestoreWalletFromWIFCredentials, BitcoinCashNewWalletCredentials> { - BitcoinCashWalletService(this.walletInfoSource, this.unspentCoinsInfoSource); + BitcoinCashWalletService(this.walletInfoSource, this.unspentCoinsInfoSource, this.isDirect); final Box walletInfoSource; final Box unspentCoinsInfoSource; + final bool isDirect; @override WalletType getType() => WalletType.bitcoinCash; @@ -34,10 +36,11 @@ class BitcoinCashWalletService extends WalletService< final wallet = await BitcoinCashWalletBase.create( mnemonic: await MnemonicBip39.generate(strength: strength), - password: credentials.password!, - walletInfo: credentials.walletInfo!, - unspentCoinsInfo: unspentCoinsInfoSource); - + password: credentials.password!, + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.save(); await wallet.init(); @@ -54,7 +57,9 @@ class BitcoinCashWalletService extends WalletService< password: password, name: name, walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.init(); saveBackup(name); return wallet; @@ -64,7 +69,9 @@ class BitcoinCashWalletService extends WalletService< password: password, name: name, walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await wallet.init(); return wallet; } @@ -86,7 +93,8 @@ class BitcoinCashWalletService extends WalletService< password: password, name: currentName, walletInfo: currentWalletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect)); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); @@ -121,7 +129,8 @@ class BitcoinCashWalletService extends WalletService< password: credentials.password!, mnemonic: credentials.mnemonic, walletInfo: credentials.walletInfo!, - unspentCoinsInfo: unspentCoinsInfoSource); + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect)); await wallet.save(); await wallet.init(); return wallet; diff --git a/cw_core/lib/encryption_file_utils.dart b/cw_core/lib/encryption_file_utils.dart new file mode 100644 index 000000000..1889c4389 --- /dev/null +++ b/cw_core/lib/encryption_file_utils.dart @@ -0,0 +1,42 @@ +import 'dart:io'; +import 'dart:typed_data'; +import 'package:cw_core/utils/file.dart' as file; +import 'package:cake_backup/backup.dart' as cwb; + +EncryptionFileUtils encryptionFileUtilsFor(bool direct) + => direct + ? XChaCha20EncryptionFileUtils() + : Salsa20EncryhptionFileUtils(); + +abstract class EncryptionFileUtils { + Future write({required String path, required String password, required String data}); + Future read({required String path, required String password}); +} + +class Salsa20EncryhptionFileUtils extends EncryptionFileUtils { + // Requires legacy complex key + iv as password + @override + Future write({required String path, required String password, required String data}) async + => await file.write(path: path, password: password, data: data); + + // Requires legacy complex key + iv as password + @override + Future read({required String path, required String password}) async + => await file.read(path: path, password: password); +} + +class XChaCha20EncryptionFileUtils extends EncryptionFileUtils { + @override + Future write({required String path, required String password, required String data}) async { + final encrypted = await cwb.encrypt(password, Uint8List.fromList(data.codeUnits)); + await File(path).writeAsBytes(encrypted); + } + + @override + Future read({required String path, required String password}) async { + final file = File(path); + final encrypted = await file.readAsBytes(); + final bytes = await cwb.decrypt(password, encrypted); + return String.fromCharCodes(bytes); + } +} \ No newline at end of file diff --git a/cw_core/lib/wallet_base.dart b/cw_core/lib/wallet_base.dart index a616b0bfd..f7af15224 100644 --- a/cw_core/lib/wallet_base.dart +++ b/cw_core/lib/wallet_base.dart @@ -84,6 +84,8 @@ abstract class WalletBase changePassword(String password); + String get password; + Future? updateBalance(); void setExceptionHandler(void Function(FlutterErrorDetails) onError) => null; diff --git a/cw_core/lib/wallet_keys_file.dart b/cw_core/lib/wallet_keys_file.dart index 45539e09d..638cdc39d 100644 --- a/cw_core/lib/wallet_keys_file.dart +++ b/cw_core/lib/wallet_keys_file.dart @@ -3,10 +3,10 @@ import 'dart:developer' as dev; import 'dart:io'; import 'package:cw_core/balance.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_history.dart'; import 'package:cw_core/transaction_info.dart'; -import 'package:cw_core/utils/file.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_type.dart'; @@ -20,28 +20,32 @@ mixin WalletKeysFile makeKeysFilePath() async => "${await makePath()}.keys"; - Future saveKeysFile(String password, [bool isBackup = false]) async { + Future saveKeysFile(String password, EncryptionFileUtils encryptionFileUtils, + [bool isBackup = false]) async { try { final rootPath = await makeKeysFilePath(); final path = "$rootPath${isBackup ? ".backup" : ""}"; dev.log("Saving .keys file '$path'"); - await write(path: path, password: password, data: walletKeysData.toJSON()); + await encryptionFileUtils.write( + path: path, password: password, data: walletKeysData.toJSON()); } catch (_) {} } - static Future createKeysFile( - String name, WalletType type, String password, WalletKeysData walletKeysData, + static Future createKeysFile(String name, WalletType type, String password, + WalletKeysData walletKeysData, EncryptionFileUtils encryptionFileUtils, [bool withBackup = true]) async { try { final rootPath = await pathForWallet(name: name, type: type); final path = "$rootPath.keys"; dev.log("Saving .keys file '$path'"); - await write(path: path, password: password, data: walletKeysData.toJSON()); + await encryptionFileUtils.write( + path: path, password: password, data: walletKeysData.toJSON()); if (withBackup) { dev.log("Saving .keys.backup file '$path.backup'"); - await write(path: "$path.backup", password: password, data: walletKeysData.toJSON()); + await encryptionFileUtils.write( + path: "$path.backup", password: password, data: walletKeysData.toJSON()); } } catch (_) {} } @@ -55,14 +59,19 @@ mixin WalletKeysFile readKeysFile(String name, WalletType type, String password) async { + static Future readKeysFile( + String name, + WalletType type, + String password, + EncryptionFileUtils encryptionFileUtils, + ) async { final path = await pathForWallet(name: name, type: type); var readPath = "$path.keys"; try { if (!File(readPath).existsSync()) throw Exception("No .keys file found for $name $type"); - final jsonSource = await read(path: readPath, password: password); + final jsonSource = await encryptionFileUtils.read(path: readPath, password: password); final data = json.decode(jsonSource) as Map; return WalletKeysData.fromJSON(data); } catch (e) { @@ -72,12 +81,12 @@ mixin WalletKeysFile; final keysData = WalletKeysData.fromJSON(data); dev.log("Restoring .keys from .keys.backup"); - createKeysFile(name, type, password, keysData, false); + createKeysFile(name, type, password, keysData, encryptionFileUtils, false); return keysData; } } diff --git a/cw_core/pubspec.lock b/cw_core/pubspec.lock index 518c71b94..e905af2d9 100644 --- a/cw_core/pubspec.lock +++ b/cw_core/pubspec.lock @@ -113,6 +113,15 @@ packages: url: "https://pub.dev" source: hosted version: "8.8.1" + cake_backup: + dependency: "direct main" + description: + path: "." + ref: main + resolved-ref: "3aba867dcab6737f6707782f5db15d71f303db38" + url: "https://github.com/cake-tech/cake_backup.git" + source: git + version: "1.0.0+1" characters: dependency: transitive description: @@ -169,6 +178,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: df156c5109286340817d21fa7b62f9140f17915077127dd70f8bd7a2a0997a35 + url: "https://pub.dev" + source: hosted + version: "2.5.0" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" dart_style: dependency: transitive description: @@ -648,6 +673,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: diff --git a/cw_core/pubspec.yaml b/cw_core/pubspec.yaml index 0513b122c..4497a709d 100644 --- a/cw_core/pubspec.yaml +++ b/cw_core/pubspec.yaml @@ -19,6 +19,11 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 + cake_backup: + git: + url: https://github.com/cake-tech/cake_backup.git + ref: main + version: 1.0.0 socks5_proxy: ^1.0.4 unorm_dart: ^0.3.0 # tor: diff --git a/cw_ethereum/lib/ethereum_transaction_history.dart b/cw_ethereum/lib/ethereum_transaction_history.dart index f774ae905..fbb8ab79d 100644 --- a/cw_ethereum/lib/ethereum_transaction_history.dart +++ b/cw_ethereum/lib/ethereum_transaction_history.dart @@ -7,6 +7,7 @@ class EthereumTransactionHistory extends EVMChainTransactionHistory { EthereumTransactionHistory({ required super.walletInfo, required super.password, + required super.encryptionFileUtils, }); @override diff --git a/cw_ethereum/lib/ethereum_wallet.dart b/cw_ethereum/lib/ethereum_wallet.dart index 7bcd55cf4..51aeab5e1 100644 --- a/cw_ethereum/lib/ethereum_wallet.dart +++ b/cw_ethereum/lib/ethereum_wallet.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/erc20_token.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_direction.dart'; @@ -16,7 +17,6 @@ import 'package:cw_evm/evm_chain_transaction_info.dart'; import 'package:cw_evm/evm_chain_transaction_model.dart'; import 'package:cw_evm/evm_chain_wallet.dart'; import 'package:cw_evm/evm_erc20_balance.dart'; -import 'package:cw_evm/file.dart'; class EthereumWallet extends EVMChainWallet { EthereumWallet({ @@ -26,6 +26,7 @@ class EthereumWallet extends EVMChainWallet { super.mnemonic, super.initialBalance, super.privateKey, + required super.encryptionFileUtils, }) : super(nativeCurrency: CryptoCurrency.eth); @override @@ -117,18 +118,24 @@ class EthereumWallet extends EVMChainWallet { } @override - EVMChainTransactionHistory setUpTransactionHistory(WalletInfo walletInfo, String password) { - return EthereumTransactionHistory(walletInfo: walletInfo, password: password); + EVMChainTransactionHistory setUpTransactionHistory( + WalletInfo walletInfo, String password, EncryptionFileUtils encryptionFileUtils) { + return EthereumTransactionHistory( + walletInfo: walletInfo, password: password, encryptionFileUtils: encryptionFileUtils); } - static Future open( - {required String name, required String password, required WalletInfo walletInfo}) async { + static Future open({ + required String name, + required String password, + required WalletInfo walletInfo, + required EncryptionFileUtils encryptionFileUtils, + }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); Map? data; try { - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); data = json.decode(jsonSource) as Map; } catch (e) { @@ -146,7 +153,12 @@ class EthereumWallet extends EVMChainWallet { keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return EthereumWallet( @@ -156,6 +168,7 @@ class EthereumWallet extends EVMChainWallet { privateKey: keysData.privateKey, initialBalance: balance, client: EthereumClient(), + encryptionFileUtils: encryptionFileUtils, ); } } diff --git a/cw_ethereum/lib/ethereum_wallet_service.dart b/cw_ethereum/lib/ethereum_wallet_service.dart index c0d3df2d6..84fc0a277 100644 --- a/cw_ethereum/lib/ethereum_wallet_service.dart +++ b/cw_ethereum/lib/ethereum_wallet_service.dart @@ -1,4 +1,5 @@ import 'package:bip39/bip39.dart' as bip39; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; @@ -9,7 +10,7 @@ import 'package:cw_evm/evm_chain_wallet_creation_credentials.dart'; import 'package:cw_evm/evm_chain_wallet_service.dart'; class EthereumWalletService extends EVMChainWalletService { - EthereumWalletService(super.walletInfoSource, {required this.client}); + EthereumWalletService(super.walletInfoSource, super.isDirect, {required this.client}); late EthereumClient client; @@ -27,6 +28,7 @@ class EthereumWalletService extends EVMChainWalletService { mnemonic: mnemonic, password: credentials.password!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -46,6 +48,7 @@ class EthereumWalletService extends EVMChainWalletService { name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -59,6 +62,7 @@ class EthereumWalletService extends EVMChainWalletService { name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); await wallet.save(); @@ -71,7 +75,11 @@ class EthereumWalletService extends EVMChainWalletService { final currentWalletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(currentName, getType())); final currentWallet = await EthereumWallet.open( - password: password, name: currentName, walletInfo: currentWalletInfo); + password: password, + name: currentName, + walletInfo: currentWalletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); @@ -97,6 +105,7 @@ class EthereumWalletService extends EVMChainWalletService { walletInfo: credentials.walletInfo!, password: credentials.password!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -114,6 +123,7 @@ class EthereumWalletService extends EVMChainWalletService { privateKey: credentials.privateKey, walletInfo: credentials.walletInfo!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -135,6 +145,7 @@ class EthereumWalletService extends EVMChainWalletService { mnemonic: credentials.mnemonic, walletInfo: credentials.walletInfo!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); diff --git a/cw_evm/lib/evm_chain_transaction_history.dart b/cw_evm/lib/evm_chain_transaction_history.dart index 2f5c31e82..c4d91783f 100644 --- a/cw_evm/lib/evm_chain_transaction_history.dart +++ b/cw_evm/lib/evm_chain_transaction_history.dart @@ -1,10 +1,10 @@ import 'dart:convert'; import 'dart:core'; import 'dart:developer'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_evm/evm_chain_transaction_info.dart'; -import 'package:cw_evm/file.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; @@ -15,7 +15,8 @@ abstract class EVMChainTransactionHistory = EVMChainTransactionHistoryBase abstract class EVMChainTransactionHistoryBase extends TransactionHistoryBase with Store { - EVMChainTransactionHistoryBase({required this.walletInfo, required String password}) + EVMChainTransactionHistoryBase( + {required this.walletInfo, required String password, required this.encryptionFileUtils}) : _password = password { transactions = ObservableMap(); } @@ -23,6 +24,7 @@ abstract class EVMChainTransactionHistoryBase String _password; final WalletInfo walletInfo; + final EncryptionFileUtils encryptionFileUtils; //! Method to be overridden by all child classes @@ -41,7 +43,7 @@ abstract class EVMChainTransactionHistoryBase final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); String path = '$dirPath/$transactionsHistoryFileNameForWallet'; final data = json.encode({'transactions': transactions}); - await writeData(path: path, password: _password, data: data); + await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e, s) { log('Error while saving ${walletInfo.type.name} transaction history: ${e.toString()}'); log(s.toString()); @@ -59,7 +61,7 @@ abstract class EVMChainTransactionHistoryBase final transactionsHistoryFileNameForWallet = getTransactionHistoryFileName(); final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); String path = '$dirPath/$transactionsHistoryFileNameForWallet'; - final content = await read(path: path, password: _password); + final content = await encryptionFileUtils.read(path: path, password: _password); if (content.isEmpty) { return {}; } diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index 55dcea959..80a366e6f 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -7,6 +7,7 @@ import 'package:bip32/bip32.dart' as bip32; import 'package:bip39/bip39.dart' as bip39; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/erc20_token.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/pathForWallet.dart'; @@ -27,7 +28,6 @@ import 'package:cw_evm/evm_chain_transaction_model.dart'; import 'package:cw_evm/evm_chain_transaction_priority.dart'; import 'package:cw_evm/evm_chain_wallet_addresses.dart'; import 'package:cw_evm/evm_ledger_credentials.dart'; -import 'package:cw_evm/file.dart'; import 'package:flutter/foundation.dart'; import 'package:hex/hex.dart'; import 'package:hive/hive.dart'; @@ -68,6 +68,7 @@ abstract class EVMChainWalletBase String? privateKey, required String password, EVMChainERC20Balance? initialBalance, + required this.encryptionFileUtils, }) : syncStatus = const NotConnectedSyncStatus(), _password = password, _mnemonic = mnemonic, @@ -83,7 +84,7 @@ abstract class EVMChainWalletBase ), super(walletInfo) { this.walletInfo = walletInfo; - transactionHistory = setUpTransactionHistory(walletInfo, password); + transactionHistory = setUpTransactionHistory(walletInfo, password, encryptionFileUtils); if (!CakeHive.isAdapterRegistered(Erc20Token.typeId)) { CakeHive.registerAdapter(Erc20TokenAdapter()); @@ -95,6 +96,7 @@ abstract class EVMChainWalletBase final String? _mnemonic; final String? _hexPrivateKey; final String _password; + final EncryptionFileUtils encryptionFileUtils; late final Box erc20TokensBox; @@ -149,7 +151,11 @@ abstract class EVMChainWalletBase Erc20Token createNewErc20TokenObject(Erc20Token token, String? iconPath); - EVMChainTransactionHistory setUpTransactionHistory(WalletInfo walletInfo, String password); + EVMChainTransactionHistory setUpTransactionHistory( + WalletInfo walletInfo, + String password, + EncryptionFileUtils encryptionFileUtils, + ); //! Common Methods across child classes @@ -510,13 +516,13 @@ abstract class EVMChainWalletBase @override Future save() async { if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { - await saveKeysFile(_password); - saveKeysFile(_password, true); + await saveKeysFile(_password, encryptionFileUtils); + saveKeysFile(_password, encryptionFileUtils, true); } await walletAddresses.updateAddressesInBox(); final path = await makePath(); - await write(path: path, password: _password, data: toJSON()); + await encryptionFileUtils.write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); } @@ -690,4 +696,7 @@ abstract class EVMChainWalletBase bytesToHex(await _evmChainPrivateKey.signPersonalMessage(ascii.encode(message))); Web3Client? getWeb3Client() => _client.getWeb3Client(); + + @override + String get password => _password; } diff --git a/cw_evm/lib/evm_chain_wallet_creation_credentials.dart b/cw_evm/lib/evm_chain_wallet_creation_credentials.dart index be763bac7..e8a13cbb9 100644 --- a/cw_evm/lib/evm_chain_wallet_creation_credentials.dart +++ b/cw_evm/lib/evm_chain_wallet_creation_credentials.dart @@ -3,8 +3,8 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class EVMChainNewWalletCredentials extends WalletCredentials { - EVMChainNewWalletCredentials({required String name, WalletInfo? walletInfo}) - : super(name: name, walletInfo: walletInfo); + EVMChainNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}) + : super(name: name, walletInfo: walletInfo, password: password); } class EVMChainRestoreWalletFromSeedCredentials extends WalletCredentials { diff --git a/cw_evm/lib/evm_chain_wallet_service.dart b/cw_evm/lib/evm_chain_wallet_service.dart index 2bbe6bd47..e6bb41b86 100644 --- a/cw_evm/lib/evm_chain_wallet_service.dart +++ b/cw_evm/lib/evm_chain_wallet_service.dart @@ -15,9 +15,10 @@ abstract class EVMChainWalletService extends WalletSer EVMChainRestoreWalletFromSeedCredentials, EVMChainRestoreWalletFromPrivateKey, EVMChainRestoreWalletFromHardware> { - EVMChainWalletService(this.walletInfoSource); + EVMChainWalletService(this.walletInfoSource, this.isDirect); final Box walletInfoSource; + final bool isDirect; @override WalletType getType(); diff --git a/cw_evm/lib/file.dart b/cw_evm/lib/file.dart deleted file mode 100644 index 8fd236ec3..000000000 --- a/cw_evm/lib/file.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:io'; -import 'package:cw_core/key.dart'; -import 'package:encrypt/encrypt.dart' as encrypt; - -Future write( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future writeData( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future read({required String path, required String password}) async { - final file = File(path); - - if (!file.existsSync()) { - file.createSync(); - } - - final encrypted = file.readAsStringSync(); - - return decode(password: password, data: encrypted); -} diff --git a/cw_evm/pubspec.yaml b/cw_evm/pubspec.yaml index c3f4347c2..b24e375a7 100644 --- a/cw_evm/pubspec.yaml +++ b/cw_evm/pubspec.yaml @@ -20,6 +20,7 @@ dependencies: hive: ^2.2.3 collection: ^1.17.1 shared_preferences: ^2.0.15 + mobx: ^2.0.7+4 cw_core: path: ../cw_core ledger_flutter: ^1.0.1 diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index e639be4b9..c0ecbca68 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -38,9 +38,10 @@ class HavenWallet = HavenWalletBase with _$HavenWallet; abstract class HavenWalletBase extends WalletBase with Store { - HavenWalletBase({required WalletInfo walletInfo}) + HavenWalletBase({required WalletInfo walletInfo, String? password}) : balance = ObservableMap.of(getHavenBalance(accountIndex: 0)), _isTransactionUpdating = false, + _password = password ?? '', _hasSyncAfterStartup = false, walletAddresses = HavenWalletAddresses(walletInfo), syncStatus = NotConnectedSyncStatus(), @@ -56,6 +57,7 @@ abstract class HavenWalletBase } static const int _autoSaveInterval = 30; + final String _password; @override HavenWalletAddresses walletAddresses; @@ -111,7 +113,7 @@ abstract class HavenWalletBase _onAccountChangeReaction?.reaction.dispose(); _autoSaveTimer?.cancel(); } - + @override Future connectToNode({required Node node}) async { try { @@ -414,4 +416,7 @@ abstract class HavenWalletBase print(e.toString()); } } + + @override + String get password => _password; } diff --git a/cw_haven/pubspec.lock b/cw_haven/pubspec.lock index c34e164f4..6e840224c 100644 --- a/cw_haven/pubspec.lock +++ b/cw_haven/pubspec.lock @@ -113,6 +113,15 @@ packages: url: "https://pub.dev" source: hosted version: "8.4.3" + cake_backup: + dependency: transitive + description: + path: "." + ref: main + resolved-ref: "3aba867dcab6737f6707782f5db15d71f303db38" + url: "https://github.com/cake-tech/cake_backup.git" + source: git + version: "1.0.0+1" characters: dependency: transitive description: @@ -169,6 +178,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: df156c5109286340817d21fa7b62f9140f17915077127dd70f8bd7a2a0997a35 + url: "https://pub.dev" + source: hosted + version: "2.5.0" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" cw_core: dependency: "direct main" description: @@ -639,6 +664,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: diff --git a/cw_monero/.metadata b/cw_monero/.metadata index 46a2f7f6f..679a0404c 100644 --- a/cw_monero/.metadata +++ b/cw_monero/.metadata @@ -18,6 +18,9 @@ migration: - platform: macos create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: linux + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 # User provided section diff --git a/cw_monero/example/linux/.gitignore b/cw_monero/example/linux/.gitignore new file mode 100644 index 000000000..d3896c984 --- /dev/null +++ b/cw_monero/example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/cw_monero/example/linux/CMakeLists.txt b/cw_monero/example/linux/CMakeLists.txt new file mode 100644 index 000000000..8b2f28252 --- /dev/null +++ b/cw_monero/example/linux/CMakeLists.txt @@ -0,0 +1,138 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "cw_monero_example") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.cakewallet.cw_monero") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/cw_monero/example/linux/flutter/CMakeLists.txt b/cw_monero/example/linux/flutter/CMakeLists.txt new file mode 100644 index 000000000..d5bd01648 --- /dev/null +++ b/cw_monero/example/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/cw_monero/example/linux/flutter/generated_plugin_registrant.cc b/cw_monero/example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 000000000..1936c88a6 --- /dev/null +++ b/cw_monero/example/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) cw_monero_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "CwMoneroPlugin"); + cw_monero_plugin_register_with_registrar(cw_monero_registrar); +} diff --git a/cw_monero/example/linux/flutter/generated_plugin_registrant.h b/cw_monero/example/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 000000000..e0f0a47bc --- /dev/null +++ b/cw_monero/example/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/cw_monero/example/linux/flutter/generated_plugins.cmake b/cw_monero/example/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000..efcc9a8f9 --- /dev/null +++ b/cw_monero/example/linux/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + cw_monero +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/cw_monero/example/linux/main.cc b/cw_monero/example/linux/main.cc new file mode 100644 index 000000000..e7c5c5437 --- /dev/null +++ b/cw_monero/example/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/cw_monero/example/linux/my_application.cc b/cw_monero/example/linux/my_application.cc new file mode 100644 index 000000000..875fc557a --- /dev/null +++ b/cw_monero/example/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "cw_monero_example"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "cw_monero_example"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/cw_monero/example/linux/my_application.h b/cw_monero/example/linux/my_application.h new file mode 100644 index 000000000..72271d5e4 --- /dev/null +++ b/cw_monero/example/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/cw_monero/lib/api/account_list.dart b/cw_monero/lib/api/account_list.dart index 199896631..7cb95a507 100644 --- a/cw_monero/lib/api/account_list.dart +++ b/cw_monero/lib/api/account_list.dart @@ -34,7 +34,6 @@ List getAllAccount() { // final size = monero.Wallet_numSubaddressAccounts(wptr!); refreshAccounts(); int size = monero.SubaddressAccount_getAll_size(subaddressAccount!); - print("size: $size"); if (size == 0) { monero.Wallet_addSubaddressAccount(wptr!); return getAllAccount(); diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 26c83b06e..14bf92d16 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -7,6 +7,8 @@ import 'package:cw_monero/api/exceptions/wallet_creation_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_restore_from_keys_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_restore_from_seed_exception.dart'; +import 'package:cw_monero/api/wallet.dart'; +import 'package:flutter/foundation.dart'; import 'package:cw_monero/api/transaction_history.dart'; import 'package:cw_monero/api/wallet.dart'; import 'package:flutter/foundation.dart'; diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 9298f8a49..31e09ca2d 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -3,6 +3,8 @@ import 'dart:ffi'; import 'dart:io'; import 'dart:isolate'; +import 'package:cw_core/pathForWallet.dart'; +import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/account.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/monero_amount_format.dart'; @@ -50,7 +52,8 @@ abstract class MoneroWalletBase extends WalletBase with Store { MoneroWalletBase( {required WalletInfo walletInfo, - required Box unspentCoinsInfo}) + required Box unspentCoinsInfo, + required String password}) : balance = ObservableMap.of({ CryptoCurrency.xmr: MoneroBalance( fullBalance: monero_wallet.getFullBalance(accountIndex: 0), @@ -59,6 +62,7 @@ abstract class MoneroWalletBase extends WalletBase monero_wallet.getSeed(); String seedLegacy(String? language) => monero_wallet.getSeedLegacy(language); + @override + String get password => _password; + @override MoneroWalletKeys get keys => MoneroWalletKeys( privateSpendKey: monero_wallet.getSecretSpendKey(), @@ -127,6 +134,7 @@ abstract class MoneroWalletBase extends WalletBase unspentCoins; + String _password; Future init() async { await walletAddresses.init(); diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index 3588ebb78..d771d1815 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -93,7 +93,9 @@ class MoneroWalletService extends WalletService< await monero_wallet_manager.createWallet( path: path, password: credentials.password!, language: credentials.language); final wallet = MoneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + password: credentials.password!); await wallet.init(); return wallet; @@ -126,10 +128,14 @@ class MoneroWalletService extends WalletService< await repairOldAndroidWallet(name); } - await monero_wallet_manager.openWalletAsync({'path': path, 'password': password}); - final walletInfo = walletInfoSource.values - .firstWhere((info) => info.id == WalletBase.idFor(name, getType())); - wallet = MoneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + await monero_wallet_manager + .openWalletAsync({'path': path, 'password': password}); + final walletInfo = walletInfoSource.values.firstWhere( + (info) => info.id == WalletBase.idFor(name, getType())); + final wallet = MoneroWallet( + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + password: password); final isValid = wallet.walletAddresses.validate(); if (!isValid) { @@ -162,15 +168,22 @@ class MoneroWalletService extends WalletService< final bool invalidSignature = e.toString().contains('invalid signature') || (e is WalletOpeningException && e.message.contains('invalid signature')); + final bool invalidPassword = e.toString().contains('invalid password') || + (e is WalletOpeningException && e.message.contains('invalid password')); + if (!isBadAlloc && !doesNotCorrespond && !isMissingCacheFilesIOS && !isMissingCacheFilesAndroid && !invalidSignature && + !invalidPassword && wallet != null && wallet.onError != null) { wallet.onError!(FlutterErrorDetails(exception: e, stack: s)); } + if (invalidPassword) { + rethrow; + } await restoreOrResetWalletFiles(name); return openWallet(name, password); @@ -206,11 +219,15 @@ class MoneroWalletService extends WalletService< } @override - Future rename(String currentName, String password, String newName) async { - final currentWalletInfo = walletInfoSource.values - .firstWhere((info) => info.id == WalletBase.idFor(currentName, getType())); - final currentWallet = - MoneroWallet(walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + Future rename( + String currentName, String password, String newName) async { + final currentWalletInfo = walletInfoSource.values.firstWhere( + (info) => info.id == WalletBase.idFor(currentName, getType())); + final currentWallet = MoneroWallet( + walletInfo: currentWalletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + password: password, + ); await currentWallet.renameWalletFiles(newName); @@ -235,7 +252,9 @@ class MoneroWalletService extends WalletService< viewKey: credentials.viewKey, spendKey: credentials.spendKey); final wallet = MoneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + password: credentials.password!); await wallet.init(); return wallet; @@ -268,7 +287,9 @@ class MoneroWalletService extends WalletService< seed: credentials.mnemonic, restoreHeight: credentials.height!); final wallet = MoneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, + unspentCoinsInfo: unspentCoinsInfoSource, + password: credentials.password!); await wallet.init(); return wallet; @@ -315,7 +336,11 @@ class MoneroWalletService extends WalletService< restoreHeight: height, spendKey: spendKey); - final wallet = MoneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + final wallet = MoneroWallet( + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + password: password, + ); await wallet.init(); return wallet; @@ -364,7 +389,11 @@ class MoneroWalletService extends WalletService< await monero_wallet_manager.openWalletAsync({'path': path, 'password': password}); final walletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(name, getType())); - final wallet = MoneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + final wallet = MoneroWallet( + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + password: password, + ); return wallet.seed; } catch (_) { // if the file couldn't be opened or read diff --git a/cw_monero/linux/CMakeLists.txt b/cw_monero/linux/CMakeLists.txt new file mode 100644 index 000000000..ba685269d --- /dev/null +++ b/cw_monero/linux/CMakeLists.txt @@ -0,0 +1,270 @@ +# The Flutter tooling requires that developers have CMake 3.10 or later +# installed. You should not increase this version, as doing so will cause +# the plugin to fail to compile for some customers of the plugin. +cmake_minimum_required(VERSION 3.10) + +# Project-level configuration. +set(PROJECT_NAME "cw_monero") +project(${PROJECT_NAME} LANGUAGES CXX) + +# This value is used when generating builds using this plugin, so it must +# not be changed. +set(PLUGIN_NAME "cw_monero_plugin") + +# Define the plugin library target. Its name must not be changed (see comment +# on PLUGIN_NAME above). +# +# Any new source files that you add to the plugin should be added here. +add_library(${PLUGIN_NAME} SHARED + "cw_monero_plugin.cc" + "../ios/Classes/monero_api.cpp" +) + +# Apply a standard set of build settings that are configured in the +# application-level CMakeLists.txt. This can be removed for plugins that want +# full control over build settings. +apply_standard_settings(${PLUGIN_NAME}) + +# Symbols are hidden by default to reduce the chance of accidental conflicts +# between plugins. This should not be removed; any symbols that should be +# exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro. +set_target_properties(${PLUGIN_NAME} PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) + +# Source include directories and library dependencies. Add any plugin-specific +# dependencies here. +target_include_directories(${PLUGIN_NAME} INTERFACE + "${CMAKE_CURRENT_SOURCE_DIR}/include") +target_link_libraries(${PLUGIN_NAME} PRIVATE flutter) +target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK) +target_link_libraries(${PLUGIN_NAME} PUBLIC cw_monero) +# List of absolute paths to libraries that should be bundled with the plugin. +# This list could contain prebuilt libraries, or libraries created by an +# external build triggered from this build file. +set(cw_monero_bundled_libraries + "" + PARENT_SCOPE +) + +add_library( cw_monero + STATIC + ../ios/Classes/monero_api.cpp) + +set(EXTERNAL_LIBS_DIR ${CMAKE_SOURCE_DIR}/../cw_shared_external/ios/External/linux) + +############ +# libsodium +############ + +add_library(sodium STATIC IMPORTED) +set_target_properties(sodium PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libsodium.a) + +############ +# OpenSSL +############ + +add_library(crypto STATIC IMPORTED) +set_target_properties(crypto PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libcrypto.a) + +add_library(ssl STATIC IMPORTED) +set_target_properties(ssl PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libssl.a) + +############ +# Boost +############ + +add_library(boost_chrono STATIC IMPORTED) +set_target_properties(boost_chrono PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_chrono.a) + +add_library(boost_date_time STATIC IMPORTED) +set_target_properties(boost_date_time PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_date_time.a) + +add_library(boost_filesystem STATIC IMPORTED) +set_target_properties(boost_filesystem PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_filesystem.a) + +add_library(boost_program_options STATIC IMPORTED) +set_target_properties(boost_program_options PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_program_options.a) + +add_library(boost_regex STATIC IMPORTED) +set_target_properties(boost_regex PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_regex.a) + +add_library(boost_serialization STATIC IMPORTED) +set_target_properties(boost_serialization PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_serialization.a) + +add_library(boost_system STATIC IMPORTED) +set_target_properties(boost_system PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_system.a) + +add_library(boost_thread STATIC IMPORTED) +set_target_properties(boost_thread PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_thread.a) + +add_library(boost_wserialization STATIC IMPORTED) +set_target_properties(boost_wserialization PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libboost_wserialization.a) + +############# +# Monero +############# + + +add_library(wallet STATIC IMPORTED) +set_target_properties(wallet PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libwallet.a) + +add_library(wallet_api STATIC IMPORTED) +set_target_properties(wallet_api PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libwallet_api.a) + +add_library(cryptonote_core STATIC IMPORTED) +set_target_properties(cryptonote_core PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcryptonote_core.a) + +add_library(cryptonote_basic STATIC IMPORTED) +set_target_properties(cryptonote_basic PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcryptonote_basic.a) + +add_library(cryptonote_format_utils_basic STATIC IMPORTED) +set_target_properties(cryptonote_format_utils_basic PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcryptonote_format_utils_basic.a) + +add_library(mnemonics STATIC IMPORTED) +set_target_properties(mnemonics PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libmnemonics.a) + +add_library(common STATIC IMPORTED) +set_target_properties(common PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcommon.a) + +add_library(cncrypto STATIC IMPORTED) +set_target_properties(cncrypto PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcncrypto.a) + +add_library(ringct STATIC IMPORTED) +set_target_properties(ringct PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libringct.a) + +add_library(ringct_basic STATIC IMPORTED) +set_target_properties(ringct_basic PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libringct_basic.a) + +add_library(blockchain_db STATIC IMPORTED) +set_target_properties(blockchain_db PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libblockchain_db.a) + +add_library(lmdb STATIC IMPORTED) +set_target_properties(lmdb PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/liblmdb.a) + +add_library(easylogging STATIC IMPORTED) +set_target_properties(easylogging PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libeasylogging.a) + +add_library(epee STATIC IMPORTED) +set_target_properties(epee PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libepee.a) + +add_library(blocks STATIC IMPORTED) +set_target_properties(blocks PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libblocks.a) + +add_library(checkpoints STATIC IMPORTED) +set_target_properties(checkpoints PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libcheckpoints.a) + +add_library(device STATIC IMPORTED) +set_target_properties(device PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libdevice.a) + +add_library(device_trezor STATIC IMPORTED) +set_target_properties(device_trezor PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libdevice_trezor.a) + +add_library(multisig STATIC IMPORTED) +set_target_properties(multisig PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libmultisig.a) + +add_library(version STATIC IMPORTED) +set_target_properties(version PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libversion.a) + +add_library(net STATIC IMPORTED) +set_target_properties(net PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libnet.a) + +add_library(hardforks STATIC IMPORTED) +set_target_properties(hardforks PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libhardforks.a) + +add_library(randomx STATIC IMPORTED) +set_target_properties(randomx PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/librandomx.a) + +add_library(rpc_base STATIC IMPORTED) +set_target_properties(rpc_base PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/librpc_base.a) + +add_library(wallet-crypto STATIC IMPORTED) +set_target_properties(wallet-crypto PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/monero/libwallet-crypto.a) + +add_library(unbound STATIC IMPORTED) +set_target_properties(unbound PROPERTIES IMPORTED_LOCATION + ${EXTERNAL_LIBS_DIR}/lib/libunbound.a) + +include_directories( ${EXTERNAL_LIBS_DIR}/include ) + +target_link_libraries( cw_monero + + wallet_api + wallet + cryptonote_core + cryptonote_basic + cryptonote_format_utils_basic + mnemonics + ringct + ringct_basic + net + common + cncrypto + blockchain_db + lmdb + easylogging + unbound + epee + blocks + checkpoints + device + device_trezor + multisig + version + randomx + hardforks + rpc_base + wallet-crypto + + boost_chrono + boost_date_time + boost_filesystem + boost_program_options + boost_regex + boost_serialization + boost_system + boost_thread + boost_wserialization + + ssl + crypto + + sodium + ) diff --git a/cw_monero/linux/cw_monero_plugin.cc b/cw_monero/linux/cw_monero_plugin.cc new file mode 100644 index 000000000..ca8524c9e --- /dev/null +++ b/cw_monero/linux/cw_monero_plugin.cc @@ -0,0 +1,70 @@ +#include "include/cw_monero/cw_monero_plugin.h" + +#include +#include +#include + +#include + +#define CW_MONERO_PLUGIN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), cw_monero_plugin_get_type(), \ + CwMoneroPlugin)) + +struct _CwMoneroPlugin { + GObject parent_instance; +}; + +G_DEFINE_TYPE(CwMoneroPlugin, cw_monero_plugin, g_object_get_type()) + +// Called when a method call is received from Flutter. +static void cw_monero_plugin_handle_method_call( + CwMoneroPlugin* self, + FlMethodCall* method_call) { + g_autoptr(FlMethodResponse) response = nullptr; + + const gchar* method = fl_method_call_get_name(method_call); + + if (strcmp(method, "getPlatformVersion") == 0) { + struct utsname uname_data = {}; + uname(&uname_data); + g_autofree gchar *version = g_strdup_printf("Linux %s", uname_data.version); + g_autoptr(FlValue) result = fl_value_new_string(version); + response = FL_METHOD_RESPONSE(fl_method_success_response_new(result)); + } else { + response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new()); + } + + fl_method_call_respond(method_call, response, nullptr); +} + +static void cw_monero_plugin_dispose(GObject* object) { + G_OBJECT_CLASS(cw_monero_plugin_parent_class)->dispose(object); +} + +static void cw_monero_plugin_class_init(CwMoneroPluginClass* klass) { + G_OBJECT_CLASS(klass)->dispose = cw_monero_plugin_dispose; +} + +static void cw_monero_plugin_init(CwMoneroPlugin* self) {} + +static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, + gpointer user_data) { + CwMoneroPlugin* plugin = CW_MONERO_PLUGIN(user_data); + cw_monero_plugin_handle_method_call(plugin, method_call); +} + +void cw_monero_plugin_register_with_registrar(FlPluginRegistrar* registrar) { + CwMoneroPlugin* plugin = CW_MONERO_PLUGIN( + g_object_new(cw_monero_plugin_get_type(), nullptr)); + + g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); + g_autoptr(FlMethodChannel) channel = + fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), + "cw_monero", + FL_METHOD_CODEC(codec)); + fl_method_channel_set_method_call_handler(channel, method_call_cb, + g_object_ref(plugin), + g_object_unref); + + g_object_unref(plugin); +} diff --git a/cw_monero/linux/flutter/generated_plugin_registrant.cc b/cw_monero/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 000000000..e71a16d23 --- /dev/null +++ b/cw_monero/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/cw_monero/linux/flutter/generated_plugin_registrant.h b/cw_monero/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 000000000..e0f0a47bc --- /dev/null +++ b/cw_monero/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/cw_monero/linux/flutter/generated_plugins.cmake b/cw_monero/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000..2e1de87a7 --- /dev/null +++ b/cw_monero/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/cw_monero/linux/include/cw_monero/cw_monero_plugin.h b/cw_monero/linux/include/cw_monero/cw_monero_plugin.h new file mode 100644 index 000000000..387903ff6 --- /dev/null +++ b/cw_monero/linux/include/cw_monero/cw_monero_plugin.h @@ -0,0 +1,26 @@ +#ifndef FLUTTER_PLUGIN_CW_MONERO_PLUGIN_H_ +#define FLUTTER_PLUGIN_CW_MONERO_PLUGIN_H_ + +#include + +G_BEGIN_DECLS + +#ifdef FLUTTER_PLUGIN_IMPL +#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default"))) +#else +#define FLUTTER_PLUGIN_EXPORT +#endif + +typedef struct _CwMoneroPlugin CwMoneroPlugin; +typedef struct { + GObjectClass parent_class; +} CwMoneroPluginClass; + +FLUTTER_PLUGIN_EXPORT GType cw_monero_plugin_get_type(); + +FLUTTER_PLUGIN_EXPORT void cw_monero_plugin_register_with_registrar( + FlPluginRegistrar* registrar); + +G_END_DECLS + +#endif // FLUTTER_PLUGIN_CW_MONERO_PLUGIN_H_ diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 38299b2dc..07c3b8876 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -113,6 +113,15 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + cake_backup: + dependency: transitive + description: + path: "." + ref: main + resolved-ref: "3aba867dcab6737f6707782f5db15d71f303db38" + url: "https://github.com/cake-tech/cake_backup.git" + source: git + version: "1.0.0+1" characters: dependency: transitive description: @@ -169,6 +178,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" cw_core: dependency: "direct main" description: @@ -342,10 +367,10 @@ packages: dependency: transitive description: name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.6.7" json_annotation: dependency: transitive description: @@ -696,6 +721,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: diff --git a/cw_nano/lib/file.dart b/cw_nano/lib/file.dart deleted file mode 100644 index 8fd236ec3..000000000 --- a/cw_nano/lib/file.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:io'; -import 'package:cw_core/key.dart'; -import 'package:encrypt/encrypt.dart' as encrypt; - -Future write( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future writeData( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future read({required String path, required String password}) async { - final file = File(path); - - if (!file.existsSync()) { - file.createSync(); - } - - final encrypted = file.readAsStringSync(); - - return decode(password: password, data: encrypted); -} diff --git a/cw_nano/lib/nano_transaction_history.dart b/cw_nano/lib/nano_transaction_history.dart index dadd353c4..44d64f7d4 100644 --- a/cw_nano/lib/nano_transaction_history.dart +++ b/cw_nano/lib/nano_transaction_history.dart @@ -2,24 +2,29 @@ import 'dart:convert'; import 'dart:core'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_nano/file.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; import 'package:cw_nano/nano_transaction_info.dart'; part 'nano_transaction_history.g.dart'; + const transactionsHistoryFileName = 'transactions.json'; class NanoTransactionHistory = NanoTransactionHistoryBase with _$NanoTransactionHistory; -abstract class NanoTransactionHistoryBase - extends TransactionHistoryBase with Store { - NanoTransactionHistoryBase({required this.walletInfo, required String password}) - : _password = password { +abstract class NanoTransactionHistoryBase extends TransactionHistoryBase + with Store { + NanoTransactionHistoryBase({ + required this.walletInfo, + required String password, + required this.encryptionFileUtils, + }) : _password = password { transactions = ObservableMap(); } final WalletInfo walletInfo; + final EncryptionFileUtils encryptionFileUtils; String _password; Future init() async => await _load(); @@ -30,7 +35,7 @@ abstract class NanoTransactionHistoryBase final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); final path = '$dirPath/$transactionsHistoryFileName'; final data = json.encode({'transactions': transactions}); - await writeData(path: path, password: _password, data: data); + await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e) { print('Error while save nano transaction history: ${e.toString()}'); } @@ -46,7 +51,10 @@ abstract class NanoTransactionHistoryBase Future> _read() async { final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); final path = '$dirPath/$transactionsHistoryFileName'; - final content = await read(path: path, password: _password); + final content = await encryptionFileUtils.read(path: path, password: _password); + if (content.isEmpty) { + return {}; + } return json.decode(content) as Map; } diff --git a/cw_nano/lib/nano_wallet.dart b/cw_nano/lib/nano_wallet.dart index 55e01d10b..cba8d09a0 100644 --- a/cw_nano/lib/nano_wallet.dart +++ b/cw_nano/lib/nano_wallet.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:bip39/bip39.dart' as bip39; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/n2_node.dart'; import 'package:cw_core/nano_account.dart'; import 'package:cw_core/nano_account_info_response.dart'; @@ -17,7 +18,6 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_keys_file.dart'; -import 'package:cw_nano/file.dart'; import 'package:cw_nano/nano_balance.dart'; import 'package:cw_nano/nano_client.dart'; import 'package:cw_nano/nano_transaction_credentials.dart'; @@ -42,11 +42,13 @@ abstract class NanoWalletBase required String mnemonic, required String password, NanoBalance? initialBalance, + required EncryptionFileUtils encryptionFileUtils, }) : syncStatus = NotConnectedSyncStatus(), _password = password, _mnemonic = mnemonic, _derivationType = walletInfo.derivationInfo!.derivationType!, _isTransactionUpdating = false, + _encryptionFileUtils = encryptionFileUtils, _client = NanoClient(), walletAddresses = NanoWalletAddresses(walletInfo), balance = ObservableMap.of({ @@ -55,7 +57,11 @@ abstract class NanoWalletBase }), super(walletInfo) { this.walletInfo = walletInfo; - transactionHistory = NanoTransactionHistory(walletInfo: walletInfo, password: password); + transactionHistory = NanoTransactionHistory( + walletInfo: walletInfo, + password: password, + encryptionFileUtils: encryptionFileUtils, + ); if (!CakeHive.isAdapterRegistered(NanoAccount.typeId)) { CakeHive.registerAdapter(NanoAccountAdapter()); } @@ -65,6 +71,8 @@ abstract class NanoWalletBase final String _password; DerivationType _derivationType; + final EncryptionFileUtils _encryptionFileUtils; + String? _privateKey; String? _publicAddress; String? _hexSeed; @@ -89,6 +97,9 @@ abstract class NanoWalletBase @observable late ObservableMap balance; + @override + String get password => _password; + static const int POLL_INTERVAL_SECONDS = 10; // initialize the different forms of private / public key we'll need: @@ -308,13 +319,13 @@ abstract class NanoWalletBase @override Future save() async { if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { - await saveKeysFile(_password); - saveKeysFile(_password, true); + await saveKeysFile(_password, _encryptionFileUtils); + saveKeysFile(_password, _encryptionFileUtils, true); } await walletAddresses.updateAddressesInBox(); final path = await makePath(); - await write(path: path, password: _password, data: toJSON()); + await _encryptionFileUtils.write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); } @@ -373,13 +384,14 @@ abstract class NanoWalletBase required String name, required String password, required WalletInfo walletInfo, + required EncryptionFileUtils encryptionFileUtils, }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); Map? data = null; try { - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); data = json.decode(jsonSource) as Map; } catch (e) { @@ -400,7 +412,12 @@ abstract class NanoWalletBase keysData = WalletKeysData( mnemonic: isHexSeed ? null : mnemonic, altMnemonic: isHexSeed ? mnemonic : null); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } DerivationType derivationType = DerivationType.nano; @@ -416,6 +433,7 @@ abstract class NanoWalletBase password: password, mnemonic: keysData.mnemonic!, initialBalance: balance, + encryptionFileUtils: encryptionFileUtils, ); // init() should always be run after this! } diff --git a/cw_nano/lib/nano_wallet_service.dart b/cw_nano/lib/nano_wallet_service.dart index 755598705..ac3d6581a 100644 --- a/cw_nano/lib/nano_wallet_service.dart +++ b/cw_nano/lib/nano_wallet_service.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:cw_core/pathForWallet.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; @@ -15,9 +16,10 @@ import 'package:nanoutil/nanoutil.dart'; class NanoWalletService extends WalletService { - NanoWalletService(this.walletInfoSource); + NanoWalletService(this.walletInfoSource, this.isDirect); final Box walletInfoSource; + final bool isDirect; static bool walletFilesExist(String path) => !File(path).existsSync() && !File('$path.keys').existsSync(); @@ -38,6 +40,7 @@ class NanoWalletService extends WalletService.from(nm.NanoMnemomics.WORDLIST)..shuffle()).take(24).join(' '); - final currentWallet = - NanoWallet(walletInfo: currentWalletInfo, password: password, mnemonic: randomWords); + final currentWallet = NanoWallet( + walletInfo: currentWalletInfo, + password: password, + mnemonic: randomWords, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); @@ -103,6 +110,7 @@ class NanoWalletService extends WalletService open( - {required String name, required String password, required WalletInfo walletInfo}) async { + static Future open({ + required String name, + required String password, + required WalletInfo walletInfo, + required EncryptionFileUtils encryptionFileUtils, + }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); Map? data; try { - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); data = json.decode(jsonSource) as Map; } catch (e) { @@ -121,7 +131,12 @@ class PolygonWallet extends EVMChainWallet { keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return PolygonWallet( @@ -131,6 +146,7 @@ class PolygonWallet extends EVMChainWallet { privateKey: keysData.privateKey, initialBalance: balance, client: PolygonClient(), + encryptionFileUtils: encryptionFileUtils, ); } } diff --git a/cw_polygon/lib/polygon_wallet_service.dart b/cw_polygon/lib/polygon_wallet_service.dart index 14baffc44..4efc312f7 100644 --- a/cw_polygon/lib/polygon_wallet_service.dart +++ b/cw_polygon/lib/polygon_wallet_service.dart @@ -1,4 +1,5 @@ import 'package:bip39/bip39.dart' as bip39; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; @@ -10,7 +11,7 @@ import 'package:cw_polygon/polygon_wallet.dart'; class PolygonWalletService extends EVMChainWalletService { PolygonWalletService( - super.walletInfoSource, { + super.walletInfoSource, super.isDirect, { required this.client, }); @@ -30,6 +31,7 @@ class PolygonWalletService extends EVMChainWalletService { mnemonic: mnemonic, password: credentials.password!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -48,6 +50,7 @@ class PolygonWalletService extends EVMChainWalletService { name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -61,6 +64,7 @@ class PolygonWalletService extends EVMChainWalletService { name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -77,6 +81,7 @@ class PolygonWalletService extends EVMChainWalletService { privateKey: credentials.privateKey, walletInfo: credentials.walletInfo!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -99,6 +104,7 @@ class PolygonWalletService extends EVMChainWalletService { walletInfo: credentials.walletInfo!, password: credentials.password!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -120,6 +126,7 @@ class PolygonWalletService extends EVMChainWalletService { mnemonic: credentials.mnemonic, walletInfo: credentials.walletInfo!, client: client, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -134,7 +141,11 @@ class PolygonWalletService extends EVMChainWalletService { final currentWalletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(currentName, getType())); final currentWallet = await PolygonWallet.open( - password: password, name: currentName, walletInfo: currentWalletInfo); + password: password, + name: currentName, + walletInfo: currentWalletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); diff --git a/cw_solana/lib/file.dart b/cw_solana/lib/file.dart deleted file mode 100644 index 8fd236ec3..000000000 --- a/cw_solana/lib/file.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:io'; -import 'package:cw_core/key.dart'; -import 'package:encrypt/encrypt.dart' as encrypt; - -Future write( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future writeData( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future read({required String path, required String password}) async { - final file = File(path); - - if (!file.existsSync()) { - file.createSync(); - } - - final encrypted = file.readAsStringSync(); - - return decode(password: password, data: encrypted); -} diff --git a/cw_solana/lib/solana_transaction_history.dart b/cw_solana/lib/solana_transaction_history.dart index c03de19ad..77f93b9ee 100644 --- a/cw_solana/lib/solana_transaction_history.dart +++ b/cw_solana/lib/solana_transaction_history.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'dart:core'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_solana/file.dart'; import 'package:cw_solana/solana_transaction_info.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; @@ -15,12 +15,14 @@ class SolanaTransactionHistory = SolanaTransactionHistoryBase with _$SolanaTrans abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase with Store { - SolanaTransactionHistoryBase({required this.walletInfo, required String password}) + SolanaTransactionHistoryBase( + {required this.walletInfo, required String password, required this.encryptionFileUtils}) : _password = password { transactions = ObservableMap(); } final WalletInfo walletInfo; + final EncryptionFileUtils encryptionFileUtils; String _password; Future init() async => await _load(); @@ -32,7 +34,7 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase MapEntry(key, value.toJson())); final data = json.encode({'transactions': transactionMaps}); - await writeData(path: path, password: _password, data: data); + await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e, s) { print('Error while saving solana transaction history: ${e.toString()}'); print(s); @@ -49,7 +51,7 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase> _read() async { final dirPath = await pathForWalletDir(name: walletInfo.name, type: walletInfo.type); final path = '$dirPath/$transactionsHistoryFileName'; - final content = await read(path: path, password: _password); + final content = await encryptionFileUtils.read(path: path, password: _password); if (content.isEmpty) { return {}; } diff --git a/cw_solana/lib/solana_wallet.dart b/cw_solana/lib/solana_wallet.dart index 2b30a204c..66b8bca42 100644 --- a/cw_solana/lib/solana_wallet.dart +++ b/cw_solana/lib/solana_wallet.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/pending_transaction.dart'; @@ -15,7 +16,6 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_keys_file.dart'; import 'package:cw_solana/default_spl_tokens.dart'; -import 'package:cw_solana/file.dart'; import 'package:cw_solana/solana_balance.dart'; import 'package:cw_solana/solana_client.dart'; import 'package:cw_solana/solana_exceptions.dart'; @@ -46,6 +46,7 @@ abstract class SolanaWalletBase String? privateKey, required String password, SolanaBalance? initialBalance, + required this.encryptionFileUtils, }) : syncStatus = const NotConnectedSyncStatus(), _password = password, _mnemonic = mnemonic, @@ -56,7 +57,11 @@ abstract class SolanaWalletBase {CryptoCurrency.sol: initialBalance ?? SolanaBalance(BigInt.zero.toDouble())}), super(walletInfo) { this.walletInfo = walletInfo; - transactionHistory = SolanaTransactionHistory(walletInfo: walletInfo, password: password); + transactionHistory = SolanaTransactionHistory( + walletInfo: walletInfo, + password: password, + encryptionFileUtils: encryptionFileUtils, + ); if (!CakeHive.isAdapterRegistered(SPLToken.typeId)) { CakeHive.registerAdapter(SPLTokenAdapter()); @@ -68,6 +73,7 @@ abstract class SolanaWalletBase final String _password; final String? _mnemonic; final String? _hexPrivateKey; + final EncryptionFileUtils encryptionFileUtils; // The Solana WalletPair Ed25519HDKeyPair? _walletKeyPair; @@ -77,7 +83,7 @@ abstract class SolanaWalletBase // To access the privateKey bytes. Ed25519HDKeyPairData? _keyPairData; - late SolanaWalletClient _client; + late final SolanaWalletClient _client; @observable double? estimatedFee; @@ -97,7 +103,7 @@ abstract class SolanaWalletBase @observable late ObservableMap balance; - Completer _sharedPrefs = Completer(); + final Completer _sharedPrefs = Completer(); @override Ed25519HDKeyPairData get keys { @@ -343,13 +349,13 @@ abstract class SolanaWalletBase @override Future save() async { if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { - await saveKeysFile(_password); - saveKeysFile(_password, true); + await saveKeysFile(_password, encryptionFileUtils); + saveKeysFile(_password, encryptionFileUtils, true); } await walletAddresses.updateAddressesInBox(); final path = await makePath(); - await write(path: path, password: _password, data: toJSON()); + await encryptionFileUtils.write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); } @@ -382,13 +388,14 @@ abstract class SolanaWalletBase required String name, required String password, required WalletInfo walletInfo, + required EncryptionFileUtils encryptionFileUtils, }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); Map? data; try { - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); data = json.decode(jsonSource) as Map; } catch (e) { @@ -405,7 +412,12 @@ abstract class SolanaWalletBase keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return SolanaWallet( @@ -414,6 +426,7 @@ abstract class SolanaWalletBase mnemonic: keysData.mnemonic, privateKey: keysData.privateKey, initialBalance: balance, + encryptionFileUtils: encryptionFileUtils, ); } @@ -572,4 +585,7 @@ abstract class SolanaWalletBase } SolanaClient? get solanaClient => _client.getSolanaClient; + + @override + String get password => _password; } diff --git a/cw_solana/lib/solana_wallet_creation_credentials.dart b/cw_solana/lib/solana_wallet_creation_credentials.dart index 881c30abd..5b4fa1774 100644 --- a/cw_solana/lib/solana_wallet_creation_credentials.dart +++ b/cw_solana/lib/solana_wallet_creation_credentials.dart @@ -2,8 +2,8 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class SolanaNewWalletCredentials extends WalletCredentials { - SolanaNewWalletCredentials({required String name, WalletInfo? walletInfo}) - : super(name: name, walletInfo: walletInfo); + SolanaNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}) + : super(name: name, walletInfo: walletInfo, password: password); } class SolanaRestoreWalletFromSeedCredentials extends WalletCredentials { diff --git a/cw_solana/lib/solana_wallet_service.dart b/cw_solana/lib/solana_wallet_service.dart index 4afb2f7f4..7461be33b 100644 --- a/cw_solana/lib/solana_wallet_service.dart +++ b/cw_solana/lib/solana_wallet_service.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:bip39/bip39.dart' as bip39; import 'package:collection/collection.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_history.dart'; @@ -17,9 +18,10 @@ import 'package:hive/hive.dart'; class SolanaWalletService extends WalletService { - SolanaWalletService(this.walletInfoSource); + SolanaWalletService(this.walletInfoSource, this.isDirect); final Box walletInfoSource; + final bool isDirect; @override Future create(SolanaNewWalletCredentials credentials, {bool? isTestnet}) async { @@ -31,6 +33,7 @@ class SolanaWalletService extends WalletService info.id == WalletBase.idFor(currentName, getType())); final currentWallet = await SolanaWalletBase.open( - password: password, name: currentName, walletInfo: currentWalletInfo); + password: password, + name: currentName, + walletInfo: currentWalletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); diff --git a/cw_tron/lib/file.dart b/cw_tron/lib/file.dart deleted file mode 100644 index 8fd236ec3..000000000 --- a/cw_tron/lib/file.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:io'; -import 'package:cw_core/key.dart'; -import 'package:encrypt/encrypt.dart' as encrypt; - -Future write( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future writeData( - {required String path, - required String password, - required String data}) async { - final keys = extractKeys(password); - final key = encrypt.Key.fromBase64(keys.first); - final iv = encrypt.IV.fromBase64(keys.last); - final encrypted = await encode(key: key, iv: iv, data: data); - final f = File(path); - f.writeAsStringSync(encrypted); -} - -Future read({required String path, required String password}) async { - final file = File(path); - - if (!file.existsSync()) { - file.createSync(); - } - - final encrypted = file.readAsStringSync(); - - return decode(password: password, data: encrypted); -} diff --git a/cw_tron/lib/tron_transaction_history.dart b/cw_tron/lib/tron_transaction_history.dart index 7d7274226..9d226c09c 100644 --- a/cw_tron/lib/tron_transaction_history.dart +++ b/cw_tron/lib/tron_transaction_history.dart @@ -3,7 +3,7 @@ import 'dart:core'; import 'dart:developer'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_evm/file.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_tron/tron_transaction_info.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_history.dart'; @@ -14,7 +14,8 @@ class TronTransactionHistory = TronTransactionHistoryBase with _$TronTransaction abstract class TronTransactionHistoryBase extends TransactionHistoryBase with Store { - TronTransactionHistoryBase({required this.walletInfo, required String password}) + TronTransactionHistoryBase( + {required this.walletInfo, required String password, required this.encryptionFileUtils}) : _password = password { transactions = ObservableMap(); } @@ -22,6 +23,7 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); @@ -33,7 +35,7 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase MapEntry(key, value.toJson())); final data = json.encode({'transactions': transactionMaps}); - await writeData(path: path, password: _password, data: data); + await encryptionFileUtils.write(path: path, password: _password, data: data); } catch (e, s) { log('Error while saving ${walletInfo.type.name} transaction history: ${e.toString()}'); log(s.toString()); @@ -51,7 +53,7 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase tronTokensBox; @@ -125,13 +128,14 @@ abstract class TronWalletBase required String name, required String password, required WalletInfo walletInfo, + required EncryptionFileUtils encryptionFileUtils, }) async { final hasKeysFile = await WalletKeysFile.hasKeysFile(name, walletInfo.type); final path = await pathForWallet(name: name, type: walletInfo.type); Map? data; try { - final jsonSource = await read(path: path, password: password); + final jsonSource = await encryptionFileUtils.read(path: path, password: password); data = json.decode(jsonSource) as Map; } catch (e) { @@ -148,7 +152,12 @@ abstract class TronWalletBase keysData = WalletKeysData(mnemonic: mnemonic, privateKey: privateKey); } else { - keysData = await WalletKeysFile.readKeysFile(name, walletInfo.type, password); + keysData = await WalletKeysFile.readKeysFile( + name, + walletInfo.type, + password, + encryptionFileUtils, + ); } return TronWallet( @@ -157,6 +166,7 @@ abstract class TronWalletBase mnemonic: keysData.mnemonic, privateKey: keysData.privateKey, initialBalance: balance, + encryptionFileUtils: encryptionFileUtils, ); } @@ -430,13 +440,13 @@ abstract class TronWalletBase @override Future save() async { if (!(await WalletKeysFile.hasKeysFile(walletInfo.name, walletInfo.type))) { - await saveKeysFile(_password); - saveKeysFile(_password, true); + await saveKeysFile(_password, encryptionFileUtils); + saveKeysFile(_password, encryptionFileUtils, true); } await walletAddresses.updateAddressesInBox(); final path = await makePath(); - await write(path: path, password: _password, data: toJSON()); + await encryptionFileUtils.write(path: path, password: _password, data: toJSON()); await transactionHistory.save(); } @@ -584,4 +594,7 @@ abstract class TronWalletBase _transactionsUpdateTimer?.cancel(); } } + + @override + String get password => _password; } diff --git a/cw_tron/lib/tron_wallet_creation_credentials.dart b/cw_tron/lib/tron_wallet_creation_credentials.dart index dc4f389aa..ed5e1c164 100644 --- a/cw_tron/lib/tron_wallet_creation_credentials.dart +++ b/cw_tron/lib/tron_wallet_creation_credentials.dart @@ -2,8 +2,8 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class TronNewWalletCredentials extends WalletCredentials { - TronNewWalletCredentials({required String name, WalletInfo? walletInfo}) - : super(name: name, walletInfo: walletInfo); + TronNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}) + : super(name: name, walletInfo: walletInfo, password: password); } class TronRestoreWalletFromSeedCredentials extends WalletCredentials { diff --git a/cw_tron/lib/tron_wallet_service.dart b/cw_tron/lib/tron_wallet_service.dart index ba217a265..dacef439a 100644 --- a/cw_tron/lib/tron_wallet_service.dart +++ b/cw_tron/lib/tron_wallet_service.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:bip39/bip39.dart' as bip39; import 'package:collection/collection.dart'; import 'package:cw_core/balance.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/transaction_history.dart'; import 'package:cw_core/transaction_info.dart'; @@ -21,11 +22,12 @@ class TronWalletService extends WalletService< TronRestoreWalletFromSeedCredentials, TronRestoreWalletFromPrivateKey, TronNewWalletCredentials> { - TronWalletService(this.walletInfoSource, {required this.client}); + TronWalletService(this.walletInfoSource, {required this.client, required this.isDirect}); late TronClient client; final Box walletInfoSource; + final bool isDirect; @override WalletType getType() => WalletType.tron; @@ -43,6 +45,7 @@ class TronWalletService extends WalletService< walletInfo: credentials.walletInfo!, mnemonic: mnemonic, password: credentials.password!, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -62,6 +65,7 @@ class TronWalletService extends WalletService< name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -75,6 +79,7 @@ class TronWalletService extends WalletService< name: name, password: password, walletInfo: walletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -92,6 +97,7 @@ class TronWalletService extends WalletService< password: credentials.password!, privateKey: credentials.privateKey, walletInfo: credentials.walletInfo!, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -114,6 +120,7 @@ class TronWalletService extends WalletService< password: credentials.password!, mnemonic: credentials.mnemonic, walletInfo: credentials.walletInfo!, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); @@ -128,7 +135,11 @@ class TronWalletService extends WalletService< final currentWalletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(currentName, getType())); final currentWallet = await TronWalletBase.open( - password: password, name: currentName, walletInfo: currentWalletInfo); + password: password, + name: currentName, + walletInfo: currentWalletInfo, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + ); await currentWallet.renameWalletFiles(newName); await saveBackup(newName); diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index e02c0ec2e..85f5e4b2f 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -50,7 +50,7 @@ abstract class WowneroWalletBase extends WalletBase with Store { WowneroWalletBase( - {required WalletInfo walletInfo, required Box unspentCoinsInfo}) + {required WalletInfo walletInfo, required Box unspentCoinsInfo, required String password}) : balance = ObservableMap.of({ CryptoCurrency.wow: WowneroBalance( fullBalance: wownero_wallet.getFullBalance(accountIndex: 0), @@ -58,6 +58,7 @@ abstract class WowneroWalletBase }), _isTransactionUpdating = false, _hasSyncAfterStartup = false, + _password = password, isEnabledAutoGenerateSubaddress = false, syncStatus = NotConnectedSyncStatus(), unspentCoins = [], @@ -109,6 +110,10 @@ abstract class WowneroWalletBase String seedLegacy(String? language) => wownero_wallet.getSeedLegacy(language); + String get password => _password; + + String _password; + @override MoneroWalletKeys get keys => MoneroWalletKeys( privateSpendKey: wownero_wallet.getSecretSpendKey(), diff --git a/cw_wownero/lib/wownero_wallet_service.dart b/cw_wownero/lib/wownero_wallet_service.dart index 13cab8f61..286bfccd0 100644 --- a/cw_wownero/lib/wownero_wallet_service.dart +++ b/cw_wownero/lib/wownero_wallet_service.dart @@ -93,7 +93,7 @@ class WowneroWalletService extends WalletService< await wownero_wallet_manager.createWallet( path: path, password: credentials.password!, language: credentials.language); final wallet = WowneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, password: credentials.password!); await wallet.init(); return wallet; @@ -129,7 +129,7 @@ class WowneroWalletService extends WalletService< await wownero_wallet_manager.openWalletAsync({'path': path, 'password': password}); final walletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(name, getType())); - wallet = WowneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + wallet = WowneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource, password: password); final isValid = wallet.walletAddresses.validate(); if (!isValid) { @@ -210,7 +210,7 @@ class WowneroWalletService extends WalletService< final currentWalletInfo = walletInfoSource.values .firstWhere((info) => info.id == WalletBase.idFor(currentName, getType())); final currentWallet = - WowneroWallet(walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + WowneroWallet(walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource, password: password); await currentWallet.renameWalletFiles(newName); @@ -235,7 +235,7 @@ class WowneroWalletService extends WalletService< viewKey: credentials.viewKey, spendKey: credentials.spendKey); final wallet = WowneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, password: credentials.password!); await wallet.init(); return wallet; @@ -268,7 +268,7 @@ class WowneroWalletService extends WalletService< seed: credentials.mnemonic, restoreHeight: credentials.height!); final wallet = WowneroWallet( - walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource); + walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, password: credentials.password!); await wallet.init(); return wallet; @@ -315,7 +315,7 @@ class WowneroWalletService extends WalletService< restoreHeight: height, spendKey: spendKey); - final wallet = WowneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource); + final wallet = WowneroWallet(walletInfo: walletInfo, unspentCoinsInfo: unspentCoinsInfoSource, password: password); await wallet.init(); return wallet; diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index 737743925..85d856b35 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -113,6 +113,15 @@ packages: url: "https://pub.dev" source: hosted version: "8.4.3" + cake_backup: + dependency: transitive + description: + path: "." + ref: main + resolved-ref: "3aba867dcab6737f6707782f5db15d71f303db38" + url: "https://github.com/cake-tech/cake_backup.git" + source: git + version: "1.0.0+1" characters: dependency: transitive description: @@ -169,6 +178,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: df156c5109286340817d21fa7b62f9140f17915077127dd70f8bd7a2a0997a35 + url: "https://pub.dev" + source: hosted + version: "2.5.0" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" cw_core: dependency: "direct main" description: @@ -680,6 +705,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index edfc77acb..989cd2b35 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -29,8 +29,8 @@ class CWBitcoin extends Bitcoin { @override WalletCredentials createBitcoinNewWalletCredentials( - {required String name, WalletInfo? walletInfo}) => - BitcoinNewWalletCredentials(name: name, walletInfo: walletInfo); + {required String name, WalletInfo? walletInfo, String? password}) => + BitcoinNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createBitcoinHardwareWalletCredentials( @@ -203,13 +203,13 @@ class CWBitcoin extends Bitcoin { } WalletService createBitcoinWalletService( - Box walletInfoSource, Box unspentCoinSource, bool alwaysScan) { - return BitcoinWalletService(walletInfoSource, unspentCoinSource, alwaysScan); + Box walletInfoSource, Box unspentCoinSource, bool alwaysScan, bool isDirect) { + return BitcoinWalletService(walletInfoSource, unspentCoinSource, alwaysScan, isDirect); } WalletService createLitecoinWalletService( - Box walletInfoSource, Box unspentCoinSource) { - return LitecoinWalletService(walletInfoSource, unspentCoinSource); + Box walletInfoSource, Box unspentCoinSource, bool isDirect) { + return LitecoinWalletService(walletInfoSource, unspentCoinSource, isDirect); } @override diff --git a/lib/bitcoin_cash/cw_bitcoin_cash.dart b/lib/bitcoin_cash/cw_bitcoin_cash.dart index 6e169209f..fcb34a286 100644 --- a/lib/bitcoin_cash/cw_bitcoin_cash.dart +++ b/lib/bitcoin_cash/cw_bitcoin_cash.dart @@ -6,16 +6,17 @@ class CWBitcoinCash extends BitcoinCash { @override WalletService createBitcoinCashWalletService( - Box walletInfoSource, Box unspentCoinSource) { - return BitcoinCashWalletService(walletInfoSource, unspentCoinSource); + Box walletInfoSource, Box unspentCoinSource, bool isDirect) { + return BitcoinCashWalletService(walletInfoSource, unspentCoinSource, isDirect); } @override WalletCredentials createBitcoinCashNewWalletCredentials({ required String name, WalletInfo? walletInfo, + String? password, }) => - BitcoinCashNewWalletCredentials(name: name, walletInfo: walletInfo); + BitcoinCashNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials( diff --git a/lib/core/backup_service.dart b/lib/core/backup_service.dart index 577238baf..42e24d3c7 100644 --- a/lib/core/backup_service.dart +++ b/lib/core/backup_service.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:cake_wallet/core/secure_storage.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/root_dir.dart'; import 'package:cw_core/wallet_type.dart'; @@ -20,7 +21,6 @@ import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cake_wallet/.secrets.g.dart' as secrets; import 'package:cake_wallet/wallet_types.g.dart'; - import 'package:cake_backup/backup.dart' as cake_backup; class BackupService { diff --git a/lib/core/wallet_creation_service.dart b/lib/core/wallet_creation_service.dart index 2f3acb6c9..823aa7e84 100644 --- a/lib/core/wallet_creation_service.dart +++ b/lib/core/wallet_creation_service.dart @@ -15,7 +15,6 @@ import 'package:cw_core/wallet_type.dart'; class WalletCreationService { WalletCreationService( {required WalletType initialType, - required this.secureStorage, required this.keyService, required this.sharedPreferences, required this.settingsStore, @@ -25,7 +24,6 @@ class WalletCreationService { } WalletType type; - final SecureStorage secureStorage; final SharedPreferences sharedPreferences; final SettingsStore settingsStore; final KeyService keyService; @@ -56,12 +54,16 @@ class WalletCreationService { Future create(WalletCredentials credentials, {bool? isTestnet}) async { checkIfExists(credentials.name); - final password = generateWalletPassword(); - credentials.password = password; + + if (credentials.password == null) { + credentials.password = generateWalletPassword(); + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); + } + if (_hasSeedPhraseLengthOption) { credentials.seedPhraseLength = settingsStore.seedPhraseLength.value; } - await keyService.saveWalletPassword(password: password, walletName: credentials.name); final wallet = await _service!.create(credentials, isTestnet: isTestnet); if (wallet.type == WalletType.monero) { @@ -94,9 +96,13 @@ class WalletCreationService { Future restoreFromKeys(WalletCredentials credentials, {bool? isTestnet}) async { checkIfExists(credentials.name); - final password = generateWalletPassword(); - credentials.password = password; - await keyService.saveWalletPassword(password: password, walletName: credentials.name); + + if (credentials.password == null) { + credentials.password = generateWalletPassword(); + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); + } + final wallet = await _service!.restoreFromKeys(credentials, isTestnet: isTestnet); if (wallet.type == WalletType.monero) { @@ -109,9 +115,13 @@ class WalletCreationService { Future restoreFromSeed(WalletCredentials credentials, {bool? isTestnet}) async { checkIfExists(credentials.name); - final password = generateWalletPassword(); - credentials.password = password; - await keyService.saveWalletPassword(password: password, walletName: credentials.name); + + if (credentials.password == null) { + credentials.password = generateWalletPassword(); + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); + } + final wallet = await _service!.restoreFromSeed(credentials, isTestnet: isTestnet); if (wallet.type == WalletType.monero) { diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index ca29576e4..2b570f14c 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -20,17 +20,18 @@ class WalletLoadingService { final KeyService keyService; final WalletService Function(WalletType type) walletServiceFactory; - Future renameWallet(WalletType type, String name, String newName) async { + Future renameWallet(WalletType type, String name, String newName, + {String? password}) async { final walletService = walletServiceFactory.call(type); - final password = await keyService.getWalletPassword(walletName: name); + final walletPassword = password ?? (await keyService.getWalletPassword(walletName: name)); // Save the current wallet's password to the new wallet name's key - await keyService.saveWalletPassword(walletName: newName, password: password); + await keyService.saveWalletPassword(walletName: newName, password: walletPassword); // Delete previous wallet name from keyService to keep only new wallet's name // otherwise keeps duplicate (old and new names) await keyService.deleteWalletPassword(walletName: name); - await walletService.rename(name, password, newName); + await walletService.rename(name, walletPassword, newName); // set shared preferences flag based on previous wallet name if (type == WalletType.monero) { @@ -41,11 +42,11 @@ class WalletLoadingService { } } - Future load(WalletType type, String name) async { + Future load(WalletType type, String name, {String? password}) async { try { final walletService = walletServiceFactory.call(type); - final password = await keyService.getWalletPassword(walletName: name); - final wallet = await walletService.openWallet(name, password); + final walletPassword = password ?? (await keyService.getWalletPassword(walletName: name)); + final wallet = await walletService.openWallet(name, walletPassword); if (type == WalletType.monero) { await updateMoneroWalletPassword(wallet); @@ -67,8 +68,8 @@ class WalletLoadingService { for (var walletInfo in walletInfoSource.values) { try { final walletService = walletServiceFactory.call(walletInfo.type); - final password = await keyService.getWalletPassword(walletName: walletInfo.name); - final wallet = await walletService.openWallet(walletInfo.name, password); + final walletPassword = password ?? (await keyService.getWalletPassword(walletName: name)); + final wallet = await walletService.openWallet(walletInfo.name, walletPassword); if (walletInfo.type == WalletType.monero) { await updateMoneroWalletPassword(wallet); diff --git a/lib/di.dart b/lib/di.dart index a64270f6d..7c22e809c 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -30,6 +30,7 @@ import 'package:cake_wallet/entities/contact.dart'; import 'package:cake_wallet/entities/contact_record.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/parse_address_from_domain.dart'; +import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/entities/qr_view_data.dart'; import 'package:cake_wallet/entities/template.dart'; import 'package:cake_wallet/entities/transaction_description.dart'; @@ -113,6 +114,8 @@ import 'package:cake_wallet/src/screens/support_chat/support_chat_page.dart'; import 'package:cake_wallet/src/screens/support_other_links/support_other_links_page.dart'; import 'package:cake_wallet/src/screens/wallet/wallet_edit_page.dart'; import 'package:cake_wallet/src/screens/wallet_connect/wc_connections_listing_view.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_page.dart'; import 'package:cake_wallet/themes/theme_list.dart'; import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/store/anonpay/anonpay_transactions_store.dart'; @@ -217,6 +220,8 @@ import 'package:cake_wallet/view_model/wallet_list/wallet_list_view_model.dart'; import 'package:cake_wallet/view_model/wallet_new_vm.dart'; import 'package:cake_wallet/view_model/wallet_restore_view_model.dart'; import 'package:cake_wallet/view_model/wallet_seed_view_model.dart'; +import 'package:cake_wallet/view_model/wallet_unlock_loadable_view_model.dart'; +import 'package:cake_wallet/view_model/wallet_unlock_verifiable_view_model.dart'; import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/receive_page_option.dart'; @@ -337,7 +342,6 @@ Future setup({ WalletCreationService( initialType: type, keyService: getIt.get(), - secureStorage: getIt.get(), sharedPreferences: getIt.get(), settingsStore: getIt.get(), walletInfoSource: _walletInfoSource)); @@ -357,6 +361,65 @@ Future setup({ getIt.get(param1: type), type: type)); + getIt.registerFactoryParam((args, closable) { + return WalletUnlockPage( + getIt.get(param1: args), + args.callback, + args.authPasswordHandler, + closable: closable); + }, instanceName: 'wallet_unlock_loadable'); + + getIt.registerFactory( + () => getIt.get( + param1: WalletUnlockArguments( + callback: (bool successful, _) { + if (successful) { + final authStore = getIt.get(); + authStore.allowed(); + }}), + param2: false, + instanceName: 'wallet_unlock_loadable'), + instanceName: 'wallet_password_login'); + + getIt.registerFactoryParam((args, closable) { + return WalletUnlockPage( + getIt.get(param1: args), + args.callback, + args.authPasswordHandler, + closable: closable); + }, instanceName: 'wallet_unlock_verifiable'); + + getIt.registerFactoryParam((args, _) { + final currentWalletName = getIt + .get() + .getString(PreferencesKey.currentWalletName) ?? ''; + final currentWalletTypeRaw = + getIt.get() + .getInt(PreferencesKey.currentWalletType) ?? 0; + final currentWalletType = deserializeFromInt(currentWalletTypeRaw); + + return WalletUnlockLoadableViewModel( + getIt.get(), + getIt.get(), + walletName: args.walletName ?? currentWalletName, + walletType: args.walletType ?? currentWalletType); + }); + + getIt.registerFactoryParam((args, _) { + final currentWalletName = getIt + .get() + .getString(PreferencesKey.currentWalletName) ?? ''; + final currentWalletTypeRaw = + getIt.get() + .getInt(PreferencesKey.currentWalletType) ?? 0; + final currentWalletType = deserializeFromInt(currentWalletTypeRaw); + + return WalletUnlockVerifiableViewModel( + getIt.get(), + walletName: args.walletName ?? currentWalletName, + walletType: args.walletType ?? currentWalletType); + }); + getIt.registerFactoryParam((WalletType type, _) { return WalletRestorationFromQRVM(getIt.get(), getIt.get(param1: type), _walletInfoSource, type); @@ -907,23 +970,28 @@ Future setup({ _walletInfoSource, _unspentCoinsInfoSource, getIt.get().silentPaymentsAlwaysScan, + SettingsStoreBase.walletPasswordDirectInput, ); case WalletType.litecoin: - return bitcoin!.createLitecoinWalletService(_walletInfoSource, _unspentCoinsInfoSource); + return bitcoin!.createLitecoinWalletService(_walletInfoSource, _unspentCoinsInfoSource, + SettingsStoreBase.walletPasswordDirectInput); case WalletType.ethereum: - return ethereum!.createEthereumWalletService(_walletInfoSource); + return ethereum!.createEthereumWalletService( + _walletInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.bitcoinCash: - return bitcoinCash! - .createBitcoinCashWalletService(_walletInfoSource, _unspentCoinsInfoSource); + return bitcoinCash!.createBitcoinCashWalletService(_walletInfoSource, + _unspentCoinsInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.nano: case WalletType.banano: - return nano!.createNanoWalletService(_walletInfoSource); + return nano!.createNanoWalletService(_walletInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.polygon: - return polygon!.createPolygonWalletService(_walletInfoSource); + return polygon!.createPolygonWalletService( + _walletInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.solana: - return solana!.createSolanaWalletService(_walletInfoSource); + return solana!.createSolanaWalletService( + _walletInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.tron: - return tron!.createTronWalletService(_walletInfoSource); + return tron!.createTronWalletService(_walletInfoSource, SettingsStoreBase.walletPasswordDirectInput); case WalletType.wownero: return wownero!.createWowneroWalletService(_walletInfoSource, _unspentCoinsInfoSource); case WalletType.none: diff --git a/lib/entities/load_current_wallet.dart b/lib/entities/load_current_wallet.dart index 595bc2233..e67b59997 100644 --- a/lib/entities/load_current_wallet.dart +++ b/lib/entities/load_current_wallet.dart @@ -6,7 +6,7 @@ import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/core/wallet_loading_service.dart'; -Future loadCurrentWallet() async { +Future loadCurrentWallet({String? password}) async { final appStore = getIt.get(); final name = getIt .get() @@ -21,7 +21,10 @@ Future loadCurrentWallet() async { final type = deserializeFromInt(typeRaw); final walletLoadingService = getIt.get(); - final wallet = await walletLoadingService.load(type, name); + final wallet = await walletLoadingService.load( + type, + name, + password: password); await appStore.changeCurrentWallet(wallet); getIt.get().registerSyncTask(); diff --git a/lib/ethereum/cw_ethereum.dart b/lib/ethereum/cw_ethereum.dart index 7b593d58d..4e210b227 100644 --- a/lib/ethereum/cw_ethereum.dart +++ b/lib/ethereum/cw_ethereum.dart @@ -4,15 +4,16 @@ class CWEthereum extends Ethereum { @override List getEthereumWordList(String language) => EVMChainMnemonics.englishWordlist; - WalletService createEthereumWalletService(Box walletInfoSource) => - EthereumWalletService(walletInfoSource, client: EthereumClient()); + WalletService createEthereumWalletService(Box walletInfoSource, bool isDirect) => + EthereumWalletService(walletInfoSource, isDirect, client: EthereumClient()); @override WalletCredentials createEthereumNewWalletCredentials({ required String name, WalletInfo? walletInfo, + String? password, }) => - EVMChainNewWalletCredentials(name: name, walletInfo: walletInfo); + EVMChainNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createEthereumRestoreWalletFromSeedCredentials({ diff --git a/lib/main.dart b/lib/main.dart index 1c0078e16..aeb76b3a8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -48,6 +48,7 @@ final rootKey = GlobalKey(); final RouteObserver> routeObserver = RouteObserver>(); Future main() async { + bool isAppRunning = false; await runZonedGuarded(() async { WidgetsFlutterBinding.ensureInitialized(); @@ -170,7 +171,6 @@ Future initializeAppConfigs() async { } final secureStorage = secureStorageShared; - final transactionDescriptionsBoxKey = await getEncryptionKey(secureStorage: secureStorage, forKey: TransactionDescription.boxKey); final tradesBoxKey = await getEncryptionKey(secureStorage: secureStorage, forKey: Trade.boxKey); @@ -247,8 +247,8 @@ Future initialSetup( ordersSource: ordersSource, anonpayInvoiceInfoSource: anonpayInvoiceInfo, unspentCoinsInfoSource: unspentCoinsInfoSource, - secureStorage: secureStorage, navigatorKey: navigatorKey, + secureStorage: secureStorage, ); await bootstrap(navigatorKey); monero?.onStartup(); diff --git a/lib/nano/cw_nano.dart b/lib/nano/cw_nano.dart index ad02d2ccb..8cf640d8b 100644 --- a/lib/nano/cw_nano.dart +++ b/lib/nano/cw_nano.dart @@ -75,8 +75,8 @@ class CWNano extends Nano { } @override - WalletService createNanoWalletService(Box walletInfoSource) { - return NanoWalletService(walletInfoSource); + WalletService createNanoWalletService(Box walletInfoSource, bool isDirect) { + return NanoWalletService(walletInfoSource, isDirect); } @override diff --git a/lib/polygon/cw_polygon.dart b/lib/polygon/cw_polygon.dart index 2dcb1b4a6..5bb87ff5b 100644 --- a/lib/polygon/cw_polygon.dart +++ b/lib/polygon/cw_polygon.dart @@ -4,15 +4,16 @@ class CWPolygon extends Polygon { @override List getPolygonWordList(String language) => EVMChainMnemonics.englishWordlist; - WalletService createPolygonWalletService(Box walletInfoSource) => - PolygonWalletService(walletInfoSource, client: PolygonClient()); + WalletService createPolygonWalletService(Box walletInfoSource, bool isDirect) => + PolygonWalletService(walletInfoSource, isDirect, client: PolygonClient()); @override WalletCredentials createPolygonNewWalletCredentials({ required String name, WalletInfo? walletInfo, + String? password }) => - EVMChainNewWalletCredentials(name: name, walletInfo: walletInfo); + EVMChainNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createPolygonRestoreWalletFromSeedCredentials({ diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index e4fd9b32f..95cbd51df 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/utils/exception_handler.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:flutter/widgets.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/entities/load_current_wallet.dart'; @@ -23,7 +24,7 @@ void startAuthenticationStateChange( _onAuthenticationStateChange ??= autorun((_) async { final state = authenticationStore.state; - if (state == AuthenticationState.installed) { + if (state == AuthenticationState.installed && !SettingsStoreBase.walletPasswordDirectInput) { try { await loadCurrentWallet(); } catch (error, stack) { diff --git a/lib/router.dart b/lib/router.dart index c09664cef..498077511 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -90,7 +90,11 @@ import 'package:cake_wallet/src/screens/wallet/wallet_edit_page.dart'; import 'package:cake_wallet/src/screens/wallet_connect/wc_connections_listing_view.dart'; import 'package:cake_wallet/src/screens/wallet_keys/wallet_keys_page.dart'; import 'package:cake_wallet/src/screens/wallet_list/wallet_list_page.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_page.dart'; import 'package:cake_wallet/src/screens/welcome/create_welcome_page.dart'; +import 'package:cake_wallet/store/settings_store.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; @@ -125,6 +129,14 @@ Route createRoute(RouteSettings settings) { return MaterialPageRoute(builder: (_) => createWelcomePage()); case Routes.newWalletFromWelcome: + if (SettingsStoreBase.walletPasswordDirectInput) { + if (availableWalletTypes.length == 1) { + return createRoute(RouteSettings(name: Routes.newWallet, arguments: availableWalletTypes.first)); + } else { + return createRoute(RouteSettings(name: Routes.newWalletType)); + } + } + return CupertinoPageRoute( builder: (_) => getIt.get(param1: (PinCodeState context, dynamic _) { @@ -176,6 +188,10 @@ Route createRoute(RouteSettings settings) { param2: [false, false])); case Routes.restoreOptions: + if (SettingsStoreBase.walletPasswordDirectInput) { + return createRoute(RouteSettings(name: Routes.restoreWalletType)); + } + final isNewInstall = settings.arguments as bool; return CupertinoPageRoute( fullscreenDialog: true, @@ -328,8 +344,16 @@ Route createRoute(RouteSettings settings) { case Routes.auth: return MaterialPageRoute( fullscreenDialog: true, - builder: (_) => getIt.get( - param1: settings.arguments as OnAuthenticationFinished, param2: true)); + builder: (_) + => SettingsStoreBase.walletPasswordDirectInput + ? getIt.get( + param1: WalletUnlockArguments( + callback: settings.arguments as OnAuthenticationFinished), + instanceName: 'wallet_unlock_verifiable', + param2: true) + : getIt.get( + param1: settings.arguments as OnAuthenticationFinished, + param2: true)); case Routes.totpAuthCodePage: final args = settings.arguments as TotpAuthArgumentsModel; @@ -340,24 +364,32 @@ Route createRoute(RouteSettings settings) { ), ); - case Routes.login: - return CupertinoPageRoute( - builder: (context) => WillPopScope( - child: getIt.get(instanceName: 'login'), - onWillPop: () async => - // FIX-ME: Additional check does it works correctly - (await SystemChannels.platform.invokeMethod('SystemNavigator.pop') ?? - false), - ), - fullscreenDialog: true); + case Routes.walletUnlockLoadable: + return MaterialPageRoute( + fullscreenDialog: true, + builder: (_) + => getIt.get( + param1: settings.arguments as WalletUnlockArguments, + instanceName: 'wallet_unlock_loadable', + param2: true)); case Routes.unlock: return MaterialPageRoute( fullscreenDialog: true, - builder: (_) => WillPopScope( - child: getIt.get( - param1: settings.arguments as OnAuthenticationFinished, param2: false), - onWillPop: () async => false)); + builder: (_) + => SettingsStoreBase.walletPasswordDirectInput + ? WillPopScope( + child: getIt.get( + param1: WalletUnlockArguments( + callback: settings.arguments as OnAuthenticationFinished), + param2: false, + instanceName: 'wallet_unlock_verifiable'), + onWillPop: () async => false) + : WillPopScope( + child: getIt.get( + param1: settings.arguments as OnAuthenticationFinished, + param2: false), + onWillPop: () async => false)); case Routes.silentPaymentsSettings: return CupertinoPageRoute( @@ -397,6 +429,17 @@ Route createRoute(RouteSettings settings) { builder: (_) => getIt.get( param1: args?['editingNode'] as Node?, param2: args?['isSelected'] as bool?)); + case Routes.login: + return CupertinoPageRoute( + builder: (context) => WillPopScope( + child: SettingsStoreBase.walletPasswordDirectInput + ? getIt.get(instanceName: 'wallet_password_login') + : getIt.get(instanceName: 'login'), + onWillPop: () async => + // FIX-ME: Additional check does it works correctly + (await SystemChannels.platform.invokeMethod('SystemNavigator.pop') ?? false)), + fullscreenDialog: true); + case Routes.newPowNode: final args = settings.arguments as Map?; return CupertinoPageRoute( @@ -486,7 +529,9 @@ Route createRoute(RouteSettings settings) { fullscreenDialog: true, builder: (_) => getIt.get()); case Routes.support: - return CupertinoPageRoute(builder: (_) => getIt.get()); + return CupertinoPageRoute( + fullscreenDialog: true, + builder: (_) => getIt.get()); case Routes.supportLiveChat: return CupertinoPageRoute(builder: (_) => getIt.get()); diff --git a/lib/routes.dart b/lib/routes.dart index 78a93bee7..caa7eb39e 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -82,6 +82,8 @@ class Routes { static const otherSettingsPage = '/other_settings_page'; static const advancedPrivacySettings = '/advanced_privacy_settings'; static const sweepingWalletPage = '/sweeping_wallet_page'; + static const walletPasswordUnlock = '/wallet_password_unlock'; + static const walletUnlockLoadable = '/wallet_unlock_loadable'; static const anonPayInvoicePage = '/anon_pay_invoice_page'; static const anonPayReceivePage = '/anon_pay_receive_page'; static const anonPayDetailsPage = '/anon_pay_details_page'; diff --git a/lib/solana/cw_solana.dart b/lib/solana/cw_solana.dart index af66cf3e5..e70739db9 100644 --- a/lib/solana/cw_solana.dart +++ b/lib/solana/cw_solana.dart @@ -4,15 +4,16 @@ class CWSolana extends Solana { @override List getSolanaWordList(String language) => SolanaMnemonics.englishWordlist; - WalletService createSolanaWalletService(Box walletInfoSource) => - SolanaWalletService(walletInfoSource); + WalletService createSolanaWalletService(Box walletInfoSource, bool isDirect) => + SolanaWalletService(walletInfoSource, isDirect); @override WalletCredentials createSolanaNewWalletCredentials({ required String name, WalletInfo? walletInfo, + String? password, }) => - SolanaNewWalletCredentials(name: name, walletInfo: walletInfo); + SolanaNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createSolanaRestoreWalletFromSeedCredentials({ diff --git a/lib/src/screens/auth/auth_page.dart b/lib/src/screens/auth/auth_page.dart index dcd1c8016..d14a12527 100644 --- a/lib/src/screens/auth/auth_page.dart +++ b/lib/src/screens/auth/auth_page.dart @@ -12,6 +12,12 @@ import 'package:cake_wallet/core/execution_state.dart'; typedef OnAuthenticationFinished = void Function(bool, AuthPageState); +abstract class AuthPageState extends State { + void changeProcessText(String text); + void hideProgressText(); + Future close({String? route, dynamic arguments}); +} + class AuthPage extends StatefulWidget { AuthPage(this.authViewModel, {required this.onAuthenticationFinished, @@ -22,10 +28,10 @@ class AuthPage extends StatefulWidget { final bool closable; @override - AuthPageState createState() => AuthPageState(); + AuthPageState createState() => AuthPagePinCodeStateImpl(); } -class AuthPageState extends State { +class AuthPagePinCodeStateImpl extends AuthPageState { final _key = GlobalKey(); final _pinCodeKey = GlobalKey(); final _backArrowImageDarkTheme = @@ -55,8 +61,6 @@ class AuthPageState extends State { } if (state is FailureState) { - print('X'); - print(state.error); WidgetsBinding.instance.addPostFrameCallback((_) async { _pinCodeKey.currentState?.clear(); dismissFlushBar(_authBar); @@ -95,17 +99,20 @@ class AuthPageState extends State { super.dispose(); } + @override void changeProcessText(String text) { dismissFlushBar(_authBar); _progressBar = createBar(text, duration: null) ..show(_key.currentContext!); } + @override void hideProgressText() { dismissFlushBar(_progressBar); _progressBar = null; } + @override Future close({String? route, dynamic arguments}) async { if (_key.currentContext == null) { throw Exception('Key context is null. Should be not happened'); diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_action_button.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_action_button.dart index 7e9b2b23d..f49047e0b 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_action_button.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_action_button.dart @@ -2,6 +2,9 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; +import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; import 'package:flutter/material.dart'; class DesktopActionButton extends StatelessWidget { @@ -24,45 +27,48 @@ class DesktopActionButton extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.fromLTRB(8, 0, 8, 8), - child: GestureDetector( - onTap: onTap, - child: Container( - padding: EdgeInsets.symmetric(vertical: 25), - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15.0), - color: Theme.of(context).extension()!.syncedBackgroundColor, - ), - child: Center( - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Image.asset( - image, - height: 30, - width: 30, - color: isEnabled - ? Theme.of(context).extension()!.textColor - : Theme.of(context).extension()!.labelTextColor, - ), - const SizedBox(width: 10), - AutoSizeText( - title, - style: TextStyle( - fontSize: 24, - fontFamily: 'Lato', - fontWeight: FontWeight.bold, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: Padding( + padding: const EdgeInsets.fromLTRB(8, 0, 8, 8), + child: GestureDetector( + onTap: onTap, + child: Container( + padding: EdgeInsets.symmetric(vertical: 25), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.0), + color: Theme.of(context).extension()!.syncedBackgroundColor, + ), + child: Center( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset( + image, + height: 30, + width: 30, color: isEnabled ? Theme.of(context).extension()!.textColor - : null, - height: 1, + : Theme.of(context).extension()!.labelTextColor, ), - maxLines: 1, - textAlign: TextAlign.center, - ) - ], + const SizedBox(width: 10), + AutoSizeText( + title, + style: TextStyle( + fontSize: 24, + fontFamily: 'Lato', + fontWeight: FontWeight.bold, + color: isEnabled + ? Theme.of(context).extension()!.textColor + : null, + height: 1, + ), + maxLines: 1, + textAlign: TextAlign.center, + ) + ], + ), ), ), ), diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart index 46e63af01..94489a945 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart @@ -4,9 +4,12 @@ import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/desktop_dropdown_item.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; +import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_widget.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/themes/extensions/menu_theme.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; @@ -176,12 +179,25 @@ class _DesktopWalletSelectionDropDownState extends State _loadWallet(WalletListItem wallet) async { - widget._authService.authenticateAction( - context, - onAuthSuccess: (isAuthenticatedSuccessfully) async { - if (!isAuthenticatedSuccessfully) { - return; - } + if (SettingsStoreBase.walletPasswordDirectInput) { + Navigator.of(context).pushNamed( + Routes.walletUnlockLoadable, + arguments: WalletUnlockArguments( + callback: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (isAuthenticatedSuccessfully) { + auth.close(); + setState(() {}); + } + }, walletName: wallet.name, + walletType: wallet.type)); + return; + } + + widget._authService.authenticateAction(context, + onAuthSuccess: (isAuthenticatedSuccessfully) async { + if (!isAuthenticatedSuccessfully) { + return; + } try { if (context.mounted) { diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index d9427af0a..b66aab4cf 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -68,14 +68,19 @@ class _WalletNameFormState extends State { _WalletNameFormState(this._walletNewVM) : _formKey = GlobalKey(), _languageSelectorKey = GlobalKey(), - _controller = TextEditingController(); + _nameController = TextEditingController(), + _passwordController = _walletNewVM.hasWalletPassword ? TextEditingController() : null, + _repeatedPasswordController = + _walletNewVM.hasWalletPassword ? TextEditingController() : null; static const aspectRatioImage = 1.22; final GlobalKey _formKey; final GlobalKey _languageSelectorKey; final WalletNewVM _walletNewVM; - final TextEditingController _controller; + final TextEditingController _nameController; + final TextEditingController? _passwordController; + final TextEditingController? _repeatedPasswordController; ReactionDisposer? _stateReaction; @override @@ -130,12 +135,11 @@ class _WalletNameFormState extends State { padding: EdgeInsets.only(top: 24), child: Form( key: _formKey, - child: Stack( - alignment: Alignment.centerRight, + child: Column( children: [ TextFormField( onChanged: (value) => _walletNewVM.name = value, - controller: _controller, + controller: _nameController, textAlign: TextAlign.center, style: TextStyle( fontSize: 20.0, @@ -169,10 +173,10 @@ class _WalletNameFormState extends State { FocusManager.instance.primaryFocus?.unfocus(); setState(() { - _controller.text = rName; + _nameController.text = rName; _walletNewVM.name = rName; - _controller.selection = TextSelection.fromPosition( - TextPosition(offset: _controller.text.length)); + _nameController.selection = TextSelection.fromPosition( + TextPosition(offset: _nameController.text.length)); }); }, icon: Container( @@ -195,6 +199,80 @@ class _WalletNameFormState extends State { ), validator: WalletNameValidator(), ), + if (_walletNewVM.hasWalletPassword) ...[ + TextFormField( + onChanged: (value) => _walletNewVM.walletPassword = value, + controller: _passwordController, + textAlign: TextAlign.center, + obscureText: true, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).extension()!.titleColor, + ), + decoration: InputDecoration( + hintStyle: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.w500, + color: + Theme.of(context).extension()!.hintTextColor, + ), + hintText: S.of(context).password, + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + ), + ), + TextFormField( + onChanged: (value) => _walletNewVM.repeatedWalletPassword = value, + controller: _repeatedPasswordController, + textAlign: TextAlign.center, + obscureText: true, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).extension()!.titleColor, + ), + decoration: InputDecoration( + hintStyle: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.w500, + color: + Theme.of(context).extension()!.hintTextColor, + ), + hintText: S.of(context).repeat_wallet_password, + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + ), + ), + ], ], ), ), diff --git a/lib/src/screens/restore/wallet_restore_from_keys_form.dart b/lib/src/screens/restore/wallet_restore_from_keys_form.dart index f8336a2e8..56e49b087 100644 --- a/lib/src/screens/restore/wallet_restore_from_keys_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_keys_form.dart @@ -16,6 +16,9 @@ class WalletRestoreFromKeysFrom extends StatefulWidget { required this.onPrivateKeyChange, required this.displayPrivateKeyField, required this.onHeightOrDateEntered, + required this.displayWalletPassword, + required this.onRepeatedPasswordChange, + this.onPasswordChange, Key? key, }) : super(key: key); @@ -23,13 +26,17 @@ class WalletRestoreFromKeysFrom extends StatefulWidget { final WalletRestoreViewModel walletRestoreViewModel; final void Function(String)? onPrivateKeyChange; final bool displayPrivateKeyField; + final bool displayWalletPassword; + final void Function(String)? onPasswordChange; + final void Function(String)? onRepeatedPasswordChange; @override - WalletRestoreFromKeysFromState createState() => WalletRestoreFromKeysFromState(); + WalletRestoreFromKeysFromState createState() => + WalletRestoreFromKeysFromState(displayWalletPassword: displayWalletPassword); } class WalletRestoreFromKeysFromState extends State { - WalletRestoreFromKeysFromState() + WalletRestoreFromKeysFromState({required bool displayWalletPassword}) : formKey = GlobalKey(), blockchainHeightKey = GlobalKey(), nameController = TextEditingController(), @@ -37,7 +44,9 @@ class WalletRestoreFromKeysFromState extends State { viewKeyController = TextEditingController(), spendKeyController = TextEditingController(), privateKeyController = TextEditingController(), - nameTextEditingController = TextEditingController(); + nameTextEditingController = TextEditingController(), + passwordTextEditingController = displayWalletPassword ? TextEditingController() : null, + repeatedPasswordTextEditingController = displayWalletPassword ? TextEditingController() : null; final GlobalKey formKey; final GlobalKey blockchainHeightKey; @@ -47,9 +56,22 @@ class WalletRestoreFromKeysFromState extends State { final TextEditingController spendKeyController; final TextEditingController nameTextEditingController; final TextEditingController privateKeyController; + final TextEditingController? passwordTextEditingController; + final TextEditingController? repeatedPasswordTextEditingController; + void Function()? passwordListener; + void Function()? repeatedPasswordListener; @override void initState() { + if (passwordTextEditingController != null) { + passwordListener = () => widget.onPasswordChange?.call(passwordTextEditingController!.text); + passwordTextEditingController?.addListener(passwordListener!); + } + + if (repeatedPasswordTextEditingController != null) { + repeatedPasswordListener = () => widget.onRepeatedPasswordChange?.call(repeatedPasswordTextEditingController!.text); + repeatedPasswordTextEditingController?.addListener(repeatedPasswordListener!); + } super.initState(); privateKeyController.addListener(() { @@ -67,6 +89,14 @@ class WalletRestoreFromKeysFromState extends State { viewKeyController.dispose(); privateKeyController.dispose(); spendKeyController.dispose(); + passwordTextEditingController?.dispose(); + if (passwordListener != null) { + passwordTextEditingController?.removeListener(passwordListener!); + } + + if (repeatedPasswordListener != null) { + repeatedPasswordTextEditingController?.removeListener(repeatedPasswordListener!); + } super.dispose(); } @@ -114,6 +144,19 @@ class WalletRestoreFromKeysFromState extends State { ), ], ), + if (widget.displayWalletPassword) + ...[Container( + padding: EdgeInsets.only(top: 20.0), + child: BaseTextFormField( + controller: passwordTextEditingController, + hintText: S.of(context).password, + obscureText: true)), + Container( + padding: EdgeInsets.only(top: 20.0), + child: BaseTextFormField( + controller: repeatedPasswordTextEditingController, + hintText: S.of(context).repeat_wallet_password, + obscureText: true))], Container(height: 20), _restoreFromKeysFormFields(), ], diff --git a/lib/src/screens/restore/wallet_restore_from_seed_form.dart b/lib/src/screens/restore/wallet_restore_from_seed_form.dart index 1f22af0cb..ec40eb1c1 100644 --- a/lib/src/screens/restore/wallet_restore_from_seed_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_seed_form.dart @@ -22,34 +22,43 @@ class WalletRestoreFromSeedForm extends StatefulWidget { required this.displayBlockHeightSelector, required this.displayPassphrase, required this.type, + required this.displayWalletPassword, required this.seedTypeViewModel, this.blockHeightFocusNode, this.onHeightOrDateEntered, this.onSeedChange, - this.onLanguageChange}) + this.onLanguageChange, + this.onPasswordChange, + this.onRepeatedPasswordChange}) : super(key: key); final WalletType type; final bool displayLanguageSelector; final bool displayBlockHeightSelector; + final bool displayWalletPassword; final bool displayPassphrase; final SeedTypeViewModel seedTypeViewModel; final FocusNode? blockHeightFocusNode; final Function(bool)? onHeightOrDateEntered; final void Function(String)? onSeedChange; final void Function(String)? onLanguageChange; + final void Function(String)? onPasswordChange; + final void Function(String)? onRepeatedPasswordChange; @override - WalletRestoreFromSeedFormState createState() => WalletRestoreFromSeedFormState('English'); + WalletRestoreFromSeedFormState createState() => + WalletRestoreFromSeedFormState('English', displayWalletPassword: displayWalletPassword); } class WalletRestoreFromSeedFormState extends State { - WalletRestoreFromSeedFormState(this.language) + WalletRestoreFromSeedFormState(this.language, {required bool displayWalletPassword}) : seedWidgetStateKey = GlobalKey(), blockchainHeightKey = GlobalKey(), formKey = GlobalKey(), languageController = TextEditingController(), nameTextEditingController = TextEditingController(), + passwordTextEditingController = displayWalletPassword ? TextEditingController() : null, + repeatedPasswordTextEditingController = displayWalletPassword ? TextEditingController() : null, passphraseController = TextEditingController(), seedTypeController = TextEditingController(); @@ -57,16 +66,30 @@ class WalletRestoreFromSeedFormState extends State { final GlobalKey blockchainHeightKey; final TextEditingController languageController; final TextEditingController nameTextEditingController; + final TextEditingController? passwordTextEditingController; + final TextEditingController? repeatedPasswordTextEditingController; final TextEditingController seedTypeController; final TextEditingController passphraseController; final GlobalKey formKey; late ReactionDisposer moneroSeedTypeReaction; String language; + void Function()? passwordListener; + void Function()? repeatedPasswordListener; @override void initState() { _setSeedType(widget.seedTypeViewModel.moneroSeedType); _setLanguageLabel(language); + + if (passwordTextEditingController != null) { + passwordListener = () => widget.onPasswordChange?.call(passwordTextEditingController!.text); + passwordTextEditingController?.addListener(passwordListener!); + } + + if (repeatedPasswordTextEditingController != null) { + repeatedPasswordListener = () => widget.onRepeatedPasswordChange?.call(repeatedPasswordTextEditingController!.text); + repeatedPasswordTextEditingController?.addListener(repeatedPasswordListener!); + } moneroSeedTypeReaction = reaction((_) => widget.seedTypeViewModel.moneroSeedType, (SeedType item) { _setSeedType(item); @@ -78,8 +101,16 @@ class WalletRestoreFromSeedFormState extends State { @override void dispose() { - super.dispose(); moneroSeedTypeReaction(); + + if (passwordListener != null) { + passwordTextEditingController?.removeListener(passwordListener!); + } + + if (repeatedPasswordListener != null) { + repeatedPasswordTextEditingController?.removeListener(repeatedPasswordListener!); + } + super.dispose(); } void onSeedChange(String seed) { @@ -177,6 +208,16 @@ class WalletRestoreFromSeedFormState extends State { ), ), ), + if (widget.displayWalletPassword) + ...[BaseTextFormField( + controller: passwordTextEditingController, + hintText: S.of(context).password, + obscureText: true), + BaseTextFormField( + controller: repeatedPasswordTextEditingController, + hintText: S.of(context).repeat_wallet_password, + obscureText: true)], + if (widget.displayLanguageSelector) if (!seedTypeController.value.text.contains("14") && widget.displayLanguageSelector) GestureDetector( onTap: () async { diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index 746b73dca..cd6383c0d 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -53,7 +53,10 @@ class WalletRestorePage extends BasePage { onLanguageChange: (String language) { final isPolyseed = language.startsWith("POLYSEED_"); _validateOnChange(isPolyseed: isPolyseed); - })); + }, + displayWalletPassword: walletRestoreViewModel.hasWalletPassword, + onPasswordChange: (String password) => walletRestoreViewModel.walletPassword = password, + onRepeatedPasswordChange: (String repeatedPassword) => walletRestoreViewModel.repeatedWalletPassword = repeatedPassword)); break; case WalletRestoreMode.keys: _pages.add(WalletRestoreFromKeysFrom( @@ -66,6 +69,9 @@ class WalletRestorePage extends BasePage { } }, displayPrivateKeyField: walletRestoreViewModel.hasRestoreFromPrivateKey, + displayWalletPassword: walletRestoreViewModel.hasWalletPassword, + onPasswordChange: (String password) => walletRestoreViewModel.walletPassword = password, + onRepeatedPasswordChange: (String repeatedPassword) => walletRestoreViewModel.repeatedWalletPassword = repeatedPassword, onHeightOrDateEntered: (value) => walletRestoreViewModel.isButtonEnabled = value)); break; default: @@ -127,6 +133,8 @@ class WalletRestorePage extends BasePage { reaction((_) => walletRestoreViewModel.mode, (WalletRestoreMode mode) { walletRestoreViewModel.isButtonEnabled = false; + walletRestoreViewModel.walletPassword = null; + walletRestoreViewModel.repeatedWalletPassword = null; walletRestoreFromSeedFormKey .currentState!.blockchainHeightKey.currentState!.restoreHeightController.text = ''; diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 7ad8af4c5..8ce0ddde9 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; 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'; diff --git a/lib/src/screens/settings/security_backup_page.dart b/lib/src/screens/settings/security_backup_page.dart index 470f49190..04ae53d77 100644 --- a/lib/src/screens/settings/security_backup_page.dart +++ b/lib/src/screens/settings/security_backup_page.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arro 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/utils/device_info.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/view_model/settings/security_settings_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -41,15 +42,16 @@ class SecurityBackupPage extends BasePage { _securitySettingsViewModel.shouldRequireTOTP2FAForAllSecurityAndBackupSettings, ), ), - SettingsCellWithArrow( - title: S.current.create_backup, - handler: (_) => _authService.authenticateAction( - context, - route: Routes.backup, - conditionToDetermineIfToUse2FA: _securitySettingsViewModel - .shouldRequireTOTP2FAForAllSecurityAndBackupSettings, + if (!SettingsStoreBase.walletPasswordDirectInput) + SettingsCellWithArrow( + title: S.current.create_backup, + handler: (_) => _authService.authenticateAction( + context, + route: Routes.backup, + conditionToDetermineIfToUse2FA: _securitySettingsViewModel + .shouldRequireTOTP2FAForAllSecurityAndBackupSettings, + ), ), - ), SettingsCellWithArrow( title: S.current.settings_change_pin, handler: (_) => _authService.authenticateAction( @@ -119,6 +121,5 @@ class SecurityBackupPage extends BasePage { ], ), ); - } } diff --git a/lib/src/screens/wallet/wallet_edit_page.dart b/lib/src/screens/wallet/wallet_edit_page.dart index 7c90ba2c5..2d1bb9e47 100644 --- a/lib/src/screens/wallet/wallet_edit_page.dart +++ b/lib/src/screens/wallet/wallet_edit_page.dart @@ -4,6 +4,12 @@ import 'package:cake_wallet/core/wallet_name_validator.dart'; import 'package:cake_wallet/palette.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/routes.dart'; +import 'package:cake_wallet/src/screens/auth/auth_page.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.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/store/settings_store.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_edit_view_model.dart'; @@ -94,9 +100,38 @@ class WalletEditPage extends BasePage { ); } else { try { - await walletEditViewModel.changeName(editingWallet); - Navigator.of(context).pop(); - walletEditViewModel.resetState(); + bool confirmed = false; + + if (SettingsStoreBase + .walletPasswordDirectInput) { + await Navigator.of(context).pushNamed( + Routes.walletUnlockLoadable, + arguments: WalletUnlockArguments( + authPasswordHandler: + (String password) async { + await walletEditViewModel + .changeName(editingWallet, + password: password); + }, + callback: (bool + isAuthenticatedSuccessfully, + AuthPageState auth) async { + if (isAuthenticatedSuccessfully) { + auth.close(); + confirmed = true; + } + }, + walletName: editingWallet.name, + walletType: editingWallet.type)); + } else { + await walletEditViewModel.changeName(editingWallet); + confirmed = true; + } + + if (confirmed) { + Navigator.of(context).pop(); + walletEditViewModel.resetState(); + } } catch (e) {} } } @@ -120,11 +155,11 @@ class WalletEditPage extends BasePage { Future _removeWallet(BuildContext context) async { authService.authenticateAction(context, onAuthSuccess: (isAuthenticatedSuccessfully) async { - if (!isAuthenticatedSuccessfully) { - return; - } + if (!isAuthenticatedSuccessfully) { + return; + } - _onSuccessfulAuth(context); + _onSuccessfulAuth(context); }, conditionToDetermineIfToUse2FA: false, ); diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 2a4841608..0d6d9e912 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -1,7 +1,10 @@ import 'package:cake_wallet/entities/wallet_list_order_types.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/filter_list_widget.dart'; import 'package:cake_wallet/src/screens/wallet_list/filtered_list.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/themes/extensions/filter_theme.dart'; import 'package:cake_wallet/themes/extensions/receive_page_theme.dart'; @@ -336,6 +339,20 @@ class WalletListBodyState extends State { } Future _loadWallet(WalletListItem wallet) async { + if (SettingsStoreBase.walletPasswordDirectInput) { + Navigator.of(context).pushNamed( + Routes.walletUnlockLoadable, + arguments: WalletUnlockArguments( + callback: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (isAuthenticatedSuccessfully) { + auth.close(); + setState(() {}); + } + }, walletName: wallet.name, + walletType: wallet.type)); + return; + } + await widget.authService.authenticateAction( context, onAuthSuccess: (isAuthenticatedSuccessfully) async { diff --git a/lib/src/screens/wallet_unlock/wallet_unlock_arguments.dart b/lib/src/screens/wallet_unlock/wallet_unlock_arguments.dart new file mode 100644 index 000000000..5b6d4dd16 --- /dev/null +++ b/lib/src/screens/wallet_unlock/wallet_unlock_arguments.dart @@ -0,0 +1,17 @@ +import 'package:cake_wallet/src/screens/auth/auth_page.dart'; +import 'package:cw_core/wallet_type.dart'; + +typedef AuthPasswordHandler = Future Function(String); + +class WalletUnlockArguments { + WalletUnlockArguments( + {required this.callback, + this.walletName, + this.walletType, + this.authPasswordHandler}); + + final OnAuthenticationFinished callback; + final AuthPasswordHandler? authPasswordHandler; + final String? walletName; + final WalletType? walletType; +} diff --git a/lib/src/screens/wallet_unlock/wallet_unlock_page.dart b/lib/src/screens/wallet_unlock/wallet_unlock_page.dart new file mode 100644 index 000000000..3e6966f9d --- /dev/null +++ b/lib/src/screens/wallet_unlock/wallet_unlock_page.dart @@ -0,0 +1,238 @@ +import 'package:another_flushbar/flushbar.dart'; +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/screens/auth/auth_page.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; +import 'package:cake_wallet/src/widgets/primary_button.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; +import 'package:cake_wallet/utils/show_bar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:cake_wallet/view_model/wallet_unlock_view_model.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:mobx/mobx.dart'; + +class WalletUnlockPage extends StatefulWidget { + WalletUnlockPage( + this.walletUnlockViewModel, this.onAuthenticationFinished, this.authPasswordHandler, + {required this.closable}); + + final WalletUnlockViewModel walletUnlockViewModel; + final OnAuthenticationFinished onAuthenticationFinished; + final AuthPasswordHandler? authPasswordHandler; + final bool closable; + + @override + State createState() => WalletUnlockPageState(); +} + +class WalletUnlockPageState extends AuthPageState { + WalletUnlockPageState() : _passwordController = TextEditingController(); + + final TextEditingController _passwordController; + final _key = GlobalKey(); + final _backArrowImageDarkTheme = Image.asset('assets/images/close_button.png'); + ReactionDisposer? _reaction; + Flushbar? _authBar; + Flushbar? _progressBar; + void Function()? _passwordControllerListener; + + @override + void initState() { + _reaction ??= reaction((_) => widget.walletUnlockViewModel.state, (ExecutionState state) { + if (state is ExecutedSuccessfullyState) { + WidgetsBinding.instance.addPostFrameCallback((_) { + widget.onAuthenticationFinished(true, this); + }); + setState(() {}); + } + + if (state is IsExecutingState) { + WidgetsBinding.instance.addPostFrameCallback((_) { + // null duration to make it indefinite until its disposed + _authBar = createBar(S.of(context).authentication, duration: null)..show(context); + }); + } + + if (state is FailureState) { + WidgetsBinding.instance.addPostFrameCallback((_) async { + dismissFlushBar(_authBar); + showBar(context, S.of(context).failed_authentication(state.error)); + + widget.onAuthenticationFinished(false, this); + }); + } + }); + + _passwordControllerListener = + () => widget.walletUnlockViewModel.setPassword(_passwordController.text); + + if (_passwordControllerListener != null) { + _passwordController.addListener(_passwordControllerListener!); + } + + super.initState(); + } + + @override + void dispose() { + _reaction?.reaction.dispose(); + + if (_passwordControllerListener != null) { + _passwordController.removeListener(_passwordControllerListener!); + } + + super.dispose(); + } + + @override + void changeProcessText(String text) { + dismissFlushBar(_authBar); + _progressBar = createBar(text, duration: null)..show(_key.currentContext!); + } + + @override + void hideProgressText() { + dismissFlushBar(_progressBar); + _progressBar = null; + } + + void dismissFlushBar(Flushbar? bar) { + WidgetsBinding.instance.addPostFrameCallback((_) async { + await bar?.dismiss(); + }); + } + + @override + Future close({String? route, arguments}) async { + if (_key.currentContext == null) { + throw Exception('Key context is null. Should be not happened'); + } + + /// not the best scenario, but WidgetsBinding is not behaving correctly on Android + await Future.delayed(Duration(milliseconds: 50)); + await _authBar?.dismiss(); + await Future.delayed(Duration(milliseconds: 50)); + await _progressBar?.dismiss(); + await Future.delayed(Duration(milliseconds: 50)); + if (route != null) { + Navigator.of(_key.currentContext!).pushReplacementNamed(route, arguments: arguments); + } else { + Navigator.of(_key.currentContext!).pop(); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + key: _key, + appBar: CupertinoNavigationBar( + leading: widget.closable + ? Container( + padding: EdgeInsets.only(top: 10), + child: SizedBox( + height: 37, + width: 37, + child: InkWell( + onTap: () => Navigator.of(context).pop(), + child: _backArrowImageDarkTheme, + ), + )) + : Container(), + backgroundColor: Theme.of(context).colorScheme.background, + border: null), + resizeToAvoidBottomInset: false, + body: Center( + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + widget.walletUnlockViewModel.walletName, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.titleColor, + ), + ), + SizedBox(height: 24), + Form( + child: TextFormField( + onChanged: (value) => null, + controller: _passwordController, + textAlign: TextAlign.center, + obscureText: true, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).extension()!.titleColor, + ), + decoration: InputDecoration( + hintStyle: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.hintTextColor, + ), + hintText: S.of(context).enter_wallet_password, + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context).extension()!.underlineColor, + width: 1.0, + ), + ), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context).extension()!.underlineColor, + width: 1.0, + ), + ), + ), + ), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(bottom: 24), + child: Observer( + builder: (_) => LoadingPrimaryButton( + onPressed: () async { + if (widget.authPasswordHandler != null) { + try { + await widget + .authPasswordHandler!(widget.walletUnlockViewModel.password); + widget.walletUnlockViewModel.success(); + } catch (e) { + widget.walletUnlockViewModel.failure(e); + } + return; + } + + widget.walletUnlockViewModel.unlock(); + }, + text: S.of(context).unlock, + color: Colors.green, + textColor: Colors.white, + isLoading: widget.walletUnlockViewModel.state is IsExecutingState, + isDisabled: widget.walletUnlockViewModel.state is IsExecutingState), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/src/widgets/address_text_field.dart b/lib/src/widgets/address_text_field.dart index 0467b18a2..f79da8069 100644 --- a/lib/src/widgets/address_text_field.dart +++ b/lib/src/widgets/address_text_field.dart @@ -1,5 +1,5 @@ -import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:flutter/services.dart'; import 'package:flutter/material.dart'; @@ -19,7 +19,10 @@ class AddressTextField extends StatelessWidget { {required this.controller, this.isActive = true, this.placeholder, - this.options = const [AddressTextFieldOption.qrCode, AddressTextFieldOption.addressBook], + this.options = const [ + AddressTextFieldOption.qrCode, + AddressTextFieldOption.addressBook + ], this.onURIScanned, this.focusNode, this.isBorderExist = true, diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 8fb26df53..df2c7767f 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -553,6 +553,7 @@ abstract class SettingsStoreBase with Store { static const defaultActionsMode = 11; static const defaultPinCodeTimeOutDuration = PinCodeRequiredDuration.tenminutes; static const defaultAutoGenerateSubaddressStatus = AutoGenerateSubaddressStatus.initialized; + static final walletPasswordDirectInput = Platform.isLinux; static const defaultSeedPhraseLength = SeedPhraseLength.twelveWords; static const defaultMoneroSeedType = SeedType.defaultSeedType; diff --git a/lib/tron/cw_tron.dart b/lib/tron/cw_tron.dart index 52b4f59f7..c6ac89342 100644 --- a/lib/tron/cw_tron.dart +++ b/lib/tron/cw_tron.dart @@ -4,15 +4,17 @@ class CWTron extends Tron { @override List getTronWordList(String language) => EVMChainMnemonics.englishWordlist; - WalletService createTronWalletService(Box walletInfoSource) => - TronWalletService(walletInfoSource, client: TronClient()); + @override + WalletService createTronWalletService(Box walletInfoSource, bool isDirect) => + TronWalletService(walletInfoSource, client: TronClient(), isDirect: isDirect); @override WalletCredentials createTronNewWalletCredentials({ required String name, WalletInfo? walletInfo, + String? password, }) => - TronNewWalletCredentials(name: name, walletInfo: walletInfo); + TronNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); @override WalletCredentials createTronRestoreWalletFromSeedCredentials({ diff --git a/lib/utils/package_info.dart b/lib/utils/package_info.dart index 8b911f887..5f3f0e743 100644 --- a/lib/utils/package_info.dart +++ b/lib/utils/package_info.dart @@ -1,5 +1,5 @@ import 'dart:io'; -import 'package:package_info/package_info.dart' as __package_info__; +import 'package:package_info_plus/package_info_plus.dart' as __package_info__; abstract class _EnvKeys { static const kWinAppName = 'CW_WIN_APP_NAME'; diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index 36661ac7e..43386494e 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -1,5 +1,7 @@ import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/core/wallet_creation_service.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/entities/background_tasks.dart'; import 'package:cake_wallet/view_model/restore/restore_wallet.dart'; @@ -37,6 +39,14 @@ abstract class WalletCreationVMBase with Store { @observable ExecutionState state; + @observable + String? walletPassword; + + @observable + String? repeatedWalletPassword; + + bool get hasWalletPassword => SettingsStoreBase.walletPasswordDirectInput; + WalletType type; final bool isRecovery; final WalletCreationService walletCreationService; @@ -59,6 +69,14 @@ abstract class WalletCreationVMBase with Store { name = await generateName(); } + if (hasWalletPassword && (walletPassword?.isEmpty ?? true)) { + throw Exception(S.current.wallet_password_is_empty); + } + + if (hasWalletPassword && walletPassword != repeatedWalletPassword) { + throw Exception(S.current.repeated_password_is_incorrect); + } + walletCreationService.checkIfExists(name); final dirPath = await pathForWalletDir(name: name, type: type); final path = await pathForWallet(name: name, type: type); diff --git a/lib/view_model/wallet_list/wallet_edit_view_model.dart b/lib/view_model/wallet_list/wallet_edit_view_model.dart index 0582c3f87..e5bfcd4e3 100644 --- a/lib/view_model/wallet_list/wallet_edit_view_model.dart +++ b/lib/view_model/wallet_list/wallet_edit_view_model.dart @@ -32,10 +32,11 @@ abstract class WalletEditViewModelBase with Store { final WalletLoadingService _walletLoadingService; @action - Future changeName(WalletListItem walletItem) async { + Future changeName(WalletListItem walletItem, {String? password}) async { state = WalletEditRenamePending(); await _walletLoadingService.renameWallet( - walletItem.type, walletItem.name, newName); + walletItem.type, walletItem.name, newName, + password: password); _walletListViewModel.updateList(); } diff --git a/lib/view_model/wallet_new_vm.dart b/lib/view_model/wallet_new_vm.dart index 4729a38b2..a618695b1 100644 --- a/lib/view_model/wallet_new_vm.dart +++ b/lib/view_model/wallet_new_vm.dart @@ -66,25 +66,25 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store { switch (type) { case WalletType.monero: return monero!.createMoneroNewWalletCredentials( - name: name, language: options!.first as String, isPolyseed: options.last as bool); + name: name, language: options!.first as String, password: walletPassword, isPolyseed: options.last as bool); case WalletType.bitcoin: - return bitcoin!.createBitcoinNewWalletCredentials(name: name); + return bitcoin!.createBitcoinNewWalletCredentials(name: name, password: walletPassword); case WalletType.litecoin: - return bitcoin!.createBitcoinNewWalletCredentials(name: name); + return bitcoin!.createBitcoinNewWalletCredentials(name: name, password: walletPassword); case WalletType.haven: - return haven! - .createHavenNewWalletCredentials(name: name, language: options!.first as String); + return haven!.createHavenNewWalletCredentials( + name: name, language: options!.first as String, password: walletPassword); case WalletType.ethereum: - return ethereum!.createEthereumNewWalletCredentials(name: name); + return ethereum!.createEthereumNewWalletCredentials(name: name, password: walletPassword); case WalletType.bitcoinCash: - return bitcoinCash!.createBitcoinCashNewWalletCredentials(name: name); + return bitcoinCash!.createBitcoinCashNewWalletCredentials(name: name, password: walletPassword); case WalletType.nano: case WalletType.banano: return nano!.createNanoNewWalletCredentials(name: name); case WalletType.polygon: - return polygon!.createPolygonNewWalletCredentials(name: name); + return polygon!.createPolygonNewWalletCredentials(name: name, password: walletPassword); case WalletType.solana: - return solana!.createSolanaNewWalletCredentials(name: name); + return solana!.createSolanaNewWalletCredentials(name: name, password: walletPassword); case WalletType.tron: return tron!.createTronNewWalletCredentials(name: name); case WalletType.wownero: diff --git a/lib/view_model/wallet_restore_view_model.dart b/lib/view_model/wallet_restore_view_model.dart index 25a555b44..a38baabd8 100644 --- a/lib/view_model/wallet_restore_view_model.dart +++ b/lib/view_model/wallet_restore_view_model.dart @@ -86,7 +86,7 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store { @override WalletCredentials getCredentials(dynamic options) { - final password = generateWalletPassword(); + final password = walletPassword ?? generateWalletPassword(); String? passphrase = options['passphrase'] as String?; final height = options['height'] as int? ?? 0; name = options['name'] as String; diff --git a/lib/view_model/wallet_unlock_loadable_view_model.dart b/lib/view_model/wallet_unlock_loadable_view_model.dart new file mode 100644 index 000000000..f5e7bb917 --- /dev/null +++ b/lib/view_model/wallet_unlock_loadable_view_model.dart @@ -0,0 +1,63 @@ +import 'package:mobx/mobx.dart'; +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/core/wallet_loading_service.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:cake_wallet/view_model/wallet_unlock_view_model.dart'; + +part 'wallet_unlock_loadable_view_model.g.dart'; + +class WalletUnlockLoadableViewModel = WalletUnlockLoadableViewModelBase + with _$WalletUnlockLoadableViewModel; + +abstract class WalletUnlockLoadableViewModelBase extends WalletUnlockViewModel with Store { + WalletUnlockLoadableViewModelBase(this._appStore, this._walletLoadingService, + {required this.walletName, required this.walletType}) + : password = '', + state = InitialExecutionState(); + + final String walletName; + + final WalletType walletType; + + @override + @observable + String password; + + @override + @observable + ExecutionState state; + + final WalletLoadingService _walletLoadingService; + + final AppStore _appStore; + + @override + @action + void setPassword(String password) => this.password = password; + + @override + @action + Future unlock() async { + try { + state = InitialExecutionState(); + final wallet = await _walletLoadingService.load(walletType, walletName, password: password); + _appStore.changeCurrentWallet(wallet); + success(); + } catch (e) { + failure(e.toString()); + } + } + + @override + @action + void success() { + state = ExecutedSuccessfullyState(); + } + + @override + @action + void failure(e) { + state = FailureState(e.toString()); + } +} diff --git a/lib/view_model/wallet_unlock_verifiable_view_model.dart b/lib/view_model/wallet_unlock_verifiable_view_model.dart new file mode 100644 index 000000000..d6f5f0e7d --- /dev/null +++ b/lib/view_model/wallet_unlock_verifiable_view_model.dart @@ -0,0 +1,60 @@ +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:mobx/mobx.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/view_model/wallet_unlock_view_model.dart'; + +part 'wallet_unlock_verifiable_view_model.g.dart'; + +class WalletUnlockVerifiableViewModel = WalletUnlockVerifiableViewModelBase + with _$WalletUnlockVerifiableViewModel; + +abstract class WalletUnlockVerifiableViewModelBase extends WalletUnlockViewModel with Store { + WalletUnlockVerifiableViewModelBase(this.appStore, + {required this.walletName, required this.walletType}) + : password = '', + state = InitialExecutionState(); + + final String walletName; + + final WalletType walletType; + + final AppStore appStore; + + @override + @observable + String password; + + @override + @observable + ExecutionState state; + + @override + @action + void setPassword(String password) => this.password = password; + + @override + @action + Future unlock() async { + try { + state = appStore.wallet!.password == password + ? ExecutedSuccessfullyState() + : FailureState(S.current.invalid_password); + } catch (e) { + failure('${S.current.invalid_password}\n${e.toString()}'); + } + } + + @override + @action + void success() { + state = ExecutedSuccessfullyState(); + } + + @override + @action + void failure(e) { + state = FailureState(e.toString()); + } +} diff --git a/lib/view_model/wallet_unlock_view_model.dart b/lib/view_model/wallet_unlock_view_model.dart new file mode 100644 index 000000000..f0131c61f --- /dev/null +++ b/lib/view_model/wallet_unlock_view_model.dart @@ -0,0 +1,11 @@ +import 'package:cake_wallet/core/execution_state.dart'; + +abstract class WalletUnlockViewModel { + String get walletName; + String get password; + void setPassword(String password); + ExecutionState get state; + Future unlock(); + void success(); + void failure(dynamic e); +} diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 000000000..d3896c984 --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt new file mode 100644 index 000000000..bfce34c34 --- /dev/null +++ b/linux/CMakeLists.txt @@ -0,0 +1,144 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "cake_wallet") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.cake_wallet") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "monero_libwallet2_api_c.so" + COMPONENT Runtime) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/wownero/x86_64-linux-gnu_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "wownero_libwallet2_api_c.so" + COMPONENT Runtime) + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/linux/com.cakewallet.CakeWallet.desktop b/linux/com.cakewallet.CakeWallet.desktop new file mode 100644 index 000000000..eb76a2fb5 --- /dev/null +++ b/linux/com.cakewallet.CakeWallet.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Cake Wallet +Comment=A noncustodial multi-currency wallet +Categories=Office;Finance; +Terminal=false +Icon=com.cakewallet.CakeWallet +Exec=cake_wallet diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt new file mode 100644 index 000000000..d5bd01648 --- /dev/null +++ b/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 000000000..01b922894 --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,27 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) devicelocale_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "DevicelocalePlugin"); + devicelocale_plugin_register_with_registrar(devicelocale_registrar); + g_autoptr(FlPluginRegistrar) flutter_local_authentication_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalAuthenticationPlugin"); + flutter_local_authentication_plugin_register_with_registrar(flutter_local_authentication_registrar); + g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); + flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); +} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 000000000..e0f0a47bc --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000..f52be7481 --- /dev/null +++ b/linux/flutter/generated_plugins.cmake @@ -0,0 +1,28 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + devicelocale + flutter_local_authentication + flutter_secure_storage_linux + url_launcher_linux +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + sp_scanner +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/linux/main.cc b/linux/main.cc new file mode 100644 index 000000000..e7c5c5437 --- /dev/null +++ b/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/linux/my_application.cc b/linux/my_application.cc new file mode 100644 index 000000000..7375d05ca --- /dev/null +++ b/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "cake_wallet"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "cake_wallet"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/linux/my_application.h b/linux/my_application.h new file mode 100644 index 000000000..72271d5e4 --- /dev/null +++ b/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/macos/CakeWallet/decrypt.swift b/macos/CakeWallet/decrypt.swift new file mode 100644 index 000000000..5f24ad3fb --- /dev/null +++ b/macos/CakeWallet/decrypt.swift @@ -0,0 +1,16 @@ +import Foundation +import CryptoSwift + +func decrypt(data: Data, key: String, salt: String) -> String? { + let keyBytes = key.data(using: .utf8)?.bytes ?? [] + let saltBytes = salt.data(using: .utf8)?.bytes ?? [] + + guard let PBKDF2key = try? PKCS5.PBKDF2(password: keyBytes, salt: saltBytes, iterations: 4096, variant: .sha256).calculate(), + let cipher = try? Blowfish(key: PBKDF2key, padding: .pkcs7), + let decryptedBytes = try? cipher.decrypt(data.bytes) else { + return nil + } + + let decryptedData = Data(decryptedBytes) + return String(data: decryptedData, encoding: .utf8) +} diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 338ece4ce..0b4ee9415 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -12,7 +12,6 @@ import flutter_inappwebview_macos import flutter_local_authentication import flutter_secure_storage_macos import in_app_review -import package_info import package_info_plus import path_provider_foundation import share_plus @@ -28,7 +27,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterLocalAuthenticationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalAuthenticationPlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin")) - FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) diff --git a/macos/Runner/RunnerBase.entitlements b/macos/Runner/RunnerBase.entitlements index 186b61b17..22be818c6 100644 --- a/macos/Runner/RunnerBase.entitlements +++ b/macos/Runner/RunnerBase.entitlements @@ -11,4 +11,4 @@ $(AppIdentifierPrefix)${BUNDLE_ID} - + \ No newline at end of file diff --git a/model_generator.sh b/model_generator.sh index 58ce9b5d0..8a1173f7d 100755 --- a/model_generator.sh +++ b/model_generator.sh @@ -1,3 +1,4 @@ +#!/bin/bash cd cw_core; flutter pub get; flutter packages pub run build_runner build --delete-conflicting-outputs; cd .. cd cw_evm; flutter pub get; flutter packages pub run build_runner build --delete-conflicting-outputs; cd .. cd cw_monero; flutter pub get; flutter packages pub run build_runner build --delete-conflicting-outputs; cd .. diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 90072a7c1..567d1b210 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -31,8 +31,7 @@ dependencies: flutter_local_authentication: git: url: https://github.com/cake-tech/flutter_local_authentication - package_info: ^2.0.0 - #package_info_plus: ^1.4.2 + package_info_plus: ^8.0.1 devicelocale: git: url: https://github.com/cake-tech/flutter-devicelocale @@ -80,6 +79,7 @@ dependencies: path_provider_android: ^2.2.1 shared_preferences_android: 2.0.17 url_launcher_android: 6.0.24 + url_launcher_linux: 3.1.1 # https://github.com/flutter/flutter/issues/153083 sensitive_clipboard: ^1.0.0 walletconnect_flutter_v2: ^2.1.4 eth_sig_util: ^0.0.9 diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 4cf9509f8..98cafdebc 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -236,6 +236,7 @@ "enter_code": "ادخل الرمز", "enter_seed_phrase": "أدخل عبارة البذور الخاصة بك", "enter_totp_code": "الرجاء إدخال رمز TOTP.", + "enter_wallet_password": "أدخل كلمة مرور المحفظة", "enter_your_note": "أدخل ملاحظتك ...", "enter_your_pin": "أدخل كود الرقم السري", "enter_your_pin_again": "أدخل PIN الخاص بك مرة أخرى", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "ليس لديك ما يكفي من SOL لتغطية رسوم المعاملة والإيجار للحساب. يرجى إضافة المزيد من sol إلى محفظتك أو تقليل مبلغ sol الذي ترسله", "introducing_cake_pay": "نقدم لكم Cake Pay!", "invalid_input": "مدخل غير صالح", + "invalid_password": "رمز مرور خاطئ", "invoice_details": "تفاصيل الفاتورة", "is_percentage": "يكون", "last_30_days": "آخر 30 يومًا", @@ -499,6 +501,8 @@ "rename": "إعادة تسمية", "rep_warning": "تحذير تمثيلي", "rep_warning_sub": "لا يبدو أن ممثلك في وضع جيد. اضغط هنا لاختيار واحدة جديدة", + "repeat_wallet_password": "كرر كلمة مرور المحفظة", + "repeated_password_is_incorrect": "كلمة المرور المتكررة غير صحيحة. يرجى تكرار كلمة مرور المحفظة مرة أخرى.", "require_for_adding_contacts": "تتطلب إضافة جهات اتصال", "require_for_all_security_and_backup_settings": "مطلوب لجميع إعدادات الأمان والنسخ الاحتياطي", "require_for_assessing_wallet": "تتطلب الوصول إلى المحفظة", @@ -797,6 +801,7 @@ "unavailable_balance_description": ".ﺎﻫﺪﻴﻤﺠﺗ ءﺎﻐﻟﺇ ﺭﺮﻘﺗ ﻰﺘﺣ ﺕﻼﻣﺎﻌﻤﻠﻟ ﻝﻮﺻﻮﻠﻟ ﺔﻠﺑﺎﻗ ﺮﻴﻏ ﺓﺪﻤﺠﻤﻟﺍ ﺓﺪﺻﺭﻷﺍ ﻞﻈﺗ ﺎﻤﻨﻴﺑ ،ﺎﻬﺑ ﺔﺻﺎﺨﻟﺍ ﺕﻼﻣﺎﻌﻤﻟﺍ ﻝﺎﻤﺘﻛﺍ ﺩﺮﺠﻤﺑ ﺔﺣﺎﺘﻣ ﺔﻠﻔﻘﻤﻟﺍ ﺓﺪﺻﺭﻷﺍ ﺢﺒﺼﺘﺳ .ﻚﺑ ﺔﺻﺎﺨﻟﺍ ﺕﻼﻤﻌﻟﺍ ﻲﻓ ﻢﻜﺤﺘﻟﺍ ﺕﺍﺩﺍﺪﻋﺇ ﻲﻓ ﻂﺸﻧ ﻞﻜﺸﺑ ﺎﻫﺪﻴﻤﺠﺘﺑ ﺖﻤﻗ", "unconfirmed": "رصيد غير مؤكد", "understand": "لقد فهمت", + "unlock": "الغاء القفل", "unmatched_currencies": "عملة محفظتك الحالية لا تتطابق مع عملة QR الممسوحة ضوئيًا", "unspent_change": "يتغير", "unspent_coins_details_title": "تفاصيل العملات الغير المنفقة", @@ -838,6 +843,7 @@ "wallet_menu": "قائمة", "wallet_name": "اسم المحفظة", "wallet_name_exists": "توجد بالفعل محفظة بهذا الاسم. الرجاء اختيار اسم مختلف أو إعادة تسمية المحفظة الأخرى أولاً.", + "wallet_password_is_empty": "كلمة مرور المحفظة فارغة. يجب ألا تكون كلمة مرور المحفظة فارغة", "wallet_recovery_height": "ارتفاع الاسترداد", "wallet_restoration_store_incorrect_seed_length": "طول السييد غير صحيح", "wallet_seed": "سييد المحفظة", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index b76401cf4..b51167dab 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -236,6 +236,7 @@ "enter_code": "Въведете код", "enter_seed_phrase": "Въведете вашата фраза за семена", "enter_totp_code": "Моля, въведете TOTP кода.", + "enter_wallet_password": "Въведете паролата за портфейла", "enter_your_note": "Въвеждане на бележка…", "enter_your_pin": "Въведете PIN", "enter_your_pin_again": "Въведете своя PIN отново", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Нямате достатъчно SOL, за да покриете таксата за транзакцията и наемането на сметката. Моля, добавете повече SOL към портфейла си или намалете сумата на SOL, която изпращате", "introducing_cake_pay": "Запознайте се с Cake Pay!", "invalid_input": "Невалиден вход", + "invalid_password": "Невалидна парола", "invoice_details": "IДанни за фактура", "is_percentage": "е", "last_30_days": "Последните 30 дни", @@ -499,6 +501,8 @@ "rename": "Промяна на името", "rep_warning": "Представително предупреждение", "rep_warning_sub": "Вашият представител изглежда не е в добро състояние. Докоснете тук, за да изберете нов", + "repeat_wallet_password": "Повторете паролата на портфейла", + "repeated_password_is_incorrect": "Многократната парола е неправилна. Моля, повторете отново паролата за портфейла.", "require_for_adding_contacts": "Изисква се за добавяне на контакти", "require_for_all_security_and_backup_settings": "Изисква се за всички настройки за сигурност и архивиране", "require_for_assessing_wallet": "Изискване за достъп до портфейла", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Неналично салдо: Тази обща сума включва средства, които са заключени в чакащи транзакции и тези, които сте замразили активно в настройките за контрол на монетите. Заключените баланси ще станат достъпни, след като съответните им транзакции бъдат завършени, докато замразените баланси остават недостъпни за транзакции, докато не решите да ги размразите.", "unconfirmed": "Непотвърден баланс", "understand": "Разбирам", + "unlock": "Отключване", "unmatched_currencies": "Валутата на този портфейл не съвпада с тази от сканирания QR код", "unspent_change": "Промяна", "unspent_coins_details_title": "Подробности за неизползваните монети", @@ -838,6 +843,7 @@ "wallet_menu": "Меню", "wallet_name": "Име на портфейл", "wallet_name_exists": "Вече има портфейл с това име. Моля, изберете друго име или преименувайте другия портфейл.", + "wallet_password_is_empty": "Паролата за портфейл е празна. Паролата за портфейл не трябва да е празна", "wallet_recovery_height": "Височина на възстановяване", "wallet_restoration_store_incorrect_seed_length": "Грешна дължина на seed-а", "wallet_seed": "Seed на портфейла", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index c5d374dd0..d47ca932c 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -236,6 +236,7 @@ "enter_code": "Zadejte kód", "enter_seed_phrase": "Zadejte svou frázi semen", "enter_totp_code": "Zadejte kód TOTP.", + "enter_wallet_password": "Zadejte heslo peněženky", "enter_your_note": "Zadejte poznámku…", "enter_your_pin": "Zadejte svůj PIN", "enter_your_pin_again": "Zadejte znovu svůj PIN", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Nemáte dostatek SOL na pokrytí transakčního poplatku a nájemného za účet. Laskavě přidejte do své peněženky více SOL nebo snižte množství Sol, kterou odesíláte", "introducing_cake_pay": "Představujeme Cake Pay!", "invalid_input": "Neplatný vstup", + "invalid_password": "Neplatné heslo", "invoice_details": "detaily faktury", "is_percentage": "je", "last_30_days": "Posledních 30 dnů", @@ -499,6 +501,8 @@ "rename": "Přejmenovat", "rep_warning": "Reprezentativní varování", "rep_warning_sub": "Zdá se, že váš zástupce není v dobrém stavu. Klepnutím zde vyberte nový", + "repeat_wallet_password": "Opakujte heslo peněženky", + "repeated_password_is_incorrect": "Opakované heslo je nesprávné. Znovu opakujte heslo peněženky.", "require_for_adding_contacts": "Vyžadovat pro přidání kontaktů", "require_for_all_security_and_backup_settings": "Vyžadovat všechna nastavení zabezpečení a zálohování", "require_for_assessing_wallet": "Vyžadovat pro přístup k peněžence", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Nedostupný zůstatek: Tento součet zahrnuje prostředky, které jsou uzamčeny v nevyřízených transakcích a ty, které jste aktivně zmrazili v nastavení kontroly mincí. Uzamčené zůstatky budou k dispozici po dokončení příslušných transakcí, zatímco zmrazené zůstatky zůstanou pro transakce nepřístupné, dokud se nerozhodnete je uvolnit.", "unconfirmed": "Nepotvrzený zůstatek", "understand": "Rozumím", + "unlock": "Odemknout", "unmatched_currencies": "Měna vaší současné peněženky neodpovídá té v naskenovaném QR kódu", "unspent_change": "Změna", "unspent_coins_details_title": "Podrobnosti o neutracených mincích", @@ -838,6 +843,7 @@ "wallet_menu": "Menu", "wallet_name": "Název peněženky", "wallet_name_exists": "Peněženka s tímto názvem už existuje. Prosím zvolte si jiný název, nebo nejprve přejmenujte nejprve druhou peněženku.", + "wallet_password_is_empty": "Heslo peněženky je prázdné. Heslo peněženky by nemělo být prázdné", "wallet_recovery_height": "Výška zotavení", "wallet_restoration_store_incorrect_seed_length": "Nesprávná délka seedu", "wallet_seed": "Seed peněženky", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 7b6613dd6..e64c3bc27 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -236,6 +236,7 @@ "enter_code": "Code eingeben", "enter_seed_phrase": "Geben Sie Ihre Seed-Phrase ein", "enter_totp_code": "Bitte geben Sie den TOTP-Code ein.", + "enter_wallet_password": "Geben Sie das Brieftaschenkennwort ein", "enter_your_note": "Geben Sie Ihre Bemerkung ein…", "enter_your_pin": "PIN eingeben", "enter_your_pin_again": "Geben Sie Ihre PIN erneut ein", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Sie haben nicht genug SOL, um die Transaktionsgebühr und die Miete für das Konto zu decken. Bitte fügen Sie mehr Sol zu Ihrer Brieftasche hinzu oder reduzieren Sie den von Ihnen gesendeten Sol -Betrag", "introducing_cake_pay": "Einführung von Cake Pay!", "invalid_input": "Ungültige Eingabe", + "invalid_password": "Ungültiges Passwort", "invoice_details": "Rechnungs-Details", "is_percentage": "ist", "last_30_days": "Letzte 30 Tage", @@ -500,6 +502,8 @@ "rename": "Umbenennen", "rep_warning": "Repräsentative Warnung", "rep_warning_sub": "Ihr Vertreter scheint nicht gut zu sein. Tippen Sie hier, um eine neue auszuwählen", + "repeat_wallet_password": "Wiederholen Sie das Brieftaschenkennwort", + "repeated_password_is_incorrect": "Wiederholtes Passwort ist falsch. Bitte wiederholen Sie das Brieftaschenkennwort erneut.", "require_for_adding_contacts": "Erforderlich zum Hinzufügen von Kontakten", "require_for_all_security_and_backup_settings": "Für alle Sicherheits- und Sicherungseinstellungen erforderlich", "require_for_assessing_wallet": "Für den Zugriff auf die Wallet erforderlich", @@ -799,6 +803,7 @@ "unconfirmed": "Unbestätigter Saldo", "und": "und", "understand": "Ich verstehe", + "unlock": "Freischalten", "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein", "unspent_change": "Wechselgeld", "unspent_coins_details_title": "Details zu nicht ausgegebenen Coins", @@ -841,6 +846,7 @@ "wallet_menu": "Wallet-Menü", "wallet_name": "Walletname", "wallet_name_exists": "Wallet mit diesem Namen existiert bereits", + "wallet_password_is_empty": "Brieftaschenkennwort ist leer. Brieftaschenkennwort sollte nicht leer sein", "wallet_recovery_height": "Erstellungshöhe", "wallet_restoration_store_incorrect_seed_length": "Falsche Seed-Länge", "wallet_seed": "Wallet-Seed", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 35712a780..9d7d9ad49 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -236,6 +236,7 @@ "enter_code": "Enter code", "enter_seed_phrase": "Enter your seed phrase", "enter_totp_code": "Please enter the TOTP Code.", + "enter_wallet_password": "Enter the wallet password", "enter_your_note": "Enter your note…", "enter_your_pin": "Enter your PIN", "enter_your_pin_again": "Enter your pin again", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "You do not have enough SOL to cover the transaction fee and rent for the account. Kindly add more SOL to your wallet or reduce the SOL amount you\\'re sending", "introducing_cake_pay": "Introducing Cake Pay!", "invalid_input": "Invalid input", + "invalid_password": "Invalid password", "invoice_details": "Invoice details", "is_percentage": "is", "last_30_days": "Last 30 days", @@ -499,6 +501,8 @@ "rename": "Rename", "rep_warning": "Representative Warning", "rep_warning_sub": "Your representative does not appear to be in good standing. Tap here to select a new one", + "repeat_wallet_password": "Repeat the wallet password", + "repeated_password_is_incorrect": "Repeated password is incorrect. Please repeat the wallet password again.", "require_for_adding_contacts": "Require for adding contacts", "require_for_all_security_and_backup_settings": "Require for all security and backup settings", "require_for_assessing_wallet": "Require for accessing wallet", @@ -798,6 +802,7 @@ "unavailable_balance_description": "Unavailable Balance: This total includes funds that are locked in pending transactions and those you have actively frozen in your coin control settings. Locked balances will become available once their respective transactions are completed, while frozen balances remain inaccessible for transactions until you decide to unfreeze them.", "unconfirmed": "Unconfirmed Balance", "understand": "I understand", + "unlock": "Unlock", "unmatched_currencies": "Your current wallet's currency does not match that of the scanned QR", "unspent_change": "Change", "unspent_coins_details_title": "Unspent coins details", @@ -839,6 +844,7 @@ "wallet_menu": "Menu", "wallet_name": "Wallet name", "wallet_name_exists": "A wallet with that name already exists. Please choose a different name or rename the other wallet first.", + "wallet_password_is_empty": "Wallet password is empty. Wallet password should not be empty", "wallet_recovery_height": "Recovery Height", "wallet_restoration_store_incorrect_seed_length": "Incorrect seed length", "wallet_seed": "Wallet seed", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 31a6e6865..e7f1366a5 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -236,6 +236,7 @@ "enter_code": "Ingresar código", "enter_seed_phrase": "Ingrese su frase de semillas", "enter_totp_code": "Ingrese el código TOTP.", + "enter_wallet_password": "Ingrese la contraseña de la billetera", "enter_your_note": "Ingresa tu nota…", "enter_your_pin": "Introduce tu PIN", "enter_your_pin_again": "Ingrese su PIN nuevamente", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "No tiene suficiente SOL para cubrir la tarifa de transacción y alquilar para la cuenta. Por favor, agregue más sol a su billetera o reduzca la cantidad de sol que está enviando", "introducing_cake_pay": "¡Presentamos Cake Pay!", "invalid_input": "Entrada inválida", + "invalid_password": "Contraseña invalida", "invoice_details": "Detalles de la factura", "is_percentage": "es", "last_30_days": "Últimos 30 días", @@ -500,6 +502,8 @@ "rename": "Rebautizar", "rep_warning": "Advertencia representativa", "rep_warning_sub": "Su representante no parece estar en buena posición. Toque aquí para seleccionar uno nuevo", + "repeat_wallet_password": "Repita la contraseña de billetera", + "repeated_password_is_incorrect": "La contraseña repetida es incorrecta. Repita la contraseña de la billetera nuevamente.", "require_for_adding_contacts": "Requerido para agregar contactos", "require_for_all_security_and_backup_settings": "Requerido para todas las configuraciones de seguridad y copia de seguridad", "require_for_assessing_wallet": "Requerido para acceder a la billetera", @@ -798,6 +802,7 @@ "unavailable_balance_description": "Saldo no disponible: este total incluye fondos que están bloqueados en transacciones pendientes y aquellos que usted ha congelado activamente en su configuración de control de monedas. Los saldos bloqueados estarán disponibles una vez que se completen sus respectivas transacciones, mientras que los saldos congelados permanecerán inaccesibles para las transacciones hasta que usted decida descongelarlos.", "unconfirmed": "Saldo no confirmado", "understand": "Entiendo", + "unlock": "desbloquear", "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado", "unspent_change": "Cambiar", "unspent_coins_details_title": "Detalles de monedas no gastadas", @@ -839,6 +844,7 @@ "wallet_menu": "Menú de billetera", "wallet_name": "Nombre de la billetera", "wallet_name_exists": "Wallet con ese nombre ya ha existido", + "wallet_password_is_empty": "La contraseña de billetera está vacía. La contraseña de la billetera no debe estar vacía", "wallet_recovery_height": "Altura de recuperación", "wallet_restoration_store_incorrect_seed_length": "Longitud de semilla incorrecta", "wallet_seed": "Semilla de billetera", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 03d4a73dd..7965eca12 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -236,6 +236,7 @@ "enter_code": "Entrez le code", "enter_seed_phrase": "Entrez votre phrase secrète (seed)", "enter_totp_code": "Veuillez entrer le code TOTP.", + "enter_wallet_password": "Entrez le mot de passe du portefeuille", "enter_your_note": "Entrez votre note…", "enter_your_pin": "Entrez votre code PIN", "enter_your_pin_again": "Entrez à nouveau votre code PIN", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Vous n'avez pas assez de SOL pour couvrir les frais de transaction et le loyer pour le compte. Veuillez ajouter plus de Sol à votre portefeuille ou réduire la quantité de sol que vous envoyez", "introducing_cake_pay": "Présentation de Cake Pay !", "invalid_input": "Entrée invalide", + "invalid_password": "Mot de passe incorrect", "invoice_details": "Détails de la facture", "is_percentage": "est", "last_30_days": "30 derniers jours", @@ -499,6 +501,8 @@ "rename": "Renommer", "rep_warning": "Avertissement représentatif", "rep_warning_sub": "Votre représentant ne semble pas être en règle. Appuyez ici pour en sélectionner un nouveau", + "repeat_wallet_password": "Répétez le mot de passe du portefeuille", + "repeated_password_is_incorrect": "Le mot de passe répété est incorrect. Veuillez répéter le mot de passe du portefeuille.", "require_for_adding_contacts": "Requis pour ajouter des contacts", "require_for_all_security_and_backup_settings": "Exiger pour tous les paramètres de sécurité et de sauvegarde", "require_for_assessing_wallet": "Nécessaire pour accéder au portefeuille", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Solde indisponible : ce total comprend les fonds bloqués dans les transactions en attente et ceux que vous avez activement gelés dans vos paramètres de contrôle des pièces. Les soldes bloqués deviendront disponibles une fois leurs transactions respectives terminées, tandis que les soldes gelés resteront inaccessibles aux transactions jusqu'à ce que vous décidiez de les débloquer.", "unconfirmed": "Solde non confirmé", "understand": "J'ai compris", + "unlock": "Ouvrir", "unmatched_currencies": "La devise de votre portefeuille (wallet) actuel ne correspond pas à celle du QR code scanné", "unspent_change": "Monnaie", "unspent_coins_details_title": "Détails des pièces (coins) non dépensées", @@ -838,6 +843,7 @@ "wallet_menu": "Menu", "wallet_name": "Nom du Portefeuille (Wallet)", "wallet_name_exists": "Un portefeuille (wallet) portant ce nom existe déjà", + "wallet_password_is_empty": "Le mot de passe du portefeuille est vide. Le mot de passe du portefeuille ne doit pas être vide", "wallet_recovery_height": "Hauteur de récupération", "wallet_restoration_store_incorrect_seed_length": "Longueur de phrase secrète (seed) incorrecte", "wallet_seed": "Phrase secrète (seed) du portefeuille (wallet)", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 922f9a51b..d2c58971f 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -236,6 +236,7 @@ "enter_code": "Shigar da lamba", "enter_seed_phrase": "Shigar da Sert Sentarku", "enter_totp_code": "Da fatan za a shigar da lambar tnp.", + "enter_wallet_password": "Shigar da kalmar sirri ta walat", "enter_your_note": "Shigar da bayanin kula…", "enter_your_pin": "Shigar da PIN", "enter_your_pin_again": "Shigar da PIN ɗinku na sake", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Ba ku da isasshen Sol don rufe kuɗin ma'amala da haya don asusun. Da kyau ƙara ƙarin sool zuwa walat ɗinku ko rage adadin Sol ɗin da kuke aikawa", "introducing_cake_pay": "Gabatar da Cake Pay!", "invalid_input": "Shigar da ba daidai ba", + "invalid_password": "Kalmar sirri mara inganci", "invoice_details": "Bayanin wadannan", "is_percentage": "shine", "last_30_days": "Kwanaki 30 na ƙarshe", @@ -501,6 +503,8 @@ "rename": "Sake suna", "rep_warning": "Gargadi Wakilin", "rep_warning_sub": "Wakilinku bai bayyana ya kasance cikin kyakkyawan yanayi ba. Matsa nan don zaɓar sabon", + "repeat_wallet_password": "Maimaita kalmar sirri", + "repeated_password_is_incorrect": "Maimaita kalmar sirri ba daidai ba ce. Da fatan za a sake maimaita kalmar sirri.", "require_for_adding_contacts": "Bukatar ƙara lambobin sadarwa", "require_for_all_security_and_backup_settings": "Bukatar duk tsaro da saitunan wariyar ajiya", "require_for_assessing_wallet": "Bukatar samun damar walat", @@ -799,6 +803,7 @@ "unavailable_balance_description": "Ma'auni Babu: Wannan jimlar ya haɗa da kuɗi waɗanda ke kulle a cikin ma'amaloli da ke jiran aiki da waɗanda kuka daskare sosai a cikin saitunan sarrafa kuɗin ku. Ma'auni da aka kulle za su kasance da zarar an kammala ma'amalolinsu, yayin da daskararrun ma'auni ba za su iya samun damar yin ciniki ba har sai kun yanke shawarar cire su.", "unconfirmed": "Ba a tabbatar ba", "understand": "na gane", + "unlock": "Buɗe", "unmatched_currencies": "Nau'in walat ɗin ku na yanzu bai dace da na lambar QR da aka bincika ba", "unspent_change": "Canza", "unspent_coins_details_title": "Bayanan tsabar kudi da ba a kashe ba", @@ -840,6 +845,7 @@ "wallet_menu": "Menu", "wallet_name": "Sunan walat", "wallet_name_exists": "Wallet mai wannan sunan ya riga ya wanzu. Da fatan za a zaɓi wani suna daban ko sake suna ɗayan walat tukuna.", + "wallet_password_is_empty": "Alamar Wallet babu komai. Al'adun Wallet bai zama komai ba", "wallet_recovery_height": "Mai Tsaro", "wallet_restoration_store_incorrect_seed_length": "kalmar sirrin iri ba daidai ba", "wallet_seed": "kalmar sirri na walat", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index db6940e8b..baa3925c0 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -236,6 +236,7 @@ "enter_code": "कोड दर्ज करें", "enter_seed_phrase": "अपना बीज वाक्यांश दर्ज करें", "enter_totp_code": "कृपया TOTP कोड दर्ज करें।", + "enter_wallet_password": "वॉलेट पासवर्ड दर्ज करें", "enter_your_note": "अपना नोट दर्ज करें ...", "enter_your_pin": "अपना पिन दर्ज करो", "enter_your_pin_again": "फिर से अपना पिन डालें", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "आपके पास लेन -देन शुल्क और खाते के लिए किराए को कवर करने के लिए पर्याप्त सोल नहीं है। कृपया अपने बटुए में अधिक सोल जोड़ें या सोल राशि को कम करें जिसे आप भेज रहे हैं", "introducing_cake_pay": "परिचय Cake Pay!", "invalid_input": "अमान्य निवेश", + "invalid_password": "अवैध पासवर्ड", "invoice_details": "चालान विवरण", "is_percentage": "है", "last_30_days": "पिछले 30 दिन", @@ -501,6 +503,8 @@ "rename": "नाम बदलें", "rep_warning": "प्रतिनिधि चेतावनी", "rep_warning_sub": "आपका प्रतिनिधि अच्छी स्थिति में नहीं दिखाई देता है। एक नया चयन करने के लिए यहां टैप करें", + "repeat_wallet_password": "वॉलेट पासवर्ड दोहराएं", + "repeated_password_is_incorrect": "बार -बार पासवर्ड गलत है। कृपया फिर से वॉलेट पासवर्ड दोहराएं।", "require_for_adding_contacts": "संपर्क जोड़ने के लिए आवश्यकता है", "require_for_all_security_and_backup_settings": "सभी सुरक्षा और बैकअप सेटिंग्स की आवश्यकता है", "require_for_assessing_wallet": "वॉलेट तक पहुँचने के लिए आवश्यकता है", @@ -799,6 +803,7 @@ "unavailable_balance_description": "अनुपलब्ध शेष राशि: इस कुल में वे धनराशि शामिल हैं जो लंबित लेनदेन में बंद हैं और जिन्हें आपने अपनी सिक्का नियंत्रण सेटिंग्स में सक्रिय रूप से जमा कर रखा है। लॉक किए गए शेष उनके संबंधित लेन-देन पूरे होने के बाद उपलब्ध हो जाएंगे, जबकि जमे हुए शेष लेन-देन के लिए अप्राप्य रहेंगे जब तक कि आप उन्हें अनफ्रीज करने का निर्णय नहीं लेते।", "unconfirmed": "अपुष्ट शेष राशि", "understand": "मुझे समझ", + "unlock": "अनलॉक", "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती", "unspent_change": "परिवर्तन", "unspent_coins_details_title": "अव्ययित सिक्कों का विवरण", @@ -840,6 +845,7 @@ "wallet_menu": "बटुआ मेनू", "wallet_name": "बटुए का नाम", "wallet_name_exists": "उस नाम वाला वॉलेट पहले से मौजूद है", + "wallet_password_is_empty": "वॉलेट पासवर्ड खाली है। वॉलेट पासवर्ड खाली नहीं होना चाहिए", "wallet_recovery_height": "वसूली ऊंचाई", "wallet_restoration_store_incorrect_seed_length": "गलत बीज की लंबाई", "wallet_seed": "बटुआ का बीज", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 57cf1361e..e6b820300 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -236,6 +236,7 @@ "enter_code": "Unesite kod", "enter_seed_phrase": "Unesite svoju sjemensku frazu", "enter_totp_code": "Unesite TOTP kod.", + "enter_wallet_password": "Unesite lozinku za novčanik", "enter_your_note": "Unesite svoju poruku…", "enter_your_pin": "Upišite PIN", "enter_your_pin_again": "Ponovno upišite pin", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Nemate dovoljno SOL -a za pokrivanje naknade za transakciju i najamninu za račun. Ljubazno dodajte više sol u svoj novčanik ili smanjite količinu SOL -a koju šaljete", "introducing_cake_pay": "Predstavljamo Cake Pay!", "invalid_input": "Pogrešan unos", + "invalid_password": "Netočna zaporka", "invoice_details": "Podaci o fakturi", "is_percentage": "je", "last_30_days": "Zadnjih 30 dana", @@ -499,6 +501,8 @@ "rename": "Preimenuj", "rep_warning": "Reprezentativno upozorenje", "rep_warning_sub": "Čini se da vaš predstavnik nije u dobrom stanju. Dodirnite ovdje za odabir novog", + "repeat_wallet_password": "Ponovite lozinku za novčanik", + "repeated_password_is_incorrect": "Ponovljena lozinka je netočna. Molimo ponovite lozinku za novčanik.", "require_for_adding_contacts": "Zahtijeva za dodavanje kontakata", "require_for_all_security_and_backup_settings": "Zahtijeva za sve postavke sigurnosti i sigurnosne kopije", "require_for_assessing_wallet": "Potreban za pristup novčaniku", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Nedostupno stanje: Ovaj ukupni iznos uključuje sredstva koja su zaključana u transakcijama na čekanju i ona koja ste aktivno zamrznuli u postavkama kontrole novčića. Zaključani saldi postat će dostupni kada se dovrše njihove transakcije, dok zamrznuti saldi ostaju nedostupni za transakcije sve dok ih ne odlučite odmrznuti.", "unconfirmed": "Nepotvrđeno stanje", "understand": "Razumijem", + "unlock": "Otključati", "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u", "unspent_change": "Promijeniti", "unspent_coins_details_title": "Nepotrošeni detalji o novčićima", @@ -838,6 +843,7 @@ "wallet_menu": "Izbornik", "wallet_name": "Ime novčanika", "wallet_name_exists": "Novčanik s tim nazivom već postoji", + "wallet_password_is_empty": "Lozinka za novčanik je prazna. Lozinka za novčanik ne bi trebala biti prazna", "wallet_recovery_height": "Visina oporavka", "wallet_restoration_store_incorrect_seed_length": "Netočna dužina pristupnog izraza", "wallet_seed": "Pristupni izraz novčanika", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 97a4afd3f..0b8077807 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -236,6 +236,7 @@ "enter_code": "Masukkan kode", "enter_seed_phrase": "Masukkan frasa benih Anda", "enter_totp_code": "Masukkan Kode TOTP.", + "enter_wallet_password": "Masukkan Kata Sandi Dompet", "enter_your_note": "Masukkan catatan Anda...", "enter_your_pin": "Masukkan PIN Anda", "enter_your_pin_again": "Masukkan PIN Anda lagi", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Anda tidak memiliki cukup SOL untuk menutupi biaya transaksi dan menyewa untuk akun tersebut. Mohon tambahkan lebih banyak sol ke dompet Anda atau kurangi jumlah sol yang Anda kirim", "introducing_cake_pay": "Perkenalkan Cake Pay!", "invalid_input": "Masukan tidak valid", + "invalid_password": "Kata sandi salah", "invoice_details": "Detail faktur", "is_percentage": "adalah", "last_30_days": "30 hari terakhir", @@ -501,6 +503,8 @@ "rename": "Ganti nama", "rep_warning": "Peringatan Perwakilan", "rep_warning_sub": "Perwakilan Anda tampaknya tidak bereputasi baik. Ketuk di sini untuk memilih yang baru", + "repeat_wallet_password": "Ulangi Kata Sandi Dompet", + "repeated_password_is_incorrect": "Kata sandi yang diulang tidak benar. Harap ulangi kata sandi dompet lagi.", "require_for_adding_contacts": "Membutuhkan untuk menambahkan kontak", "require_for_all_security_and_backup_settings": "Memerlukan untuk semua pengaturan keamanan dan pencadangan", "require_for_assessing_wallet": "Diperlukan untuk mengakses dompet", @@ -800,6 +804,7 @@ "unavailable_balance_description": "Saldo Tidak Tersedia: Total ini termasuk dana yang terkunci dalam transaksi yang tertunda dan dana yang telah Anda bekukan secara aktif di pengaturan kontrol koin Anda. Saldo yang terkunci akan tersedia setelah transaksi masing-masing selesai, sedangkan saldo yang dibekukan tetap tidak dapat diakses untuk transaksi sampai Anda memutuskan untuk mencairkannya.", "unconfirmed": "Saldo Belum Dikonfirmasi", "understand": "Saya mengerti", + "unlock": "Membuka kunci", "unmatched_currencies": "Mata uang dompet Anda saat ini tidak cocok dengan yang ditandai QR", "unspent_change": "Mengubah", "unspent_coins_details_title": "Rincian koin yang tidak terpakai", @@ -841,6 +846,7 @@ "wallet_menu": "Menu", "wallet_name": "Nama Dompet", "wallet_name_exists": "Nama dompet sudah ada. Silakan pilih nama yang berbeda atau ganti nama dompet yang lain terlebih dahulu.", + "wallet_password_is_empty": "Kata sandi dompet kosong. Kata sandi dompet tidak boleh kosong", "wallet_recovery_height": "Tinggi pemulihan", "wallet_restoration_store_incorrect_seed_length": "Panjang seed yang salah", "wallet_seed": "Seed dompet", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 42c2e628d..b7a81ef9a 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -237,6 +237,7 @@ "enter_code": "Inserisci codice", "enter_seed_phrase": "Inserisci la tua frase di semi", "enter_totp_code": "Inserisci il codice TOTP.", + "enter_wallet_password": "Immettere la password del portafoglio", "enter_your_note": "Inserisci la tua nota…", "enter_your_pin": "Inserisci il tuo PIN", "enter_your_pin_again": "Inserisci il tuo pin di nuovo", @@ -341,6 +342,7 @@ "insufficientFundsForRentError": "Non hai abbastanza SOL per coprire la tassa di transazione e l'affitto per il conto. Si prega di aggiungere più SOL al tuo portafoglio o ridurre l'importo SOL che stai inviando", "introducing_cake_pay": "Presentazione di Cake Pay!", "invalid_input": "Inserimento non valido", + "invalid_password": "Password non valida", "invoice_details": "Dettagli della fattura", "is_percentage": "è", "last_30_days": "Ultimi 30 giorni", @@ -501,6 +503,8 @@ "rename": "Rinomina", "rep_warning": "Avvertenza rappresentativa", "rep_warning_sub": "Il tuo rappresentante non sembra essere in regola. Tocca qui per selezionarne uno nuovo", + "repeat_wallet_password": "Ripeti la password del portafoglio", + "repeated_password_is_incorrect": "La password ripetuta non è corretta. Si prega di ripetere di nuovo la password del portafoglio.", "require_for_adding_contacts": "Richiesto per l'aggiunta di contatti", "require_for_all_security_and_backup_settings": "Richiedi per tutte le impostazioni di sicurezza e backup", "require_for_assessing_wallet": "Richiesto per l'accesso al portafoglio", @@ -799,6 +803,7 @@ "unavailable_balance_description": "Saldo non disponibile: questo totale include i fondi bloccati nelle transazioni in sospeso e quelli che hai congelato attivamente nelle impostazioni di controllo delle monete. I saldi bloccati diventeranno disponibili una volta completate le rispettive transazioni, mentre i saldi congelati rimarranno inaccessibili per le transazioni finché non deciderai di sbloccarli.", "unconfirmed": "Saldo non confermato", "understand": "Capisco", + "unlock": "Sbloccare", "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato", "unspent_change": "Modifica", "unspent_coins_details_title": "Dettagli sulle monete non spese", @@ -841,6 +846,7 @@ "wallet_menu": "Menù", "wallet_name": "Nome del Portafoglio", "wallet_name_exists": "Il portafoglio con quel nome è già esistito", + "wallet_password_is_empty": "La password del portafoglio è vuota. La password del portafoglio non dovrebbe essere vuota", "wallet_recovery_height": "Altezza di recupero", "wallet_restoration_store_incorrect_seed_length": "Lunghezza seme non corretta", "wallet_seed": "Seme Portafoglio", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 72b1f7d09..a13a4e6f0 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -236,6 +236,7 @@ "enter_code": "コードを入力", "enter_seed_phrase": "シードフレーズを入力してください", "enter_totp_code": "TOTPコードを入力してください。", + "enter_wallet_password": "ウォレットパスワードを入力します", "enter_your_note": "メモを入力してください…", "enter_your_pin": "PINを入力してください", "enter_your_pin_again": "ピンをもう一度入力してください", @@ -341,6 +342,7 @@ "insufficientFundsForRentError": "アカウントの取引料金とレンタルをカバーするのに十分なソルがありません。財布にソルを追加するか、送信するソル量を減らしてください", "introducing_cake_pay": "序章Cake Pay!", "invalid_input": "無効入力", + "invalid_password": "無効なパスワード", "invoice_details": "請求の詳細", "is_percentage": "is", "last_30_days": "過去30日", @@ -500,6 +502,8 @@ "rename": "リネーム", "rep_warning": "代表的な警告", "rep_warning_sub": "あなたの代表者は良好な状態ではないようです。ここをタップして、新しいものを選択します", + "repeat_wallet_password": "ウォレットパスワードを繰り返します", + "repeated_password_is_incorrect": "繰り返しパスワードが正しくありません。ウォレットのパスワードをもう一度繰り返してください。", "require_for_adding_contacts": "連絡先の追加に必要", "require_for_all_security_and_backup_settings": "すべてのセキュリティおよびバックアップ設定に必須", "require_for_assessing_wallet": "ウォレットにアクセスするために必要です", @@ -798,6 +802,7 @@ "unavailable_balance_description": "利用不可能な残高: この合計には、保留中のトランザクションにロックされている資金と、コイン管理設定でアクティブに凍結した資金が含まれます。ロックされた残高は、それぞれの取引が完了すると利用可能になりますが、凍結された残高は、凍結を解除するまで取引にアクセスできません。", "unconfirmed": "残高未確認", "understand": "わかります", + "unlock": "ロックを解除します", "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません", "unspent_change": "変化", "unspent_coins_details_title": "未使用のコインの詳細", @@ -839,6 +844,7 @@ "wallet_menu": "ウォレットメニュー", "wallet_name": "ウォレット名", "wallet_name_exists": "その名前のウォレットはすでに存在しています", + "wallet_password_is_empty": "ウォレットパスワードは空です。ウォレットのパスワードは空にしてはいけません", "wallet_recovery_height": "回復の高さ", "wallet_restoration_store_incorrect_seed_length": "誤ったシード長s", "wallet_seed": "ウォレットシード", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index b8cfee1b5..d20546f41 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -236,6 +236,7 @@ "enter_code": "코드 입력", "enter_seed_phrase": "시드 문구를 입력하십시오", "enter_totp_code": "TOTP 코드를 입력하세요.", + "enter_wallet_password": "지갑 암호를 입력하십시오", "enter_your_note": "메모를 입력하세요…", "enter_your_pin": "PIN을 입력하십시오", "enter_your_pin_again": "다시 핀을 입력", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "거래 수수료와 계좌 임대료를 충당하기에 충분한 SOL이 없습니다. 지갑에 더 많은 솔을 추가하거나 보내는 솔을 줄이십시오.", "introducing_cake_pay": "소개 Cake Pay!", "invalid_input": "잘못된 입력", + "invalid_password": "유효하지 않은 비밀번호", "invoice_details": "인보이스 세부정보", "is_percentage": "이다", "last_30_days": "지난 30일", @@ -500,6 +502,8 @@ "rename": "이름 바꾸기", "rep_warning": "대표 경고", "rep_warning_sub": "귀하의 대표는 양호한 상태가 아닌 것 같습니다. 새 것을 선택하려면 여기를 탭하십시오", + "repeat_wallet_password": "지갑 암호를 반복하십시오", + "repeated_password_is_incorrect": "반복 된 비밀번호가 올바르지 않습니다. 지갑 암호를 다시 반복하십시오.", "require_for_adding_contacts": "연락처 추가에 필요", "require_for_all_security_and_backup_settings": "모든 보안 및 백업 설정에 필요", "require_for_assessing_wallet": "지갑 접근을 위해 필요", @@ -798,6 +802,7 @@ "unavailable_balance_description": "사용할 수 없는 잔액: 이 총계에는 보류 중인 거래에 잠겨 있는 자금과 코인 관리 설정에서 적극적으로 동결된 자금이 포함됩니다. 잠긴 잔액은 해당 거래가 완료되면 사용할 수 있게 되며, 동결된 잔액은 동결을 해제하기 전까지 거래에 액세스할 수 없습니다.", "unconfirmed": "확인되지 않은 잔액", "understand": "이해 했어요", + "unlock": "터놓다", "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다.", "unspent_change": "변화", "unspent_coins_details_title": "사용하지 않은 동전 세부 정보", @@ -839,6 +844,7 @@ "wallet_menu": "월렛 메뉴", "wallet_name": "지갑 이름", "wallet_name_exists": "해당 이름의 지갑이 이미 존재합니다.", + "wallet_password_is_empty": "지갑 암호는 비어 있습니다. 지갑 암호는 비어 있지 않아야합니다", "wallet_recovery_height": "복구 높이", "wallet_restoration_store_incorrect_seed_length": "시드 길이가 잘못되었습니다", "wallet_seed": "지갑 시드", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 52fe72ea6..06d7cf627 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -236,6 +236,7 @@ "enter_code": "ကုဒ်ထည့်ပါ။", "enter_seed_phrase": "သင့်ရဲ့မျိုးစေ့စကားစုကိုရိုက်ထည့်ပါ", "enter_totp_code": "ကျေးဇူးပြု၍ TOTP ကုဒ်ကို ထည့်ပါ။", + "enter_wallet_password": "ပိုက်ဆံအိတ်စကားဝှက်ကိုရိုက်ထည့်ပါ", "enter_your_note": "သင့်မှတ်စုကို ထည့်ပါ...", "enter_your_pin": "သင်၏ PIN ကိုထည့်ပါ။", "enter_your_pin_again": "သင့်ပင်နံပါတ်ကို ထပ်မံထည့်သွင်းပါ။", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "သင်ငွေပေးချေမှုအခကြေးငွေကိုဖုံးအုပ်ရန်နှင့်အကောင့်ငှားရန်လုံလောက်သော sol ရှိသည်မဟုတ်ကြဘူး။ ကြင်နာစွာသင်၏ပိုက်ဆံအိတ်သို့ပိုမို sol ကိုပိုမိုထည့်ပါသို့မဟုတ်သင်ပို့ခြင်း sol ပမာဏကိုလျှော့ချပါ", "introducing_cake_pay": "Cake Pay ကို မိတ်ဆက်ခြင်း။", "invalid_input": "ထည့်သွင်းမှု မမှန်ကန်ပါ။", + "invalid_password": "မမှန်ကန်သောစကားဝှက်", "invoice_details": "ပြေစာအသေးစိတ်", "is_percentage": "သည်", "last_30_days": "လွန်ခဲ့သော ရက် 30", @@ -499,6 +501,8 @@ "rename": "အမည်ပြောင်းပါ။", "rep_warning": "ကိုယ်စားလှယ်သတိပေးချက်", "rep_warning_sub": "သင်၏ကိုယ်စားလှယ်သည်ကောင်းမွန်သောရပ်တည်မှုတွင်မဖြစ်သင့်ပါ။ အသစ်တစ်ခုကိုရွေးချယ်ရန်ဤနေရာတွင်အသာပုတ်ပါ", + "repeat_wallet_password": "ပိုက်ဆံအိတ်စကားဝှက်ကိုပြန်လုပ်ပါ", + "repeated_password_is_incorrect": "ထပ်ခါတလဲလဲစကားဝှက်မမှန်ကန်ပါ ကျေးဇူးပြုပြီးပိုက်ဆံအိတ်စကားဝှက်ကိုပြန်လုပ်ပါ။", "require_for_adding_contacts": "အဆက်အသွယ်များထည့်ရန် လိုအပ်သည်။", "require_for_all_security_and_backup_settings": "လုံခြုံရေးနှင့် အရန်ဆက်တင်များအားလုံးအတွက် လိုအပ်ပါသည်။", "require_for_assessing_wallet": "ပိုက်ဆံအိတ်ကို ဝင်သုံးရန် လိုအပ်သည်။", @@ -797,6 +801,7 @@ "unavailable_balance_description": "မရရှိနိုင်သော လက်ကျန်ငွေ- ဤစုစုပေါင်းတွင် ဆိုင်းငံ့ထားသော ငွေပေးငွေယူများတွင် သော့ခတ်ထားသော ငွေကြေးများနှင့် သင်၏ coin ထိန်းချုပ်မှုဆက်တင်များတွင် သင် တက်ကြွစွာ အေးခဲထားသော ငွေများ ပါဝင်သည်။ သော့ခတ်ထားသော လက်ကျန်ငွေများကို ၎င်းတို့၏ သက်ဆိုင်ရာ ငွေပေးငွေယူများ ပြီးမြောက်သည်နှင့် တပြိုင်နက် ရရှိနိုင်မည်ဖြစ်ပြီး၊ အေးခဲထားသော လက်ကျန်များကို ၎င်းတို့အား ပြန်ဖြုတ်ရန် သင်ဆုံးဖြတ်သည်အထိ ငွေပေးငွေယူများအတွက် ဆက်လက်၍မရနိုင်ပါ။", "unconfirmed": "အတည်မပြုနိုင်သော လက်ကျန်ငွေ", "understand": "ကျွန်တော်နားလည်ပါတယ်", + "unlock": "သော့ဖွင့်", "unmatched_currencies": "သင့်လက်ရှိပိုက်ဆံအိတ်၏ငွေကြေးသည် စကင်ဖတ်ထားသော QR နှင့် မကိုက်ညီပါ။", "unspent_change": "ပေြာင်းလဲခြင်း", "unspent_coins_details_title": "အသုံးမဝင်သော အကြွေစေ့အသေးစိတ်များ", @@ -838,6 +843,7 @@ "wallet_menu": "မီနူး", "wallet_name": "ပိုက်ဆံအိတ်နာမည", "wallet_name_exists": "ထိုအမည်ဖြင့် ပိုက်ဆံအိတ်တစ်ခု ရှိနှင့်ပြီးဖြစ်သည်။ အခြားအမည်တစ်ခုကို ရွေးပါ သို့မဟုတ် အခြားပိုက်ဆံအိတ်ကို ဦးစွာ အမည်ပြောင်းပါ။", + "wallet_password_is_empty": "ပိုက်ဆံအိတ်စကားဝှက်သည်ဗလာဖြစ်သည်။ ပိုက်ဆံအိတ်စကားဝှက်သည်အချည်းနှီးဖြစ်သင့်သည်", "wallet_recovery_height": "ပြန်လည်ထူထောင်ရေးအမြင့်", "wallet_restoration_store_incorrect_seed_length": "မျိုးစေ့အရှည် မမှန်ပါ။", "wallet_seed": "ပိုက်ဆံအိတ်စေ့", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index cde10506f..78caef912 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -236,6 +236,7 @@ "enter_code": "Voer code in", "enter_seed_phrase": "Voer uw zaadzin in", "enter_totp_code": "Voer de TOTP-code in.", + "enter_wallet_password": "Voer het Wallet -wachtwoord in", "enter_your_note": "Voer uw notitie in ...", "enter_your_pin": "Voer uw pincode in", "enter_your_pin_again": "Voer uw PIN opnieuw in", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "U hebt niet genoeg SOL om de transactiekosten en huur voor de rekening te dekken. Voeg vriendelijk meer SOL toe aan uw portemonnee of verminder de SOL -hoeveelheid die u verzendt", "introducing_cake_pay": "Introductie van Cake Pay!", "invalid_input": "Ongeldige invoer", + "invalid_password": "Ongeldig wachtwoord", "invoice_details": "Factuurgegevens", "is_percentage": "is", "last_30_days": "Laatste 30 dagen", @@ -499,6 +501,8 @@ "rename": "Hernoemen", "rep_warning": "Representatieve waarschuwing", "rep_warning_sub": "Uw vertegenwoordiger lijkt niet goed te staan. Tik hier om een ​​nieuwe te selecteren", + "repeat_wallet_password": "Herhaal het Wallet -wachtwoord", + "repeated_password_is_incorrect": "Herhaald wachtwoord is onjuist. Herhaal het Wallet -wachtwoord opnieuw.", "require_for_adding_contacts": "Vereist voor het toevoegen van contacten", "require_for_all_security_and_backup_settings": "Vereist voor alle beveiligings- en back-upinstellingen", "require_for_assessing_wallet": "Vereist voor toegang tot portemonnee", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Niet-beschikbaar saldo: Dit totaal omvat het geld dat is vergrendeld in lopende transacties en het geld dat u actief hebt bevroren in uw muntcontrole-instellingen. Vergrendelde saldi komen beschikbaar zodra de betreffende transacties zijn voltooid, terwijl bevroren saldi ontoegankelijk blijven voor transacties totdat u besluit ze weer vrij te geven.", "unconfirmed": "Onbevestigd saldo", "understand": "Ik begrijp het", + "unlock": "Ontgrendelen", "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR", "unspent_change": "Wijziging", "unspent_coins_details_title": "Details van niet-uitgegeven munten", @@ -839,6 +844,7 @@ "wallet_menu": "Portemonnee-menu", "wallet_name": "Portemonnee naam", "wallet_name_exists": "Portemonnee met die naam bestaat al", + "wallet_password_is_empty": "Wallet -wachtwoord is leeg. Wallet -wachtwoord mag niet leeg zijn", "wallet_recovery_height": "Herstelhoogte", "wallet_restoration_store_incorrect_seed_length": "Onjuiste zaadlengte", "wallet_seed": "Portemonnee zaad", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index a22034c96..7de435319 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -236,6 +236,7 @@ "enter_code": "Wprowadź kod", "enter_seed_phrase": "Wprowadź swoją frazę nasienną", "enter_totp_code": "Wprowadź kod TOTP.", + "enter_wallet_password": "Wprowadź hasło portfela", "enter_your_note": "Wpisz notatkę…", "enter_your_pin": "Wpisz kod PIN", "enter_your_pin_again": "Wprowadź ponownie swój kod PIN", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Nie masz wystarczającej ilości SOL, aby pokryć opłatę za transakcję i czynsz za konto. Uprzejmie dodaj więcej sol do portfela lub zmniejsz solę, którą wysyłasz", "introducing_cake_pay": "Przedstawiamy Cake Pay!", "invalid_input": "Nieprawidłowe dane wejściowe", + "invalid_password": "Nieprawidłowe hasło", "invoice_details": "Dane do faktury", "is_percentage": "jest", "last_30_days": "Ostatnie 30 dni", @@ -499,6 +501,8 @@ "rename": "Zmień nazwę", "rep_warning": "Przedstawicielskie ostrzeżenie", "rep_warning_sub": "Twój przedstawiciel nie wydaje się mieć dobrej opinii. Stuknij tutaj, aby wybrać nowy", + "repeat_wallet_password": "Powtórz hasło portfela", + "repeated_password_is_incorrect": "Powtarzane hasło jest nieprawidłowe. Powtórz ponownie hasło portfela.", "require_for_adding_contacts": "Wymagane do dodania kontaktów", "require_for_all_security_and_backup_settings": "Wymagaj dla wszystkich ustawień zabezpieczeń i kopii zapasowych", "require_for_assessing_wallet": "Wymagaj dostępu do portfela", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Niedostępne saldo: Suma ta obejmuje środki zablokowane w transakcjach oczekujących oraz te, które aktywnie zamroziłeś w ustawieniach kontroli monet. Zablokowane salda staną się dostępne po zakończeniu odpowiednich transakcji, natomiast zamrożone salda pozostaną niedostępne dla transakcji, dopóki nie zdecydujesz się ich odblokować.", "unconfirmed": "Niepotwierdzone saldo", "understand": "Rozumiem", + "unlock": "Odblokować", "unmatched_currencies": "Waluta Twojego obecnego portfela nie zgadza się z waluctą zeskanowanego kodu QR", "unspent_change": "Zmiana", "unspent_coins_details_title": "Szczegóły niewydanych monet", @@ -838,6 +843,7 @@ "wallet_menu": "Menu portfela", "wallet_name": "Nazwa portfela", "wallet_name_exists": "Portfel o tej nazwie już istnieje", + "wallet_password_is_empty": "Hasło portfela jest puste. Hasło portfela nie powinno być puste", "wallet_recovery_height": "Wysokość odzysku", "wallet_restoration_store_incorrect_seed_length": "Nieprawidłowa długość frazy seed", "wallet_seed": "Seed portfela", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 8f87ca59f..a3d789cab 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -236,6 +236,7 @@ "enter_code": "Digite o código", "enter_seed_phrase": "Digite sua frase de semente", "enter_totp_code": "Digite o código TOTP.", + "enter_wallet_password": "Digite a senha da carteira", "enter_your_note": "Insira sua nota ...", "enter_your_pin": "Insira seu PIN", "enter_your_pin_again": "Insira seu PIN novamente", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Você não tem Sol suficiente para cobrir a taxa de transação e o aluguel da conta. Por favor, adicione mais sol à sua carteira ou reduza a quantidade de sol que você envia", "introducing_cake_pay": "Apresentando o Cake Pay!", "invalid_input": "Entrada inválida", + "invalid_password": "Senha inválida", "invoice_details": "Detalhes da fatura", "is_percentage": "é", "last_30_days": "Últimos 30 dias", @@ -501,6 +503,8 @@ "rename": "Renomear", "rep_warning": "Aviso representativo", "rep_warning_sub": "Seu representante não parece estar em boa posição. Toque aqui para selecionar um novo", + "repeat_wallet_password": "Repita a senha da carteira", + "repeated_password_is_incorrect": "A senha repetida está incorreta. Repita a senha da carteira novamente.", "require_for_adding_contacts": "Requer para adicionar contatos", "require_for_all_security_and_backup_settings": "Exigir todas as configurações de segurança e backup", "require_for_assessing_wallet": "Requer para acessar a carteira", @@ -799,6 +803,7 @@ "unavailable_balance_description": "Saldo Indisponível: Este total inclui fundos bloqueados em transações pendentes e aqueles que você congelou ativamente nas configurações de controle de moedas. Os saldos bloqueados ficarão disponíveis assim que suas respectivas transações forem concluídas, enquanto os saldos congelados permanecerão inacessíveis para transações até que você decida descongelá-los.", "unconfirmed": "Saldo não confirmado", "understand": "Entendo", + "unlock": "Desbloquear", "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado", "unspent_change": "Troco", "unspent_coins_details_title": "Detalhes de moedas não gastas", @@ -841,6 +846,7 @@ "wallet_menu": "Menu", "wallet_name": "Nome da carteira", "wallet_name_exists": "A carteira com esse nome já existe", + "wallet_password_is_empty": "A senha da carteira está vazia. A senha da carteira não deve estar vazia", "wallet_recovery_height": "Altura de recuperação", "wallet_restoration_store_incorrect_seed_length": "Comprimento de semente incorreto", "wallet_seed": "Semente de carteira", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 9f360137f..d84aa146f 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -236,6 +236,7 @@ "enter_code": "Введите код", "enter_seed_phrase": "Введите свою семенную фразу", "enter_totp_code": "Пожалуйста, введите TOTP-код.", + "enter_wallet_password": "Введите пароль кошелька", "enter_your_note": "Введите примечание…", "enter_your_pin": "Введите ваш PIN", "enter_your_pin_again": "Введите PIN еще раз", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "У вас недостаточно Sol, чтобы покрыть плату за транзакцию и аренду для счета. Пожалуйста, добавьте больше Sol в свой кошелек или уменьшите сумму Sol, которую вы отправляете", "introducing_cake_pay": "Представляем Cake Pay!", "invalid_input": "Неверный Ввод", + "invalid_password": "Неверный пароль", "invoice_details": "Детали счета", "is_percentage": "есть", "last_30_days": "Последние 30 дней", @@ -500,6 +502,8 @@ "rename": "Переименовать", "rep_warning": "Представительное предупреждение", "rep_warning_sub": "Ваш представитель, похоже, не в хорошей репутации. Нажмите здесь, чтобы выбрать новый", + "repeat_wallet_password": "Повторите пароль кошелька", + "repeated_password_is_incorrect": "Повторный пароль неверен. Пожалуйста, повторите пароль кошелька снова.", "require_for_adding_contacts": "Требовать добавления контактов", "require_for_all_security_and_backup_settings": "Требовать все настройки безопасности и резервного копирования", "require_for_assessing_wallet": "Требовать для доступа к кошельку", @@ -798,6 +802,7 @@ "unavailable_balance_description": "Недоступный баланс: в эту сумму входят средства, заблокированные в ожидающих транзакциях, и средства, которые вы активно заморозили в настройках управления монетами. Заблокированные балансы станут доступны после завершения соответствующих транзакций, а замороженные балансы останутся недоступными для транзакций, пока вы не решите их разморозить.", "unconfirmed": "Неподтвержденный баланс", "understand": "Понятно", + "unlock": "Разблокировать", "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода.", "unspent_change": "Изменять", "unspent_coins_details_title": "Сведения о неизрасходованных монетах", @@ -839,6 +844,7 @@ "wallet_menu": "Меню кошелька", "wallet_name": "Имя кошелька", "wallet_name_exists": "Кошелек с таким именем уже существует", + "wallet_password_is_empty": "Пароль кошелька пуст. Пароль кошелька не должен быть пустым", "wallet_recovery_height": "Высота восстановления", "wallet_restoration_store_incorrect_seed_length": "Неверная длина мнемонической фразы", "wallet_seed": "Мнемоническая фраза кошелька", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index a178d2452..2adccb2cf 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -236,6 +236,7 @@ "enter_code": "กรอกรหัส", "enter_seed_phrase": "ป้อนวลีเมล็ดพันธุ์ของคุณ", "enter_totp_code": "กรุณาใส่รหัสทีโอที", + "enter_wallet_password": "ป้อนรหัสผ่านกระเป๋าเงิน", "enter_your_note": "ใส่บันทึกของคุณ...", "enter_your_pin": "ใส่ PIN ของคุณ", "enter_your_pin_again": "ใส่ PIN ของคุณอีกครั้ง", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "คุณไม่มีโซลเพียงพอที่จะครอบคลุมค่าธรรมเนียมการทำธุรกรรมและค่าเช่าสำหรับบัญชี กรุณาเพิ่มโซลให้มากขึ้นลงในกระเป๋าเงินของคุณหรือลดจำนวนโซลที่คุณส่งมา", "introducing_cake_pay": "ยินดีต้อนรับสู่ Cake Pay!", "invalid_input": "อินพุตไม่ถูกต้อง", + "invalid_password": "รหัสผ่านไม่ถูกต้อง", "invoice_details": "รายละเอียดใบแจ้งหนี้", "is_percentage": "เป็น", "last_30_days": "30 วันล่าสุด", @@ -499,6 +501,8 @@ "rename": "เปลี่ยนชื่อ", "rep_warning": "คำเตือนตัวแทน", "rep_warning_sub": "ตัวแทนของคุณดูเหมือนจะไม่อยู่ในสถานะที่ดี แตะที่นี่เพื่อเลือกอันใหม่", + "repeat_wallet_password": "ทำซ้ำรหัสผ่านกระเป๋าเงิน", + "repeated_password_is_incorrect": "รหัสผ่านซ้ำไม่ถูกต้อง โปรดทำซ้ำรหัสผ่านกระเป๋าเงินอีกครั้ง", "require_for_adding_contacts": "ต้องการสำหรับการเพิ่มผู้ติดต่อ", "require_for_all_security_and_backup_settings": "จำเป็นสำหรับการตั้งค่าความปลอดภัยและการสำรองข้อมูลทั้งหมด", "require_for_assessing_wallet": "จำเป็นสำหรับการเข้าถึงกระเป๋าเงิน", @@ -797,6 +801,7 @@ "unavailable_balance_description": "ยอดคงเหลือที่ไม่พร้อมใช้งาน: ยอดรวมนี้รวมถึงเงินทุนที่ถูกล็อคในการทำธุรกรรมที่รอดำเนินการและที่คุณได้แช่แข็งไว้ในการตั้งค่าการควบคุมเหรียญของคุณ ยอดคงเหลือที่ถูกล็อคจะพร้อมใช้งานเมื่อธุรกรรมที่เกี่ยวข้องเสร็จสมบูรณ์ ในขณะที่ยอดคงเหลือที่แช่แข็งจะไม่สามารถเข้าถึงได้สำหรับธุรกรรมจนกว่าคุณจะตัดสินใจยกเลิกการแช่แข็ง", "unconfirmed": "ยอดคงเหลือที่ไม่ได้รับการยืนยัน", "understand": "ฉันเข้าใจ", + "unlock": "ปลดล็อค", "unmatched_currencies": "สกุลเงินของกระเป๋าปัจจุบันของคุณไม่ตรงกับของ QR ที่สแกน", "unspent_change": "เปลี่ยน", "unspent_coins_details_title": "รายละเอียดเหรียญที่ไม่ได้ใช้", @@ -838,6 +843,7 @@ "wallet_menu": "เมนู", "wallet_name": "ชื่อกระเป๋า", "wallet_name_exists": "กระเป๋าที่มีชื่อนี้มีอยู่แล้ว โปรดเลือกชื่ออื่นหรือเปลี่ยนชื่อกระเป๋าอื่นก่อน", + "wallet_password_is_empty": "รหัสผ่านกระเป๋าเงินว่างเปล่า รหัสผ่านกระเป๋าเงินไม่ควรว่างเปล่า", "wallet_recovery_height": "ความสูงของการกู้คืน", "wallet_restoration_store_incorrect_seed_length": "ความยาวของซีดไม่ถูกต้อง", "wallet_seed": "ซีดของกระเป๋า", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index f49d3ddee..3bbae2e50 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -236,6 +236,7 @@ "enter_code": "Ipasok ang code", "enter_seed_phrase": "Ipasok ang iyong pariralang binhi", "enter_totp_code": "Mangyaring ipasok ang TOTP code.", + "enter_wallet_password": "Ipasok ang password ng pitaka", "enter_your_note": "Ipasok ang iyong tala ...", "enter_your_pin": "Ipasok ang iyong pin", "enter_your_pin_again": "Ipasok muli ang iyong pin", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "Wala kang sapat na sol upang masakop ang bayad sa transaksyon at upa para sa account. Mabait na magdagdag ng higit pa sa iyong pitaka o bawasan ang halaga ng sol na iyong ipinapadala", "introducing_cake_pay": "Ipinakikilala ang cake pay!", "invalid_input": "Di -wastong input", + "invalid_password": "Di wastong password", "invoice_details": "Mga detalye ng invoice", "is_percentage": "ay", "last_30_days": "Huling 30 araw", @@ -499,6 +501,8 @@ "rename": "Palitan ang pangalan", "rep_warning": "Babala ng kinatawan", "rep_warning_sub": "Ang iyong kinatawan ay hindi lilitaw na nasa mabuting kalagayan. Tapikin dito upang pumili ng bago", + "repeat_wallet_password": "Ulitin ang password ng pitaka", + "repeated_password_is_incorrect": "Ang paulit -ulit na password ay hindi tama. Mangyaring ulitin muli ang password ng pitaka.", "require_for_adding_contacts": "Nangangailangan para sa pagdaragdag ng mga contact", "require_for_all_security_and_backup_settings": "Nangangailangan para sa lahat ng mga setting ng seguridad at backup", "require_for_assessing_wallet": "Nangangailangan para sa pag -access ng pitaka", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Hindi Available na Balanse: Kasama sa kabuuang ito ang mga pondong naka-lock sa mga nakabinbing transaksyon at ang mga aktibong na-freeze mo sa iyong mga setting ng kontrol ng coin. Magiging available ang mga naka-lock na balanse kapag nakumpleto na ang kani-kanilang mga transaksyon, habang ang mga nakapirming balanse ay nananatiling hindi naa-access para sa mga transaksyon hanggang sa magpasya kang i-unfreeze ang mga ito.", "unconfirmed": "Hindi nakumpirma na balanse", "understand": "naiintindihan ko", + "unlock": "I -unlock", "unmatched_currencies": "Ang pera ng iyong kasalukuyang pitaka ay hindi tumutugma sa na -scan na QR", "unspent_change": "Baguhin", "unspent_coins_details_title": "Mga Detalye ng Unspent Coins", @@ -838,6 +843,7 @@ "wallet_menu": "Menu", "wallet_name": "Pangalan ng Wallet", "wallet_name_exists": "Ang isang pitaka na may pangalang iyon ay mayroon na. Mangyaring pumili ng ibang pangalan o palitan muna ang iba pang pitaka.", + "wallet_password_is_empty": "Walang laman ang password ng wallet. Ang password ng wallet ay hindi dapat walang laman", "wallet_recovery_height": "Taas ng pagbawi", "wallet_restoration_store_incorrect_seed_length": "Maling haba ng binhi", "wallet_seed": "SEED ng Wallet", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index c73765f64..b47787bbd 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -236,6 +236,7 @@ "enter_code": "Kodu girin", "enter_seed_phrase": "Tohum ifadenizi girin", "enter_totp_code": "Lütfen TOTP Kodunu giriniz.", + "enter_wallet_password": "Cüzdan şifresini girin", "enter_your_note": "Notunu gir…", "enter_your_pin": "PIN'ini gir", "enter_your_pin_again": "PIN kodunu tekrar girin", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "İşlem ücretini karşılamak ve hesap için kiralamak için yeterli SOL'nuz yok. Lütfen cüzdanınıza daha fazla sol ekleyin veya gönderdiğiniz sol miktarını azaltın", "introducing_cake_pay": "Cake Pay ile tanışın!", "invalid_input": "Geçersiz Giriş", + "invalid_password": "Geçersiz şifre", "invoice_details": "fatura detayları", "is_percentage": "is", "last_30_days": "Son 30 gün", @@ -499,6 +501,8 @@ "rename": "Yeniden adlandır", "rep_warning": "Temsilci uyarı", "rep_warning_sub": "Temsilciniz iyi durumda görünmüyor. Yeni bir tane seçmek için buraya dokunun", + "repeat_wallet_password": "Cüzdan şifresini tekrarlayın", + "repeated_password_is_incorrect": "Tekrarlanan şifre yanlış. Lütfen cüzdan şifresini tekrarlayın.", "require_for_adding_contacts": "Kişi eklemek için gerekli", "require_for_all_security_and_backup_settings": "Tüm güvenlik ve yedekleme ayarları için iste", "require_for_assessing_wallet": "Cüzdana erişmek için gerekli", @@ -797,6 +801,7 @@ "unavailable_balance_description": "Kullanılamayan Bakiye: Bu toplam, bekleyen işlemlerde kilitlenen fonları ve jeton kontrol ayarlarınızda aktif olarak dondurduğunuz fonları içerir. Kilitli bakiyeler, ilgili işlemleri tamamlandıktan sonra kullanılabilir hale gelir; dondurulmuş bakiyeler ise siz onları dondurmaya karar verene kadar işlemler için erişilemez durumda kalır.", "unconfirmed": "Onaylanmamış Bakiye", "understand": "Anladım", + "unlock": "Kilidini aç", "unmatched_currencies": "Mevcut cüzdanınızın para birimi taranan QR ile eşleşmiyor", "unspent_change": "Değiştirmek", "unspent_coins_details_title": "Harcanmamış koin detayları", @@ -838,6 +843,7 @@ "wallet_menu": "Menü", "wallet_name": "Cüzdan ismi", "wallet_name_exists": "Bu isimde bir cüzdan zaten mevcut. Lütfen farklı bir isim seç veya önce diğer cüzdanı yeniden adlandır.", + "wallet_password_is_empty": "Cüzdan şifresi boş. Cüzdan şifresi boş olmamalı", "wallet_recovery_height": "Kurtarma Yüksekliği", "wallet_restoration_store_incorrect_seed_length": "Yanlış tohum uzunluğu", "wallet_seed": "Cüzdan tohumu", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index d088dd1b2..328548087 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -236,6 +236,7 @@ "enter_code": "Введіть код", "enter_seed_phrase": "Введіть свою насіннєву фразу", "enter_totp_code": "Будь ласка, введіть код TOTP.", + "enter_wallet_password": "Введіть пароль гаманця", "enter_your_note": "Введіть примітку…", "enter_your_pin": "Введіть ваш PIN", "enter_your_pin_again": "Введіть PIN ще раз", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "У вас недостатньо SOL, щоб покрити плату за транзакцію та оренду на рахунок. Будь ласка, додайте до свого гаманця більше SOL або зменшіть суму, яку ви надсилаєте", "introducing_cake_pay": "Представляємо Cake Pay!", "invalid_input": "Неправильні дані", + "invalid_password": "Недійсний пароль", "invoice_details": "Реквізити рахунку-фактури", "is_percentage": "є", "last_30_days": "Останні 30 днів", @@ -500,6 +502,8 @@ "rename": "Перейменувати", "rep_warning": "Представницьке попередження", "rep_warning_sub": "Ваш представник, схоже, не має доброго становища. Торкніться тут, щоб вибрати новий", + "repeat_wallet_password": "Повторіть пароль гаманця", + "repeated_password_is_incorrect": "Повторний пароль невірний. Будь ласка, повторіть пароль гаманця ще раз.", "require_for_adding_contacts": "Потрібен для додавання контактів", "require_for_all_security_and_backup_settings": "Вимагати всіх налаштувань безпеки та резервного копіювання", "require_for_assessing_wallet": "Потрібен доступ до гаманця", @@ -798,6 +802,7 @@ "unavailable_balance_description": "Недоступний баланс: ця сума включає кошти, заблоковані в незавершених транзакціях, і ті, які ви активно заморозили в налаштуваннях контролю монет. Заблоковані баланси стануть доступними після завершення відповідних транзакцій, тоді як заморожені баланси залишаються недоступними для транзакцій, доки ви не вирішите їх розморозити.", "unconfirmed": "Непідтверджений баланс", "understand": "Зрозуміло", + "unlock": "Розблокувати", "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду", "unspent_change": "Зміна", "unspent_coins_details_title": "Відомості про невитрачені монети", @@ -839,6 +844,7 @@ "wallet_menu": "Меню гаманця", "wallet_name": "Ім'я гаманця", "wallet_name_exists": "Гаманець з такою назвою вже існує", + "wallet_password_is_empty": "Пароль гаманця порожній. Пароль гаманця не повинен бути порожнім", "wallet_recovery_height": "Висота відновлення", "wallet_restoration_store_incorrect_seed_length": "Невірна довжина мнемонічної фрази", "wallet_seed": "Мнемонічна фраза гаманця", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 0694463de..7d794f9bb 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -236,6 +236,7 @@ "enter_code": "کوڈ درج کریں", "enter_seed_phrase": "اپنے بیج کا جملہ درج کریں", "enter_totp_code": "براہ کرم TOTP کوڈ درج کریں۔", + "enter_wallet_password": "پرس کا پاس ورڈ درج کریں", "enter_your_note": "اپنا نوٹ درج کریں…", "enter_your_pin": "اپنا PIN درج کریں۔", "enter_your_pin_again": "اپنا پن دوبارہ درج کریں۔", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "آپ کے پاس ٹرانزیکشن فیس اور اکاؤنٹ کے لئے کرایہ لینے کے ل enough اتنا SOL نہیں ہے۔ برائے مہربانی اپنے بٹوے میں مزید سول شامل کریں یا آپ کو بھیجنے والی سول رقم کو کم کریں", "introducing_cake_pay": "Cake پے کا تعارف!", "invalid_input": "غلط ان پٹ", + "invalid_password": "غلط پاسورڈ", "invoice_details": "رسید کی تفصیلات", "is_percentage": "ہے", "last_30_days": "آخری 30 دن", @@ -501,6 +503,8 @@ "rename": "نام تبدیل کریں۔", "rep_warning": "نمائندہ انتباہ", "rep_warning_sub": "آپ کا نمائندہ اچھ standing ے مقام پر نہیں دکھائی دیتا ہے۔ نیا منتخب کرنے کے لئے یہاں ٹیپ کریں", + "repeat_wallet_password": "بٹوے کا پاس ورڈ دہرائیں", + "repeated_password_is_incorrect": "بار بار پاس ورڈ غلط ہے۔ براہ کرم دوبارہ پرس کا پاس ورڈ دہرائیں۔", "require_for_adding_contacts": "رابطوں کو شامل کرنے کی ضرورت ہے۔", "require_for_all_security_and_backup_settings": "تمام سیکورٹی اور بیک اپ کی ترتیبات کے لیے درکار ہے۔", "require_for_assessing_wallet": "بٹوے تک رسائی کے لیے درکار ہے۔", @@ -799,6 +803,7 @@ "unavailable_balance_description": "۔ﮯﺗﺮﮐ ﮟﯿﮩﻧ ﮧﻠﺼﯿﻓ ﺎﮐ ﮯﻧﺮﮐ ﺪﻤﺠﻨﻣ ﻥﺍ ﮟﯿﮩﻧﺍ ﭖﺁ ﮧﮐ ﮏﺗ ﺐﺟ ﮟﯿﮨ ﮯﺘﮨﺭ ﯽﺋﺎﺳﺭ ﻞﺑﺎﻗﺎﻧ ﮏﺗ ﺖﻗﻭ ﺱﺍ ﮯﯿﻟ ﮯﮐ ﻦﯾﺩ ﻦﯿﻟ ﺲﻨﻠﯿﺑ ﺪﻤﺠﻨﻣ ﮧﮐ ﺐﺟ ،ﮯﮔ ﮟﯿﺋﺎﺟ ﻮﮨ ﺏﺎﯿﺘﺳﺩ ﺲﻨﻠﯿﺑ ﻞﻔﻘﻣ ﺪﻌﺑ ﮯﮐ ﮯﻧﻮﮨ ﻞﻤﮑﻣ ﻦﯾﺩ ﻦﯿﻟ ﮧﻘﻠﻌﺘﻣ ﮯﮐ ﻥﺍ ۔ﮯﮨ ﺎﮭﮐﺭ ﺮ", "unconfirmed": "غیر تصدیق شدہ بیلنس", "understand": "میں سمجھتا ہوں۔", + "unlock": "غیر مقفل", "unmatched_currencies": "آپ کے پرس کی موجودہ کرنسی اسکین شدہ QR سے مماثل نہیں ہے۔", "unspent_change": "تبدیل کریں", "unspent_coins_details_title": "غیر خرچ شدہ سککوں کی تفصیلات", @@ -840,6 +845,7 @@ "wallet_menu": "مینو", "wallet_name": "بٹوے کا نام", "wallet_name_exists": "اس نام کا پرس پہلے سے موجود ہے۔ براہ کرم ایک مختلف نام منتخب کریں یا پہلے دوسرے بٹوے کا نام تبدیل کریں۔", + "wallet_password_is_empty": "پرس کا پاس ورڈ خالی ہے۔ پرس کا پاس ورڈ خالی نہیں ہونا چاہئے", "wallet_recovery_height": "بحالی کی اونچائی", "wallet_restoration_store_incorrect_seed_length": "غلط بیج کی لمبائی", "wallet_seed": "بٹوے کا بیج", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 87df87aca..2150a503f 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -237,6 +237,7 @@ "enter_code": "Tẹ̀ ọ̀rọ̀", "enter_seed_phrase": "Tẹ ọrọ-iru irugbin rẹ", "enter_totp_code": "Jọwọ pọ koodu TOTP.", + "enter_wallet_password": "Tẹ ọrọ igbaniwọle apamọwọ", "enter_your_note": "Tẹ̀ àkọsílẹ̀ yín", "enter_your_pin": "Tẹ̀ òǹkà ìdánimọ̀ àdáni yín", "enter_your_pin_again": "Tún òǹkà ìdánimọ̀ àdáni yín tẹ̀", @@ -341,6 +342,7 @@ "insufficientFundsForRentError": "O ko ni Sol kan lati bo owo isanwo naa ki o yalo fun iroyin naa. Fi agbara kun Sol diẹ sii si apamọwọ rẹ tabi dinku soso naa ti o \\ 'tun n firanṣẹ", "introducing_cake_pay": "Ẹ bá Cake Pay!", "invalid_input": "Iṣawọle ti ko tọ", + "invalid_password": "Ọrọ igbaniwọle ti ko wulo", "invoice_details": "Iru awọn ẹya ọrọ", "is_percentage": "jẹ́", "last_30_days": "Ọ̀jọ̀ mọ́gbọ̀n tó kọjà", @@ -500,6 +502,8 @@ "rename": "Pààrọ̀ orúkọ", "rep_warning": "Ikilọ aṣoju", "rep_warning_sub": "Aṣoju rẹ ko han lati wa ni iduro to dara. Fọwọ ba ibi lati yan ọkan titun kan", + "repeat_wallet_password": "Tun ọrọ igbaniwọle apamọwọ naa", + "repeated_password_is_incorrect": "Ọrọ igbaniwọle tun jẹ aṣiṣe. Jọwọ tun ọrọigbaniwọle apamọwọ lẹẹkansi.", "require_for_adding_contacts": "Beere fun fifi awọn olubasọrọ kun", "require_for_all_security_and_backup_settings": "Beere fun gbogbo aabo ati awọn eto afẹyinti", "require_for_assessing_wallet": "Beere fun wiwọle si apamọwọ", @@ -798,6 +802,7 @@ "unavailable_balance_description": "Iwontunws.funfun ti ko si: Lapapọ yii pẹlu awọn owo ti o wa ni titiipa ni awọn iṣowo isunmọ ati awọn ti o ti didi ni itara ninu awọn eto iṣakoso owo rẹ. Awọn iwọntunwọnsi titiipa yoo wa ni kete ti awọn iṣowo oniwun wọn ba ti pari, lakoko ti awọn iwọntunwọnsi tio tutunini ko ni iraye si fun awọn iṣowo titi iwọ o fi pinnu lati mu wọn kuro.", "unconfirmed": "A kò tí ì jẹ́rìí ẹ̀", "understand": "Ó ye mi", + "unlock": "Sisalẹ", "unmatched_currencies": "Irú owó ti àpamọ́wọ́ yín kì í ṣe irú ti yíya àmì ìlujá", "unspent_change": "Yipada", "unspent_coins_details_title": "Àwọn owó ẹyọ t'á kò tí ì san", @@ -839,6 +844,7 @@ "wallet_menu": "Mẹ́nù", "wallet_name": "Orúkọ àpamọ́wọ́", "wallet_name_exists": "Ẹ ti ní àpamọ́wọ́ pẹ̀lú orúkọ̀ yẹn. Ẹ jọ̀wọ́ yàn orúkọ̀ tó yàtọ̀ tàbí pààrọ̀ orúkọ ti àpamọ́wọ́ tẹ́lẹ̀.", + "wallet_password_is_empty": "Ọrọ igbaniwọle apamọwọ ti ṣofo. Ọrọ igbaniwọle apamọwọ ko yẹ ki o ṣofo", "wallet_recovery_height": "Iga Imularada", "wallet_restoration_store_incorrect_seed_length": "Gígùn hóró tí a máa ń lò kọ́ ni èyí", "wallet_seed": "Hóró àpamọ́wọ́", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 89eca2073..5db53a423 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -236,6 +236,7 @@ "enter_code": "输入代码", "enter_seed_phrase": "输入您的种子短语", "enter_totp_code": "请输入 TOTP 代码。", + "enter_wallet_password": "输入钱包密码", "enter_your_note": "输入您的笔记...", "enter_your_pin": "输入密码", "enter_your_pin_again": "再次输入您的PIN码", @@ -340,6 +341,7 @@ "insufficientFundsForRentError": "您没有足够的溶胶来支付该帐户的交易费和租金。请在钱包中添加更多溶胶或减少您发送的溶胶量", "introducing_cake_pay": "介绍 Cake Pay!", "invalid_input": "输入无效", + "invalid_password": "无效的密码", "invoice_details": "发票明细", "is_percentage": "是", "last_30_days": "过去 30 天", @@ -499,6 +501,8 @@ "rename": "重命名", "rep_warning": "代表性警告", "rep_warning_sub": "您的代表似乎并不信誉良好。点击这里选择一个新的", + "repeat_wallet_password": "重复钱包密码", + "repeated_password_is_incorrect": "重复密码不正确。请再次重复钱包密码。", "require_for_adding_contacts": "需要添加联系人", "require_for_all_security_and_backup_settings": "需要所有安全和备份设置", "require_for_assessing_wallet": "需要访问钱包", @@ -797,6 +801,7 @@ "unavailable_balance_description": "不可用余额:此总额包括锁定在待处理交易中的资金以及您在硬币控制设置中主动冻结的资金。一旦各自的交易完成,锁定的余额将变得可用,而冻结的余额在您决定解冻之前仍然无法进行交易。", "unconfirmed": "未确认余额", "understand": "我已知晓", + "unlock": "开锁", "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配", "unspent_change": "改变", "unspent_coins_details_title": "未使用代幣詳情", @@ -838,6 +843,7 @@ "wallet_menu": "钱包菜单", "wallet_name": "钱包名称", "wallet_name_exists": "同名的钱包已经存在", + "wallet_password_is_empty": "钱包密码为空。钱包密码不应为空", "wallet_recovery_height": "恢复高度", "wallet_restoration_store_incorrect_seed_length": "种子长度错误", "wallet_seed": "钱包种子", diff --git a/scripts/android/shell.nix b/scripts/android/shell.nix deleted file mode 100644 index b89da09c0..000000000 --- a/scripts/android/shell.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs ? import {} }: - -pkgs.mkShell { - buildInputs = [ - pkgs.curl - pkgs.unzip - pkgs.automake - pkgs.file - pkgs.pkg-config - pkgs.git - pkgs.libtool - pkgs.ncurses5 - pkgs.openjdk8 - pkgs.clang - ]; -} diff --git a/scripts/ios/gen_framework.sh b/scripts/ios/gen_framework.sh index 950a7afe5..5c9bcd228 100755 --- a/scripts/ios/gen_framework.sh +++ b/scripts/ios/gen_framework.sh @@ -28,4 +28,4 @@ fi cd $FRWK_DIR # go to iOS framework dir lipo -create $DYLIB_LINK_PATH -output WowneroWallet -echo "Generated ${FRWK_DIR}" \ No newline at end of file +echo "Generated ${FRWK_DIR}" diff --git a/scripts/linux/app_config.sh b/scripts/linux/app_config.sh new file mode 100755 index 000000000..b4ca1423c --- /dev/null +++ b/scripts/linux/app_config.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +CAKEWALLET="cakewallet" +DIR=`pwd` + +if [ -z "$APP_LINUX_TYPE" ]; then + echo "Please set APP_LINUX_TYPE" + exit 1 +fi + +cd ../.. # go to root +CONFIG_ARGS="" + +case $APP_LINUX_TYPE in + $CAKEWALLET) + CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron --wownero --excludeFlutterSecureStorage";; +esac + +cp -rf pubspec_description.yaml pubspec.yaml +flutter pub get +flutter pub run tool/generate_pubspec.dart +flutter pub get +flutter packages pub run tool/configure.dart $CONFIG_ARGS +sed -i '0,/version: 0.0.0/s//version: '"${APP_LINUX_VERSION}"'+'"${APP_LINUX_BUILD_NUMBER}"'/' pubspec.yaml +cd $DIR diff --git a/scripts/linux/app_env.fish b/scripts/linux/app_env.fish new file mode 100644 index 000000000..8dec90ce3 --- /dev/null +++ b/scripts/linux/app_env.fish @@ -0,0 +1,35 @@ +#!/usr/bin/env fish + +set -g APP_LINUX_NAME "" +set -g APP_LINUX_VERSION "" +set -g APP_LINUX_BUILD_NUMBER "" + +set -g CAKEWALLET "cakewallet" + +set -g TYPES $CAKEWALLET +set -g APP_LINUX_TYPE $CAKEWALLET + +if test -n "$argv[1]" + set -g APP_LINUX_TYPE $argv[1] +end + +set -g CAKEWALLET_NAME "Cake Wallet" +set -g CAKEWALLET_VERSION "1.9.0" +set -g CAKEWALLET_BUILD_NUMBER 29 + +if not contains -- $APP_LINUX_TYPE $TYPES + echo "Wrong app type." + exit 1 +end + +switch $APP_LINUX_TYPE + case $CAKEWALLET + set -g APP_LINUX_NAME $CAKEWALLET_NAME + set -g APP_LINUX_VERSION $CAKEWALLET_VERSION + set -g APP_LINUX_BUILD_NUMBER $CAKEWALLET_BUILD_NUMBER +end + +export APP_LINUX_TYPE +export APP_LINUX_NAME +export APP_LINUX_VERSION +export APP_LINUX_BUILD_NUMBER diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh new file mode 100755 index 000000000..729cf376b --- /dev/null +++ b/scripts/linux/app_env.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +APP_LINUX_NAME="" +APP_LINUX_VERSION="" +APP_LINUX_BUILD_VERSION="" + +CAKEWALLET="cakewallet" + +TYPES=($CAKEWALLET) +APP_LINUX_TYPE=$CAKEWALLET + +if [ -n "$1" ]; then + APP_LINUX_TYPE=$1 +fi + +CAKEWALLET_NAME="Cake Wallet" +CAKEWALLET_VERSION="1.9.2" +CAKEWALLET_BUILD_NUMBER=30 + +if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then + echo "Wrong app type." + exit 1 +fi + +case $APP_LINUX_TYPE in + $CAKEWALLET) + APP_LINUX_NAME=$CAKEWALLET_NAME + APP_LINUX_VERSION=$CAKEWALLET_VERSION + APP_LINUX_BUILD_NUMBER=$CAKEWALLET_BUILD_NUMBER;; +esac + +export APP_LINUX_TYPE +export APP_LINUX_NAME +export APP_LINUX_VERSION +export APP_LINUX_BUILD_NUMBER diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh new file mode 100755 index 000000000..e2bdb081c --- /dev/null +++ b/scripts/linux/build_all.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./build_monero_all.sh diff --git a/scripts/linux/build_boost.sh b/scripts/linux/build_boost.sh new file mode 100755 index 000000000..3ac613e7c --- /dev/null +++ b/scripts/linux/build_boost.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e + +. ./config.sh + +BOOST_SRC_DIR=${EXTERNAL_LINUX_SOURCE_DIR}/boost_1_82_0 +BOOST_FILENAME=boost_1_82_0.tar.bz2 +BOOST_VERSION=1.82.0 +BOOST_FILE_PATH=${EXTERNAL_LINUX_SOURCE_DIR}/$BOOST_FILENAME +BOOST_SHA256="a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6" + +if [ ! -e "$BOOST_FILE_PATH" ]; then + curl -L http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/${BOOST_FILENAME} > $BOOST_FILE_PATH +fi + +echo $BOOST_SHA256 $BOOST_FILE_PATH | sha256sum -c - || exit 1 + +cd $EXTERNAL_LINUX_SOURCE_DIR +rm -rf $BOOST_SRC_DIR +tar -xvf $BOOST_FILE_PATH -C $EXTERNAL_LINUX_SOURCE_DIR +cd $BOOST_SRC_DIR +./bootstrap.sh --prefix=${EXTERNAL_LINUX_DIR} +./b2 cxxflags=-fPIC cflags=-fPIC \ + --with-chrono \ + --with-date_time \ + --with-filesystem \ + --with-program_options \ + --with-regex \ + --with-serialization \ + --with-system \ + --with-thread \ + --with-locale \ + link=static \ + install + diff --git a/scripts/linux/build_expat.sh b/scripts/linux/build_expat.sh new file mode 100755 index 000000000..a45852d1d --- /dev/null +++ b/scripts/linux/build_expat.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +. ./config.sh + + +EXPAT_VERSION=R_2_4_8 +EXPAT_HASH="3bab6c09bbe8bf42d84b81563ddbcf4cca4be838" +EXPAT_SRC_DIR=${EXTERNAL_LINUX_SOURCE_DIR}/libexpat + +git clone https://github.com/libexpat/libexpat.git -b ${EXPAT_VERSION} ${EXPAT_SRC_DIR} +cd $EXPAT_SRC_DIR +test `git rev-parse HEAD` = ${EXPAT_HASH} || exit 1 +cd $EXPAT_SRC_DIR/expat + +./buildconf.sh +./configure --enable-static --disable-shared --prefix=${EXTERNAL_LINUX_DIR} +make +make install diff --git a/scripts/linux/build_iconv.sh b/scripts/linux/build_iconv.sh new file mode 100755 index 000000000..29812cdb3 --- /dev/null +++ b/scripts/linux/build_iconv.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +. ./config.sh + +export ICONV_FILENAME=libiconv-1.16.tar.gz +export ICONV_FILE_PATH=${EXTERNAL_LINUX_SOURCE_DIR}/${ICONV_FILENAME} +export ICONV_SRC_DIR=${EXTERNAL_LINUX_SOURCE_DIR}/libiconv-1.16 +ICONV_SHA256="e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04" + +curl http://ftp.gnu.org/pub/gnu/libiconv/${ICONV_FILENAME} -o $ICONV_FILE_PATH +echo $ICONV_SHA256 $ICONV_FILE_PATH | sha256sum -c - || exit 1 + +cd $EXTERNAL_LINUX_SOURCE_DIR +rm -rf $ICONV_SRC_DIR +tar -xzf $ICONV_FILE_PATH -C $EXTERNAL_LINUX_SOURCE_DIR +cd $ICONV_SRC_DIR + +./configure --prefix=${EXTERNAL_LINUX_DIR} +make +make install diff --git a/scripts/linux/build_monero.sh b/scripts/linux/build_monero.sh new file mode 100755 index 000000000..cbefec08e --- /dev/null +++ b/scripts/linux/build_monero.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +. ./config.sh + +MONERO_URL="https://github.com/cake-tech/monero.git" +MONERO_DIR_PATH="${EXTERNAL_LINUX_SOURCE_DIR}/monero" +MONERO_VERSION=release-v0.18.3.2 +PREFIX=${EXTERNAL_LINUX_DIR} +DEST_LIB_DIR=${EXTERNAL_LINUX_LIB_DIR}/monero +DEST_INCLUDE_DIR=${EXTERNAL_LINUX_INCLUDE_DIR}/monero + +echo "Cloning monero from - $MONERO_URL to - $MONERO_DIR_PATH" +git clone $MONERO_URL $MONERO_DIR_PATH +cd $MONERO_DIR_PATH +git checkout $MONERO_VERSION +git submodule update --init --force +rm -rf ./build/release +mkdir -p ./build/release +cd ./build/release + +mkdir -p $DEST_LIB_DIR +mkdir -p $DEST_INCLUDE_DIR + +echo "Building LINUX" +export CMAKE_INCLUDE_PATH="${PREFIX}/include" +export CMAKE_LIBRARY_PATH="${PREFIX}/lib" + +cmake -DSTATIC=ON \ + -DBUILD_GUI_DEPS=ON \ + -DUNBOUND_INCLUDE_DIR=${EXTERNAL_LINUX_INCLUDE_DIR} \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DUSE_DEVICE_TREZOR=OFF \ + -DMANUAL_SUBMODULES=1 \ + ../.. + +make wallet_api -j$(($(nproc) / 2)) + +find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; +cp -r ./lib/* $DEST_LIB_DIR +cp ../../src/wallet/api/wallet2_api.h $DEST_INCLUDE_DIR diff --git a/scripts/linux/build_monero_all.sh b/scripts/linux/build_monero_all.sh new file mode 100755 index 000000000..5dc512527 --- /dev/null +++ b/scripts/linux/build_monero_all.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +. ./config.sh + + +set -x -e + +cd "$(dirname "$0")" + +NPROC="-j$(nproc)" + +../prepare_moneroc.sh + +for COIN in monero wownero; +do + pushd ../monero_c + ./build_single.sh ${COIN} $(gcc -dumpmachine) $NPROC + popd + unxz -f ../monero_c/release/${COIN}/$(gcc -dumpmachine)_libwallet2_api_c.so.xz +done diff --git a/scripts/linux/build_openssl.sh b/scripts/linux/build_openssl.sh new file mode 100755 index 000000000..205cf7abf --- /dev/null +++ b/scripts/linux/build_openssl.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +. ./config.sh + +OPENSSL_FILENAME=openssl-1.1.1q.tar.gz +OPENSSL_FILE_PATH=${EXTERNAL_LINUX_SOURCE_DIR}/${OPENSSL_FILENAME} +OPENSSL_SRC_DIR=${EXTERNAL_LINUX_SOURCE_DIR}/openssl-1.1.1q +OPENSSL_SHA256="d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca" + +curl https://www.openssl.org/source/${OPENSSL_FILENAME} -o ${OPENSSL_FILE_PATH} + +rm -rf $OPENSSL_SRC_DIR +tar -xzf $OPENSSL_FILE_PATH -C $EXTERNAL_LINUX_SOURCE_DIR +cd $OPENSSL_SRC_DIR +export CFLAGS=-fPIC +./config -fPIC shared --prefix=${EXTERNAL_LINUX_DIR} +make install diff --git a/scripts/linux/build_sodium.sh b/scripts/linux/build_sodium.sh new file mode 100755 index 000000000..3a6f6adf9 --- /dev/null +++ b/scripts/linux/build_sodium.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +. ./config.sh + +SODIUM_PATH="${EXTERNAL_LINUX_SOURCE_DIR}/libsodium" +SODIUM_URL="https://github.com/jedisct1/libsodium.git" + +echo "============================ SODIUM ============================" + +echo "Cloning SODIUM from - $SODIUM_URL" +git clone $SODIUM_URL $SODIUM_PATH --branch stable +cd $SODIUM_PATH + + +./configure --prefix=${EXTERNAL_LINUX_DIR} +make +make install diff --git a/scripts/linux/build_unbound.sh b/scripts/linux/build_unbound.sh new file mode 100755 index 000000000..1ae917da9 --- /dev/null +++ b/scripts/linux/build_unbound.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +. ./config.sh + +UNBOUND_VERSION=release-1.16.2 +UNBOUND_HASH="cbed768b8ff9bfcf11089a5f1699b7e5707f1ea5" +UNBOUND_DIR_PATH="${EXTERNAL_LINUX_SOURCE_DIR}/unbound-1.16.2" + +echo "============================ Unbound ============================" +rm -rf ${UNBOUND_DIR_PATH} +git clone https://github.com/NLnetLabs/unbound.git -b ${UNBOUND_VERSION} ${UNBOUND_DIR_PATH} +cd $UNBOUND_DIR_PATH +test `git rev-parse HEAD` = ${UNBOUND_HASH} || exit 1 + +export CFLAGS=-fPIC +./configure cxxflags=-fPIC cflags=-fPIC \ + --prefix="${EXTERNAL_LINUX_DIR}" \ + --with-ssl="${EXTERNAL_LINUX_DIR}" \ + --with-libexpat="${EXTERNAL_LINUX_DIR}" \ + --enable-static \ + --disable-flto +make +make install diff --git a/scripts/linux/build_zmq.sh b/scripts/linux/build_zmq.sh new file mode 100755 index 000000000..f6980e40d --- /dev/null +++ b/scripts/linux/build_zmq.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./config.sh + +ZMQ_PATH="${EXTERNAL_LINUX_SOURCE_DIR}/libzmq" +ZMQ_URL="https://github.com/zeromq/libzmq.git" + +echo "============================ ZMQ ============================" + +echo "Cloning ZMQ from - $ZMQ_URL" +git clone $ZMQ_URL $ZMQ_PATH +cd $ZMQ_PATH +mkdir cmake-build +cd cmake-build +cmake .. -DCMAKE_INSTALL_PREFIX="${EXTERNAL_LINUX_DIR}" +make +make install diff --git a/scripts/linux/cakewallet.sh b/scripts/linux/cakewallet.sh new file mode 100755 index 000000000..89c7a7ef0 --- /dev/null +++ b/scripts/linux/cakewallet.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +. ./app_env.sh "cakewallet" +. ./app_config.sh diff --git a/scripts/linux/config.sh b/scripts/linux/config.sh new file mode 100755 index 000000000..3fbdf349e --- /dev/null +++ b/scripts/linux/config.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +export LINUX_SCRIPTS_DIR=`pwd` +export CW_ROOT=${LINUX_SCRIPTS_DIR}/../.. +export EXTERNAL_DIR=${CW_ROOT}/cw_shared_external/ios/External +export EXTERNAL_LINUX_DIR=${EXTERNAL_DIR}/linux +export EXTERNAL_LINUX_SOURCE_DIR=${EXTERNAL_LINUX_DIR}/sources +export EXTERNAL_LINUX_LIB_DIR=${EXTERNAL_LINUX_DIR}/lib +export EXTERNAL_LINUX_INCLUDE_DIR=${EXTERNAL_LINUX_DIR}/include + +mkdir -p $EXTERNAL_LINUX_LIB_DIR +mkdir -p $EXTERNAL_LINUX_INCLUDE_DIR +mkdir -p $EXTERNAL_LINUX_SOURCE_DIR diff --git a/scripts/linux/gcc10.nix b/scripts/linux/gcc10.nix new file mode 100644 index 000000000..dfc01986a --- /dev/null +++ b/scripts/linux/gcc10.nix @@ -0,0 +1,12 @@ +with import {}; +gcc10Stdenv.mkDerivation { + name="gcc10-stdenv"; + buildInputs = [ + pkgs.cmake + pkgs.pkg-config + pkgs.autoconf + pkgs.libtool + pkgs.expat + ]; +} + diff --git a/scripts/linux/setup.sh b/scripts/linux/setup.sh new file mode 100755 index 000000000..a323cf027 --- /dev/null +++ b/scripts/linux/setup.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +. ./config.sh + +CW_EXTERNAL_DIR=${CW_ROOT}/cw_monero/ios/External/linux +CW_EXTERNAL_DIR_INCLUDE=${CW_EXTERNAL_DIR}/include + +mkdir -p $CW_EXTERNAL_DIR_INCLUDE +cp $EXTERNAL_LINUX_INCLUDE_DIR/monero/wallet2_api.h $CW_EXTERNAL_DIR_INCLUDE diff --git a/tool/configure.dart b/tool/configure.dart index c37946476..a0104c34e 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -150,7 +150,7 @@ abstract class Bitcoin { String? passphrase, }); WalletCredentials createBitcoinRestoreWalletFromWIFCredentials({required String name, required String password, required String wif, WalletInfo? walletInfo}); - WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo}); + WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createBitcoinHardwareWalletCredentials({required String name, required HardwareAccountData accountData, WalletInfo? walletInfo}); List getWordList(); Map getWalletKeys(Object wallet); @@ -179,8 +179,8 @@ abstract class Bitcoin { List getUnspents(Object wallet); Future updateUnspents(Object wallet); WalletService createBitcoinWalletService( - Box walletInfoSource, Box unspentCoinSource, bool alwaysScan); - WalletService createLitecoinWalletService(Box walletInfoSource, Box unspentCoinSource); + Box walletInfoSource, Box unspentCoinSource, bool alwaysScan, bool isDirect); + WalletService createLitecoinWalletService(Box walletInfoSource, Box unspentCoinSource, bool isDirect); TransactionPriority getBitcoinTransactionPriorityMedium(); TransactionPriority getBitcoinTransactionPriorityCustom(); TransactionPriority getLitecoinTransactionPriorityMedium(); @@ -369,7 +369,7 @@ abstract class Monero { required String language, required int height}); WalletCredentials createMoneroRestoreWalletFromSeedCredentials({required String name, required String password, required int height, required String mnemonic}); - WalletCredentials createMoneroNewWalletCredentials({required String name, required String language, required bool isPolyseed, String password}); + WalletCredentials createMoneroNewWalletCredentials({required String name, required String language, required bool isPolyseed, String? password}); Map getKeys(Object wallet); int? getRestoreHeight(Object wallet); Object createMoneroTransactionCreationCredentials({required List outputs, required TransactionPriority priority}); @@ -734,7 +734,7 @@ abstract class Haven { required String language, required int height}); WalletCredentials createHavenRestoreWalletFromSeedCredentials({required String name, required String password, required int height, required String mnemonic}); - WalletCredentials createHavenNewWalletCredentials({required String name, required String language, String password}); + WalletCredentials createHavenNewWalletCredentials({required String name, required String language, String? password}); Map getKeys(Object wallet); Object createHavenTransactionCreationCredentials({required List outputs, required TransactionPriority priority, required String assetType}); String formatterMoneroAmountToString({required int amount}); @@ -828,8 +828,8 @@ import 'package:eth_sig_util/util/utils.dart'; const ethereumContent = """ abstract class Ethereum { List getEthereumWordList(String language); - WalletService createEthereumWalletService(Box walletInfoSource); - WalletCredentials createEthereumNewWalletCredentials({required String name, WalletInfo? walletInfo}); + WalletService createEthereumWalletService(Box walletInfoSource, bool isDirect); + WalletCredentials createEthereumNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createEthereumRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password}); WalletCredentials createEthereumRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password}); WalletCredentials createEthereumHardwareWalletCredentials({required String name, required HardwareAccountData hwAccountData, WalletInfo? walletInfo}); @@ -932,8 +932,8 @@ import 'package:eth_sig_util/util/utils.dart'; const polygonContent = """ abstract class Polygon { List getPolygonWordList(String language); - WalletService createPolygonWalletService(Box walletInfoSource); - WalletCredentials createPolygonNewWalletCredentials({required String name, WalletInfo? walletInfo}); + WalletService createPolygonWalletService(Box walletInfoSource, bool isDirect); + WalletCredentials createPolygonNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createPolygonRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password}); WalletCredentials createPolygonRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password}); WalletCredentials createPolygonHardwareWalletCredentials({required String name, required HardwareAccountData hwAccountData, WalletInfo? walletInfo}); @@ -1017,10 +1017,10 @@ abstract class BitcoinCash { String getCashAddrFormat(String address); WalletService createBitcoinCashWalletService( - Box walletInfoSource, Box unspentCoinSource); + Box walletInfoSource, Box unspentCoinSource, bool isDirect); WalletCredentials createBitcoinCashNewWalletCredentials( - {required String name, WalletInfo? walletInfo}); + {required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials( {required String name, required String mnemonic, required String password}); @@ -1097,11 +1097,11 @@ abstract class Nano { void setCurrentAccount(Object wallet, int id, String label, String? balance); - WalletService createNanoWalletService(Box walletInfoSource); + WalletService createNanoWalletService(Box walletInfoSource, bool isDirect); WalletCredentials createNanoNewWalletCredentials({ required String name, - String password, + String? password, }); WalletCredentials createNanoRestoreWalletFromSeedCredentials({ @@ -1215,9 +1215,9 @@ import 'package:cw_solana/solana_wallet_creation_credentials.dart'; const solanaContent = """ abstract class Solana { List getSolanaWordList(String language); - WalletService createSolanaWalletService(Box walletInfoSource); + WalletService createSolanaWalletService(Box walletInfoSource, bool isDirect); WalletCredentials createSolanaNewWalletCredentials( - {required String name, WalletInfo? walletInfo}); + {required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createSolanaRestoreWalletFromSeedCredentials( {required String name, required String mnemonic, required String password}); WalletCredentials createSolanaRestoreWalletFromPrivateKey( @@ -1302,8 +1302,8 @@ import 'package:cw_tron/tron_wallet_service.dart'; const tronContent = """ abstract class Tron { List getTronWordList(String language); - WalletService createTronWalletService(Box walletInfoSource); - WalletCredentials createTronNewWalletCredentials({required String name, WalletInfo? walletInfo}); + WalletService createTronWalletService(Box walletInfoSource, bool isDirect); + WalletCredentials createTronNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}); WalletCredentials createTronRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password}); WalletCredentials createTronRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password}); String getAddress(WalletBase wallet); From 0491ad9ee24175240556ad4bb63634b52d78f0b2 Mon Sep 17 00:00:00 2001 From: tuxsudo Date: Tue, 13 Aug 2024 07:15:47 -0400 Subject: [PATCH 36/77] Update support links (#1595) * Update support links list, add proper support for light/dark icons, update provider icons * Update trocador icon * Update variable * trial fix for android build --------- Co-authored-by: OmarHatem --- android/build.gradle | 4 +- assets/images/dfx_dark.png | Bin 3515 -> 10166 bytes assets/images/dfx_light.png | Bin 3502 -> 12024 bytes assets/images/moonpay.png | Bin 1392 -> 16575 bytes assets/images/moonpay_dark.png | Bin 23214 -> 14212 bytes assets/images/moonpay_light.png | Bin 20800 -> 13866 bytes assets/images/trocador.png | Bin 10417 -> 28127 bytes cw_haven/android/build.gradle | 4 +- cw_shared_external/android/build.gradle | 4 +- .../support_other_links_page.dart | 10 ++-- lib/view_model/settings/link_list_item.dart | 2 + lib/view_model/support_view_model.dart | 47 ++++++++++++------ 12 files changed, 47 insertions(+), 24 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index aa9f5005d..7ddb75179 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.8.21' repositories { google() - jcenter() + mavenCentral() } dependencies { @@ -15,7 +15,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/assets/images/dfx_dark.png b/assets/images/dfx_dark.png index cbba87372adad4c0c3f5d14dec996aacea01ee88..6ac112eae3be1f20e7195d60fd0bb8ef357e2d70 100644 GIT binary patch literal 10166 zcmX9^by$<_+aBHBjl`%S-5`xL2#9nyNW63iOu`{8J-S6Y6p$Jrn~V@fNQmS}0YT~b z=I{IC+4CGbuH%mLzV0i}BxA#;WW>zG004kYM_a=L0KkG`zGDgTF~8!9&4QR0k-xTO zAOJwZ_V2-}qWOl#{K*ugX%S@V=N1&|_@65vG&J}RQv!lQ3W55603y&0;0RT>b zj)tmPSkbTI@F<(-R}VjTCV2!5^hkvH5oso4FKkrl7srn4x!OpckG$qeZXg!qPp(GX zYpO`o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2TBRd)HN zPNhG2Gv$4R8XFs__Ul^Ow|`%>VKRqpyU$##Ju2=NtP!n$sSr2EeIWkreouU#zEITg z8|B1_Z$$o-DRRSO=7n#nPqyQysAyoHVanp4RaLs(uEK6zI1MK>C)8fUM`ZaQ`x#=e zSOxnGG-_f8wJV=~_NmC7GFjxkmoM`2^F=;CS=m{V2#?pqv74(>6xuYw7%z0yZ2RVQ zBn-v}oYp9SJ+7nyTzp&}z+uU6>j;21n;vB2?T*PSSFY5^fH3lzJb5zD(g{gK?E$l9 z&C+n6f4@jzX8 zHfX|x3DQGZ*8)#1EnK*ejvqg+VO2leDITWE?=0OPt+IXlc6n#x^=5PQn?`(slwb;1 zL16)H*|LS0Pq`MY&IK^sE?ABR2w;1j;Yff(81~5{ELijdJ5^$ctndLdz&wPa?}*`0 z79tN8rUaY8FP!!iw{G2%-Y5cgSb~5+WEqMe7;A->f<(cI8A3eAvjc(yH*YvYCwt;g zFOrA~_y+%0<>~B9e}8`jcyj*5xv8nCNu;HvA@B2QBeIOeWoIxfo$5 zB6uhc^guVXMuu!!v83i>cuqU6-r(O+IyyQ8{QYPatPM`!OO&7kdZ5cp#lMV=#ko!U zcer}9emld*ZqeDapL$?E@JgI8mop2KML|FC03TwlP>AyOUFDG292&6v-i+;8es6~F z#&F_`cLbN*^AF$vuf8_}o>24~9yAVtraTgz69LQXZW(`&!4-QF+%P))|Y^6 pQp9UReF@mWv-maR81a{Y{|Bm1`FlyA?co3b002ovPDHLkV1keosl5OI diff --git a/assets/images/dfx_light.png b/assets/images/dfx_light.png index e4836be3ebecc08d3d0dee8fe3af672c511c7c2f..a045d3e681c7f9648178a5a887652ba7de507105 100644 GIT binary patch literal 12024 zcmXYXcRbba`~T}8dxwsL;*iKX94nhnDp^_C+sT%d83)l(Ml#PaBb#LJEs`UfM2M`s z%@f(aFQ4D<565{p?sLEH>%Ok%HJ;CCUG4jH)G%rQ0O%e*K^}F5ee^xhK7KY{4uGGZpQw|&i?^N4GY3%*uczr- z3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N5Z}!?)>6;&1ZpV9s1U(Sjv;Ry%+B`=xXK3xAG0acZM?Ilu9d z*9nXsZv+6e1p86qv YGw80q^r|1g;*f#C)78&qol`;+0McLD?*IS* diff --git a/assets/images/moonpay_dark.png b/assets/images/moonpay_dark.png index 872e322e2a5f8ab6a639f5949dff97ffcd325e00..21de98eb4389c69e334e252a65652e2c79c06255 100644 GIT binary patch literal 14212 zcmaibc|6q7`|laUm|-xMYGkP)OCm!dYlAGwmOV>mNcKo5L{r8Rk`_ymMjKgbl%*2J z5S5Au6Ok4nq^w2io{zrY`}*Dcy06#$!;5pybDr~T=Q-!|evZ@jwiZGH>jeM+Lc1+@ zIRJpBAwO6Q>^X$LzZ3q#gC=O092k8 z{7vHnKu2=-E@P)-sHwpZQR00II>Qy^i_0S}guTWE0&*%3Zk);!;8{ae!QKXrs2e;N z1;SOR4#vOlQl@nSc+<{>?(Th2ux-{L_=;9*_;hi=_Qto%liLIV7~Wsj6I8hMY*&9n z!uvn-zgy?ObkuFvPiU~6m|ln-{A1*O_u&1vQDlMpP$Z*0##>U#?nl4$mAN<5akgKp zs?06rUZamp=gd{Us^?g!rL}{{TlW^d1M%QOBq`gkQ`?xPy^bJ*V!sSUjH4I^y7~~<` z;X4?;LnP?Ujd?5Lz*$6_jWr8#h9YVyzONbNXmvz`{W$Lnov^V5X$;)}In8}$SZ_x- zz958jy{bm*3^5G79eZF;5~6{>wf^U1KlhGX39qpEv3~AcU-;M?&rRf*T7R;yd>>5v}*Xpnus47ykuK{+5h$s;u^wriYU*oDY^D4U0?UU_I|0Y5%iRzA>90y=|x`-=Th$$pW|ZMO_7 zzmA{o7e#@exzW=$g$X~mGd-ufW3}^N-np)cnBJTF*Uay7N%++~L_MQDs7X~`@>fl} z3De~n=6Zxemp;;Kipp63($|o6{qn*-XlUxkestdZB$V`unIi zZ~$?aw@&js7$22r8ET^-{6(!$A%$BvbjM1tZTbQYcN) zL)BNahY)XNSjLvT5XpVWqb)LQWaGZ`RvI^I&Qbx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h@yu)VdjS0=w0+i$=F7}vGk_Du`8QcYyOdCCWoGw)`mDnVtas=*slq!sLp|4H9x z2EdKa>P`WTAMww*8nlBSUX|f61WfR7RFCoP2jf?oUP!fQ-G7s`D*lZZT;uZk^Q9aR zL}i_jw?xQ706*_bJIkuod&KdUv_j2Jo zcn_RJmc4lCeG~uAkG^*U7y*JPCg6Kqu3m&9XL1?gkH+nIjTEXZrE~$wj8OgCq^X%t z^x=sH##vxm2YAWwfGhTFlt)rx$*PtjPeVdgIlswk=d&lFM?l6M=`NG>f=T^woJd9d zqr~~0sgpY8slQ8?LeGshUKAmu4a$C;f96o~EmNzb-GO_xS7}a}V2+`$cN0ZDt#q!{dfn z-tmfx>|(LiJ~;pyoBk6B1hF~H_#r8@FjoG*5$^);o_HB~TE)YlhTw;8-kSl{OUTi9 hh8d_e1+nD=$V|w|6dO9B6L`NKGQpS`ywP{L|9?N3T;%`& diff --git a/assets/images/moonpay_light.png b/assets/images/moonpay_light.png index c76ae6e74ec7e578874528b4c670ca4829be5647..3d3de2e4f17670fec4f60e869ad7b8151e37e202 100644 GIT binary patch literal 13866 zcmb7rc|6oz^#2{h7#R$nGG%+Dv=Bqtk|?4DX=9XShA3-f%RXhIvb0zdp^X$VDzcl# z_B;|rmTZX!St3cw*6)1uJiqVv_51Jl$Gm*bUCurC+;h&o_kFI*=4Qr1E7q()2np@m zYj_wTJOld?2~gredZq_|1U&azc_Sn!j{R^b`8EX#ao&fGcca`!sSzM}Pwg_@g;4%g z!372%Lh6u20=3X6^2Z_7J!tn_j3Y(Sg$yTeVq zMe9@Z+B#h;#SrRKNY0h94h$LKwkucIE}cvFYpQE1otqe+`T2hM)!4{;MZquo5n`r_ z<;tWTi`#ipcgOrfxXBrb+6q(IH)is8UdNINh;v-s#=SW*N3(HfuH5OKn%ol>-1pzd z2Q-fEBjOQ#i^d4PJ?NHyU&$k}hC-W=gq`v31}j-qgc2X~=9*eo*8kl5G5K?equo&1 z3DBG8sr4t_OXi+uPnOQ51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Mm-Qe$@JfFtyoAYcceGGbD z#Ni`iK(J53d>wG6Bny^(gVLTl2BZ`FYzmZY{gASIQV)!e@ypk4>svKb0md_#1bhU$ z|EpG6sx!==vp?so$?6u?&-rCI8QWI1%OPVoNWCG!2FEVR^(Xmj*B*mHnvKwgfz{|t zJo)H;g3BRoHwh3K!L}mKgK!5}-h)80;FluK!~5~0wAYpEyeKWZw?)wpz^kFDxPmzc z7`R|K>PEzk5d?X+;me}vr=ar4+!nf8M@p-9ywL4>Yk@WttIe`-D%cH3Q3zG(7Dcti zX5y8AG&}e|=Y1W11{S2mD<{*B3@jdWom-m~Hjh8J*-Zl4B~>ZhY4;bSg!wYzO3IT8 zbc83RqDv3=oXDo`yFk#62JN+jV!tW?KQ;80?;ea`1 ztaWN~sDQ9g`#L2nvF{#mn2D>;usfW9!N^Z33Zq*Q4M3ScKs$4$z+ zI}sA%gm$4?+c()!.iconColor; + final isLightMode = Theme.of(context).extension()?.useDarkImage ?? false; + return Container( child: Center( child: ConstrainedBox( @@ -37,16 +41,16 @@ class SupportOtherLinksPage extends BasePage { if (item is RegularListItem) { return SettingsCellWithArrow(title: item.title, handler: item.handler); } - if (item is LinkListItem) { + bool hasLightIcon = false; + if (item.lightIcon != null) hasLightIcon = true; return SettingsLinkProviderCell( title: item.title, - icon: item.icon, + icon: isLightMode && hasLightIcon ? item.lightIcon : item.icon, iconColor: item.hasIconColor ? iconColor : null, link: item.link, linkTitle: item.linkTitle); } - return Container(); }), ), diff --git a/lib/view_model/settings/link_list_item.dart b/lib/view_model/settings/link_list_item.dart index 4ee4162a9..8d7607eb5 100644 --- a/lib/view_model/settings/link_list_item.dart +++ b/lib/view_model/settings/link_list_item.dart @@ -8,10 +8,12 @@ class LinkListItem extends SettingsListItem { required this.link, required this.linkTitle, this.icon, + this.lightIcon, this.hasIconColor = false}) : super(title); final String? icon; + final String? lightIcon; final String link; final String linkTitle; final bool hasIconColor; diff --git a/lib/view_model/support_view_model.dart b/lib/view_model/support_view_model.dart index ccef76154..2bb749b42 100644 --- a/lib/view_model/support_view_model.dart +++ b/lib/view_model/support_view_model.dart @@ -33,11 +33,6 @@ abstract class SupportViewModelBase with Store { icon: 'assets/images/Telegram.png', linkTitle: '@cakewallet_bot', link: 'https://t.me/cakewallet_bot'), - LinkListItem( - title: 'Twitter', - icon: 'assets/images/Twitter.png', - linkTitle: '@cakewallet', - link: 'https://twitter.com/cakewallet'), LinkListItem( title: 'ChangeNow', icon: 'assets/images/change_now.png', @@ -46,7 +41,7 @@ abstract class SupportViewModelBase with Store { LinkListItem( title: 'SideShift', icon: 'assets/images/sideshift.png', - linkTitle: S.current.help, + linkTitle: 'help.sideshift.ai', link: 'https://help.sideshift.ai/en/'), LinkListItem( title: 'SimpleSwap', @@ -58,19 +53,41 @@ abstract class SupportViewModelBase with Store { icon: 'assets/images/exolix.png', linkTitle: 'support@exolix.com', link: 'mailto:support@exolix.com'), - if (!isMoneroOnly) ... [ - LinkListItem( - title: 'Wyre', - icon: 'assets/images/wyre.png', - linkTitle: S.current.submit_request, - link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'), + LinkListItem( + title: 'Quantex', + icon: 'assets/images/quantex.png', + linkTitle: 'help.myquantex.com', + link: 'mailto:support@exolix.com'), + LinkListItem( + title: 'Trocador', + icon: 'assets/images/trocador.png', + linkTitle: 'mail@trocador.app', + link: 'mailto:mail@trocador.app'), + LinkListItem( + title: 'Onramper', + icon: 'assets/images/onramper_dark.png', + lightIcon: 'assets/images/onramper_light.png', + linkTitle: 'View exchanges', + link: 'https://guides.cakewallet.com/docs/service-support/buy/#onramper'), + LinkListItem( + title: 'DFX', + icon: 'assets/images/dfx_dark.png', + lightIcon: 'assets/images/dfx_light.png', + linkTitle: 'support@dfx.swiss', + link: 'mailto:support@dfx.swiss'), + if (!isMoneroOnly) ... [ LinkListItem( title: 'MoonPay', icon: 'assets/images/moonpay.png', - hasIconColor: true, linkTitle: S.current.submit_request, - link: 'https://support.moonpay.com/hc/en-gb/requests/new') - ] + link: 'https://support.moonpay.com/hc/en-gb/requests/new'), + LinkListItem( + title: 'Robinhood Connect', + icon: 'assets/images/robinhood_dark.png', + lightIcon: 'assets/images/robinhood_light.png', + linkTitle: S.current.submit_request, + link: 'https://robinhood.com/contact') + ] //LinkListItem( // title: 'Yat', // icon: 'assets/images/yat_mini_logo.png', From 29492998216ec65a5b986a8ca168c97a2b68f727 Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 13 Aug 2024 14:15:31 +0200 Subject: [PATCH 37/77] unstoppable domains fix (#1600) --- android/app/build.gradle | 1 - .../cakewallet/cake_wallet/MainActivity.java | 29 ------------------- .../com/cakewallet/haven/MainActivity.java | 29 ------------------- .../java/com/monero/app/MainActivity.java | 29 ------------------- ios/Podfile | 1 - ios/Runner/AppDelegate.swift | 23 +-------------- lib/entities/unstoppable_domain_address.dart | 27 +++++++++-------- 7 files changed, 16 insertions(+), 123 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 60defb1fd..2f5427531 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,5 +91,4 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - implementation 'com.unstoppabledomains:resolution:5.0.0' } diff --git a/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java b/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java index 29b37c46c..df3f6be01 100644 --- a/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java +++ b/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java @@ -20,14 +20,10 @@ import android.net.Uri; import android.os.PowerManager; import android.provider.Settings; -import com.unstoppabledomains.resolution.DomainResolution; -import com.unstoppabledomains.resolution.Resolution; - import java.security.SecureRandom; public class MainActivity extends FlutterFragmentActivity { final String UTILS_CHANNEL = "com.cake_wallet/native_utils"; - final int UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK = 24; boolean isAppSecure = false; @Override @@ -53,14 +49,6 @@ public class MainActivity extends FlutterFragmentActivity { random.nextBytes(bytes); handler.post(() -> result.success(bytes)); break; - case "getUnstoppableDomainAddress": - int version = Build.VERSION.SDK_INT; - if (version >= UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK) { - getUnstoppableDomainAddress(call, result); - } else { - handler.post(() -> result.success("")); - } - break; case "setIsAppSecure": isAppSecure = call.argument("isAppSecure"); if (isAppSecure) { @@ -85,23 +73,6 @@ public class MainActivity extends FlutterFragmentActivity { } } - private void getUnstoppableDomainAddress(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { - DomainResolution resolution = new Resolution(); - Handler handler = new Handler(Looper.getMainLooper()); - String domain = call.argument("domain"); - String ticker = call.argument("ticker"); - - AsyncTask.execute(() -> { - try { - String address = resolution.getAddress(domain, ticker); - handler.post(() -> result.success(address)); - } catch (Exception e) { - System.out.println("Expected Address, but got " + e.getMessage()); - handler.post(() -> result.success("")); - } - }); - } - private void disableBatteryOptimization() { String packageName = getPackageName(); PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); diff --git a/android/app/src/main/java/com/cakewallet/haven/MainActivity.java b/android/app/src/main/java/com/cakewallet/haven/MainActivity.java index d0a465d22..83a790683 100644 --- a/android/app/src/main/java/com/cakewallet/haven/MainActivity.java +++ b/android/app/src/main/java/com/cakewallet/haven/MainActivity.java @@ -19,14 +19,10 @@ import android.net.Uri; import android.os.PowerManager; import android.provider.Settings; -import com.unstoppabledomains.resolution.DomainResolution; -import com.unstoppabledomains.resolution.Resolution; - import java.security.SecureRandom; public class MainActivity extends FlutterFragmentActivity { final String UTILS_CHANNEL = "com.cake_wallet/native_utils"; - final int UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK = 24; @Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { @@ -51,14 +47,6 @@ public class MainActivity extends FlutterFragmentActivity { random.nextBytes(bytes); handler.post(() -> result.success(bytes)); break; - case "getUnstoppableDomainAddress": - int version = Build.VERSION.SDK_INT; - if (version >= UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK) { - getUnstoppableDomainAddress(call, result); - } else { - handler.post(() -> result.success("")); - } - break; case "disableBatteryOptimization": disableBatteryOptimization(); handler.post(() -> result.success(null)); @@ -75,23 +63,6 @@ public class MainActivity extends FlutterFragmentActivity { } } - private void getUnstoppableDomainAddress(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { - DomainResolution resolution = new Resolution(); - Handler handler = new Handler(Looper.getMainLooper()); - String domain = call.argument("domain"); - String ticker = call.argument("ticker"); - - AsyncTask.execute(() -> { - try { - String address = resolution.getAddress(domain, ticker); - handler.post(() -> result.success(address)); - } catch (Exception e) { - System.out.println("Expected Address, but got " + e.getMessage()); - handler.post(() -> result.success("")); - } - }); - } - private void disableBatteryOptimization() { String packageName = getPackageName(); PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); diff --git a/android/app/src/main/java/com/monero/app/MainActivity.java b/android/app/src/main/java/com/monero/app/MainActivity.java index 49c368ec7..e6306d27b 100644 --- a/android/app/src/main/java/com/monero/app/MainActivity.java +++ b/android/app/src/main/java/com/monero/app/MainActivity.java @@ -19,14 +19,10 @@ import android.net.Uri; import android.os.PowerManager; import android.provider.Settings; -import com.unstoppabledomains.resolution.DomainResolution; -import com.unstoppabledomains.resolution.Resolution; - import java.security.SecureRandom; public class MainActivity extends FlutterFragmentActivity { final String UTILS_CHANNEL = "com.cake_wallet/native_utils"; - final int UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK = 24; boolean isAppSecure = false; @Override @@ -52,14 +48,6 @@ public class MainActivity extends FlutterFragmentActivity { random.nextBytes(bytes); handler.post(() -> result.success(bytes)); break; - case "getUnstoppableDomainAddress": - int version = Build.VERSION.SDK_INT; - if (version >= UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK) { - getUnstoppableDomainAddress(call, result); - } else { - handler.post(() -> result.success("")); - } - break; case "setIsAppSecure": isAppSecure = call.argument("isAppSecure"); if (isAppSecure) { @@ -84,23 +72,6 @@ public class MainActivity extends FlutterFragmentActivity { } } - private void getUnstoppableDomainAddress(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { - DomainResolution resolution = new Resolution(); - Handler handler = new Handler(Looper.getMainLooper()); - String domain = call.argument("domain"); - String ticker = call.argument("ticker"); - - AsyncTask.execute(() -> { - try { - String address = resolution.getAddress(domain, ticker); - handler.post(() -> result.success(address)); - } catch (Exception e) { - System.out.println("Expected Address, but got " + e.getMessage()); - handler.post(() -> result.success("")); - } - }); - } - private void disableBatteryOptimization() { String packageName = getPackageName(); PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); diff --git a/ios/Podfile b/ios/Podfile index 51622ff10..f0a0721a6 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -36,7 +36,6 @@ target 'Runner' do # Cake Wallet (Legacy) pod 'CryptoSwift' - pod 'UnstoppableDomainsResolution', '~> 4.0.0' end post_install do |installer| diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index acdfa4346..0cc4eebe8 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,6 +1,5 @@ import UIKit import Flutter -import UnstoppableDomainsResolution import workmanager @UIApplicationMain @@ -87,27 +86,7 @@ import workmanager } result(secRandom(count: count)) - case "getUnstoppableDomainAddress": - guard let args = call.arguments as? Dictionary, - let domain = args["domain"], - let ticker = args["ticker"], - let resolution = self?.resolution else { - result(nil) - return - } - - resolution.addr(domain: domain, ticker: ticker) { addrResult in - var address : String = "" - - switch addrResult { - case .success(let returnValue): - address = returnValue - case .failure(let error): - print("Expected Address, but got \(error)") - } - - result(address) - } + case "setIsAppSecure": guard let args = call.arguments as? Dictionary, let isAppSecure = args["isAppSecure"] else { diff --git a/lib/entities/unstoppable_domain_address.dart b/lib/entities/unstoppable_domain_address.dart index c5ec71ab5..0f56517b8 100644 --- a/lib/entities/unstoppable_domain_address.dart +++ b/lib/entities/unstoppable_domain_address.dart @@ -1,5 +1,7 @@ -import 'package:cake_wallet/utils/device_info.dart'; +import 'dart:convert'; + import 'package:flutter/services.dart'; +import 'package:http/http.dart' as http; const channel = MethodChannel('com.cake_wallet/native_utils'); @@ -7,18 +9,19 @@ Future fetchUnstoppableDomainAddress(String domain, String ticker) async var address = ''; try { - if (DeviceInfo.instance.isMobile) { - address = await channel.invokeMethod( - 'getUnstoppableDomainAddress', - { - 'domain' : domain, - 'ticker' : ticker - } - ) ?? ''; - } else { - // TODO: Integrate with Unstoppable domains resolution API - return address; + final uri = Uri.parse("https://api.unstoppabledomains.com/profile/public/${Uri.encodeQueryComponent(domain)}?fields=records"); + final jsonString = await http.read(uri); + final jsonParsed = json.decode(jsonString) as Map; + if (jsonParsed["records"] == null) { + throw Exception(".records response from $uri is empty"); + }; + final records = jsonParsed["records"] as Map; + final key = "crypto.${ticker.toUpperCase()}.address"; + if (records[key] == null) { + throw Exception(".records.${key} response from $uri is empty"); } + + return records[key] as String? ?? ''; } catch (e) { print('Unstoppable domain error: ${e.toString()}'); address = ''; From 4b69277858a75ea3beafb268eb9f4c60cef9f070 Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 13 Aug 2024 15:47:37 +0200 Subject: [PATCH 38/77] add mutex around _confirmForm to prevent the wallets from breaking (#1602) * add mutex around _confirmForm to prevent the wallets from breaking * add async * drop mutex for a boolean * don't make the variable global --- .../screens/new_wallet/new_wallet_page.dart | 49 +++--- .../screens/restore/wallet_restore_page.dart | 139 ++++++++++-------- 2 files changed, 106 insertions(+), 82 deletions(-) diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index b66aab4cf..cd5a7ce8d 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -25,6 +25,7 @@ import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/entities/seed_type.dart'; + class NewWalletPage extends BasePage { NewWalletPage(this._walletNewVM, this._seedTypeViewModel); @@ -74,6 +75,7 @@ class _WalletNameFormState extends State { _walletNewVM.hasWalletPassword ? TextEditingController() : null; static const aspectRatioImage = 1.22; + static bool formProcessing = false; final GlobalKey _formKey; final GlobalKey _languageSelectorKey; @@ -347,26 +349,35 @@ class _WalletNameFormState extends State { ); } - void _confirmForm() { - if (_formKey.currentState != null && !_formKey.currentState!.validate()) { - return; - } - if (_walletNewVM.nameExists(_walletNewVM.name)) { - showPopUp( - context: context, - builder: (_) { - return AlertWithOneAction( - alertTitle: '', - alertContent: S.of(context).wallet_name_exists, - buttonText: S.of(context).ok, - buttonAction: () => Navigator.of(context).pop()); - }); - } else { - _walletNewVM.create( - options: _walletNewVM.hasLanguageSelector - ? [_languageSelectorKey.currentState!.selected, isPolyseed] - : null); + void _confirmForm() async { + if (formProcessing) return; + formProcessing = true; + try { + if (_formKey.currentState != null && !_formKey.currentState!.validate()) { + formProcessing = false; + return; + } + if (_walletNewVM.nameExists(_walletNewVM.name)) { + await showPopUp( + context: context, + builder: (_) { + return AlertWithOneAction( + alertTitle: '', + alertContent: S.of(context).wallet_name_exists, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop()); + }); + } else { + await _walletNewVM.create( + options: _walletNewVM.hasLanguageSelector + ? [_languageSelectorKey.currentState!.selected, isPolyseed] + : null); + } + } catch (e) { + formProcessing = false; + rethrow; } + formProcessing = false; } bool get isPolyseed => widget._seedTypeViewModel.moneroSeedType == SeedType.polyseed; diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index cd6383c0d..29bc29986 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -2,6 +2,7 @@ import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/screens/new_wallet/new_wallet_page.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_from_keys_form.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_from_seed_form.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; @@ -80,6 +81,8 @@ class WalletRestorePage extends BasePage { }); } + static bool formProcessing = false; + @override Widget middle(BuildContext context) => Observer( builder: (_) => Text( @@ -350,75 +353,85 @@ class WalletRestorePage extends BasePage { } Future _confirmForm(BuildContext context) async { - // Dismissing all visible keyboard to provide context for navigation - FocusManager.instance.primaryFocus?.unfocus(); + if (formProcessing) return; + formProcessing = true; + try { + // Dismissing all visible keyboard to provide context for navigation + FocusManager.instance.primaryFocus?.unfocus(); - late BuildContext? formContext; - late GlobalKey? formKey; - late String name; - if (walletRestoreViewModel.mode == WalletRestoreMode.seed) { - formContext = walletRestoreFromSeedFormKey.currentContext; - formKey = walletRestoreFromSeedFormKey.currentState!.formKey; - name = walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.value.text; - } else if (walletRestoreViewModel.mode == WalletRestoreMode.keys) { - formContext = walletRestoreFromKeysFormKey.currentContext; - formKey = walletRestoreFromKeysFormKey.currentState!.formKey; - name = walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.value.text; - } - - if (!formKey!.currentState!.validate()) { - return; - } - - if (walletRestoreViewModel.nameExists(name)) { - showNameExistsAlert(formContext!); - return; - } - - walletRestoreViewModel.state = IsExecutingState(); - - DerivationInfo? dInfo; - - // get info about the different derivations: - List derivations = - await walletRestoreViewModel.getDerivationInfo(_credentials()); - - int derivationsWithHistory = 0; - int derivationWithHistoryIndex = 0; - for (int i = 0; i < derivations.length; i++) { - if (derivations[i].transactionsCount > 0) { - derivationsWithHistory++; - derivationWithHistoryIndex = i; + late BuildContext? formContext; + late GlobalKey? formKey; + late String name; + if (walletRestoreViewModel.mode == WalletRestoreMode.seed) { + formContext = walletRestoreFromSeedFormKey.currentContext; + formKey = walletRestoreFromSeedFormKey.currentState!.formKey; + name = walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.value.text; + } else if (walletRestoreViewModel.mode == WalletRestoreMode.keys) { + formContext = walletRestoreFromKeysFormKey.currentContext; + formKey = walletRestoreFromKeysFormKey.currentState!.formKey; + name = walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.value.text; } - } - if (derivationsWithHistory > 1) { - dInfo = await Navigator.of(context).pushNamed( - Routes.restoreWalletChooseDerivation, - arguments: derivations, - ) as DerivationInfo?; - } else if (derivationsWithHistory == 1) { - dInfo = derivations[derivationWithHistoryIndex]; - } - - // get the default derivation for this wallet type: - if (dInfo == null) { - // we only return 1 derivation if we're pretty sure we know which one to use: - if (derivations.length == 1) { - dInfo = derivations.first; - } else { - // if we have multiple possible derivations, and none have histories - // we just default to the most common one: - dInfo = walletRestoreViewModel.getCommonRestoreDerivation(); + if (!formKey!.currentState!.validate()) { + formProcessing = false; + return; } - } - this.derivationInfo = dInfo; - if (this.derivationInfo == null) { - this.derivationInfo = walletRestoreViewModel.getDefaultDerivation(); - } + if (walletRestoreViewModel.nameExists(name)) { + showNameExistsAlert(formContext!); + formProcessing = false; + return; + } - walletRestoreViewModel.create(options: _credentials()); + walletRestoreViewModel.state = IsExecutingState(); + + DerivationInfo? dInfo; + + // get info about the different derivations: + List derivations = + await walletRestoreViewModel.getDerivationInfo(_credentials()); + + int derivationsWithHistory = 0; + int derivationWithHistoryIndex = 0; + for (int i = 0; i < derivations.length; i++) { + if (derivations[i].transactionsCount > 0) { + derivationsWithHistory++; + derivationWithHistoryIndex = i; + } + } + + if (derivationsWithHistory > 1) { + dInfo = await Navigator.of(context).pushNamed( + Routes.restoreWalletChooseDerivation, + arguments: derivations, + ) as DerivationInfo?; + } else if (derivationsWithHistory == 1) { + dInfo = derivations[derivationWithHistoryIndex]; + } + + // get the default derivation for this wallet type: + if (dInfo == null) { + // we only return 1 derivation if we're pretty sure we know which one to use: + if (derivations.length == 1) { + dInfo = derivations.first; + } else { + // if we have multiple possible derivations, and none have histories + // we just default to the most common one: + dInfo = walletRestoreViewModel.getCommonRestoreDerivation(); + } + } + + this.derivationInfo = dInfo; + if (this.derivationInfo == null) { + this.derivationInfo = walletRestoreViewModel.getDefaultDerivation(); + } + + await walletRestoreViewModel.create(options: _credentials()); + } catch (e) { + formProcessing = false; + rethrow; + } + formProcessing = false; } Future showNameExistsAlert(BuildContext context) { From 4e7e00b975816cffec2d23866c3b5d59fb8445b9 Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:25:18 +0100 Subject: [PATCH 39/77] Fix: Remove resolution scope from unstoppable domains plugin (#1604) --- ios/Runner/AppDelegate.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 0cc4eebe8..402f6556b 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -3,11 +3,7 @@ import Flutter import workmanager @UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - lazy var resolution : Resolution? = { - return try? Resolution() - }() - +@objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? From 525df820c3f6bccf7d2f1b419ae261d015bee37f Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 13 Aug 2024 22:51:25 +0300 Subject: [PATCH 40/77] Generic fixes (#1605) * minor fixes * fix not saving wallet password to secure storage * cache linux deps as well --- .github/workflows/cache_dependencies.yml | 5 ++++- cw_monero/lib/api/wallet_manager.dart | 3 --- lib/core/wallet_creation_service.dart | 13 ++++++------- lib/src/screens/new_wallet/new_wallet_page.dart | 12 ++++++------ lib/src/screens/restore/wallet_restore_page.dart | 15 +++++++-------- lib/view_model/wallet_creation_vm.dart | 2 -- 6 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index cca5bb4bf..72a74a8b2 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -60,7 +60,7 @@ jobs: path: | /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') }} + key: ${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh' ,'**/cache_dependencies.yml') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals @@ -68,3 +68,6 @@ jobs: cd /opt/android/cake_wallet/scripts/android/ source ./app_env.sh cakewallet ./build_monero_all.sh + cd ../linux/ + source ./app_env.sh cakewallet + ./build_monero_all.sh diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index 14bf92d16..ce4d41010 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -8,10 +8,7 @@ import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_restore_from_keys_exception.dart'; import 'package:cw_monero/api/exceptions/wallet_restore_from_seed_exception.dart'; import 'package:cw_monero/api/wallet.dart'; -import 'package:flutter/foundation.dart'; import 'package:cw_monero/api/transaction_history.dart'; -import 'package:cw_monero/api/wallet.dart'; -import 'package:flutter/foundation.dart'; import 'package:monero/monero.dart' as monero; class MoneroCException implements Exception { diff --git a/lib/core/wallet_creation_service.dart b/lib/core/wallet_creation_service.dart index 823aa7e84..1e9299282 100644 --- a/lib/core/wallet_creation_service.dart +++ b/lib/core/wallet_creation_service.dart @@ -1,4 +1,3 @@ -import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cw_core/wallet_info.dart'; @@ -57,9 +56,9 @@ class WalletCreationService { if (credentials.password == null) { credentials.password = generateWalletPassword(); - await keyService.saveWalletPassword( - password: credentials.password!, walletName: credentials.name); } + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); if (_hasSeedPhraseLengthOption) { credentials.seedPhraseLength = settingsStore.seedPhraseLength.value; @@ -99,9 +98,9 @@ class WalletCreationService { if (credentials.password == null) { credentials.password = generateWalletPassword(); - await keyService.saveWalletPassword( - password: credentials.password!, walletName: credentials.name); } + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); final wallet = await _service!.restoreFromKeys(credentials, isTestnet: isTestnet); @@ -118,9 +117,9 @@ class WalletCreationService { if (credentials.password == null) { credentials.password = generateWalletPassword(); - await keyService.saveWalletPassword( - password: credentials.password!, walletName: credentials.name); } + await keyService.saveWalletPassword( + password: credentials.password!, walletName: credentials.name); final wallet = await _service!.restoreFromSeed(credentials, isTestnet: isTestnet); diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index cd5a7ce8d..cb451c056 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -75,7 +75,7 @@ class _WalletNameFormState extends State { _walletNewVM.hasWalletPassword ? TextEditingController() : null; static const aspectRatioImage = 1.22; - static bool formProcessing = false; + bool _formProcessing = false; final GlobalKey _formKey; final GlobalKey _languageSelectorKey; @@ -350,11 +350,11 @@ class _WalletNameFormState extends State { } void _confirmForm() async { - if (formProcessing) return; - formProcessing = true; + if (_formProcessing) return; + _formProcessing = true; try { if (_formKey.currentState != null && !_formKey.currentState!.validate()) { - formProcessing = false; + _formProcessing = false; return; } if (_walletNewVM.nameExists(_walletNewVM.name)) { @@ -374,10 +374,10 @@ class _WalletNameFormState extends State { : null); } } catch (e) { - formProcessing = false; + _formProcessing = false; rethrow; } - formProcessing = false; + _formProcessing = false; } bool get isPolyseed => widget._seedTypeViewModel.moneroSeedType == SeedType.polyseed; diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index 29bc29986..c8fa3665e 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -2,7 +2,6 @@ import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/screens/new_wallet/new_wallet_page.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_from_keys_form.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_from_seed_form.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; @@ -81,7 +80,7 @@ class WalletRestorePage extends BasePage { }); } - static bool formProcessing = false; + bool _formProcessing = false; @override Widget middle(BuildContext context) => Observer( @@ -353,8 +352,8 @@ class WalletRestorePage extends BasePage { } Future _confirmForm(BuildContext context) async { - if (formProcessing) return; - formProcessing = true; + if (_formProcessing) return; + _formProcessing = true; try { // Dismissing all visible keyboard to provide context for navigation FocusManager.instance.primaryFocus?.unfocus(); @@ -373,13 +372,13 @@ class WalletRestorePage extends BasePage { } if (!formKey!.currentState!.validate()) { - formProcessing = false; + _formProcessing = false; return; } if (walletRestoreViewModel.nameExists(name)) { showNameExistsAlert(formContext!); - formProcessing = false; + _formProcessing = false; return; } @@ -428,10 +427,10 @@ class WalletRestorePage extends BasePage { await walletRestoreViewModel.create(options: _credentials()); } catch (e) { - formProcessing = false; + _formProcessing = false; rethrow; } - formProcessing = false; + _formProcessing = false; } Future showNameExistsAlert(BuildContext context) { diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index 43386494e..5a9a1d093 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -110,8 +110,6 @@ abstract class WalletCreationVMBase with Store { _appStore.authenticationStore.allowed(); state = ExecutedSuccessfullyState(); } catch (e, s) { - print("@@@@@@@@"); - print(s); state = FailureState(e.toString()); } } From b0ece46f29b3829482f42349c8688d74caa43b7d Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Tue, 13 Aug 2024 23:15:32 +0300 Subject: [PATCH 41/77] use the cached deps for both jobs [skip ci] --- .github/workflows/pr_test_build_android.yml | 2 +- .github/workflows/pr_test_build_linux.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index ea8770860..5dbf1610f 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -78,7 +78,7 @@ jobs: path: | /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') }} + key: ${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh' ,'**/cache_dependencies.yml') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index 12c930120..37253e96f 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -75,7 +75,7 @@ jobs: path: | /opt/android/cake_wallet/cw_haven/android/.cxx /opt/android/cake_wallet/scripts/monero_c/release - key: linux-${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh') }} + key: ${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh' ,'**/cache_dependencies.yml') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals From 390fdda0231d45d6aff44b5d837e19afc04d3068 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 14 Aug 2024 00:58:13 +0300 Subject: [PATCH 42/77] fix caching linux deps --- .github/workflows/cache_dependencies.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 72a74a8b2..f5fbf4826 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -37,7 +37,12 @@ jobs: channel: stable - name: Install package dependencies - run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang + run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python-is-python3 libtool libtinfo5 cmake clang + + - name: Install desktop dependencies + run: | + sudo apt update + sudo apt install -y ninja-build libgtk-3-dev gperf - name: Execute Build and Setup Commands run: | @@ -70,4 +75,5 @@ jobs: ./build_monero_all.sh cd ../linux/ source ./app_env.sh cakewallet + ./app_config.sh ./build_monero_all.sh From 20252cdea8b4c822ef643dd2e3cc2315b977aed1 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 14 Aug 2024 01:37:04 +0300 Subject: [PATCH 43/77] cache only android deps only have linux build as an artifact --- .github/workflows/cache_dependencies.yml | 11 +---------- .github/workflows/pr_test_build_linux.yml | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index f5fbf4826..902a44a42 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -37,12 +37,7 @@ jobs: channel: stable - name: Install package dependencies - run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python-is-python3 libtool libtinfo5 cmake clang - - - name: Install desktop dependencies - run: | - sudo apt update - sudo apt install -y ninja-build libgtk-3-dev gperf + run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang - name: Execute Build and Setup Commands run: | @@ -73,7 +68,3 @@ jobs: cd /opt/android/cake_wallet/scripts/android/ source ./app_env.sh cakewallet ./build_monero_all.sh - cd ../linux/ - source ./app_env.sh cakewallet - ./app_config.sh - ./build_monero_all.sh diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index 37253e96f..c1a3a3be4 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -174,13 +174,14 @@ jobs: with: path: /opt/android/cake_wallet/build/linux/x64/release/${{env.BRANCH_NAME}}.zip - - name: Send Test APK - continue-on-error: true - uses: adrey/slack-file-upload-action@1.0.5 - with: - token: ${{ secrets.SLACK_APP_TOKEN }} - path: /opt/android/cake_wallet/build/linux/x64/release/${{env.BRANCH_NAME}}.zip - channel: ${{ secrets.SLACK_APK_CHANNEL }} - title: "${{ env.BRANCH_NAME }}_linux.zip" - filename: ${{ env.BRANCH_NAME }}_linux.zip - initial_comment: ${{ github.event.head_commit.message }} +# Just as an artifact would be enough +# - name: Send Test APK +# continue-on-error: true +# uses: adrey/slack-file-upload-action@1.0.5 +# with: +# token: ${{ secrets.SLACK_APP_TOKEN }} +# path: /opt/android/cake_wallet/build/linux/x64/release/${{env.BRANCH_NAME}}.zip +# channel: ${{ secrets.SLACK_APK_CHANNEL }} +# title: "${{ env.BRANCH_NAME }}_linux.zip" +# filename: ${{ env.BRANCH_NAME }}_linux.zip +# initial_comment: ${{ github.event.head_commit.message }} From 183f9c191d292ed9fb5d6b1d1bcf6982e1424445 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Wed, 14 Aug 2024 17:49:56 +0300 Subject: [PATCH 44/77] Update pr_test_build_linux.yml --- .github/workflows/pr_test_build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index c1a3a3be4..7935dd177 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -75,7 +75,7 @@ jobs: path: | /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') }} + key: linux_${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh' ,'**/cache_dependencies.yml') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals From d96bab43c9fee91b464166f7747be3b864b7f5ff Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 14 Aug 2024 20:40:40 -0300 Subject: [PATCH 45/77] fix: p2sh addr (#1607) --- cw_bitcoin/lib/utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/utils.dart b/cw_bitcoin/lib/utils.dart index 29d7a9bf3..a7435bed1 100644 --- a/cw_bitcoin/lib/utils.dart +++ b/cw_bitcoin/lib/utils.dart @@ -23,7 +23,7 @@ String generateP2SHAddress({ required int index, }) => ECPublic.fromBip32(hd.childKey(Bip32KeyIndex(index)).publicKey) - .toP2wshInP2sh() + .toP2wpkhInP2sh() .toAddress(network); String generateP2WSHAddress({ From 4fa487fa275b9d1fc1343c7852d763b899dcb74b Mon Sep 17 00:00:00 2001 From: cyan Date: Thu, 15 Aug 2024 01:41:22 +0200 Subject: [PATCH 46/77] seed fixes (#1594) * seed fixes + jCenter removal * set seed language to English if none show error when requesting seed --------- Co-authored-by: Omar Hatem --- cw_monero/lib/api/wallet.dart | 5 ++++- cw_monero/lib/api/wallet_manager.dart | 11 ++++++++++- cw_wownero/lib/api/wallet.dart | 5 ++++- cw_wownero/lib/api/wallet_manager.dart | 11 ++++++++++- lib/view_model/dashboard/dashboard_view_model.dart | 13 ++++++++----- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 0f6e59c4e..973a38535 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -39,7 +39,7 @@ String getSeed() { if (polyseed != "") { return polyseed; } - final legacy = monero.Wallet_seed(wptr!, seedOffset: ''); + final legacy = getSeedLegacy("English"); return legacy; } @@ -49,6 +49,9 @@ String getSeedLegacy(String? language) { monero.Wallet_setSeedLanguage(wptr!, language: language ?? "English"); legacy = monero.Wallet_seed(wptr!, seedOffset: ''); } + if (monero.Wallet_status(wptr!) != 0) { + return monero.Wallet_errorString(wptr!); + } return legacy; } diff --git a/cw_monero/lib/api/wallet_manager.dart b/cw_monero/lib/api/wallet_manager.dart index ce4d41010..f06fe3e66 100644 --- a/cw_monero/lib/api/wallet_manager.dart +++ b/cw_monero/lib/api/wallet_manager.dart @@ -123,7 +123,16 @@ void restoreWalletFromKeysSync( int nettype = 0, int restoreHeight = 0}) { txhistory = null; - final newWptr = monero.WalletManager_createWalletFromKeys( + final newWptr = spendKey != "" + ? monero.WalletManager_createDeterministicWalletFromSpendKey( + wmPtr, + path: path, + password: password, + language: language, + spendKeyString: spendKey, + newWallet: true, // TODO(mrcyjanek): safe to remove + restoreHeight: restoreHeight) + : monero.WalletManager_createWalletFromKeys( wmPtr, path: path, password: password, diff --git a/cw_wownero/lib/api/wallet.dart b/cw_wownero/lib/api/wallet.dart index 96822dfe4..2ccd560ed 100644 --- a/cw_wownero/lib/api/wallet.dart +++ b/cw_wownero/lib/api/wallet.dart @@ -41,7 +41,7 @@ String getSeed() { if (polyseed != "") { return polyseed; } - final legacy = wownero.Wallet_seed(wptr!, seedOffset: ''); + final legacy = getSeedLegacy(null); return legacy; } @@ -51,6 +51,9 @@ String getSeedLegacy(String? language) { wownero.Wallet_setSeedLanguage(wptr!, language: language ?? "English"); legacy = wownero.Wallet_seed(wptr!, seedOffset: ''); } + if (wownero.Wallet_status(wptr!) != 0) { + return wownero.Wallet_errorString(wptr!); + } return legacy; } diff --git a/cw_wownero/lib/api/wallet_manager.dart b/cw_wownero/lib/api/wallet_manager.dart index 7915373bb..660433ba6 100644 --- a/cw_wownero/lib/api/wallet_manager.dart +++ b/cw_wownero/lib/api/wallet_manager.dart @@ -140,7 +140,16 @@ void restoreWalletFromKeysSync( int nettype = 0, int restoreHeight = 0}) { txhistory = null; - final newWptr = wownero.WalletManager_createWalletFromKeys( + final newWptr = spendKey != "" + ? wownero.WalletManager_createDeterministicWalletFromSpendKey( + wmPtr, + path: path, + password: password, + language: language, + spendKeyString: spendKey, + newWallet: true, // TODO(mrcyjanek): safe to remove + restoreHeight: restoreHeight) + : wownero.WalletManager_createWalletFromKeys( wmPtr, path: path, password: password, diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 1baea76cd..e98412dce 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -362,12 +362,15 @@ abstract class DashboardViewModelBase with Store { if (wallet.type != WalletType.monero) return []; final keys = monero!.getKeys(wallet); List errors = [ - if (keys['privateSpendKey'] == List.generate(64, (index) => "0").join("")) "Private spend key is 0", + // leaving these commented out for now, I'll be able to fix that properly in the airgap update + // to not cause work duplication, this will do the job as well, it will be slightly less precise + // about what happened - but still enough. + // if (keys['privateSpendKey'] == List.generate(64, (index) => "0").join("")) "Private spend key is 0", if (keys['privateViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0", - if (keys['publicSpendKey'] == List.generate(64, (index) => "0").join("")) "public spend key is 0", - if (keys['publicViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0", - if (wallet.seed == null) "wallet seed is null", - if (wallet.seed == "") "wallet seed is empty", + // if (keys['publicSpendKey'] == List.generate(64, (index) => "0").join("")) "public spend key is 0", + if (keys['publicViewKey'] == List.generate(64, (index) => "0").join("")) "public view key is 0", + // if (wallet.seed == null) "wallet seed is null", + // if (wallet.seed == "") "wallet seed is empty", if (monero!.getSubaddressList(wallet).getAll(wallet)[0].address == "41d7FXjswpK1111111111111111111111111111111111111111111111111111111111111111111111111111112KhNi4") "primary address is invalid, you won't be able to receive / spend funds", ]; From 40496fbfe73d56903213c40482a6ab6ee03a5022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Brunner?= Date: Thu, 15 Aug 2024 19:04:11 +0200 Subject: [PATCH 47/77] Major overhaul of the Tagalog localization (#1611) --- res/values/strings_tl.arb | 1058 ++++++++++++++++++------------------- 1 file changed, 529 insertions(+), 529 deletions(-) diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 3bbae2e50..22093f772 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -1,735 +1,735 @@ { - "about_cake_pay": "Pinapayagan ka ng cake Pay na madaling bumili ng mga kard ng regalo na may mga virtual na pag -aari, gastusin agad sa higit sa 150,000 mga mangangalakal sa Estados Unidos.", + "about_cake_pay": "Binibigyan-daan ka ng Cake Pay na madaling makabili ng mga gift card na may mga virtual na asset na magagastos kaagad sa mahigit na 150,000 merchant sa United States.", "account": "Account", "accounts": "Mga Account", - "accounts_subaddresses": "Mga Account at Subaddresses", - "activate": "Buhayin", + "accounts_subaddresses": "Mga account at mga subaddress", + "activate": "Aktibahin", "active": "Aktibo", - "active_cards": "Mga aktibong kard", + "active_cards": "Mga aktibong card", "activeConnectionsPrompt": "Lalabas dito ang mga aktibong koneksyon", - "add": "Idagdag", + "add": "Magdagdag", "add_contact": "Magdagdag ng contact", - "add_contact_to_address_book": "Nais mo bang idagdag ang contact na ito sa iyong address book?", - "add_custom_node": "Magdagdag ng bagong pasadyang node", - "add_custom_redemption": "Magdagdag ng pasadyang pagtubos", - "add_fund_to_card": "Magdagdag ng prepaid na pondo sa mga kard (hanggang sa ${value})", + "add_contact_to_address_book": "Gusto mo bang idagdag ang contact na ito sa iyong address book?", + "add_custom_node": "Magdagdag ng Bagong Custom Node", + "add_custom_redemption": "Magdagdag ng Custom Redemption", + "add_fund_to_card": "Magdagdag ng mga prepaid na pondo sa card (hanggang sa ${value})", "add_new_node": "Magdagdag ng bagong node", "add_new_word": "Magdagdag ng bagong salita", "add_receiver": "Magdagdag ng isa pang tatanggap (opsyonal)", "add_secret_code": "O, idagdag ang sikretong code na ito sa isang authenticator app", - "add_tip": "Magdagdag ng tip", - "add_token_disclaimer_check": "Kinumpirma ko ang address ng kontrata ng token at impormasyon gamit ang isang kagalang -galang na mapagkukunan. Ang pagdaragdag ng nakakahamak o hindi tamang impormasyon ay maaaring magresulta sa pagkawala ng mga pondo.", - "add_token_warning": "Huwag i -edit o magdagdag ng mga token tulad ng itinuro ng mga scammers.\nLaging kumpirmahin ang mga token address na may mga kagalang -galang na mapagkukunan!", + "add_tip": "Magdagdag ng Tip", + "add_token_disclaimer_check": "Kinumpirma ko ang address ng kontrata ng token at impormasyon gamit ang isang kagalang-galang na mapagkukunan. Ang pagdaragdag ng nakakahamak o hindi tamang impormasyon ay maaaring magresulta sa pagkawala ng mga pondo.", + "add_token_warning": "Huwag i-edit o magdagdag ng mga token tulad ng itinuro ng mga scammers.\nLaging kumpirmahin ang mga token address na may mga kagalang-galang na mapagkukunan!", "add_value": "Magdagdag ng halaga", "address": "Address", "address_book": "Address Book", - "address_book_menu": "Address Book", + "address_book_menu": "Address book", "address_detected": "Nakita ang address", - "address_from_domain": "Ang address na ito ay mula sa ${domain} sa mga hindi mapigilan na mga domain", - "address_from_yat": "Ang address na ito ay mula sa ${emoji} sa yat", - "address_label": "Address Label", + "address_from_domain": "Ang address na ito ay mula sa ${domain} mga Unstoppable Domains", + "address_from_yat": "Ang address na ito ay mula sa ${emoji} sa Yat", + "address_label": "Label ng address", "address_remove_contact": "Alisin ang contact", "address_remove_content": "Sigurado ka bang nais mong alisin ang napiling contact?", - "addresses": "Mga address", + "addresses": "Mga Address", "advanced_settings": "Mga Advanced na Setting", "aggressive": "Agresibo", - "agree": "Sumang -ayon", - "agree_and_continue": "Sumang -ayon at magpatuloy", - "agree_to": "Sa pamamagitan ng paglikha ng account sumasang -ayon ka sa", - "all": "Lahat", - "all_trades": "Lahat ng mga kalakal", + "agree": "Sumang-ayon", + "agree_and_continue": "Sumang-ayon & Magpatuloy", + "agree_to": "Sa pamamagitan ng paggawa ng account sumasang-ayon ka sa ", + "all": "LAHAT", + "all_trades": "Lahat ng mga trade", "all_transactions": "Lahat ng mga transaksyon", "alphabetical": "Alpabeto", "already_have_account": "Mayroon nang account?", "always": "Palagi", - "amount": "Halaga:", + "amount": "Halaga: ", "amount_is_below_minimum_limit": "Ang iyong balanse pagkatapos ng mga bayarin ay mas mababa kaysa sa minimum na halaga na kinakailangan para sa palitan (${min})", "amount_is_estimate": "Ang natanggap na halaga ay isang pagtatantya", "amount_is_guaranteed": "Ang natanggap na halaga ay garantisado", "and": "at", - "anonpay_description": "Bumuo ng ${type}. Ang tatanggap ay maaaring ${method} na may anumang suportadong cryptocurrency, at makakatanggap ka ng mga pondo sa pitaka na ito.", - "apk_update": "APK Update", + "anonpay_description": "Bumuo ng ${type}. Ang tatanggap ay maaaring ${method} na may anumang suportadong cryptocurrency, at makakatanggap ka ng mga pondo sa wallet na ito.", + "apk_update": "APK update", "approve": "Aprubahan", "arrive_in_this_address": "Ang ${currency} ${tag} ay darating sa address na ito", "ascending": "Umakyat", - "ask_each_time": "Magtanong sa bawat oras", - "auth_store_ban_timeout": "ban_timeout", - "auth_store_banned_for": "Pinagbawalan para sa", - "auth_store_banned_minutes": "minuto", - "auth_store_incorrect_password": "Maling pin", + "ask_each_time": "Magtanong sa tuwing", + "auth_store_ban_timeout": "ban timeout", + "auth_store_banned_for": "Pinagbawalan para sa ", + "auth_store_banned_minutes": " minuto", + "auth_store_incorrect_password": "Maling PIN", "authenticated": "Napatunayan", "authentication": "Pagpapatunay", "auto_generate_addresses": "Auto bumuo ng mga address", - "auto_generate_subaddresses": "Ang Auto ay bumubuo ng mga subaddresses", + "auto_generate_subaddresses": "Auto bumuo ng mga subaddress", "automatic": "Awtomatiko", - "available_balance": "Magagamit na balanse", + "available_balance": "Magagamit na Balanse", "available_balance_description": "Ang \"magagamit na balanse\" o \"nakumpirma na balanse\" ay mga pondo na maaaring gastusin kaagad. Kung lumilitaw ang mga pondo sa mas mababang balanse ngunit hindi ang nangungunang balanse, dapat kang maghintay ng ilang minuto para sa mga papasok na pondo upang makakuha ng mas maraming mga kumpirmasyon sa network. Matapos silang makakuha ng higit pang mga kumpirmasyon, gugugol sila.", "avg_savings": "Avg. Matitipid", "awaitDAppProcessing": "Pakihintay na matapos ang pagproseso ng dApp.", - "awaiting_payment_confirmation": "Naghihintay ng kumpirmasyon sa pagbabayad", - "background_sync_mode": "Mode ng pag -sync ng background", + "awaiting_payment_confirmation": "Nanghihintay ng Kumpirmasyon sa Pagbabayad", + "background_sync_mode": "Background sync mode", "backup": "Backup", - "backup_file": "Backup file", - "backup_password": "Backup password", - "balance": "Balansehin", + "backup_file": "Backup na file", + "backup_password": "Backup na password", + "balance": "Balanse", "balance_page": "Pahina ng Balanse", "bill_amount": "Halaga ng Bill", - "billing_address_info": "Kung tatanungin ang isang address ng pagsingil, ibigay ang iyong address sa pagpapadala", - "biometric_auth_reason": "I -scan ang iyong fingerprint upang mapatunayan", - "bitcoin_dark_theme": "Bitcoin Madilim na Tema", - "bitcoin_light_theme": "Tema ng ilaw ng bitcoin", - "bitcoin_payments_require_1_confirmation": "Ang mga pagbabayad sa Bitcoin ay nangangailangan ng 1 kumpirmasyon, na maaaring tumagal ng 20 minuto o mas mahaba. Salamat sa iyong pasensya! Mag -email ka kapag nakumpirma ang pagbabayad.", - "block_remaining": "1 bloke ang natitira", + "billing_address_info": "Kung humihingi ng billing address, ibigay ang iyong shipping address", + "biometric_auth_reason": "I-scan ang iyong fingerprint para ma-authenticate", + "bitcoin_dark_theme": "Bitcoin Dark Theme", + "bitcoin_light_theme": "Bitcoin Light Theme", + "bitcoin_payments_require_1_confirmation": "Ang mga pagbabayad sa Bitcoin ay nangangailangan ng 1 kumpirmasyon, na maaaring tumagal ng 20 minuto o mas mahaba. Salamat sa iyong pasensya! Mag-email ka kapag nakumpirma ang pagbabayad.", + "block_remaining": "1 Bloke ang Natitira", "Blocks_remaining": "Ang natitirang ${status} ay natitira", "bluetooth": "Bluetooth", - "bright_theme": "Maliwanag", - "bump_fee": "Bayad sa paga", - "buy": "Bilhin", + "bright_theme": "Bright", + "bump_fee": "Dagdagan ang fee", + "buy": "Bumili", "buy_alert_content": "Sa kasalukuyan ay sinusuportahan lamang namin ang pagbili ng Bitcoin, Ethereum, Litecoin, at Monero. Mangyaring lumikha o lumipat sa iyong Bitcoin, Ethereum, Litecoin, o Monero Wallet.", - "buy_bitcoin": "Bumili ng bitcoin", - "buy_now": "Bumili ka na ngayon", + "buy_bitcoin": "Bumili ng Bitcoin", + "buy_now": "Bumili Ngayon", "buy_provider_unavailable": "Kasalukuyang hindi available ang provider.", - "buy_with": "Bumili ka", - "by_cake_pay": "sa pamamagitan ng cake pay", - "cake_2fa_preset": "Cake 2fa preset", - "cake_dark_theme": "Cake madilim na tema", - "cake_pay_account_note": "Mag -sign up na may isang email address lamang upang makita at bumili ng mga kard. Ang ilan ay magagamit kahit sa isang diskwento!", - "cake_pay_learn_more": "Agad na bumili at tubusin ang mga kard ng regalo sa app!\nMag -swipe pakaliwa sa kanan upang matuto nang higit pa.", - "cake_pay_save_order": "Ang card ay dapat ipadala sa iyong e-mail sa loob ng 1 araw ng negosyo \n i-save ang iyong order ID:", + "buy_with": "Bumili ng", + "by_cake_pay": "by Cake Pay", + "cake_2fa_preset": "Cake 2FA Preset", + "cake_dark_theme": "Cake Dark Theme", + "cake_pay_account_note": "Mag-sign up na may isang email address lamang upang makita at bumili ng mga kard. Ang ilan ay magagamit kahit sa isang diskwento!", + "cake_pay_learn_more": "Agad na bumili at tubusin ang mga kard ng regalo sa app!\nMag-swipe pakaliwa sa kanan upang matuto nang higit pa.", + "cake_pay_save_order": "Ang card ay dapat ipadala sa iyong email sa loob ng 1 araw ng negosyo \n I-save ang iyong order ID:", "cake_pay_subtitle": "Bumili ng mga pandaigdigang prepaid card at gift card", "cake_pay_web_cards_subtitle": "Bumili ng mga pandaigdigang prepaid card at gift card", - "cake_pay_web_cards_title": "Cake pay web card", - "cake_wallet": "Cake wallet", - "cakepay_prepaid_card": "Cakepay prepaid debit card", + "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_wallet": "Cake Wallet", + "cakepay_prepaid_card": "CakePay Prepaid Debit Card", "camera_consent": "Gagamitin ang iyong camera upang kumuha ng larawan para sa mga layunin ng pagkakakilanlan sa pamamagitan ng ${provider}. Pakisuri ang kanilang Patakaran sa Privacy para sa mga detalye.", "camera_permission_is_required": "Kinakailangan ang pahintulot sa camera.\nMangyaring paganahin ito mula sa mga setting ng app.", "cancel": "Kanselahin", "card_address": "Address:", "cardholder_agreement": "Kasunduan sa Cardholder", "cards": "Mga Card", - "chains": "Mga tanikala", - "change": "Palitan", - "change_backup_password_alert": "Ang iyong mga nakaraang backup file ay hindi magagamit upang mai -import gamit ang bagong backup password. Ang bagong backup na password ay gagamitin lamang para sa mga bagong backup file. Sigurado ka bang nais mong baguhin ang backup password?", + "chains": "Mga Chain", + "change": "Sukli", + "change_backup_password_alert": "Ang iyong mga nakaraang backup na file ay hindi magagamit upang i-import gamit ang bagong backup na password. Ang bagong backup na password ay gagamitin lamang para sa mga bagong backup na file. Sigurado ka bang gusto mong baguhin ang backup na password?", "change_currency": "Baguhin ang pera", "change_current_node": "Sigurado ka bang baguhin ang kasalukuyang node sa ${node}?", "change_current_node_title": "Baguhin ang kasalukuyang node", - "change_exchange_provider": "Baguhin ang tagapagbigay ng palitan", + "change_exchange_provider": "Baguhin ang exchange provider", "change_language": "Baguhin ang wika", "change_language_to": "Baguhin ang wika sa ${language}?", - "change_password": "Palitan ANG password", - "change_rep": "Baguhin ang kinatawan", - "change_rep_message": "Sigurado ka bang nais mong baguhin ang mga kinatawan?", - "change_rep_successful": "Matagumpay na nagbago ng kinatawan", - "change_wallet_alert_content": "Nais mo bang baguhin ang kasalukuyang pitaka sa ${wallet_name}?", - "change_wallet_alert_title": "Baguhin ang kasalukuyang pitaka", + "change_password": "Baguhin ang password", + "change_rep": "Baguhin ang Representative", + "change_rep_message": "Sigurado ka bang nais mong baguhin ang mga representative?", + "change_rep_successful": "Matagumpay na nagbago ng representative", + "change_wallet_alert_content": "Gusto mo bang palitan ang kasalukuyang wallet sa ${wallet_name}?", + "change_wallet_alert_title": "Baguhin ang kasalukuyang wallet", "choose_account": "Pumili ng account", "choose_address": "Mangyaring piliin ang address:", "choose_card_value": "Pumili ng isang halaga ng card", - "choose_derivation": "Piliin ang derivation ng Wallet", + "choose_derivation": "Piliin ang Derivation ng Wallet", "choose_from_available_options": "Pumili mula sa magagamit na mga pagpipilian:", "choose_one": "Pumili ng isa", "choose_relay": "Mangyaring pumili ng relay na gagamitin", - "choose_wallet_currency": "Mangyaring piliin ang Pera ng Wallet:", - "clear": "Malinaw", + "choose_wallet_currency": "Mangyaring piliin ang pera ng wallet:", + "clear": "Burahin", "clearnet_link": "Link ng Clearnet", - "close": "Malapit", - "coin_control": "Control ng barya (opsyonal)", - "cold_or_recover_wallet": "Magdagdag ng isang malamig na pitaka o mabawi ang isang wallet ng papel", - "color_theme": "Tema ng kulay", - "commit_transaction_amount_fee": "Gumawa ng transaksyon\nHalaga: ${amount}\nBayad: ${fee}", + "close": "Isara", + "coin_control": "Coin control (opsyonal)", + "cold_or_recover_wallet": "Magdagdag ng isang cold wallet o mabawi ang isang paper wallet", + "color_theme": "Color theme", + "commit_transaction_amount_fee": "Gumawa ng transaksyon\nHalaga: ${amount}\nFee: ${fee}", "confirm": "Kumpirmahin", - "confirm_delete_template": "Ang pagkilos na ito ay tatanggalin ang template na ito. Nais mo bang magpatuloy?", - "confirm_delete_wallet": "Ang pagkilos na ito ay tatanggalin ang pitaka na ito. Nais mo bang magpatuloy?", - "confirm_fee_deduction": "Kumpirmahin ang pagbabawas ng bayad", - "confirm_fee_deduction_content": "Sumasang -ayon ka bang bawasan ang bayad mula sa output?", + "confirm_delete_template": "Tatanggalin ng pagkilos na ito ang template na ito. Gusto mo bang magpatuloy?", + "confirm_delete_wallet": "Tatanggalin ng pagkilos na ito ang wallet na ito. Gusto mo bang magpatuloy?", + "confirm_fee_deduction": "Kumpirmahin ang pagbabawas ng fee", + "confirm_fee_deduction_content": "Sumasang-ayon ka bang bawasan ang fee mula sa output?", "confirm_sending": "Kumpirmahin ang pagpapadala", - "confirm_silent_payments_switch_node": "Ang iyong kasalukuyang node ay hindi sumusuporta sa tahimik na pagbabayad \\ ncake wallet ay lilipat sa isang katugmang node, para lamang sa pag -scan", + "confirm_silent_payments_switch_node": "Ang iyong kasalukuyang node ay hindi sumusuporta sa tahimik na pagbabayad \\ nCake Wallet ay lilipat sa isang katugmang node, para lamang sa pag-scan", "confirmations": "Mga kumpirmasyon", - "confirmed": "Nakumpirma na balanse", + "confirmed": "Nakumpirma na Balanse", "confirmed_tx": "Nakumpirma", - "congratulations": "Binabati kita!", - "connect_an_existing_yat": "Ikonekta ang isang umiiral na yat", - "connect_yats": "Ikonekta ang mga yats", - "connect_your_hardware_wallet": "Ikonekta ang iyong wallet ng hardware gamit ang Bluetooth o USB", - "connect_your_hardware_wallet_ios": "Ikonekta ang iyong wallet ng hardware gamit ang Bluetooth", - "connection_sync": "Koneksyon at pag -sync", + "congratulations": "Congratulations!", + "connect_an_existing_yat": "Ikonekta ang isang umiiral na Yat", + "connect_yats": "Ikonekta sa Yats", + "connect_your_hardware_wallet": "Ikonekta ang iyong hardware wallet gamit ang Bluetooth o USB", + "connect_your_hardware_wallet_ios": "Ikonekta ang iyong wallet gamit ang Bluetooth", + "connection_sync": "Koneksyon at pag-sync", "connectWalletPrompt": "Ikonekta ang iyong wallet sa WalletConnect upang gumawa ng mga transaksyon", - "contact": "Makipag -ugnay", - "contact_list_contacts": "Mga contact", - "contact_list_wallets": "Ang mga wallets ko", - "contact_name": "pangalan ng contact", - "contact_support": "Makipag -ugnay sa suporta", + "contact": "Contact", + "contact_list_contacts": "Mga Contact", + "contact_list_wallets": "Mga Wallet Ko", + "contact_name": "Pangalan ng Contact", + "contact_support": "Makipag-ugnay sa Suporta", "continue_text": "Magpatuloy", "contractName": "Pangalan ng Kontrata", "contractSymbol": "Simbolo ng Kontrata", - "copied_key_to_clipboard": "Kinopya ang ${key} sa clipboard", - "copied_to_clipboard": "Kinopya sa clipboard", - "copy": "Kopya", - "copy_address": "Kopyahin ang address", - "copy_id": "Kopyahin ang id", + "copied_key_to_clipboard": "Kinopya ang ${key} sa Clipboard", + "copied_to_clipboard": "Kinopya sa Clipboard", + "copy": "Kopyahin", + "copy_address": "Kopyahin ang Address", + "copy_id": "Kopyahin ang ID", "copyWalletConnectLink": "Kopyahin ang link ng WalletConnect mula sa dApp at i-paste dito", "countries": "Mga bansa", - "create_account": "Lumikha ng account", - "create_backup": "Gumawa ng backup", + "create_account": "Lumikha ng Account", + "create_backup": "Lumikha ng backup", "create_donation_link": "Lumikha ng link ng donasyon", "create_invoice": "Lumikha ng invoice", - "create_new": "Lumikha ng bagong pitaka", - "create_new_account": "Lumikha ng Bagong Account", - "creating_new_wallet": "Lumilikha ng bagong pitaka", + "create_new": "Lumikha ng Bagong Wallet", + "create_new_account": "Lumikha ng bagong account", + "creating_new_wallet": "Lumikha ng bagong wallet", "creating_new_wallet_error": "Error: ${description}", "creation_date": "Petsa ng paglikha", - "custom": "pasadya", - "custom_drag": "Pasadyang (hawakan at i -drag)", - "custom_redeem_amount": "Pasadyang tinubos ang halaga", - "custom_value": "Pasadyang halaga", - "dark_theme": "Madilim", - "debit_card": "Debit card", - "debit_card_terms": "Ang pag -iimbak at paggamit ng numero ng iyong card ng pagbabayad (at mga kredensyal na naaayon sa iyong numero ng card ng pagbabayad) sa digital na pitaka na ito ay napapailalim sa mga termino at kundisyon ng naaangkop na kasunduan sa cardholder kasama ang nagbigay ng card ng pagbabayad, tulad ng sa oras -oras.", + "custom": "Pasadya", + "custom_drag": "Pasadya (Hawakan at I-drag)", + "custom_redeem_amount": "Pasadyang Tinubos ang Halaga", + "custom_value": "Pasadyang Halaga", + "dark_theme": "Dark", + "debit_card": "Debit Card", + "debit_card_terms": "Ang pag-iimbak at paggamit ng iyong numero sa card (at mga kredensyal na nauugnay sa numero ng iyong card sa pagbabayad) sa pagbabayad sa digital wallet na ito ay napapailalim sa mga tuntunin at kundisyon ng naaangkop na kasunduan sa may-ari ng card kasama ang nagbigay ng card ng pagbabayad, na may bisa sa pana-panahon.", "decimal_places_error": "Masyadong maraming mga lugar na desimal", - "decimals_cannot_be_zero": "Ang Token Decimal ay hindi maaaring maging zero.", - "default_buy_provider": "Default na Provider ng Pagbili", + "decimals_cannot_be_zero": "Ang token decimal ay hindi maaaring maging zero.", + "default_buy_provider": "Default na Buy Provider", "default_sell_provider": "Default na Sell Provider", "delete": "Tanggalin", - "delete_account": "Tanggalin ang account", - "delete_wallet": "Tanggalin ang pitaka", - "delete_wallet_confirm_message": "Sigurado ka bang nais mong tanggalin ang ${wallet_name} wallet?", + "delete_account": "Tanggalin ang Account", + "delete_wallet": "Tanggalin ang wallet", + "delete_wallet_confirm_message": "Sigurado ka ba na gusto mong tanggalin ang iyong ${wallet_name} wallet?", "deleteConnectionConfirmationPrompt": "Sigurado ka bang gusto mong tanggalin ang koneksyon sa", - "denominations": "Denominasyon", + "denominations": "Mga Denominasyon", "descending": "Pababang", "description": "Paglalarawan", "destination_tag": "Tag ng patutunguhan:", - "dfx_option_description": "Bumili ng crypto kasama ang EUR & CHF. Para sa mga customer at corporate customer sa Europa", + "dfx_option_description": "Bumili ng crypto kasama ang EUR & CHF. Para sa mga retail customer at corporate customer sa Europe", "didnt_get_code": "Hindi nakuha ang code?", - "digit_pin": "-digit pin", - "digital_and_physical_card": "Digital at Physical Prepaid Debit Card", + "digit_pin": "-digit PIN", + "digital_and_physical_card": " digital at pisikal na prepaid debit card", "disable": "Huwag paganahin", - "disable_bulletin": "Huwag paganahin ang Bulletin ng Katayuan ng Serbisyo", + "disable_bulletin": "Huwag paganahin ang bulletin ng katayuan ng serbisyo", "disable_buy": "Huwag paganahin ang pagkilos ng pagbili", - "disable_cake_2fa": "Huwag paganahin ang cake 2FA", + "disable_cake_2fa": "Huwag paganahin ang Cake 2FA", "disable_exchange": "Huwag paganahin ang palitan", - "disable_fiat": "Huwag paganahin ang Fiat", + "disable_fiat": "Huwag paganahin ang fiat", "disable_sell": "Huwag paganahin ang pagkilos ng pagbebenta", - "disableBatteryOptimization": "Huwag paganahin ang pag -optimize ng baterya", - "disableBatteryOptimizationDescription": "Nais mo bang huwag paganahin ang pag -optimize ng baterya upang gawing mas malaya at maayos ang pag -sync ng background?", + "disableBatteryOptimization": "Huwag Paganahin ang Pag-optimize ng Baterya", + "disableBatteryOptimizationDescription": "Nais mo bang huwag paganahin ang pag-optimize ng baterya upang gawing mas malaya at maayos ang background sync?", "disabled": "Hindi pinagana", "discount": "Makatipid ng ${value}%", "display_settings": "Mga setting ng pagpapakita", "displayable": "Maipapakita", - "do_not_have_enough_gas_asset": "Wala kang sapat na ${currency} para gumawa ng transaksyon sa kasalukuyang kundisyon ng network ng blockchain. Kailangan mo ng higit pang ${currency} upang magbayad ng mga bayarin sa network ng blockchain, kahit na nagpapadala ka ng ibang asset.", - "do_not_send": "Huwag magpadala", - "do_not_share_warning_text": "Huwag ibahagi ang mga ito sa sinumang iba pa, kabilang ang suporta.\n\nAng iyong mga pondo ay maaari at ninakaw!", + "do_not_have_enough_gas_asset": "Wala kang sapat na ${currency} para gumawa ng transaksyon sa kasalukuyang kundisyon ng network ng blockchain. Kailangan mo ng higit pang ${currency} upang magbayad ng mga fee sa network ng blockchain, kahit na nagpapadala ka ng ibang asset.", + "do_not_send": "Huwag ipadala", + "do_not_share_warning_text": "Huwag ibahagi ang mga ito sa sinuman kasama ang tagatustos.\n\nMaaaring manakaw ang iyong mga pondo!", "do_not_show_me": "Huwag mo itong ipakita muli", "domain_looks_up": "Mga paghahanap ng domain", - "donation_link_details": "Mga Detalye ng Link ng Donasyon", - "e_sign_consent": "E-sign na pahintulot", - "edit": "I -edit", - "edit_backup_password": "I -edit ang backup password", - "edit_node": "I -edit ang node", - "edit_token": "I -edit ang token", - "electrum_address_disclaimer": "Bumubuo kami ng mga bagong address sa tuwing gumagamit ka ng isa, ngunit ang mga nakaraang address ay patuloy na gumagana", - "email_address": "Email address", - "enable_replace_by_fee": "Paganahin ang palitan-by-fee", - "enable_silent_payments_scanning": "Paganahin ang pag -scan ng tahimik na pagbabayad", + "donation_link_details": "Mga detalye ng link ng donasyon", + "e_sign_consent": "E-Sign Consent", + "edit": "I-edit", + "edit_backup_password": "I-edit ang backup na password", + "edit_node": "I-edit ang Node", + "edit_token": "I-edit ang token", + "electrum_address_disclaimer": "Bumubuo kami ng mga bagong address sa tuwing gagamit ka ng isa, ngunit ang mga nakaraang address ay patuloy na gumagana", + "email_address": "Email Address", + "enable_replace_by_fee": "Paganahin ang Replace-By-Fee", + "enable_silent_payments_scanning": "Paganahin ang pag-scan ng mga tahimik na pagbabayad", "enabled": "Pinagana", "enter_amount": "Ipasok ang halaga", - "enter_backup_password": "Ipasok ang backup password dito", + "enter_backup_password": "Ipasok ang backup na password dito", "enter_code": "Ipasok ang code", - "enter_seed_phrase": "Ipasok ang iyong pariralang binhi", - "enter_totp_code": "Mangyaring ipasok ang TOTP code.", - "enter_wallet_password": "Ipasok ang password ng pitaka", + "enter_seed_phrase": "Ipasok ang iyong seed phrase", + "enter_totp_code": "Ipasok ang TOTP code", + "enter_wallet_password": "Ipasok ang password ng wallet", "enter_your_note": "Ipasok ang iyong tala ...", - "enter_your_pin": "Ipasok ang iyong pin", - "enter_your_pin_again": "Ipasok muli ang iyong pin", - "enterTokenID": "Ilagay ang token ID", - "enterWalletConnectURI": "Ilagay ang WalletConnect URI", + "enter_your_pin": "Ipasok ang iyong PIN", + "enter_your_pin_again": "Ipasok muli ang iyong PIN", + "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 ulat ng pag -crash sa aming koponan ng suporta upang maging mas mahusay ang application.", + "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_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", - "error_text_contact_name": "Ang pangalan ng contact ay hindi maaaring maglaman ng mga simbolo ng ',' \"\nat dapat sa pagitan ng 1 at 32 character ang haba", - "error_text_crypto_currency": "Ang bilang ng mga numero ng fraction\ndapat mas mababa o katumbas ng 12", - "error_text_fiat": "Ang halaga ng halaga ay hindi maaaring lumampas sa magagamit na balanse.\nAng bilang ng mga numero ng fraction ay dapat na mas mababa o katumbas ng 2", + "error_text_contact_name": "Ang pangalan ng contact ay hindi maaaring maglaman ng ` , ' \" mga symbolo\nat dapat nasa pagitan ng 1 at 32 character ang haba", + "error_text_crypto_currency": "Ang bilang ng mga fraction digit\nay dapat mas mababa o katumbas ng 12", + "error_text_fiat": "Ang halaga ay hindi maaaring lumampas sa magagamit na balanse.\nang bilang ng mga fraction digit ay dapat na mas kaunti o katumbas ng 2", "error_text_input_above_maximum_limit": "Ang halaga ay higit pa sa maximum", "error_text_input_below_minimum_limit": "Ang halaga ay mas mababa sa minimum", - "error_text_keys": "Ang mga susi ng wallet ay maaari lamang maglaman ng 64 chars sa hex", - "error_text_limits_loading_failed": "Ang kalakalan para sa ${provider} ay hindi nilikha. Nabigo ang mga limitasyon sa paglo -load", - "error_text_maximum_limit": "Ang kalakalan para sa ${provider} ay hindi nilikha. Ang halaga ay higit na maximum: ${max} ${currency}", - "error_text_minimal_limit": "Ang kalakalan para sa ${provider} ay hindi nilikha. Ang halaga ay mas mababa pagkatapos ng minimal: ${min} ${currency}", - "error_text_node_address": "Mangyaring magpasok ng isang address ng IPv4", - "error_text_node_port": "Ang Node Port ay maaari lamang maglaman ng mga numero sa pagitan ng 0 at 65535", - "error_text_node_proxy_address": "Mangyaring ipasok ang : , halimbawa 127.0.0.1:9050", - "error_text_payment_id": "Ang Payment ID ay maaari lamang maglaman mula 16 hanggang 64 chars sa hex", + "error_text_keys": "Ang mga wallet key ay maaari lamang maglaman ng 64 chars sa hex", + "error_text_limits_loading_failed": "Ang kalakalan para sa ${provider} hindi nilikha . Nabigo ang pag-load ng mga limitasyon", + "error_text_maximum_limit": "Ang kalakalan para sa ${provider} ay hindi nilikha. Ang halaga ay higit sa maximum: ${max} ${currency}", + "error_text_minimal_limit": "Ang kalakalan para sa ${provider} ay hindi nilikha. Ang halaga ay mas mababa sa minimum: ${min} ${currency}", + "error_text_node_address": "Pakipasok isan iPv4 address", + "error_text_node_port": "Ang node port ay maaari lamang maglaman ng numero sa pagitan ng 0 at 65535", + "error_text_node_proxy_address": "Pakipasok : , halimbawa 127.0.0.1:9050", + "error_text_payment_id": "Ang Payment ID ay dapat maglaman ng 16 na char sa hex", "error_text_subaddress_name": "Ang pangalan ng subaddress ay hindi maaaring maglaman ng mga simbolo na `, '\"\nat dapat sa pagitan ng 1 at 20 character ang haba", "error_text_template": "Ang pangalan ng template at address ay hindi maaaring maglaman ng mga simbolo ng ',' \"\nat dapat sa pagitan ng 1 at 106 na character ang haba", - "error_text_wallet_name": "Ang pangalan ng pitaka ay maaari lamang maglaman ng mga titik, numero, _ - mga simbolo\nat dapat sa pagitan ng 1 at 33 character ang haba", + "error_text_wallet_name": "Ang pangalan ng wallet ay maaari lamang maglaman ng mga titik, numero, _ - mga simbolo\nat dapat sa pagitan ng 1 at 33 character ang haba", "error_text_xmr": "Ang halaga ng XMR ay hindi maaaring lumampas sa magagamit na balanse.\nAng bilang ng mga numero ng fraction ay dapat na mas mababa o katumbas ng 12", "errorGettingCredentials": "Nabigo: Error habang kumukuha ng mga kredensyal", - "errorSigningTransaction": "May naganap na error habang pinipirmahan ang transaksyon", + "errorSigningTransaction": "Error habang pinipirmahan ang transaksyon", "estimated": "Tinatayang", - "estimated_new_fee": "Tinatayang bagong bayad", + "estimated_new_fee": "Tinatayang bagong fee", "estimated_receive_amount": "Tinatayang natanggap na halaga", "etherscan_history": "Kasaysayan ng Etherscan", "event": "Kaganapan", "events": "Mga kaganapan", "exchange": "Palitan", - "exchange_incorrect_current_wallet_for_xmr": "Kung nais mong makipagpalitan ng XMR mula sa iyong balanse ng cake wallet Monero, mangyaring lumipat sa iyong Monero Wallet muna.", + "exchange_incorrect_current_wallet_for_xmr": "Kung gusto mong palitan ang XMR mula sa iyong balanse ng Monero ng Cake Wallet, mangyaring lumipat muna sa iyong Monero wallet.", "exchange_new_template": "Bagong template", "exchange_provider_unsupported": "Ang ${providerName} ay hindi na suportado!", - "exchange_result_confirm": "Sa pamamagitan ng pagpindot ng kumpirmahin, magpapadala ka ng ${fetchingLabel} ${from} mula sa iyong pitaka na tinatawag na ${walletName} sa address na ipinakita sa ibaba. O maaari kang magpadala mula sa iyong panlabas na pitaka sa ibaba address/qr code.\n\nMangyaring pindutin ang kumpirmahin na magpatuloy o bumalik upang baguhin ang mga halaga.", - "exchange_result_description": "Dapat kang magpadala ng isang minimum na ${fetchingLabel} ${from} hanggang sa address na ipinakita sa susunod na pahina. Kung nagpapadala ka ng isang halaga na mas mababa kaysa sa ${fetchingLabel} ${from} maaaring hindi ito ma -convert at maaaring hindi ito ibabalik.", - "exchange_result_write_down_ID": "*Mangyaring kopyahin o isulat ang iyong ID na ipinakita sa itaas.", + "exchange_result_confirm": "Sa pamamagitan ng pagpindot sa kumpirmahin, ikaw ay magpapadala ${fetchingLabel} ${from} mula sa inyong wallet na tinatawag ${walletName} sa wallet na ipinapakita sa ibaba. O pwede kang magpadala sa inyong external wallet sa ibabang address/QR code.\n\nPara magpatuloy, mangyaring pindutin upang kumpirmahin o bumalik para baguhin ang halaga.", + "exchange_result_description": "Kailangan mong magpadala ng minimum ${fetchingLabel} ${from} sa address na ipinakita sa susunod na pahina. Kung magpapadala ka ng halagang mas masmababa sa ${fetchingLabel} ${from} maaring hindi ito ma-convert at maaaring hindi ito ma-refund.", + "exchange_result_write_down_ID": "*Mangyaring kopyahin o isulat ang inyong ID na ipinapakita sa itaas.", "exchange_result_write_down_trade_id": "Mangyaring kopyahin o isulat ang trade ID upang magpatuloy.", - "exchange_sync_alert_content": "Mangyaring maghintay hanggang ang iyong pitaka ay naka -synchronize", - "expired": "Nag -expire", - "expires": "Mag -expire", + "exchange_sync_alert_content": "Mangyaring maghintay hanggang ang iyong wallet ay naka-synchronize", + "expired": "Nag-expire na", + "expires": "Mag-e-expire", "expiresOn": "Mag-e-expire sa", - "expiry_and_validity": "Pag -expire at bisa", - "export_backup": "I -export ang backup", + "expiry_and_validity": "Pag-expire at Bisa", + "export_backup": "I-export ang backup", "extra_id": "Dagdag na ID:", "extracted_address_content": "Magpapadala ka ng pondo sa\n${recipient_name}", - "failed_authentication": "Nabigong pagpapatunay. ${state_error}", + "failed_authentication": "Nabigo ang pagpapatunay. ${state_error}", "faq": "FAQ", "features": "Mga tampok", "fetching": "Pagkuha", "fiat_api": "Fiat API", "fiat_balance": "Balanse ng fiat", "field_required": "Kinakailangan ang patlang na ito", - "fill_code": "Mangyaring punan ang verification code na ibinigay sa iyong email", + "fill_code": "Mangyaring ilagay ang verfification code na ibinigay sa iyong email", "filter_by": "Filter ni", - "first_wallet_text": "Kahanga -hangang pitaka para sa Monero, Bitcoin, Ethereum, Litecoin, at Haven", + "first_wallet_text": "Kahanga-hangang wallet para sa Monero, Bitcoin, Litecoin, Ethereum, at Haven", "fixed_pair_not_supported": "Ang nakapirming pares na ito ay hindi suportado sa mga napiling palitan", - "fixed_rate": "Naayos na rate", - "fixed_rate_alert": "Magagawa mong ipasok ang makatanggap na halaga kapag naka -check ang naayos na mode ng rate. Nais mo bang lumipat sa nakapirming mode ng rate?", - "forgot_password": "Nakalimutan ang password", - "freeze": "I -freeze", - "frequently_asked_questions": "Madalas na nagtanong", + "fixed_rate": "Fixed rate", + "fixed_rate_alert": "Makakapagpasok ka ng halaga ng pagtanggap kapag nasuri ang fixed rate mode. Gusto mo bang lumipat sa fixed rate mode?", + "forgot_password": "Nakalimutan ang Password", + "freeze": "I-freeze", + "frequently_asked_questions": "Mga madalas itanong", "frozen": "Frozen", - "full_balance": "Buong balanse", + "full_balance": "Buong Balanse", "generate_name": "Bumuo ng pangalan", "generating_gift_card": "Bumubuo ng Gift Card", - "get_a": "Kumuha ng", - "get_card_note": "na maaari mong i -reload sa mga digital na pera. Walang karagdagang impormasyon na kailangan!", - "get_your_yat": "Kunin ang iyong yat", + "get_a": "Kumuha ng ", + "get_card_note": " na maaari mong i-load gamit ang mga digital na pera. Walang karagdagang impormasyon na kailangan!", + "get_your_yat": "Kunin ang iyong Yat", "gift_card_amount": "Halaga ng Gift Card", - "gift_card_balance_note": "Ang mga kard ng regalo na may natitirang balanse ay lilitaw dito", - "gift_card_is_generated": "Ang card ng regalo ay nabuo", - "gift_card_number": "Numero ng regalo card", - "gift_card_redeemed_note": "Ang mga kard ng regalo na iyong tinubos ay lilitaw dito", - "gift_cards": "Mga kard ng regalo", - "gift_cards_unavailable": "Magagamit ang mga gift card para sa pagbili lamang kasama ang Monero, Bitcoin, at Litecoin sa oras na ito", + "gift_card_balance_note": "Lalabas dito ang mga gift card na may natitirang balanse", + "gift_card_is_generated": "Nabuo ang gift card", + "gift_card_number": "Numero ng gift card", + "gift_card_redeemed_note": "Lalabas dito ang mga gift card na na-redeem mo", + "gift_cards": "Mga Gift Card", + "gift_cards_unavailable": "Ang mga gift card ay magagamit lamang para bilhin gamit ng Monero, Bitcoin, at Litecoin sa ngayon", "got_it": "Nakuha ko", - "gross_balance": "Balanse ng gross", + "gross_balance": "Kabuuang balanse", "group_by_type": "Pangkat ayon sa uri", - "haven_app": "Haven sa pamamagitan ng cake wallet", - "haven_app_wallet_text": "Galing ng pitaka para sa Haven", + "haven_app": "Haven by Cake Wallet", + "haven_app_wallet_text": "Kahanga-hangang wallet para sa Haven", "help": "Tulong", - "hidden_balance": "Nakatagong balanse", + "hidden_balance": "Nakatagong Balanse", "hide_details": "Itago ang mga detalye", - "high_contrast_theme": "Mataas na tema ng kaibahan", + "high_contrast_theme": "High Contrast Theme", "home_screen_settings": "Mga setting ng home screen", "how_to_use": "Paano gamitin", - "how_to_use_card": "Paano gamitin ang kard na ito", - "id": "ID:", + "how_to_use_card": "Paano gamitin ang card na ito", + "id": "ID: ", "ignor": "Huwag pansinin", - "import": "Angkat", + "import": "Mag-import", "importNFTs": "Mag-import ng mga NFT", - "in_store": "Nakatago", + "in_store": "Nasa Stock", "incoming": "Papasok", - "incorrect_seed": "Ang teksto na ipinasok ay hindi wasto.", + "incorrect_seed": "Ang text na ipinasok ay hindi wasto.", "inputs": "Mga input", - "insufficientFundsForRentError": "Wala kang sapat na sol upang masakop ang bayad sa transaksyon at upa para sa account. Mabait na magdagdag ng higit pa sa iyong pitaka o bawasan ang halaga ng sol na iyong ipinapadala", - "introducing_cake_pay": "Ipinakikilala ang cake pay!", - "invalid_input": "Di -wastong input", - "invalid_password": "Di wastong password", + "insufficientFundsForRentError": "Wala kang sapat na SOL upang masakop ang fee sa transaksyon at upa para sa account. Mabait na magdagdag ng higit pa sa iyong wallet o bawasan ang halaga ng SOL na iyong ipinapadala", + "introducing_cake_pay": "Pagpapakilala ng Cake Pay!", + "invalid_input": "Di-wastong input", + "invalid_password": "Di-wastong password", "invoice_details": "Mga detalye ng invoice", "is_percentage": "ay", - "last_30_days": "Huling 30 araw", + "last_30_days": "Huling 30 na araw", "learn_more": "Matuto nang higit pa", - "ledger_connection_error": "Nabigong kumonekta sa iyo ledger. Pakisubukang muli.", - "ledger_error_device_locked": "Naka -lock ang ledger", - "ledger_error_tx_rejected_by_user": "Ang transaksyon ay tinanggihan sa aparato", - "ledger_error_wrong_app": "Mangyaring tiyaking pinipili mo ang tamang app sa iyong ledger", - "ledger_please_enable_bluetooth": "Mangyaring paganahin ang Bluetooth upang makita ang iyong ledger", - "light_theme": "Ilaw", - "load_more": "Mag -load pa", - "loading_your_wallet": "Naglo -load ng iyong pitaka", - "login": "Mag log in", - "logout": "Mag -logout", - "low_fee": "Mababang bayad", - "low_fee_alert": "Kasalukuyan kang gumagamit ng isang mababang priyoridad sa bayad sa network. Maaari itong maging sanhi ng mahabang paghihintay, iba't ibang mga rate, o kanselahin ang mga trading. Inirerekumenda namin ang pagtatakda ng isang mas mataas na bayad para sa isang mas mahusay na karanasan.", + "ledger_connection_error": "Nabigong kumonekta sa iyong Ledger. Pakisubukang muli.", + "ledger_error_device_locked": "Naka-lock ang Ledger", + "ledger_error_tx_rejected_by_user": "Ang transaksyon ay tinanggihan sa hardware wallet", + "ledger_error_wrong_app": "Mangyaring tiyaking pinipili mo ang tamang app sa iyong Ledger", + "ledger_please_enable_bluetooth": "Mangyaring paganahin ang Bluetooth upang makita ang iyong Ledger", + "light_theme": "Light", + "load_more": "Mag-load pa", + "loading_your_wallet": "Naglo-load ng iyong wallet", + "login": "Mag-login", + "logout": "Mag-logout", + "low_fee": "Mababang fee", + "low_fee_alert": "Kasalukuyan kang gumagamit ng isang mababang priyoridad sa network fee. Maaari itong maging sanhi ng mahabang paghihintay, iba't ibang mga rate, o kanselahin ang mga trading. Inirerekumenda namin ang pagtatakda ng isang mas mataas na fee para sa isang mas mahusay na karanasan.", "manage_nodes": "Pamahalaan ang mga node", - "manage_pow_nodes": "Pamahalaan ang mga POW node", - "manage_yats": "Pamahalaan ang mga yats", + "manage_pow_nodes": "Pamahalaan ang mga PoW node", + "manage_yats": "Pamahalaan ang mga Yat", "mark_as_redeemed": "Markahan bilang tinubos", "market_place": "Marketplace", - "matrix_green_dark_theme": "Matrix Green Madilim na Tema", + "matrix_green_dark_theme": "Matrix Green Dark Theme", "max_amount": "Max: ${value}", "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Mensahe", - "methods": "Paraan", + "methods": "Mga Paraan", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", "minutes_to_pin_code": "${minute} minuto", - "mm": "Mm", - "modify_2fa": "Baguhin ang cake 2FA", - "monero_com": "Monero.com sa pamamagitan ng cake wallet", - "monero_com_wallet_text": "Galing ng pitaka para sa Monero", - "monero_dark_theme": "Monero Madilim na Tema", - "monero_light_theme": "Tema ng Monero Light", - "moonpay_alert_text": "Ang halaga ng halaga ay dapat na higit pa o katumbas ng ${minAmount} ${fiatCurrency}", - "more_options": "Higit pang mga pagpipilian", + "mm": "MM", + "modify_2fa": "Baguhin ang Cake 2FA", + "monero_com": "Monero.com by Cake Wallet", + "monero_com_wallet_text": "Kahanga-hangang wallet para sa Monero", + "monero_dark_theme": "Monero Dark Theme", + "monero_light_theme": "Monero Light Theme", + "moonpay_alert_text": "Ang halaga ay dapat na higit pa o katumbas ng ${minAmount} ${fiatCurrency}", + "more_options": "Higit pang mga Pagpipilian", "name": "Pangalan", - "nano_current_rep": "Kasalukuyang kinatawan", - "nano_gpt_thanks_message": "Salamat sa paggamit ng nanogpt! Tandaan na bumalik sa browser matapos makumpleto ang iyong transaksyon!", - "nano_pick_new_rep": "Pumili ng isang bagong kinatawan", - "nanogpt_subtitle": "Ang lahat ng mga pinakabagong modelo (GPT-4, Claude). \\ Nno subscription, magbayad gamit ang crypto.", + "nano_current_rep": "Kasalukuyang Representative", + "nano_gpt_thanks_message": "Salamat sa paggamit ng NanoGPT! Tandaan na bumalik sa browser matapos makumpleto ang iyong transaksyon!", + "nano_pick_new_rep": "Pumili ng isang bagong representative", + "nanogpt_subtitle": "Ang lahat ng mga pinakabagong modelo (GPT-4, Claude). \nNo subscription, magbayad gamit ang crypto.", "narrow": "Makitid", "new_first_wallet_text": "Panatilihing ligtas ang iyong crypto, piraso ng cake", - "new_node_testing": "Bagong pagsubok sa node", + "new_node_testing": "Bagong node testing", "new_subaddress_create": "Lumikha", "new_subaddress_label_name": "Pangalan ng label", - "new_subaddress_title": "Bagong tirahan", - "new_template": "Bagong template", - "new_wallet": "Bagong pitaka", + "new_subaddress_title": "Bagong address", + "new_template": "Bagong Template", + "new_wallet": "Bagong Wallet", "newConnection": "Bagong Koneksyon", - "no_cards_found": "Walang nahanap na mga kard", + "no_cards_found": "Walang nahanap na mga card", "no_id_needed": "Hindi kailangan ng ID!", - "no_id_required": "Walang kinakailangang ID. I -top up at gumastos kahit saan", + "no_id_required": "Hindi kailangan ng ID. I-top up at gumastos kahit saan", "no_relay_on_domain": "Walang relay para sa domain ng user o hindi available ang relay. Mangyaring pumili ng relay na gagamitin.", "no_relays": "Walang mga relay", "no_relays_message": "Nakakita kami ng Nostr NIP-05 record para sa user na ito, ngunit hindi ito naglalaman ng anumang mga relay. Mangyaring atasan ang tatanggap na magdagdag ng mga relay sa kanilang Nostr record.", "node_address": "Node address", "node_connection_failed": "Nabigo ang koneksyon", - "node_connection_successful": "Ang koneksyon ay matagumpay", - "node_new": "Bagong node", + "node_connection_successful": "Naging tagumpay ang konekyson", + "node_new": "Bagong Node", "node_port": "Node port", - "node_reset_settings_title": "I -reset ang Mga Setting", - "node_test": "Pagsusulit", - "nodes": "Node", - "nodes_list_reset_to_default_message": "Sigurado ka bang nais mong i -reset ang mga setting upang default?", - "none_of_selected_providers_can_exchange": "Wala sa mga napiling tagapagkaloob na maaaring gumawa ng palitan na ito", + "node_reset_settings_title": "I-reset ang mga settings", + "node_test": "Test", + "nodes": "Mga node", + "nodes_list_reset_to_default_message": "Sigurado ka bang gusto mo bang i-reset ang mga settings sa default?", + "none_of_selected_providers_can_exchange": "Wala sa mga napiling provider ang makakagawa ng palitan na ito", "noNFTYet": "Wala pang NFT", "normal": "Normal", - "note_optional": "Tandaan (Opsyonal)", - "note_tap_to_change": "Tandaan (Tapikin upang baguhin)", + "note_optional": "Tala (opsyonal)", + "note_tap_to_change": "Tala (i-tap para baguhin)", "nullURIError": "Ang URI ay null", - "offer_expires_in": "Mag -expire ang alok sa:", + "offer_expires_in": "Mag-expire ang alok sa: ", "offline": "Offline", - "ok": "Ok", - "old_fee": "Matandang bayad", - "onion_link": "Link ng Onion", + "ok": "OK", + "old_fee": "Dating fee", + "onion_link": "Onion link", "online": "Online", - "onramper_option_description": "Mabilis na bumili ng crypto na may maraming paraan ng pagbabayad. Available sa karamihan ng mga bansa. Iba-iba ang mga spread at bayarin.", + "onramper_option_description": "Mabilis na bumili ng crypto na may maraming paraan ng pagbabayad. Available sa karamihan ng mga bansa. Iba-iba ang mga spread at fee.", "open_gift_card": "Buksan ang Gift Card", "optional_description": "Opsyonal na paglalarawan", - "optional_email_hint": "Opsyonal na Payee Notification Email", + "optional_email_hint": "Opsyonal na payee notification email", "optional_name": "Opsyonal na pangalan ng tatanggap", - "optionally_order_card": "Opsyonal na mag -order ng isang pisikal na kard.", - "orbot_running_alert": "Mangyaring tiyakin na ang Orbot ay tumatakbo bago kumonekta sa node na ito.", + "optionally_order_card": "Opsyonal na mag-order ng pisikal na card.", + "orbot_running_alert": "Pakitiyak na tumatakbo ang Orbot bago kumonekta sa node na ito.", "order_by": "Iniutos ni", - "order_id": "Order id", - "order_physical_card": "Mag -order ng pisikal na kard", + "order_id": "Order ID", + "order_physical_card": "Mag-order ng Pisical na Card", "other_settings": "Iba pang mga setting", - "outdated_electrum_wallet_description": "Ang mga bagong wallets ng Bitcoin na nilikha sa cake ay mayroon na ngayong 24-salitang binhi. Ipinag-uutos na lumikha ka ng isang bagong pitaka ng Bitcoin at ilipat ang lahat ng iyong mga pondo sa bagong 24-salitang pitaka, at itigil ang paggamit ng mga pitaka na may 12-salitang binhi. Mangyaring gawin ito kaagad upang ma -secure ang iyong mga pondo.", - "outdated_electrum_wallet_receive_warning": "Kung ang pitaka na ito ay may 12-salitang binhi at nilikha sa cake, huwag magdeposito sa Bitcoin sa pitaka na ito. Ang anumang BTC na inilipat sa pitaka na ito ay maaaring mawala. Lumikha ng isang bagong 24-word wallet (tapikin ang menu sa kanang tuktok, piliin ang mga pitaka, piliin ang Lumikha ng Bagong Wallet, pagkatapos ay piliin ang Bitcoin) at agad na ilipat ang iyong BTC doon. Ang mga bagong (24-salita) BTC Wallets mula sa cake ay ligtas", + "outdated_electrum_wallet_description": "Ang mga bagong Bitcoin wallet na ginagawa sa Cake ay mayroon na ngayong 24 na salita na seed. Ipinag-uutos na lumikha ka ng bagong bitcoin wallet at ilipat ang lahat ng iyong pondo sa bagong 24-salitang wallet, at ihinto ang paggamit ng mga wallet na may 12-salitang seed. Mangyaring gawin ito kaagad upang ma-secure ang iyong mga pondo.", + "outdated_electrum_wallet_receive_warning": "Kung ang wallet na ito ay may 12-word seed na ginawa sa Cake, huwag magdeposito ng Bitcoin sa wallet na ito. Anumang BTC na inilipat sa wallet na ito ay maaaring mawala. Lumikha ng bagong 24 na salita na wallet (i-tap ang menu sa kanang taas, piliin ang Mga Wallets, piliin ang Lumikha ng Bagong Wallet, pagkatapos ay piliin ang Bitcoin) at agad na ilipat ang iyong BTC doon. Bagong (24 na salita) BTC wallet mula sa Cake ay ligtas", "outgoing": "Palabas", "outputs": "Mga output", - "overwrite_amount": "Overwrite na halaga", - "pairingInvalidEvent": "Pagpares ng Di-wastong Kaganapan", + "overwrite_amount": "I-overwrite ang halaga", + "pairingInvalidEvent": "Pairing Invalid Event", "passphrase": "Passphrase (opsyonal)", "password": "Password", - "paste": "I -paste", + "paste": "I-paste", "pause_wallet_creation": "Kasalukuyang naka-pause ang kakayahang gumawa ng Haven Wallet.", - "payment_id": "Payment ID:", - "payment_was_received": "Natanggap ang iyong pagbabayad.", - "pending": "(Pending)", + "payment_id": "Payment ID: ", + "payment_was_received": "Natanggap ang iyong bayad.", + "pending": "(hindi pa tapos)", "percentageOf": "ng ${amount}", - "pin_at_top": "Pin ${token} sa tuktok", - "pin_is_incorrect": "Mali ang pin", - "pin_number": "Numero ng pin", + "pin_at_top": "I-pin ${token} sa tuktok", + "pin_is_incorrect": "Mali ang PIN", + "pin_number": "Numero ng PIN", "placeholder_contacts": "Ang iyong mga contact ay ipapakita dito", "placeholder_transactions": "Ang iyong mga transaksyon ay ipapakita dito", - "please_fill_totp": "Mangyaring punan ang 8-digit na code na naroroon sa iyong iba pang aparato", - "please_make_selection": "Mangyaring gumawa ng isang pagpipilian sa ibaba upang lumikha o mabawi ang iyong pitaka.", - "please_reference_document": "Mangyaring sanggunian ang mga dokumento sa ibaba para sa karagdagang impormasyon.", + "please_fill_totp": "Mangyaring punan ang 8-digit na code na naroroon sa iyong iba pang device", + "please_make_selection": "Mangyaring gumawa ng isang pagpipilian sa ibaba upang lumikha o mabawi ang iyong wallet.", + "please_reference_document": "Mangyaring sumangguni sa mga dokumento sa ibaba para sa karagdagang impormasyon.", "please_select": "Pakipili:", - "please_select_backup_file": "Mangyaring piliin ang backup file at ipasok ang backup password.", - "please_try_to_connect_to_another_node": "Mangyaring subukang kumonekta sa isa pang node", + "please_select_backup_file": "Mangyaring piliin ang backup na file at ipasok ang backup na password.", + "please_try_to_connect_to_another_node": "Pakisubukang kumonekta sa iba pang node", "please_wait": "Mangyaring maghintay", "polygonscan_history": "Kasaysayan ng PolygonScan", - "powered_by": "Pinapagana ng ${title}", - "pre_seed_button_text": "Naiintindihan ko. Ipakita sa akin ang aking binhi", - "pre_seed_description": "Sa susunod na pahina makikita mo ang isang serye ng mga ${words} na mga salita. Ito ang iyong natatangi at pribadong binhi at ito ang tanging paraan upang mabawi ang iyong pitaka kung sakaling mawala o madepektong paggawa. Responsibilidad mong isulat ito at itago ito sa isang ligtas na lugar sa labas ng cake wallet app.", - "pre_seed_title": "Mahalaga", - "prepaid_cards": "Prepaid card", - "prevent_screenshots": "Maiwasan ang mga screenshot at pag -record ng screen", - "privacy": "Privacy", + "powered_by": "Pinapatakbo ng${title}", + "pre_seed_button_text": "Naiitindihan ko. Ipakita ang aking seed", + "pre_seed_description": "Sa susunod na pahina ay makikita mo ang isang serye ng ${words} na salita. Ito ang iyong natatangi at pribadong seed at ito ang tanging paraan upang mabawi ang iyong wallet kung sakaling mawala o hindi gumana. Responsibilidad mong isulat ito sa isang ligtas na lugar sa labas ng Cake Wallet app.", + "pre_seed_title": "MAHALAGA", + "prepaid_cards": "Mga Prepaid Card", + "prevent_screenshots": "Maiwasan ang mga screenshot at pag-record ng screen", + "privacy": "Pagkapribado", "privacy_policy": "Patakaran sa Pagkapribado", "privacy_settings": "Settings para sa pagsasa-pribado", - "private_key": "Pribadong susi", - "proceed_after_one_minute": "Kung ang screen ay hindi magpatuloy pagkatapos ng 1 minuto, suriin ang iyong email.", - "proceed_on_device": "Magpatuloy sa iyong aparato", - "proceed_on_device_description": "Mangyaring sundin ang mga tagubilin na sinenyasan sa iyong wallet ng hardware", + "private_key": "Private key", + "proceed_after_one_minute": "Kung ang screen ay hindi magpapatuloy pagkatapos ng 1 minuto, suriin ang iyong email.", + "proceed_on_device": "Magpatuloy sa iyong hardware wallet", + "proceed_on_device_description": "Mangyaring sundin ang mga tagubilin na sinenyasan sa iyong hardware wallet", "profile": "Profile", "provider_error": "${provider} error", - "public_key": "Pampublikong susi", + "public_key": "Public key", "purchase_gift_card": "Bumili ng Gift Card", - "purple_dark_theme": "Purple Madilim na Tema", - "qr_fullscreen": "Tapikin upang buksan ang buong screen QR code", - "qr_payment_amount": "Ang QR code na ito ay naglalaman ng isang halaga ng pagbabayad. Nais mo bang i -overwrite ang kasalukuyang halaga?", + "purple_dark_theme": "Purple Dark Theme", + "qr_fullscreen": "I-tap para makuha ang buong screen na QR code", + "qr_payment_amount": "Ang QR code na ito ay naglalaman ng halaga ng pagbabayad. Gusto mo bang i-overwrite ang kasalukuyang halaga?", "quantity": "Dami", - "question_to_disable_2fa": "Sigurado ka bang nais mong huwag paganahin ang cake 2fa? Ang isang 2FA code ay hindi na kinakailangan upang ma -access ang pitaka at ilang mga pag -andar.", + "question_to_disable_2fa": "Sigurado ka bang nais mong huwag paganahin ang Cake 2FA? Ang isang 2FA code ay hindi na kinakailangan upang ma-access ang wallet at ilang mga pag-andar.", "receivable_balance": "Natatanggap na balanse", "receive": "Tumanggap", "receive_amount": "Halaga", "received": "Natanggap", "recipient_address": "Address ng tatanggap", "reconnect": "Kumonekta muli", - "reconnect_alert_text": "Sigurado ka bang nais mong muling kumonekta?", - "reconnection": "Pag -ugnay muli", - "red_dark_theme": "Red Madilim na Tema", - "red_light_theme": "Red light tema", + "reconnect_alert_text": "Sigurado ka bang gusto mong kumonekta uli?", + "reconnection": "Muling pagkakakonekta", + "red_dark_theme": "Red Dark Theme", + "red_light_theme": "Red Light Theme", "redeemed": "Tinubos", - "refund_address": "Refund address", + "refund_address": "Address ng refund", "reject": "Tanggihan", "remaining": "natitira", "remove": "Alisin", "remove_node": "Alisin ang node", - "remove_node_message": "Sigurado ka bang nais mong alisin ang napiling node?", + "remove_node_message": "Sigurado ka bang gusto mong alisin ang napiling node?", "rename": "Palitan ang pangalan", - "rep_warning": "Babala ng kinatawan", - "rep_warning_sub": "Ang iyong kinatawan ay hindi lilitaw na nasa mabuting kalagayan. Tapikin dito upang pumili ng bago", - "repeat_wallet_password": "Ulitin ang password ng pitaka", - "repeated_password_is_incorrect": "Ang paulit -ulit na password ay hindi tama. Mangyaring ulitin muli ang password ng pitaka.", + "rep_warning": "Babala ng Representative", + "rep_warning_sub": "Ang iyong representative ay hindi lilitaw na nasa mabuting kalagayan. Tapikin dito upang pumili ng bago", + "repeat_wallet_password": "Ulitin ang password ng wallet", + "repeated_password_is_incorrect": "Ang paulit-ulit na password ay hindi tama. Mangyaring ulitin muli ang password ng wallet.", "require_for_adding_contacts": "Nangangailangan para sa pagdaragdag ng mga contact", "require_for_all_security_and_backup_settings": "Nangangailangan para sa lahat ng mga setting ng seguridad at backup", - "require_for_assessing_wallet": "Nangangailangan para sa pag -access ng pitaka", - "require_for_creating_new_wallets": "Nangangailangan para sa paglikha ng mga bagong pitaka", - "require_for_exchanges_to_external_wallets": "Kinakailangan para sa mga palitan sa mga panlabas na wallet", - "require_for_exchanges_to_internal_wallets": "Nangangailangan para sa mga palitan sa mga panloob na mga pitaka", + "require_for_assessing_wallet": "Nangangailangan para sa pag-access ng wallet", + "require_for_creating_new_wallets": "Nangangailangan para sa paglikha ng mga bagong wallet", + "require_for_exchanges_to_external_wallets": "Nangangailangan para sa mga palitan sa mga panlabas na wallet", + "require_for_exchanges_to_internal_wallets": "Nangangailangan para sa mga palitan sa mga panloob na wallet", "require_for_sends_to_contacts": "Nangangailangan para sa pagpapadala sa mga contact", - "require_for_sends_to_internal_wallets": "Nangangailangan para sa pagpapadala sa mga panloob na mga pitaka", + "require_for_sends_to_internal_wallets": "Nangangailangan para sa pagpapadala sa mga panloob na wallet", "require_for_sends_to_non_contacts": "Nangangailangan para sa pagpapadala sa mga hindi contact", - "require_pin_after": "Nangangailangan ng pin pagkatapos", - "rescan": "Rescan", - "resend_code": "Mangyaring ipagpatuloy ito", - "reset": "I -reset", - "reset_password": "I -reset ang password", - "restore_active_seed": "Aktibong binhi", + "require_pin_after": "Nangangailangan ng PIN pagkatapos", + "rescan": "Muling i-scan", + "resend_code": "Mangyaring ipadala ito muli", + "reset": "I-reset", + "reset_password": "I-reset ang password", + "restore_active_seed": "Aktibong seed", "restore_address": "Address", - "restore_bitcoin_description_from_keys": "Ibalik ang iyong pitaka mula sa nabuong wif string mula sa iyong mga pribadong susi", - "restore_bitcoin_description_from_seed": "Ibalik ang iyong pitaka mula sa 24 na code ng kombinasyon ng salita", + "restore_bitcoin_description_from_keys": "Ibalik ang iyong wallet mula sa nabuong WIF string mula sa iyong mga private key", + "restore_bitcoin_description_from_seed": "Ibalik ang iyong wallet mula sa 24 na salita na seed", "restore_bitcoin_title_from_keys": "Ibalik mula sa WIF", - "restore_description_from_backup": "Maaari mong ibalik ang buong cake wallet app mula sa iyong back-up file", - "restore_description_from_hardware_wallet": "Ibalik mula sa isang ledger hardware wallet", - "restore_description_from_keys": "Ibalik ang iyong pitaka mula sa nabuong mga keystroke na na -save mula sa iyong mga pribadong susi", - "restore_description_from_seed": "Ibalik ang iyong pitaka mula sa alinman sa 25 salita o 13 na code ng kombinasyon ng salita", - "restore_description_from_seed_keys": "Ibalik ang iyong pitaka mula sa mga binhi/susi na na -save mo upang ma -secure ang lugar", - "restore_from_date_or_blockheight": "Mangyaring magpasok ng isang petsa ng ilang araw bago mo nilikha ang pitaka na ito. O kung alam mo ang blockheight, mangyaring ipasok ito sa halip", - "restore_from_seed_placeholder": "Mangyaring ipasok o i -paste ang iyong binhi dito", - "restore_new_seed": "Bagong binhi", + "restore_description_from_backup": "Maari mong ibalik ang buong Cake Wallet app sa iyong backup file", + "restore_description_from_hardware_wallet": "Ibalik mula sa isang Ledger hardware wallet", + "restore_description_from_keys": "Ibalik ang iyong wallet mula sa nabuong mga keystrokes na na-save mula sa iyong mga private key", + "restore_description_from_seed": "Ibalik ang iyong wallet mula sa alinman sa 25 na salita o 13 na salita na seed", + "restore_description_from_seed_keys": "Ibalik ang inyong wallet mula sa inyong seed/keys na iyong na-save sa ligtas na lugar", + "restore_from_date_or_blockheight": "Mangyaring maglagay ng petsa ilang araw bago mo ginawa ang wallet na ito. O kung alam mo ang block height pwede ilagay ito sa halip", + "restore_from_seed_placeholder": "Mangyaring ipasok o idikit ang iyong seed dito", + "restore_new_seed": "Bagong seed", "restore_next": "Susunod", "restore_recover": "Ibalik", - "restore_restore_wallet": "Ibalik ang pitaka", - "restore_seed_keys_restore": "Ibinalik ang mga binhi/susi", - "restore_spend_key_private": "Gumastos ng susi (pribado)", + "restore_restore_wallet": "Ibalik ang wallet", + "restore_seed_keys_restore": "Ibalik mula sa Seed/Keys", + "restore_spend_key_private": "Spend key (private)", "restore_title_from_backup": "Ibalik mula sa backup", - "restore_title_from_hardware_wallet": "Ibalik mula sa pitaka ng hardware", - "restore_title_from_keys": "Ibalik mula sa mga susi", - "restore_title_from_seed": "Ibalik mula sa binhi", - "restore_title_from_seed_keys": "Ibalik mula sa mga binhi/susi", - "restore_view_key_private": "Tingnan ang Key (Pribado)", - "restore_wallet": "Ibalik ang pitaka", - "restore_wallet_name": "Pangalan ng Wallet", - "restore_wallet_restore_description": "Paglalarawan ng Wallet", + "restore_title_from_hardware_wallet": "Ibalik mula sa hardware wallet", + "restore_title_from_keys": "Ibalik mula sa keys", + "restore_title_from_seed": "Ibalik mula sa seed", + "restore_title_from_seed_keys": "Ibalik mula sa seed/keys", + "restore_view_key_private": "View key (private)", + "restore_wallet": "Ibalik ang wallet", + "restore_wallet_name": "Pangalan ng wallet", + "restore_wallet_restore_description": "Paglalarawan ng pagpapanumbalik ng wallet", "robinhood_option_description": "Bumili at ilipat kaagad gamit ang iyong debit card, bank account, o balanse ng Robinhood. USA lang.", - "router_no_route": "Walang ruta na tinukoy para sa ${name}", - "save": "I -save", - "save_backup_password": "Mangyaring tiyaking nai -save mo ang iyong backup password. Hindi mo mai -import ang iyong mga backup na file nang wala ito.", - "save_backup_password_alert": "I -save ang backup password", - "save_to_downloads": "I -save sa mga pag -download", - "saved_the_trade_id": "Nai -save ko ang trade ID", - "scan_one_block": "I -scan ang isang bloke", - "scan_qr_code": "I -scan ang QR Code", - "scan_qr_code_to_get_address": "I -scan ang QR code upang makuha ang address", + "router_no_route": "Walang tinukoy na ruta para sa ${name}", + "save": "I-save", + "save_backup_password": "Pakitiyak na nai-save mo ang iyong backup na password. Hindi mo mai-import ang iyong mga backup na file kun wala ito.", + "save_backup_password_alert": "I-save ang backup na password", + "save_to_downloads": "I-save sa mga Pag-download", + "saved_the_trade_id": "Nai-save ko na ang trade ID", + "scan_one_block": "I-scan ang isang bloke", + "scan_qr_code": "I-scan ang QR code", + "scan_qr_code_to_get_address": "I-scan ang QR code upang makuha ang address", "scan_qr_on_device": "I-scan ang QR code na ito sa ibang device", "search": "Maghanap", "search_add_token": "Maghanap / Magdagdag ng Token", "search_category": "Kategorya ng paghahanap", "search_currency": "Maghanap ng pera", "search_language": "Maghanap ng wika", - "second_intro_content": "Ang iyong yat ay isang solong natatanging address ng emoji na pumapalit sa lahat ng iyong mahabang hexadecimal address para sa lahat ng iyong mga pera.", - "second_intro_title": "Isang address ng emoji upang mamuno sa kanilang lahat", + "second_intro_content": "Ang iyong Yat ay isang natatanging emoji address na pumapalit sa lahat ng iyong mahabang hexadecimal address para sa lahat ng iyong pera.", + "second_intro_title": "Isang emoji address para pamunuan silang lahat", "security_and_backup": "Seguridad at backup", - "seed_alert_back": "Bumalik ka", - "seed_alert_content": "Ang binhi ay ang tanging paraan upang mabawi ang iyong pitaka. Nasulat mo na ba ito?", - "seed_alert_title": "Pansin", + "seed_alert_back": "Bumalik", + "seed_alert_content": "Ang seed ay ang tanging paraan upang mabawi ang iyong wallet. Naisulat mo na ba?", + "seed_alert_title": "Attention", "seed_alert_yes": "Oo meron ako", - "seed_choose": "Pumili ng wika ng binhi", + "seed_choose": "Pumili ng seed language", "seed_hex_form": "Wallet seed (hex form)", - "seed_key": "Seed Key", - "seed_language": "Wika ng binhi", - "seed_language_chinese": "Tsino", - "seed_language_chinese_traditional": "Intsik (tradisyonal)", + "seed_key": "Seed key", + "seed_language": "Wika ng seed", + "seed_language_chinese": "Chinese", + "seed_language_chinese_traditional": "Chinese (Traditional)", "seed_language_czech": "Czech", "seed_language_dutch": "Dutch", - "seed_language_english": "Ingles", - "seed_language_french": "Pranses", - "seed_language_german": "Aleman", - "seed_language_italian": "Italyano", - "seed_language_japanese": "Hapon", + "seed_language_english": "English", + "seed_language_french": "French", + "seed_language_german": "German", + "seed_language_italian": "Italian", + "seed_language_japanese": "Japanese", "seed_language_korean": "Korean", "seed_language_next": "Susunod", - "seed_language_portuguese": "Portuges", + "seed_language_portuguese": "Portuguese", "seed_language_russian": "Russian", - "seed_language_spanish": "Espanyol", - "seed_phrase_length": "Haba ng parirala ng binhi", - "seed_reminder": "Mangyaring isulat ang mga ito kung sakaling mawala ka o punasan ang iyong telepono", - "seed_share": "Magbahagi ng binhi", - "seed_title": "Binhi", - "seedtype": "Seedtype", - "seedtype_legacy": "Pamana (25 salita)", + "seed_language_spanish": "Spanish", + "seed_phrase_length": "Haba ng parirala ng seed", + "seed_reminder": "Mangyaring isulat ang mga ito kung sakaling mawala o mabura sa inyong telepono", + "seed_share": "Ibahagi ang seed", + "seed_title": "Seed", + "seedtype": "Seed type", + "seedtype_legacy": "Legacy (25 na salita)", "seedtype_polyseed": "Polyseed (16 na salita)", - "select_backup_file": "Piliin ang backup file", + "select_backup_file": "Piliin ang backup na file", "select_buy_provider_notice": "Pumili ng provider ng pagbili sa itaas. Maaari mong laktawan ang screen na ito sa pamamagitan ng pagtatakda ng iyong default na provider ng pagbili sa mga setting ng app.", - "select_destination": "Mangyaring piliin ang patutunguhan para sa backup file.", + "select_destination": "Mangyaring piliin ang patutunguhan para sa backup na file.", "select_sell_provider_notice": "Pumili ng provider ng nagbebenta sa itaas. Maaari mong laktawan ang screen na ito sa pamamagitan ng pagtatakda ng iyong default na sell provider sa mga setting ng app.", "sell": "Ibenta", - "sell_alert_content": "Kasalukuyan lamang naming sinusuportahan ang pagbebenta ng Bitcoin, Ethereum at Litecoin. Mangyaring lumikha o lumipat sa iyong Bitcoin, Ethereum o Litecoin Wallet.", + "sell_alert_content": "Kasalukuyan lamang naming sinusuportahan ang pagbebenta ng Bitcoin, Ethereum at Litecoin. Mangyaring lumikha o lumipat sa iyong Bitcoin, Ethereum o Litecoin wallet.", "sell_monero_com_alert_content": "Ang pagbebenta ng Monero ay hindi pa suportado", "send": "Ipadala", "send_address": "${cryptoCurrency} address", "send_amount": "Halaga:", "send_creating_transaction": "Paglikha ng transaksyon", - "send_error_currency": "Ang pera ay maaari lamang maglaman ng mga numero", - "send_error_minimum_value": "Ang pinakamababang halaga ng halaga ay 0.01", - "send_estimated_fee": "Tinatayang bayad:", - "send_fee": "Bayad:", + "send_error_currency": "Ang halaga ay maaari lamang maglaman ng mga numero", + "send_error_minimum_value": "Ang minimum na halaga ay 0.01", + "send_estimated_fee": "Tinatayang fee:", + "send_fee": "Fee:", "send_name": "Pangalan", "send_new": "Bago", - "send_payment_id": "Payment ID (Opsyonal)", - "send_priority": "Sa kasalukuyan ang bayad ay nakatakda sa ${transactionPriority} priority.\nAng priority ng transaksyon ay maaaring maiakma sa mga setting", - "send_sending": "Pagpapadala ...", - "send_success": "Ang iyong ${crypto} ay matagumpay na naipadala", - "send_templates": "Mga template", + "send_payment_id": "Payment ID (opsyonal)", + "send_priority": "Kasalukuyang nakatakda ang fee sa ${transactionPriority} priyoridad.\n Ang priyoridad ng transaksyon ay maaaring isaayos sa mga setting", + "send_sending": "Nagpapadala...", + "send_success": "Matagumpay na naipadala ang iyong ${crypto}", + "send_templates": "Mga Template", "send_title": "Ipadala", - "send_to_this_address": "Magpadala ng ${currency} ${tag} sa address na ito", - "send_xmr": "Magpadala ng XMR", - "send_your_wallet": "Iyong pitaka", - "sending": "Pagpapadala", + "send_to_this_address": "Ipadala ang ${currency} ${tag} sa address na ito", + "send_xmr": "Ipadala ang XMR", + "send_your_wallet": "Iyong wallet", + "sending": "Nagpapadala", "sent": "Ipinadala", - "service_health_disabled": "Hindi pinagana ang Bulletin ng Serbisyo sa Kalusugan", - "service_health_disabled_message": "Ito ang pahina ng Bulletin ng Serbisyo ng Bulletin, maaari mong paganahin ang pahinang ito sa ilalim ng Mga Setting -> Pagkapribado", - "settings": "Mga setting", - "settings_all": "Lahat", - "settings_allow_biometrical_authentication": "Payagan ang pagpapatunay ng biometrical", + "service_health_disabled": "Hindi pinagana ang Service Health Bulletin", + "service_health_disabled_message": "Ito ang pahina ng Service Health Bulletin, maaari mong paganahin ang pahinang ito sa ilalim ng Mga Setting -> Pagkapribado", + "settings": "Mga Setting", + "settings_all": "LAHAT", + "settings_allow_biometrical_authentication": "Payagan ang biometrical authentication", "settings_can_be_changed_later": "Ang mga setting na ito ay maaaring mabago mamaya sa mga setting ng app", "settings_change_language": "Baguhin ang wika", - "settings_change_pin": "Baguhin ang pin", + "settings_change_pin": "Baguhin ang PIN", "settings_currency": "Pera", "settings_current_node": "Kasalukuyang node", - "settings_dark_mode": "Madilim na mode", + "settings_dark_mode": "Dark mode", "settings_display_balance": "Ipakita ang balanse", "settings_display_on_dashboard_list": "Ipakita sa listahan ng dashboard", - "settings_fee_priority": "Priority priority", - "settings_nodes": "Node", + "settings_fee_priority": "Priyoridad sa fee", + "settings_nodes": "Mga node", "settings_none": "Wala", - "settings_only_trades": "TRADES LAMANG", + "settings_only_trades": "Mga nangangalakal lamang", "settings_only_transactions": "Mga transaksyon lamang", "settings_personal": "Personal", - "settings_save_recipient_address": "I -save ang address ng tatanggap", + "settings_save_recipient_address": "I-save ang address ng tatanggap", "settings_support": "Suporta", "settings_terms_and_conditions": "Mga Tuntunin at Kundisyon", - "settings_title": "Mga setting", - "settings_trades": "Trading", - "settings_transactions": "Mga Transaksyon", - "settings_wallets": "Wallets", - "setup_2fa": "Setup cake 2fa", - "setup_2fa_text": "Gumagana ang Cake 2FA gamit ang TOTP bilang pangalawang kadahilanan sa pagpapatunay.\n\nAng TOTP ng Cake 2FA ay nangangailangan ng SHA-512 at 8 digit na suporta; nagbibigay ito ng mas mataas na seguridad. Higit pang impormasyon at suportadong app ang makikita sa gabay.", - "setup_pin": "Setup pin", - "setup_successful": "Matagumpay na na -set up ang iyong pin!", + "settings_title": "Mga Setting", + "settings_trades": "Mga kalakalan", + "settings_transactions": "Mga transaksyon", + "settings_wallets": "Mga wallet", + "setup_2fa": "Setup Cake 2FA", + "setup_2fa_text": "Gumagana ang Cake 2FA gamit ang TOTP bilang pangalawang kadahilanan sa pagpapatunay.\n\nAng TOTP ng Cake 2FA ay nangangailangan ng SHA-512 at 8 digit na suporta; nagbibigay ito ng mas mataas na seguridad. Higit pang impormasyon at suportadong app ang makikita sa guide.", + "setup_pin": "I-Setup ang PIN", + "setup_successful": "Matagumpay na na-set up ang iyong PIN!", "setup_totp_recommended": "I-setup ang TOTP", - "setup_warning_2fa_text": "Kakailanganin mong ibalik ang iyong wallet mula sa mnemonic seed.\n\nHindi ka matutulungan ng suporta sa cake kung mawawalan ka ng access sa iyong 2FA o mnemonic seeds.\nAng Cake 2FA ay pangalawang pagpapatotoo para sa ilang partikular na pagkilos sa wallet. Bago gamitin ang Cake 2FA, inirerekomenda naming basahin ang gabay.HINDI ito kasing-secure ng malamig na imbakan.\n\nKung nawalan ka ng access sa iyong 2FA app o TOTP keys, MAWAWALA ka ng access sa wallet na ito. ", - "setup_your_debit_card": "I -set up ang iyong debit card", + "setup_warning_2fa_text": "Ang Cake 2FA ay pangalawang pagpapatotoo para sa ilang partikular na pagkilos sa wallet. HINDI ito kasing-secure ng cold wallet.\n\nKung mawalan ka ng access sa iyong 2FA app o TOTP keys, MAWAWALA ka ng access sa wallet na ito. Kakailanganin mong i-restore ang iyong wallet mula sa mnemonic seed.\n\nHindi ka matutulungan ng Cake support kung mawawalan ka ng access sa iyong 2FA o mnemonic seeds.\nBago gamitin ang Cake 2FA, inirerekomenda naming basahin ang guide.", + "setup_your_debit_card": "I-set up ang iyong debit card", "share": "Ibahagi", "share_address": "Ibahagi ang address", "show_details": "Ipakita ang mga detalye", - "show_keys": "Ipakita ang mga binhi/susi", + "show_keys": "Ipakita ang mga seed/key", "show_market_place": "Ipakita ang Marketplace", - "show_seed": "Magpakita ng binhi", - "sign_up": "Mag -sign up", - "signTransaction": "Mag-sign Transaksyon", - "signup_for_card_accept_terms": "Mag -sign up para sa card at tanggapin ang mga termino.", + "show_seed": "Ipakita ang seed", + "sign_up": "Mag-sign Up", + "signTransaction": "Mag-sign ang Transaksyon", + "signup_for_card_accept_terms": "Mag-sign up para sa card at tanggapin ang mga tuntunin.", "silent_payments": "Tahimik na pagbabayad", - "silent_payments_always_scan": "Itakda ang mga tahimik na pagbabayad na laging nag -scan", + "silent_payments_always_scan": "Itakda ang mga tahimik na pagbabayad na laging nag-scan", "silent_payments_disclaimer": "Ang mga bagong address ay hindi mga bagong pagkakakilanlan. Ito ay isang muling paggamit ng isang umiiral na pagkakakilanlan na may ibang label.", "silent_payments_display_card": "Ipakita ang Silent Payment Card", - "silent_payments_scan_from_date": "I -scan mula sa petsa", - "silent_payments_scan_from_date_or_blockheight": "Mangyaring ipasok ang taas ng block na nais mong simulan ang pag -scan para sa papasok na tahimik na pagbabayad, o, gamitin ang petsa sa halip. Maaari kang pumili kung ang pitaka ay patuloy na pag -scan sa bawat bloke, o suriin lamang ang tinukoy na taas.", - "silent_payments_scan_from_height": "I -scan mula sa taas ng block", - "silent_payments_scanned_tip": "Na -scan sa tip! (${tip})", - "silent_payments_scanning": "Tahimik na pag -scan ng mga pagbabayad", + "silent_payments_scan_from_date": "I-scan mula sa petsa", + "silent_payments_scan_from_date_or_blockheight": "Mangyaring ipasok ang block height na gusto mong simulan ang pag-scan para sa papasok na tahimik na pagbabayad, o, gamitin ang petsa sa halip. Maaari kang pumili kung ang wallet ay patuloy na pag-scan sa bawat bloke, o suriin lamang ang tinukoy na taas.", + "silent_payments_scan_from_height": "I-scan mula sa block height", + "silent_payments_scanned_tip": "Na-scan sa tip! (${tip})", + "silent_payments_scanning": "Pag-scan ng tahimik na pagbabayad", "silent_payments_settings": "Mga setting ng tahimik na pagbabayad", "slidable": "Slidable", - "sort_by": "Pag -uri -uriin sa pamamagitan ng", - "spend_key_private": "Gumastos ng susi (pribado)", - "spend_key_public": "Gumastos ng susi (publiko)", - "status": "Katayuan:", + "sort_by": "Pag-uri-uriin sa pamamagitan ng", + "spend_key_private": "Spend key (private)", + "spend_key_public": "Spend key (public)", + "status": "Katayuan: ", "string_default": "Default", "subaddress_title": "Listahan ng Subaddress", - "subaddresses": "Mga Subaddresses", + "subaddresses": "Mga Subaddress", "submit_request": "magsumite ng isang kahilingan", "successful": "Matagumpay", "support_description_guides": "Dokumentasyon at suporta para sa mga karaniwang isyu", "support_description_live_chat": "Libre at mabilis! Ang mga bihasang kinatawan ng suporta ay magagamit upang tulungan", "support_description_other_links": "Sumali sa aming mga komunidad o maabot sa amin ang aming mga kasosyo sa pamamagitan ng iba pang mga pamamaraan", - "support_title_guides": "Mga Gabay sa Wallet ng cake", + "support_title_guides": "Mga guide sa Cake Wallet", "support_title_live_chat": "Live na suporta", "support_title_other_links": "Iba pang mga link sa suporta", - "sweeping_wallet": "Pagwawalis ng pitaka", - "sweeping_wallet_alert": "Hindi ito dapat magtagal. Huwag iwanan ang screen na ito o maaaring mawala ang mga pondo ng swept.", + "sweeping_wallet": "Sweeping wallet", + "sweeping_wallet_alert": "Hindi ito dapat magtagal. HUWAG iwanan ang screen na ito o maaaring mawala ang mga pondo.", "switchToETHWallet": "Mangyaring lumipat sa isang Ethereum wallet at subukang muli", "switchToEVMCompatibleWallet": "Mangyaring lumipat sa isang EVM compatible na wallet at subukang muli (Ethereum, Polygon)", "symbol": "Simbolo", - "sync_all_wallets": "I -sync ang lahat ng mga pitaka", - "sync_status_attempting_sync": "Pagtatangka ng pag -sync", - "sync_status_connected": "Konektado", - "sync_status_connecting": "Pagkonekta", - "sync_status_failed_connect": "Naka -disconnect", + "sync_all_wallets": "I-sync ang lahat ng mga wallet", + "sync_status_attempting_sync": "SINUSUBUKANG I-SYNC", + "sync_status_connected": "KONEKTADO", + "sync_status_connecting": "KUMOKENEKTA", + "sync_status_failed_connect": "NADISKONEKTA", "sync_status_not_connected": "HINDI KONEKTADO", - "sync_status_starting_scan": "Simula sa pag -scan", - "sync_status_starting_sync": "Simula sa pag -sync", - "sync_status_syncronized": "Naka -synchronize", - "sync_status_syncronizing": "Pag -synchronize", - "sync_status_timed_out": "Nag -time out", - "sync_status_unsupported": "Hindi suportadong node", - "syncing_wallet_alert_content": "Ang iyong balanse at listahan ng transaksyon ay maaaring hindi kumpleto hanggang sa sabihin nito na \"naka -synchronize\" sa tuktok. Mag -click/tap upang malaman ang higit pa.", - "syncing_wallet_alert_title": "Ang iyong pitaka ay nag -sync", + "sync_status_starting_scan": "SIMULA SA PAG-SCAN", + "sync_status_starting_sync": "SIMULA SA PAG-SYNC", + "sync_status_syncronized": "NAKA-SYNCHRONIZE", + "sync_status_syncronizing": "PAG-SYNCHRONIZE", + "sync_status_timed_out": "NAG-TIME OUT", + "sync_status_unsupported": "HINDI SUPORTADONG NODE", + "syncing_wallet_alert_content": "Ang iyong balanse at listahan ng transaksyon ay maaaring hindi kumpleto hanggang sa sabihin nito na \"NAKA-SYNCHRONIZE\" sa tuktok. Mag-click/tap upang malaman ang higit pa.", + "syncing_wallet_alert_title": "Ang iyong wallet ay nag-sync", "template": "Template", "template_name": "Pangalan ng Template", "testnet_coins_no_value": "Ang mga barya ng testnet ay walang halaga", - "third_intro_content": "Ang mga yats ay nakatira sa labas ng cake wallet, din. Ang anumang address ng pitaka sa mundo ay maaaring mapalitan ng isang yat!", - "third_intro_title": "Si Yat ay mahusay na gumaganap sa iba", - "thorchain_contract_address_not_supported": "Hindi sinusuportahan ng Thorchain ang pagpapadala sa isang address ng kontrata", - "thorchain_taproot_address_not_supported": "Ang Tagabigay ng Thorchain ay hindi sumusuporta sa mga address ng taproot. Mangyaring baguhin ang address o pumili ng ibang provider.", + "third_intro_content": "Nabubuhay rin ang Yats sa labas ng Cake Wallet. Anumang wallet address sa mundo ay maaaring palitan ng Yat!", + "third_intro_title": "Magaling makipaglaro ang Yat sa iba", + "thorchain_contract_address_not_supported": "Hindi sinusuportahan ng THORChain ang pagpapadala sa isang address ng kontrata", + "thorchain_taproot_address_not_supported": "Ang provider ng THORChain ay hindi sumusuporta sa mga address ng Taproot. Mangyaring baguhin ang address o pumili ng ibang provider.", "time": "${minutes} m ${seconds} s", "tip": "Tip:", "today": "Ngayon", - "token_contract_address": "Token Address ng Kontrata", - "token_decimal": "Token Decimal", - "token_name": "Pangalan ng Token hal: Tether", - "token_symbol": "Simbolo ng token hal: USDT", + "token_contract_address": "Address ng token contract", + "token_decimal": "Token decimal", + "token_name": "Pangalan ng token, halimbawa: Tether", + "token_symbol": "Simbolo ng token, halimbawa: USDT", "tokenID": "ID", "tor_connection": "Koneksyon ng Tor", - "tor_only": "Tor lang", + "tor_only": "Tor lamang", "total": "Kabuuan", - "total_saving": "Kabuuang pagtitipid", - "totp_2fa_failure": "Maling code. Mangyaring subukan ang ibang code o makabuo ng isang bagong lihim na susi. Gumamit ng isang katugmang 2FA app na sumusuporta sa 8-digit na mga code at SHA512.", - "totp_2fa_success": "Tagumpay! Pinagana ang cake 2FA para sa pitaka na ito. Tandaan na i -save ang iyong mnemonic seed kung sakaling mawalan ka ng pag -access sa pitaka.", + "total_saving": "Kabuuang ipon", + "totp_2fa_failure": "Maling code. Mangyaring subukan ang ibang code o makabuo ng isang bagong secret key. Gumamit ng isang katugmang 2FA app na sumusuporta sa 8-digit na mga code at SHA512.", + "totp_2fa_success": "Tagumpay! Pinagana ang Cake 2FA para sa wallet na ito. Tandaan na i-save ang iyong mnemonic seed kung sakaling mawalan ka ng pag-access sa wallet.", "totp_auth_url": "TOTP AUTH URL", - "totp_code": "TOTP code", + "totp_code": "TOTP Code", "totp_secret_code": "TOTP Secret Code", "totp_verification_success": "Matagumpay ang pagpapatunay!", "track": "Subaybayan", @@ -738,14 +738,14 @@ "trade_details_fetching": "Pagkuha", "trade_details_id": "ID", "trade_details_pair": "Pares", - "trade_details_provider": "Tagabigay", + "trade_details_provider": "Provider", "trade_details_state": "Katayuan", - "trade_details_title": "Mga detalye sa kalakalan", + "trade_details_title": "Mga detalye ng kalakalan", "trade_for_not_created": "Ang kalakalan para sa ${title} ay hindi nilikha.", - "trade_history_title": "Kasaysayan ng Kalakal", + "trade_history_title": "Kasaysayan ng kalakalan", "trade_id": "Trade ID:", - "trade_id_not_found": "Trade ${tradeId} ng ${title} Hindi natagpuan.", - "trade_is_powered_by": "Ang kalakalan na ito ay pinalakas ng ${provider}", + "trade_id_not_found": "Kalakala na ${tradeId} ng ${title} ay hindi natagpuan.", + "trade_is_powered_by": "Ang kalakal na ito ay pinatakbo ng ${provider}", "trade_not_created": "Hindi nilikha ang kalakalan", "trade_not_found": "Hindi natagpuan ang kalakalan.", "trade_state_btc_sent": "Ipinadala ang BTC", @@ -753,134 +753,134 @@ "trade_state_confirming": "Pagkumpirma", "trade_state_created": "Nilikha", "trade_state_finished": "Tapos na", - "trade_state_paid": "Bayad", + "trade_state_paid": "Binayaran", "trade_state_paid_unconfirmed": "Bayad na hindi nakumpirma", - "trade_state_pending": "Nakabinbin", - "trade_state_timeout": "Oras ng oras", - "trade_state_to_be_created": "Upang malikha", + "trade_state_pending": "Hindi pa tapos", + "trade_state_timeout": "Timeout", + "trade_state_to_be_created": "lilikhain", "trade_state_traded": "Ipinagpalit", "trade_state_trading": "Pangangalakal", - "trade_state_underpaid": "Underpaid", - "trade_state_unpaid": "Walang bayad", - "trades": "Trading", + "trade_state_underpaid": "Kulang sa bayad", + "trade_state_unpaid": "Hindi nabayaran", + "trades": "Pangangalakal", "transaction_details_amount": "Halaga", "transaction_details_copied": "${title} kinopya sa clipboard", "transaction_details_date": "Petsa", - "transaction_details_fee": "Bayad", - "transaction_details_height": "Taas", + "transaction_details_fee": "Fee", + "transaction_details_height": "Height", "transaction_details_recipient_address": "Mga address ng tatanggap", - "transaction_details_source_address": "SOURCE ADDRESS", + "transaction_details_source_address": "Address ng pinagmulan", "transaction_details_title": "Mga detalye ng transaksyon", "transaction_details_transaction_id": "Transaction ID", - "transaction_key": "Susi ng transaksyon", + "transaction_key": "Transaction Key", "transaction_priority_fast": "Mabilis", "transaction_priority_fastest": "Pinakamabilis", - "transaction_priority_medium": "Katamtaman", + "transaction_priority_medium": "Medium", "transaction_priority_regular": "Regular", "transaction_priority_slow": "Mabagal", "transaction_sent": "Ipinadala ang transaksyon!", - "transaction_sent_notice": "Kung ang screen ay hindi magpatuloy pagkatapos ng 1 minuto, suriin ang isang block explorer at ang iyong email.", + "transaction_sent_notice": "Kung hindi magpapatuloy ang screen pagkatapos ng 1 minuto, tingnan ang block explorer at ang iyong email.", "transactions": "Mga Transaksyon", - "transactions_by_date": "Mga Transaksyon ayon sa Petsa", - "trongrid_history": "Kasaysayan ng Trongrid", + "transactions_by_date": "Mga transaksyon ayon sa petsa", + "trongrid_history": "Kasaysayan ng TronGrid", "trusted": "Pinagkakatiwalaan", - "tx_commit_exception_no_dust_on_change": "Ang transaksyon ay tinanggihan sa halagang ito. Sa mga barya na ito maaari kang magpadala ng ${min} nang walang pagbabago o ${max} na nagbabalik ng pagbabago.", - "tx_commit_failed": "Nabigo ang transaksyon sa transaksyon. Mangyaring makipag -ugnay sa suporta.", - "tx_invalid_input": "Gumagamit ka ng maling uri ng pag -input para sa ganitong uri ng pagbabayad", - "tx_no_dust_exception": "Ang transaksyon ay tinanggihan sa pamamagitan ng pagpapadala ng isang maliit na maliit. Mangyaring subukang dagdagan ang halaga.", - "tx_not_enough_inputs_exception": "Hindi sapat na magagamit ang mga input. Mangyaring pumili ng higit pa sa ilalim ng control ng barya", - "tx_rejected_bip68_final": "Ang transaksyon ay hindi nakumpirma na mga input at nabigo na palitan ng bayad.", - "tx_rejected_dust_change": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng pagbabago (alikabok). Subukang ipadala ang lahat o bawasan ang halaga.", - "tx_rejected_dust_output": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng output (alikabok). Mangyaring dagdagan ang halaga.", - "tx_rejected_dust_output_send_all": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng output (alikabok). Mangyaring suriin ang balanse ng mga barya na napili sa ilalim ng kontrol ng barya.", - "tx_rejected_vout_negative": "Hindi sapat na balanse upang magbayad para sa mga bayarin ng transaksyon na ito. Mangyaring suriin ang balanse ng mga barya sa ilalim ng kontrol ng barya.", + "tx_commit_exception_no_dust_on_change": "Ang transaksyon ay tinanggihan sa halagang ito. Sa mga barya na ito maaari kang magpadala ng ${min} nang walang sukli o ${max} na nagbabalik ng sukli.", + "tx_commit_failed": "Nabigo ang transaksyon. Mangyaring makipag-ugnay sa suporta.", + "tx_invalid_input": "Gumagamit ka ng maling uri ng pag-input para sa ganitong uri ng pagbabayad", + "tx_no_dust_exception": "Ang transaksyon ay tinanggihan sa pamamagitan ng pagpapadala ng isang maliit na halaga. Mangyaring subukang dagdagan ang halaga.", + "tx_not_enough_inputs_exception": "Hindi sapat na magagamit ang mga input. Mangyaring pumili ng higit pa sa ilalim ng Coin Control", + "tx_rejected_bip68_final": "Ang transaksyon ay hindi nakumpirma na mga input at nabigo na palitan ng fee.", + "tx_rejected_dust_change": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng fee (dust). Subukang ipadala ang lahat o bawasan ang halaga.", + "tx_rejected_dust_output": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng output (dust). Mangyaring dagdagan ang halaga.", + "tx_rejected_dust_output_send_all": "Ang transaksyon na tinanggihan ng mga patakaran sa network, mababang halaga ng output (dust). Mangyaring suriin ang balanse ng mga barya na napili sa ilalim ng Coin Control.", + "tx_rejected_vout_negative": "Hindi sapat na balanse upang magbayad para sa mga fee ng transaksyon na ito. Mangyaring suriin ang balanse ng mga barya sa ilalim ng Coin Control.", "tx_wrong_balance_exception": "Wala kang sapat na ${currency} upang maipadala ang halagang ito.", - "tx_wrong_balance_with_amount_exception": "Wala kang sapat ${currency} Upang ipadala ang kabuuang halaga ng ${amount}", - "tx_zero_fee_exception": "Hindi maaaring magpadala ng transaksyon na may 0 bayad. Subukan ang pagtaas ng rate o pagsuri sa iyong koneksyon para sa pinakabagong mga pagtatantya.", + "tx_wrong_balance_with_amount_exception": "Wala kang sapat ${currency} upang ipadala ang kabuuang halaga ng ${amount}", + "tx_zero_fee_exception": "Hindi maaaring magpadala ng transaksyon na may 0 fee. Subukan ang pagtaas ng rate o pagsuri sa iyong koneksyon para sa pinakabagong mga pagtatantya.", "unavailable_balance": "Hindi available na balanse", - "unavailable_balance_description": "Hindi Available na Balanse: Kasama sa kabuuang ito ang mga pondong naka-lock sa mga nakabinbing transaksyon at ang mga aktibong na-freeze mo sa iyong mga setting ng kontrol ng coin. Magiging available ang mga naka-lock na balanse kapag nakumpleto na ang kani-kanilang mga transaksyon, habang ang mga nakapirming balanse ay nananatiling hindi naa-access para sa mga transaksyon hanggang sa magpasya kang i-unfreeze ang mga ito.", + "unavailable_balance_description": "Hindi available na balanse: Kasama sa kabuuang ito ang mga pondong naka-lock sa mga nakabinbing transaksyon at ang mga aktibong na-freeze mo sa iyong mga setting ng Coin Control. Magiging available ang mga naka-lock na balanse kapag nakumpleto na ang kani-kanilang mga transaksyon, habang ang mga nakapirming balanse ay nananatiling hindi naa-access para sa mga transaksyon hanggang sa magpasya kang i-unfreeze ang mga ito.", "unconfirmed": "Hindi nakumpirma na balanse", - "understand": "naiintindihan ko", - "unlock": "I -unlock", - "unmatched_currencies": "Ang pera ng iyong kasalukuyang pitaka ay hindi tumutugma sa na -scan na QR", - "unspent_change": "Baguhin", - "unspent_coins_details_title": "Mga Detalye ng Unspent Coins", - "unspent_coins_title": "Unspent barya", - "unsupported_asset": "Hindi namin sinusuportahan ang pagkilos na ito para sa asset na ito. Mangyaring lumikha o lumipat sa isang pitaka ng isang suportadong uri ng pag -aari.", + "understand": "Naiitindihan ko", + "unlock": "I-unlock", + "unmatched_currencies": "Hindi tumutugma ang pera ng iyong kasalukuyang wallet sa na-scan na QR", + "unspent_change": "Sukli", + "unspent_coins_details_title": "Mga detalye ng mga hindi nagastos na barya", + "unspent_coins_title": "Mga hindi nagamit na barya", + "unsupported_asset": "Hindi namin sinusuportahan ang pagkilos na ito para sa asset na ito. Mangyaring lumikha o lumipat sa isang wallet ng isang suportadong uri ng asset.", "uptime": "Uptime", - "upto": "Hanggang sa ${value}", + "upto": "hanggang sa ${value}", "usb": "USB", - "use": "Lumipat sa", - "use_card_info_three": "Gamitin ang digital card online o sa mga pamamaraan ng pagbabayad na walang contact.", - "use_card_info_two": "Ang mga pondo ay na -convert sa USD kapag gaganapin sila sa prepaid account, hindi sa mga digital na pera.", + "use": "Lumipat sa ", + "use_card_info_three": "Gamitin ang digital card online o sa mga paraan ng pagbabayad na walang contact.", + "use_card_info_two": "Ang mga pondo ay na-convert sa USD kapag hawak sa prepaid account, hindi sa mga digital na pera.", "use_ssl": "Gumamit ng SSL", "use_suggested": "Gumamit ng iminungkahing", "use_testnet": "Gumamit ng testnet", "value": "Halaga", "value_type": "Uri ng halaga", - "variable_pair_not_supported": "Ang variable na pares na ito ay hindi suportado sa mga napiling palitan", - "verification": "Pag -verify", - "verify_with_2fa": "Mag -verify sa cake 2FA", + "variable_pair_not_supported": "Ang variable na pares na ito ay hindi suportado sa mga napiling exchange", + "verification": "Pag-verify", + "verify_with_2fa": "Mag-verify sa Cake 2FA", "version": "Bersyon ${currentVersion}", "view_all": "Tingnan lahat", "view_in_block_explorer": "Tingnan sa Block Explorer", - "view_key_private": "Tingnan ang Key (Pribado)", - "view_key_public": "Tingnan ang Key (Publiko)", - "view_transaction_on": "Tingnan ang transaksyon sa", + "view_key_private": "Tingnan ang view key (private)", + "view_key_public": "Tingnan ang view key (public)", + "view_transaction_on": "Tingnan ang transaksyon sa ", "voting_weight": "Bigat ng pagboto", "waitFewSecondForTxUpdate": "Mangyaring maghintay ng ilang segundo para makita ang transaksyon sa history ng mga transaksyon", - "wallet_keys": "Mga buto/susi ng pitaka", - "wallet_list_create_new_wallet": "Lumikha ng bagong pitaka", - "wallet_list_edit_wallet": "I -edit ang Wallet", - "wallet_list_failed_to_load": "Nabigong mag -load ng ${wallet_name} pitaka. ${error}", + "wallet_keys": "Wallet seed/keys", + "wallet_list_create_new_wallet": "Lumikha ng bagong wallet", + "wallet_list_edit_wallet": "I-edit ang wallet", + "wallet_list_failed_to_load": "Nabigong na-load ang ${wallet_name} na wallet. ${error}", "wallet_list_failed_to_remove": "Nabigong alisin ang ${wallet_name} wallet. ${error}", - "wallet_list_load_wallet": "Mag -load ng pitaka", - "wallet_list_loading_wallet": "Naglo -load ng ${wallet_name} Wallet", - "wallet_list_removing_wallet": "Pag -alis ng ${wallet_name} Wallet", - "wallet_list_restore_wallet": "Ibalik ang pitaka", + "wallet_list_load_wallet": "I-load ang wallet", + "wallet_list_loading_wallet": "Naglo-load ng ${wallet_name} wallet", + "wallet_list_removing_wallet": "Nag-aalis ang ${wallet_name} na wallet", + "wallet_list_restore_wallet": "Ibalik ang Wallet", "wallet_list_title": "Monero Wallet", - "wallet_list_wallet_name": "Pangalan ng Wallet", + "wallet_list_wallet_name": "Pangalan ng wallet", "wallet_menu": "Menu", - "wallet_name": "Pangalan ng Wallet", - "wallet_name_exists": "Ang isang pitaka na may pangalang iyon ay mayroon na. Mangyaring pumili ng ibang pangalan o palitan muna ang iba pang pitaka.", + "wallet_name": "Pangalan ng wallet", + "wallet_name_exists": "Ang isang wallet na may pangalang iyon ay mayroon na. Mangyaring pumili ng ibang pangalan o palitan muna ang iba pang wallet.", "wallet_password_is_empty": "Walang laman ang password ng wallet. Ang password ng wallet ay hindi dapat walang laman", - "wallet_recovery_height": "Taas ng pagbawi", - "wallet_restoration_store_incorrect_seed_length": "Maling haba ng binhi", - "wallet_seed": "SEED ng Wallet", + "wallet_recovery_height": "Recovery Height", + "wallet_restoration_store_incorrect_seed_length": "Maling haba ng seed", + "wallet_seed": "Wallet seed", "wallet_seed_legacy": "Legacy wallet seed", "wallet_store_monero_wallet": "Monero Wallet", "walletConnect": "WalletConnect", - "wallets": "Wallets", + "wallets": "Mga Wallet", "warning": "Babala", "welcome": "Maligayang pagdating sa", - "welcome_to_cakepay": "Maligayang pagdating sa cake pay!", + "welcome_to_cakepay": "Maligayang pagdating sa Cake Pay!", "what_is_silent_payments": "Ano ang tahimik na pagbabayad?", "widgets_address": "Address", "widgets_or": "o", - "widgets_restore_from_blockheight": "Ibalik mula sa blockheight", + "widgets_restore_from_blockheight": "Ibalik mula sa block height", "widgets_restore_from_date": "Ibalik mula sa petsa", - "widgets_seed": "Binhi", + "widgets_seed": "Seed", "wouoldLikeToConnect": "gustong kumonekta", - "write_down_backup_password": "Mangyaring isulat ang iyong backup password, na ginagamit para sa pag -import ng iyong mga backup file.", - "xlm_extra_info": "Mangyaring huwag kalimutan na tukuyin ang memo ID habang ipinapadala ang transaksyon ng XLM para sa palitan", - "xmr_available_balance": "Magagamit na balanse", - "xmr_full_balance": "Buong balanse", + "write_down_backup_password": "Mangyaring isulat ang iyong backup na password na ginagamit para sa pag-import ng iyong mga backup na file.", + "xlm_extra_info": "Mangyaring huwag kalimutang tukuyin ang Memo ID habang ipinapadala ang transaksyon sa XLM para sa palitan", + "xmr_available_balance": "Magagamit na Balanse", + "xmr_full_balance": "Buong Balanse", "xmr_hidden": "Nakatago", - "xmr_to_error": "Xmr.to error", - "xmr_to_error_description": "Di -wastong halaga. Pinakamataas na limitasyon ng 8 numero pagkatapos ng punto ng desimal", - "xrp_extra_info": "Mangyaring huwag kalimutan na tukuyin ang patutunguhan na tag habang ipinapadala ang transaksyon ng XRP para sa palitan", + "xmr_to_error": "XMR.TO error", + "xmr_to_error_description": "Hindi wastong halaga. Maximum�na limitasyon 8 digit pagkatapos ng decimal point", + "xrp_extra_info": "Mangyaring huwag kalimutan na tukuyin ang Destination Tag habang ipinapadala ang transaksyon ng XRP para sa palitan", "yat": "Yat", - "yat_address": "Yat address", - "yat_alert_content": "Ang mga gumagamit ng cake wallet ay maaari na ngayong magpadala at makatanggap ng lahat ng kanilang mga paboritong pera na may isang one-of-a-kind emoji-based username.", - "yat_alert_title": "Magpadala at tumanggap ng crypto nang mas madali sa yat", - "yat_error": "Error sa yat", - "yat_error_content": "Walang mga address na naka -link sa yat na ito. Subukan ang isa pang yat", - "yat_popup_content": "Maaari ka na ngayong magpadala at makatanggap ng crypto sa cake wallet kasama ang iyong yat - isang maikli, emoji na batay sa username. Pamahalaan ang mga yats anumang oras sa screen ng Mga Setting", - "yat_popup_title": "Ang iyong wallet address ay maaaring ma -emojified.", + "yat_address": "Yat Address", + "yat_alert_content": "Ang mga gumagamit ng Cake Wallet ay maaari na ngayong magpadala at tumanggap ng lahat ng kanilang mga paboritong pera gamit ang isa sa isang uri ng emoji-based na username.", + "yat_alert_title": "Magpadala at tumanggap ng crypto nang mas madali gamit ang Yat", + "yat_error": "Error sa Yat", + "yat_error_content": "Walang mga address na naka-link sa Yat na ito. Subukan ang isa pang Yat", + "yat_popup_content": "Maaari ka na ngayong magpadala at tumanggap ng crypto sa Cake Wallet gamit ang iyong Yat - isang maikling emoji-based na username. Pamahalaan ang Yats anumang oras sa screen ng mga setting", + "yat_popup_title": "Ang iyong wallet address ay maaring ma-emojified.", "yesterday": "Kahapon", "you_now_have_debit_card": "Mayroon ka na ngayong debit card", - "you_pay": "Magbabayad ka", - "you_will_get": "Mag -convert sa", - "you_will_send": "I -convert mula sa", + "you_pay": "Magbayad ka", + "you_will_get": "I-convert sa", + "you_will_send": "I-convert mula sa", "yy": "YY" -} \ No newline at end of file +} From 102139b0611dc3dceffedea26085eaef89ac31f4 Mon Sep 17 00:00:00 2001 From: Rafael Date: Thu, 15 Aug 2024 22:34:41 -0300 Subject: [PATCH 48/77] feat: more info on privkey error (#1612) --- cw_bitcoin/lib/electrum_wallet.dart | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 501d94e54..9dc8de083 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -993,11 +993,29 @@ abstract class ElectrumWalletBase bool hasTaprootInputs = false; final transaction = txb.buildTransaction((txDigest, utxo, publicKey, sighash) { - final key = estimatedTx.inputPrivKeyInfos - .firstWhereOrNull((element) => element.privkey.getPublic().toHex() == publicKey); + String error = "Cannot find private key."; + + ECPrivateInfo? key; + + if (estimatedTx.inputPrivKeyInfos.isEmpty) { + error += "\nNo private keys generated."; + } else { + error += "\nAddress: ${utxo.ownerDetails.address.toAddress()}"; + + key = estimatedTx.inputPrivKeyInfos.firstWhereOrNull((element) { + final elemPubkey = element.privkey.getPublic().toHex(); + if (elemPubkey == publicKey) { + return true; + } else { + error += "\nExpected: $publicKey"; + error += "\nPubkey: $elemPubkey"; + return false; + } + }); + } if (key == null) { - throw Exception("Cannot find private key"); + throw Exception(error); } if (utxo.utxo.isP2tr()) { From fb3f64facfb2dd5b6eb1b236a8c1fc074384f3ab Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Fri, 16 Aug 2024 23:21:03 +0100 Subject: [PATCH 49/77] fix: Restore backup bug fix and clean up sol error message (#1614) * fix: Restore backup bug fix and clean up sol error message * fix: Add async await to reinitialize --- lib/reactions/bootstrap.dart | 10 ++++---- .../on_authentication_state_change.dart | 16 +++++++++++-- lib/view_model/send/send_view_model.dart | 24 +++++++++++++++++++ res/values/strings_ar.arb | 2 ++ res/values/strings_bg.arb | 2 ++ res/values/strings_cs.arb | 2 ++ res/values/strings_de.arb | 2 ++ res/values/strings_en.arb | 2 ++ res/values/strings_es.arb | 2 ++ res/values/strings_fr.arb | 2 ++ res/values/strings_ha.arb | 2 ++ res/values/strings_hi.arb | 2 ++ res/values/strings_hr.arb | 2 ++ res/values/strings_id.arb | 2 ++ res/values/strings_it.arb | 2 ++ res/values/strings_ja.arb | 2 ++ res/values/strings_ko.arb | 2 ++ res/values/strings_my.arb | 2 ++ res/values/strings_nl.arb | 2 ++ res/values/strings_pl.arb | 2 ++ res/values/strings_pt.arb | 2 ++ res/values/strings_ru.arb | 2 ++ res/values/strings_th.arb | 2 ++ res/values/strings_tl.arb | 4 +++- res/values/strings_tr.arb | 2 ++ res/values/strings_uk.arb | 2 ++ res/values/strings_ur.arb | 2 ++ res/values/strings_yo.arb | 2 ++ res/values/strings_zh.arb | 2 ++ 29 files changed, 95 insertions(+), 9 deletions(-) diff --git a/lib/reactions/bootstrap.dart b/lib/reactions/bootstrap.dart index e78d8a01d..5b1a0ace7 100644 --- a/lib/reactions/bootstrap.dart +++ b/lib/reactions/bootstrap.dart @@ -21,16 +21,14 @@ Future bootstrap(GlobalKey navigatorKey) async { final settingsStore = getIt.get(); final fiatConversionStore = getIt.get(); - final currentWalletName = getIt - .get() - .getString(PreferencesKey.currentWalletName); + final currentWalletName = + getIt.get().getString(PreferencesKey.currentWalletName); if (currentWalletName != null) { authenticationStore.installed(); } - startAuthenticationStateChange(authenticationStore, navigatorKey); - startCurrentWalletChangeReaction( - appStore, settingsStore, fiatConversionStore); + await startAuthenticationStateChange(authenticationStore, navigatorKey); + startCurrentWalletChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatApiModeChangeReaction(appStore, settingsStore, fiatConversionStore); startOnCurrentNodeChangeReaction(appStore); diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index 95cbd51df..014306b98 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -13,8 +13,20 @@ ReactionDisposer? _onAuthenticationStateChange; dynamic loginError; StreamController authenticatedErrorStreamController = StreamController(); -void startAuthenticationStateChange( - AuthenticationStore authenticationStore, GlobalKey navigatorKey) { +Future reInitializeStreamController() async { + if (!authenticatedErrorStreamController.isClosed) { + await authenticatedErrorStreamController.close(); + } + + authenticatedErrorStreamController = StreamController(); +} + +Future startAuthenticationStateChange( + AuthenticationStore authenticationStore, + GlobalKey navigatorKey, +) async { + await reInitializeStreamController(); + authenticatedErrorStreamController.stream.listen((event) { if (authenticationStore.state == AuthenticationState.allowed) { ExceptionHandler.showError(event.toString(), delayInSeconds: 3); diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index d0514bb19..863c83957 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -583,6 +583,30 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor String errorMessage = error.toString(); if (walletType == WalletType.solana) { + if (errorMessage.contains('insufficient lamports')) { + double solValueNeeded = 0.0; + + // Regular expression to match the number after "need". This shows the exact lamports the user needs to perform the transaction. + RegExp regExp = RegExp(r'need (\d+)'); + + // Find the match + Match? match = regExp.firstMatch(errorMessage); + + if (match != null) { + String neededAmount = match.group(1)!; + final lamportsNeeded = int.tryParse(neededAmount); + + // 5000 lamport used here is the constant for sending a transaction on solana + int lamportsPerSol = 1000000000; + + solValueNeeded = + lamportsNeeded != null ? ((lamportsNeeded + 5000) / lamportsPerSol) : 0.0; + return S.current.insufficient_lamports(solValueNeeded.toString()); + } else { + print("No match found."); + return S.current.insufficient_lamport_for_tx; + } + } if (errorMessage.contains('insufficient funds for rent')) { return S.current.insufficientFundsForRentError; } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 98cafdebc..a73067383 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -338,6 +338,8 @@ "incoming": "الواردة", "incorrect_seed": "النص الذي تم إدخاله غير صالح.", "inputs": "المدخلات", + "insufficient_lamport_for_tx": "ليس لديك ما يكفي من SOL لتغطية المعاملة ورسوم المعاملات الخاصة بها. يرجى إضافة المزيد من SOL إلى محفظتك أو تقليل كمية SOL التي ترسلها.", + "insufficient_lamports": "ليس لديك ما يكفي من SOL لتغطية المعاملة ورسوم المعاملات الخاصة بها. تحتاج على الأقل ${solValueNeeded} sol. يرجى إضافة المزيد من sol إلى محفظتك أو تقليل مبلغ sol الذي ترسله", "insufficientFundsForRentError": "ليس لديك ما يكفي من SOL لتغطية رسوم المعاملة والإيجار للحساب. يرجى إضافة المزيد من sol إلى محفظتك أو تقليل مبلغ sol الذي ترسله", "introducing_cake_pay": "نقدم لكم Cake Pay!", "invalid_input": "مدخل غير صالح", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index b51167dab..b60cbc55c 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -338,6 +338,8 @@ "incoming": "Входящи", "incorrect_seed": "Въведеният текст е невалиден.", "inputs": "Входове", + "insufficient_lamport_for_tx": "Нямате достатъчно SOL, за да покриете транзакцията и таксата му за транзакция. Моля, добавете повече SOL към портфейла си или намалете сумата на SOL, която изпращате.", + "insufficient_lamports": "Нямате достатъчно SOL, за да покриете транзакцията и таксата му за транзакция. Имате нужда от поне ${solValueNeeded} sol. Моля, добавете повече SOL към портфейла си или намалете сумата на SOL, която изпращате", "insufficientFundsForRentError": "Нямате достатъчно SOL, за да покриете таксата за транзакцията и наемането на сметката. Моля, добавете повече SOL към портфейла си или намалете сумата на SOL, която изпращате", "introducing_cake_pay": "Запознайте се с Cake Pay!", "invalid_input": "Невалиден вход", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index d47ca932c..537695dd9 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -338,6 +338,8 @@ "incoming": "Příchozí", "incorrect_seed": "Zadaný text není správný.", "inputs": "Vstupy", + "insufficient_lamport_for_tx": "Nemáte dostatek SOL na pokrytí transakce a jejího transakčního poplatku. Laskavě přidejte do své peněženky více solu nebo snižte množství Sol, kterou odesíláte.", + "insufficient_lamports": "Nemáte dostatek SOL na pokrytí transakce a jejího transakčního poplatku. Potřebujete alespoň ${solValueNeeded} sol. Laskavě přidejte do své peněženky více SOL nebo snižte množství Sol, kterou odesíláte", "insufficientFundsForRentError": "Nemáte dostatek SOL na pokrytí transakčního poplatku a nájemného za účet. Laskavě přidejte do své peněženky více SOL nebo snižte množství Sol, kterou odesíláte", "introducing_cake_pay": "Představujeme Cake Pay!", "invalid_input": "Neplatný vstup", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index e64c3bc27..052015367 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -338,6 +338,8 @@ "incoming": "Eingehend", "incorrect_seed": "Der eingegebene Text ist ungültig.", "inputs": "Eingänge", + "insufficient_lamport_for_tx": "Sie haben nicht genug SOL, um die Transaktion und ihre Transaktionsgebühr abzudecken. Bitte fügen Sie Ihrer Brieftasche mehr Sol hinzu oder reduzieren Sie die SO -Menge, die Sie senden.", + "insufficient_lamports": "Sie haben nicht genug SOL, um die Transaktion und ihre Transaktionsgebühr abzudecken. Sie brauchen mindestens ${solValueNeeded} Sol. Bitte fügen Sie mehr Sol zu Ihrer Wallet hinzu oder reduzieren Sie den von Ihnen gesendeten Sol -Betrag", "insufficientFundsForRentError": "Sie haben nicht genug SOL, um die Transaktionsgebühr und die Miete für das Konto zu decken. Bitte fügen Sie mehr Sol zu Ihrer Brieftasche hinzu oder reduzieren Sie den von Ihnen gesendeten Sol -Betrag", "introducing_cake_pay": "Einführung von Cake Pay!", "invalid_input": "Ungültige Eingabe", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 9d7d9ad49..0f0ebd470 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -338,6 +338,8 @@ "incoming": "Incoming", "incorrect_seed": "The text entered is not valid.", "inputs": "Inputs", + "insufficient_lamport_for_tx": "You do not have enough SOL to cover the transaction and its transaction fee. Kindly add more SOL to your wallet or reduce the SOL amount you\\'re sending.", + "insufficient_lamports": "You do not have enough SOL to cover the transaction and its transaction fee. You need at least ${solValueNeeded} SOL. Kindly add more SOL to your wallet or reduce the SOL amount you\\'re sending", "insufficientFundsForRentError": "You do not have enough SOL to cover the transaction fee and rent for the account. Kindly add more SOL to your wallet or reduce the SOL amount you\\'re sending", "introducing_cake_pay": "Introducing Cake Pay!", "invalid_input": "Invalid input", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index e7f1366a5..1e6eeae59 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -338,6 +338,8 @@ "incoming": "Entrante", "incorrect_seed": "El texto ingresado no es válido.", "inputs": "Entradas", + "insufficient_lamport_for_tx": "No tiene suficiente SOL para cubrir la transacción y su tarifa de transacción. Por favor, agregue más SOL a su billetera o reduzca la cantidad de sol que está enviando.", + "insufficient_lamports": "No tiene suficiente SOL para cubrir la transacción y su tarifa de transacción. Necesita al menos ${solValueNeeded} sol. Por favor, agregue más sol a su billetera o reduzca la cantidad de sol que está enviando", "insufficientFundsForRentError": "No tiene suficiente SOL para cubrir la tarifa de transacción y alquilar para la cuenta. Por favor, agregue más sol a su billetera o reduzca la cantidad de sol que está enviando", "introducing_cake_pay": "¡Presentamos Cake Pay!", "invalid_input": "Entrada inválida", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 7965eca12..a64a69514 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -338,6 +338,8 @@ "incoming": "Entrantes", "incorrect_seed": "Le texte entré est invalide.", "inputs": "Contributions", + "insufficient_lamport_for_tx": "Vous n'avez pas assez de sol pour couvrir la transaction et ses frais de transaction. Veuillez ajouter plus de Sol à votre portefeuille ou réduire la quantité de Sol que vous envoyez.", + "insufficient_lamports": "Vous n'avez pas assez de sol pour couvrir la transaction et ses frais de transaction. Vous avez besoin d'au moins ${solValueNeeded} sol. Veuillez ajouter plus de Sol à votre portefeuille ou réduire la quantité de sol que vous envoyez", "insufficientFundsForRentError": "Vous n'avez pas assez de SOL pour couvrir les frais de transaction et le loyer pour le compte. Veuillez ajouter plus de Sol à votre portefeuille ou réduire la quantité de sol que vous envoyez", "introducing_cake_pay": "Présentation de Cake Pay !", "invalid_input": "Entrée invalide", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index d2c58971f..219b3c939 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -338,6 +338,8 @@ "incoming": "Mai shigowa", "incorrect_seed": "rubutun da aka shigar ba shi da inganci.", "inputs": "Abubuwan da ke ciki", + "insufficient_lamport_for_tx": "Ba ku da isasshen sool don rufe ma'amala da kuɗin ma'amala. Da unara ƙara ƙarin sool a cikin walat ɗinku ko rage adadin Sol ɗin da kuke aikawa.", + "insufficient_lamports": "Ba ku da isasshen sool don rufe ma'amala da kuɗin ma'amala. Kuna buƙatar aƙalla ${solValueNeeded} Sol. Da kyau ƙara ƙarin sool zuwa walat ɗinku ko rage adadin Sol ɗin da kuke aikawa", "insufficientFundsForRentError": "Ba ku da isasshen Sol don rufe kuɗin ma'amala da haya don asusun. Da kyau ƙara ƙarin sool zuwa walat ɗinku ko rage adadin Sol ɗin da kuke aikawa", "introducing_cake_pay": "Gabatar da Cake Pay!", "invalid_input": "Shigar da ba daidai ba", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index baa3925c0..b711939a4 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -338,6 +338,8 @@ "incoming": "आने वाली", "incorrect_seed": "दर्ज किया गया पाठ मान्य नहीं है।", "inputs": "इनपुट", + "insufficient_lamport_for_tx": "आपके पास लेनदेन और इसके लेनदेन शुल्क को कवर करने के लिए पर्याप्त सोल नहीं है। कृपया अपने बटुए में अधिक सोल जोड़ें या आपके द्वारा भेजे जा रहे सोल राशि को कम करें।", + "insufficient_lamports": "आपके पास लेनदेन और इसके लेनदेन शुल्क को कवर करने के लिए पर्याप्त सोल नहीं है। आपको कम से कम ${solValueNeeded} सोल की आवश्यकता है। कृपया अपने बटुए में अधिक सोल जोड़ें या सोल राशि को कम करें जिसे आप भेज रहे हैं", "insufficientFundsForRentError": "आपके पास लेन -देन शुल्क और खाते के लिए किराए को कवर करने के लिए पर्याप्त सोल नहीं है। कृपया अपने बटुए में अधिक सोल जोड़ें या सोल राशि को कम करें जिसे आप भेज रहे हैं", "introducing_cake_pay": "परिचय Cake Pay!", "invalid_input": "अमान्य निवेश", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index e6b820300..401514735 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -338,6 +338,8 @@ "incoming": "Dolazno", "incorrect_seed": "Uneseni tekst nije valjan.", "inputs": "Unosi", + "insufficient_lamport_for_tx": "Nemate dovoljno SOL -a da pokriva transakciju i njegovu transakcijsku naknadu. Ljubazno dodajte više sol u svoj novčanik ili smanjite količinu SOL -a koju šaljete.", + "insufficient_lamports": "Nemate dovoljno SOL -a da pokriva transakciju i njegovu transakcijsku naknadu. Trebate najmanje ${solValueNeeded} sol. Ljubazno dodajte više sol u svoj novčanik ili smanjite količinu SOL -a koju šaljete", "insufficientFundsForRentError": "Nemate dovoljno SOL -a za pokrivanje naknade za transakciju i najamninu za račun. Ljubazno dodajte više sol u svoj novčanik ili smanjite količinu SOL -a koju šaljete", "introducing_cake_pay": "Predstavljamo Cake Pay!", "invalid_input": "Pogrešan unos", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 0b8077807..b6210b5dd 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -338,6 +338,8 @@ "incoming": "Masuk", "incorrect_seed": "Teks yang dimasukkan tidak valid.", "inputs": "Input", + "insufficient_lamport_for_tx": "Anda tidak memiliki cukup SOL untuk menutupi transaksi dan biaya transaksinya. Mohon tambahkan lebih banyak sol ke dompet Anda atau kurangi jumlah sol yang Anda kirim.", + "insufficient_lamports": "Anda tidak memiliki cukup SOL untuk menutupi transaksi dan biaya transaksinya. Anda membutuhkan setidaknya ${solValueNeeded} sol. Mohon tambahkan lebih banyak sol ke dompet Anda atau kurangi jumlah sol yang Anda kirim", "insufficientFundsForRentError": "Anda tidak memiliki cukup SOL untuk menutupi biaya transaksi dan menyewa untuk akun tersebut. Mohon tambahkan lebih banyak sol ke dompet Anda atau kurangi jumlah sol yang Anda kirim", "introducing_cake_pay": "Perkenalkan Cake Pay!", "invalid_input": "Masukan tidak valid", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index b7a81ef9a..fc4abf7c4 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -339,6 +339,8 @@ "incoming": "In arrivo", "incorrect_seed": "Il testo inserito non è valido.", "inputs": "Input", + "insufficient_lamport_for_tx": "Non hai abbastanza SOL per coprire la transazione e la sua quota di transazione. Si prega di aggiungere più SOL al tuo portafoglio o ridurre l'importo SOL che stai inviando.", + "insufficient_lamports": "Non hai abbastanza SOL per coprire la transazione e la sua quota di transazione. Hai bisogno di almeno ${solValueNeeded} sol. Si prega di aggiungere più SOL al tuo portafoglio o ridurre l'importo SOL che stai inviando", "insufficientFundsForRentError": "Non hai abbastanza SOL per coprire la tassa di transazione e l'affitto per il conto. Si prega di aggiungere più SOL al tuo portafoglio o ridurre l'importo SOL che stai inviando", "introducing_cake_pay": "Presentazione di Cake Pay!", "invalid_input": "Inserimento non valido", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index a13a4e6f0..98495fc8b 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -339,6 +339,8 @@ "incoming": "着信", "incorrect_seed": "入力されたテキストは無効です。", "inputs": "入力", + "insufficient_lamport_for_tx": "トランザクションとその取引手数料をカバーするのに十分なSOLがありません。財布にソルを追加するか、送信するソル量を減らしてください。", + "insufficient_lamports": "トランザクションとその取引手数料をカバーするのに十分なSOLがありません。少なくとも${solValueNeeded} solが必要です。財布にソルを追加するか、送信するソル量を減らしてください", "insufficientFundsForRentError": "アカウントの取引料金とレンタルをカバーするのに十分なソルがありません。財布にソルを追加するか、送信するソル量を減らしてください", "introducing_cake_pay": "序章Cake Pay!", "invalid_input": "無効入力", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index d20546f41..60c52b21f 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -338,6 +338,8 @@ "incoming": "들어오는", "incorrect_seed": "입력하신 텍스트가 유효하지 않습니다.", "inputs": "입력", + "insufficient_lamport_for_tx": "거래 및 거래 수수료를 충당하기에 충분한 SOL이 없습니다. 지갑에 더 많은 솔을 추가하거나 보내는 솔을 줄입니다.", + "insufficient_lamports": "거래 및 거래 수수료를 충당하기에 충분한 SOL이 없습니다. 최소 ${solValueNeeded} sol이 필요합니다. 지갑에 더 많은 솔을 추가하거나 보내는 솔을 줄이십시오.", "insufficientFundsForRentError": "거래 수수료와 계좌 임대료를 충당하기에 충분한 SOL이 없습니다. 지갑에 더 많은 솔을 추가하거나 보내는 솔을 줄이십시오.", "introducing_cake_pay": "소개 Cake Pay!", "invalid_input": "잘못된 입력", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 06d7cf627..42643be48 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -338,6 +338,8 @@ "incoming": "ဝင်လာ", "incorrect_seed": "ထည့်သွင်းထားသော စာသားသည် မမှန်ကန်ပါ။", "inputs": "သွင်းငေှ", + "insufficient_lamport_for_tx": "သငျသညျငွေပေးငွေယူနှင့်၎င်း၏ငွေပေးငွေယူကြေးကိုဖုံးလွှမ်းရန် sol ရှိသည်မဟုတ်ကြဘူး။ ကြင်နာစွာသင်၏ပိုက်ဆံအိတ်သို့ပိုမို sol ကိုထပ်ထည့်ပါသို့မဟုတ်သင်ပို့လွှတ်ခြင်း sol ပမာဏကိုလျှော့ချပါ။", + "insufficient_lamports": "သငျသညျငွေပေးငွေယူနှင့်၎င်း၏ငွေပေးငွေယူကြေးကိုဖုံးလွှမ်းရန် sol ရှိသည်မဟုတ်ကြဘူး။ သင်အနည်းဆုံး ${solValueNeeded} s ကိုလိုအပ်ပါတယ်။ ကြင်နာစွာသင်၏ပိုက်ဆံအိတ်သို့ပိုမို sol ကိုထပ်ထည့်ပါသို့မဟုတ်သင်ပို့နေသော sol ပမာဏကိုလျှော့ချပါ", "insufficientFundsForRentError": "သင်ငွေပေးချေမှုအခကြေးငွေကိုဖုံးအုပ်ရန်နှင့်အကောင့်ငှားရန်လုံလောက်သော sol ရှိသည်မဟုတ်ကြဘူး။ ကြင်နာစွာသင်၏ပိုက်ဆံအိတ်သို့ပိုမို sol ကိုပိုမိုထည့်ပါသို့မဟုတ်သင်ပို့ခြင်း sol ပမာဏကိုလျှော့ချပါ", "introducing_cake_pay": "Cake Pay ကို မိတ်ဆက်ခြင်း။", "invalid_input": "ထည့်သွင်းမှု မမှန်ကန်ပါ။", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 78caef912..0f6149182 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -338,6 +338,8 @@ "incoming": "inkomend", "incorrect_seed": "De ingevoerde tekst is niet geldig.", "inputs": "Invoer", + "insufficient_lamport_for_tx": "U hebt niet genoeg SOL om de transactie en de transactiekosten te dekken. Voeg vriendelijk meer SOL toe aan uw portemonnee of verminder de SOL -hoeveelheid die u verzendt.", + "insufficient_lamports": "U hebt niet genoeg SOL om de transactie en de transactiekosten te dekken. Je hebt minstens ${solValueNeeded} sol nodig. Voeg vriendelijk meer Sol toe aan uw portemonnee of verminder de SOL -hoeveelheid die u verzendt", "insufficientFundsForRentError": "U hebt niet genoeg SOL om de transactiekosten en huur voor de rekening te dekken. Voeg vriendelijk meer SOL toe aan uw portemonnee of verminder de SOL -hoeveelheid die u verzendt", "introducing_cake_pay": "Introductie van Cake Pay!", "invalid_input": "Ongeldige invoer", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 7de435319..48d6e38f6 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -338,6 +338,8 @@ "incoming": "Przychodzące", "incorrect_seed": "Wprowadzony seed jest nieprawidłowy.", "inputs": "Wejścia", + "insufficient_lamport_for_tx": "Nie masz wystarczającej ilości SOL, aby pokryć transakcję i opłatę za transakcję. Uprzejmie dodaj więcej sol do portfela lub zmniejsz wysyłaną kwotę SOL.", + "insufficient_lamports": "Nie masz wystarczającej ilości SOL, aby pokryć transakcję i opłatę za transakcję. Potrzebujesz przynajmniej ${solValueNeeded} sol. Uprzejmie dodaj więcej sol do portfela lub zmniejsz wysyłaną kwotę SOL, którą wysyłasz", "insufficientFundsForRentError": "Nie masz wystarczającej ilości SOL, aby pokryć opłatę za transakcję i czynsz za konto. Uprzejmie dodaj więcej sol do portfela lub zmniejsz solę, którą wysyłasz", "introducing_cake_pay": "Przedstawiamy Cake Pay!", "invalid_input": "Nieprawidłowe dane wejściowe", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index a3d789cab..070f3f776 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -338,6 +338,8 @@ "incoming": "Recebidas", "incorrect_seed": "O texto digitado não é válido.", "inputs": "Entradas", + "insufficient_lamport_for_tx": "Você não tem Sol suficiente para cobrir a transação e sua taxa de transação. Por favor, adicione mais sol à sua carteira ou reduza a quantidade de sol que você envia.", + "insufficient_lamports": "Você não tem Sol suficiente para cobrir a transação e sua taxa de transação. Você precisa de pelo menos ${solValueNeeded} sol. Por favor, adicione mais sol à sua carteira ou reduza a quantidade de sol que você está enviando", "insufficientFundsForRentError": "Você não tem Sol suficiente para cobrir a taxa de transação e o aluguel da conta. Por favor, adicione mais sol à sua carteira ou reduza a quantidade de sol que você envia", "introducing_cake_pay": "Apresentando o Cake Pay!", "invalid_input": "Entrada inválida", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index d84aa146f..695877c77 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -338,6 +338,8 @@ "incoming": "Входящие", "incorrect_seed": "Введённый текст некорректный.", "inputs": "Входы", + "insufficient_lamport_for_tx": "У вас недостаточно Sol, чтобы покрыть транзакцию и плату за транзакцию. Пожалуйста, добавьте больше Sol в свой кошелек или уменьшите сумму Sol, которую вы отправляете.", + "insufficient_lamports": "У вас недостаточно Sol, чтобы покрыть транзакцию и плату за транзакцию. Вам нужен как минимум ${solValueNeeded} sol. Пожалуйста, добавьте больше Sol в свой кошелек или уменьшите сумму Sol, которую вы отправляете", "insufficientFundsForRentError": "У вас недостаточно Sol, чтобы покрыть плату за транзакцию и аренду для счета. Пожалуйста, добавьте больше Sol в свой кошелек или уменьшите сумму Sol, которую вы отправляете", "introducing_cake_pay": "Представляем Cake Pay!", "invalid_input": "Неверный Ввод", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 2adccb2cf..5757eed0b 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -338,6 +338,8 @@ "incoming": "ขาเข้า", "incorrect_seed": "ข้อความที่ป้อนไม่ถูกต้อง", "inputs": "อินพุต", + "insufficient_lamport_for_tx": "คุณไม่มีโซลเพียงพอที่จะครอบคลุมการทำธุรกรรมและค่าธรรมเนียมการทำธุรกรรม กรุณาเพิ่มโซลให้มากขึ้นลงในกระเป๋าเงินของคุณหรือลดจำนวนโซลที่คุณส่งมา", + "insufficient_lamports": "คุณไม่มีโซลเพียงพอที่จะครอบคลุมการทำธุรกรรมและค่าธรรมเนียมการทำธุรกรรม คุณต้องการอย่างน้อย ${solValueNeeded} SOL กรุณาเพิ่มโซลให้มากขึ้นลงในกระเป๋าเงินของคุณหรือลดจำนวนโซลที่คุณกำลังส่ง", "insufficientFundsForRentError": "คุณไม่มีโซลเพียงพอที่จะครอบคลุมค่าธรรมเนียมการทำธุรกรรมและค่าเช่าสำหรับบัญชี กรุณาเพิ่มโซลให้มากขึ้นลงในกระเป๋าเงินของคุณหรือลดจำนวนโซลที่คุณส่งมา", "introducing_cake_pay": "ยินดีต้อนรับสู่ Cake Pay!", "invalid_input": "อินพุตไม่ถูกต้อง", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 22093f772..7fc83afd8 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -338,6 +338,8 @@ "incoming": "Papasok", "incorrect_seed": "Ang text na ipinasok ay hindi wasto.", "inputs": "Mga input", + "insufficient_lamport_for_tx": "Wala kang sapat na SOL upang masakop ang transaksyon at ang bayad sa transaksyon nito. Mabuting magdagdag ng higit pa sa iyong pitaka o bawasan ang sol na halaga na iyong ipinapadala.", + "insufficient_lamports": "Wala kang sapat na SOL upang masakop ang transaksyon at ang bayad sa transaksyon nito. Kailangan mo ng hindi bababa sa ${solValueNeeded} sol. Mabait na magdagdag ng higit pang sol sa iyong pitaka o bawasan ang dami ng iyong ipinapadala", "insufficientFundsForRentError": "Wala kang sapat na SOL upang masakop ang fee sa transaksyon at upa para sa account. Mabait na magdagdag ng higit pa sa iyong wallet o bawasan ang halaga ng SOL na iyong ipinapadala", "introducing_cake_pay": "Pagpapakilala ng Cake Pay!", "invalid_input": "Di-wastong input", @@ -883,4 +885,4 @@ "you_will_get": "I-convert sa", "you_will_send": "I-convert mula sa", "yy": "YY" -} +} \ No newline at end of file diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index b47787bbd..4d1aa43e4 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -338,6 +338,8 @@ "incoming": "Gelen", "incorrect_seed": "Girilen metin geçerli değil.", "inputs": "Girişler", + "insufficient_lamport_for_tx": "İşlemi ve işlem ücretini karşılamak için yeterli SOL'unuz yok. Lütfen cüzdanınıza daha fazla SOL ekleyin veya gönderdiğiniz sol miktarını azaltın.", + "insufficient_lamports": "İşlemi ve işlem ücretini karşılamak için yeterli SOL'unuz yok. En az ${solValueNeeded} Sol'a ihtiyacınız var. Lütfen cüzdanınıza daha fazla sol ekleyin veya gönderdiğiniz sol miktarını azaltın", "insufficientFundsForRentError": "İşlem ücretini karşılamak ve hesap için kiralamak için yeterli SOL'nuz yok. Lütfen cüzdanınıza daha fazla sol ekleyin veya gönderdiğiniz sol miktarını azaltın", "introducing_cake_pay": "Cake Pay ile tanışın!", "invalid_input": "Geçersiz Giriş", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 328548087..22edec0d5 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -338,6 +338,8 @@ "incoming": "Вхідні", "incorrect_seed": "Введений текст невірний.", "inputs": "Вхoди", + "insufficient_lamport_for_tx": "У вас недостатньо SOL, щоб покрити транзакцію та її плату за трансакцію. Будь ласка, додайте до свого гаманця більше SOL або зменшіть суму, яку ви надсилаєте.", + "insufficient_lamports": "У вас недостатньо SOL, щоб покрити транзакцію та її плату за трансакцію. Вам потрібно щонайменше ${solValueNeeded} sol. Будь ласка, додайте до свого гаманця більше SOL або зменшіть суму Sol, яку ви надсилаєте", "insufficientFundsForRentError": "У вас недостатньо SOL, щоб покрити плату за транзакцію та оренду на рахунок. Будь ласка, додайте до свого гаманця більше SOL або зменшіть суму, яку ви надсилаєте", "introducing_cake_pay": "Представляємо Cake Pay!", "invalid_input": "Неправильні дані", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 7d794f9bb..590f344d8 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -338,6 +338,8 @@ "incoming": "آنے والا", "incorrect_seed": "درج کردہ متن درست نہیں ہے۔", "inputs": "آدانوں", + "insufficient_lamport_for_tx": "آپ کے پاس ٹرانزیکشن اور اس کے لین دین کی فیس کا احاطہ کرنے کے لئے کافی SOL نہیں ہے۔ برائے مہربانی اپنے بٹوے میں مزید سول شامل کریں یا آپ کو بھیجنے والی سول رقم کو کم کریں۔", + "insufficient_lamports": "آپ کے پاس ٹرانزیکشن اور اس کے لین دین کی فیس کا احاطہ کرنے کے لئے کافی SOL نہیں ہے۔ آپ کو کم از کم ${solValueNeeded} sol کی ضرورت ہے۔ برائے مہربانی اپنے بٹوے میں مزید SOL شامل کریں یا آپ جس SOL رقم کو بھیج رہے ہو اسے کم کریں", "insufficientFundsForRentError": "آپ کے پاس ٹرانزیکشن فیس اور اکاؤنٹ کے لئے کرایہ لینے کے ل enough اتنا SOL نہیں ہے۔ برائے مہربانی اپنے بٹوے میں مزید سول شامل کریں یا آپ کو بھیجنے والی سول رقم کو کم کریں", "introducing_cake_pay": "Cake پے کا تعارف!", "invalid_input": "غلط ان پٹ", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 2150a503f..e5cf3d3f9 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -339,6 +339,8 @@ "incoming": "Wọ́n tó ń bọ̀", "incorrect_seed": "Ọ̀rọ̀ tí a tẹ̀ kì í ṣe èyí.", "inputs": "Igbewọle", + "insufficient_lamport_for_tx": "O ko ni sosi to lati bo idunadura ati idiyele iṣowo rẹ. Fi agbara kun Sol diẹ sii si apamọwọ rẹ tabi dinku sodo naa ti o \\ 'tun n firanṣẹ.", + "insufficient_lamports": "O ko ni sosi to lati bo idunadura ati idiyele iṣowo rẹ. O nilo o kere ju ${solValueNeeded}. Fi agbara kun Sol diẹ sii si apamọwọ rẹ tabi dinku soso ti o n firanṣẹ", "insufficientFundsForRentError": "O ko ni Sol kan lati bo owo isanwo naa ki o yalo fun iroyin naa. Fi agbara kun Sol diẹ sii si apamọwọ rẹ tabi dinku soso naa ti o \\ 'tun n firanṣẹ", "introducing_cake_pay": "Ẹ bá Cake Pay!", "invalid_input": "Iṣawọle ti ko tọ", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 5db53a423..25024d0ed 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -338,6 +338,8 @@ "incoming": "收到", "incorrect_seed": "输入的文字无效。", "inputs": "输入", + "insufficient_lamport_for_tx": "您没有足够的溶胶来支付交易及其交易费用。请在您的钱包中添加更多溶胶或减少您发送的溶胶量。", + "insufficient_lamports": "您没有足够的溶胶来支付交易及其交易费用。您至少需要${solValueNeeded} sol。请在您的钱包中添加更多溶胶或减少您发送的溶胶量", "insufficientFundsForRentError": "您没有足够的溶胶来支付该帐户的交易费和租金。请在钱包中添加更多溶胶或减少您发送的溶胶量", "introducing_cake_pay": "介绍 Cake Pay!", "invalid_input": "输入无效", From ab1f267c78abdb8d4e0f03d80b51ccc6b0485a02 Mon Sep 17 00:00:00 2001 From: tuxpizza Date: Fri, 16 Aug 2024 18:45:06 -0400 Subject: [PATCH 50/77] Update flags --- assets/images/flags/are.png | Bin 287 -> 190 bytes assets/images/flags/arg.png | Bin 340 -> 440 bytes assets/images/flags/aus.png | Bin 1390 -> 873 bytes assets/images/flags/bgd.png | Bin 446 -> 447 bytes assets/images/flags/bgr.png | Bin 735 -> 193 bytes assets/images/flags/bra.png | Bin 1269 -> 692 bytes assets/images/flags/cad.png | Bin 1005 -> 417 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/flags/are.png b/assets/images/flags/are.png index ae68c4ff2a1768cadb388223715b2f0dc75642df..8eb1e2bd3815aa15b34deb6a323f0b55a87df21f 100644 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC&H|6fVg?3oVGw3ym^DWNC|Ka> z;uumf=k3*vyhjW;SOb=I1;reF``lAGa^juhwWp_idurRsDDa_^p`qSjpS$hK&9&23 zTyQXM+~j2JerHKQ=f#h0?qy%AJGppEgf+BHijTx{O_h+%uSl7>)1{T|63Z#BvoeKV k3xyUZKX+$i*tk%>YwzQm5~UY2fp#-^y85}Sb4q9e08`9Dc>n+a literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3HD`?mYJmNHG=%xjQkeJ16rJ$YDu$^mSxl z*x1kgCy^D%=PdAuEM{QfI}E~%$MaXD00p;rx;TbJxF<`nDvKI8Wg7h8ciV9=TThJb zZAGbpulR*(!FP6Q8n!PEu5ez-+qT^KKlA2W_v`B=C0?{nWboYiPgq{uxv*O4uzH-{ z3Xa@^t9In=`0Y`o(Y!)~`S8})JUmK=0vK;GxhXUlo%C4z|G%T;7uLl)=iN$>u%0qg z^3(!-g|!t)>FFBZJ}_MV!mv7Qtu?#}nihQl@4AY1X$jVbis5Mt!)grOtO~c1gm<|g zeS!Xc4aQy)#^w|{+bYa;6;^f{PI&>sZbe_f7XpKabJ)ccI@&xQb92yh4BnN7z!%XM z2)-uKXWDN40NuKVfpPPz6DSz9z+aT|ldx9 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`Jpz0}Tuav6FIs(X@rhT9Prm*S0{_0hef<9JiH}dN-P_%JaelgpT+y^?3zb&dGGD+yErfW;=G8(Ctd>$TX{@F2}ntl1o;Jn&A}uX z&I;?j0;=IG@Q5sCVBk9p!i>lBSEK+13q4&NLoEESUOdUwpdiwkxLHO@X4Ap%^_La; z8WW4mb^jC;Ka77d)pgVVAh!z%w*(cQ>i?}R@@Stk!OOEzQFD3KoM*1d9$hOpo~ush zb<wn>X~kpFh7oHSu()$H($e-eoTJOAO;ayjFXwZ&ErLXgPzY LtDnm{r-UW|t%;#5 diff --git a/assets/images/flags/aus.png b/assets/images/flags/aus.png index c8837731c58a5746ff36872629dfabac35b11026..79a9744255c5642e75c8c4961602459a8c617513 100644 GIT binary patch delta 865 zcmV-n1D^cu3h4$RiBL{Q4GJ0x0000DNk~Le0000m0000m2nGNE09OL}hmj!{e*+sy zL_t(|ob8wUOOsI?#`ou}3-v>-vISYtinN-yG($@Z3bWFb0u5$Kplzu%CrqZI+nDCC zBxEX5s3obT)ekD!buruKHZSwG?cJU@FHOR|&V}!mgZF`lb2vNa<@?z=-*e&dIC0{{ zi4!MITR=;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gcz-pE@~UR-1H>)njV3( zm?TfFNbvi6Z-b|x3J#pR0oTXoRJ&>X^0!8pU{~=@_`0$he;&U4D}3PXV{MPrl;}t_ z)|Erw*%sKbttctc_O5T?ct`JDALDYl^d6;v#X%R|KYxaK@WPS9@X1sVeBD>nM$%FU z{41i;wLs3}9wnk{ zE^{dMnvZ_UBn?yVbew8n;P;6G s3DNk>?2y55cp*ZP0|~M-J9yyuAKVAP`)@@c&Hw-a07*qoM6N<$f`p)$rvLx| diff --git a/assets/images/flags/bgd.png b/assets/images/flags/bgd.png index 0f8c5cfe543515fb1c5b2e9520656dbc2783beb3..505636a801fe7459a7f7fd7000f6d74d014e7cde 100644 GIT binary patch literal 447 zcmV;w0YLtVP)@?DT-0OfyH zH7_Cc=b7l`iY^jK4}%FkhhzHgj|$@&_s&yUjA`W;n5B}IK}@uNvexgxm`+pK9)R6k z(PEfxEc~}`ql|X)762@26mNVTP5lDQQdzrr<7p=S0Q7QItY=$*k07?+*dm>kZAF|GDNn{1`D*}8%Tp6jjdJ;fA zoCO|{#S9F5he4R}c>anMpx|sz7sn6_|E-r^@--Oa-AF8!18XjzB xvG?B8RJCz?e)rl9>$?x{Yw>-e87#eWtE#f1n{TytM!T diff --git a/assets/images/flags/bgr.png b/assets/images/flags/bgr.png index a89509f1fe0a556e5c983509983685d07615e426..d89a0ae89bff348beeb221066ea35302e9dca0e6 100644 GIT binary patch delta 179 zcmcc5dXQ1EGr-TCmrII^fq{Y7)59eQNE?7K2OE$KXZqPbQBk74*we)^q+-t7t2=oQ zIB>XJ%l}d&5IOd^mFc=X0pdWpvU#+iJE3sa$ZW9uGwKMOXrk;>&)&cX`P~{76{5 zDy-#l*%g+7mxQBrM_3LdHe^Z^i6Sfmzj{O!yktrgnJz2?mpsjhJagd7kFUZea9yQV ztEKcOqLalpVH1W4NkF}Nf4yLBhT3DXU~Nn$GjGy5YGX1XcxHK03Kp)g5J`Db$)psc z6j%e)QT_^3ywqN=2R?uQC2Yb^4xY}PG@^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m9?gMK2tX7VaaDjPmGdJc>Fhs%+($ z(#Qw$@8413;|KBsyC#)ClFeo*5{U?1mPhfGlLxxuXQ}vk#i}C&g52f>7HMhnJoLhYoPzOl4bQsA z&x>bzJuKXEcz9^Ya)3G{yZA+P7y;dmpeDWOLl(S;!{%o zmON7L8g2}acIh}qGdvBsrP-fpg`A!&p_mHXFwE0V^y>At?PFJNaD3h-x5&}9gvMeq za?6=}kJ|b;U~~HZe?xK$oY&ydPJx$B@+_Wp;zI_p~Ab%#)bh Date: Fri, 16 Aug 2024 21:09:23 -0400 Subject: [PATCH 51/77] Update more flags --- assets/images/flags/arg.png | Bin 440 -> 1183 bytes assets/images/flags/aus.png | Bin 873 -> 1834 bytes assets/images/flags/bgd.png | Bin 447 -> 913 bytes assets/images/flags/bgr.png | Bin 193 -> 372 bytes assets/images/flags/cad.png | Bin 417 -> 788 bytes assets/images/flags/che.png | Bin 855 -> 371 bytes assets/images/flags/chl.png | Bin 351 -> 753 bytes assets/images/flags/chn.png | Bin 860 -> 840 bytes assets/images/flags/col.png | Bin 217 -> 381 bytes assets/images/flags/czk.png | Bin 915 -> 830 bytes assets/images/flags/deu.png | Bin 703 -> 370 bytes assets/images/flags/dnk.png | Bin 801 -> 387 bytes assets/images/flags/egy.png | Bin 431 -> 553 bytes assets/images/flags/esp.png | Bin 1090 -> 1874 bytes assets/images/flags/fra.png | Bin 700 -> 351 bytes assets/images/flags/gbr.png | Bin 1341 -> 1944 bytes assets/images/flags/gha.png | Bin 432 -> 762 bytes assets/images/flags/gtm.png | Bin 477 -> 1691 bytes assets/images/flags/hkg.png | Bin 1023 -> 2007 bytes assets/images/flags/hrv.png | Bin 1088 -> 1421 bytes assets/images/flags/hun.png | Bin 728 -> 373 bytes assets/images/flags/idn.png | Bin 684 -> 360 bytes assets/images/flags/irn.png | Bin 615 -> 1150 bytes assets/images/flags/isl.png | Bin 867 -> 424 bytes assets/images/flags/isr.png | Bin 937 -> 994 bytes assets/images/flags/ita.png | Bin 705 -> 351 bytes assets/images/flags/jpn.png | Bin 896 -> 851 bytes assets/images/flags/kor.png | Bin 1119 -> 2594 bytes assets/images/flags/mar.png | Bin 429 -> 849 bytes assets/images/flags/mex.png | Bin 1013 -> 1620 bytes assets/images/flags/mmr.png | Bin 902 -> 1041 bytes assets/images/flags/mys.png | Bin 1082 -> 1436 bytes assets/images/flags/nga.png | Bin 193 -> 351 bytes assets/images/flags/nld.png | Bin 762 -> 372 bytes assets/images/flags/nor.png | Bin 898 -> 424 bytes assets/images/flags/nzl.png | Bin 1373 -> 2096 bytes assets/images/flags/pak.png | Bin 899 -> 1157 bytes assets/images/flags/phl.png | Bin 1179 -> 1565 bytes assets/images/flags/pol.png | Bin 707 -> 366 bytes assets/images/flags/prt.png | Bin 1169 -> 2611 bytes assets/images/flags/rou.png | Bin 705 -> 351 bytes assets/images/flags/rus.png | Bin 702 -> 371 bytes assets/images/flags/saf.png | Bin 1319 -> 750 bytes assets/images/flags/sau.png | Bin 476 -> 2201 bytes assets/images/flags/sgp.png | Bin 902 -> 1123 bytes assets/images/flags/usa.png | Bin 1220 -> 597 bytes 46 files changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/flags/arg.png b/assets/images/flags/arg.png index b941801284174a855e748daface2029e463d16e8..d8745845501576ded2c11ef07a2ecc62b9258469 100644 GIT binary patch literal 1183 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|QH- zr;B4q#hkY@qcdbmMUH*mHhbH$pbx$xs{(vmyZpI=9BVad12bEKvNB(LC?zFzOh_rblvar2=v4REBXNdd=Z7vuoy!algEb17 zk8mq~Wa$)dmQ)arGi-Tkn%D5yBEgd1ms#pThpfSLiG+h*zZRbLIj~Xp#wm+8F=E?N z*EZgZ$!SPcNtBfOvXN~?xLw1gpS(Rg4PP+3Pms%RnA@o+yi0wLf4J0yng4lj9u;s} ze&1!yV_TKq`x>gYiruuN(@W`{m}!KifLq-4C%jtgkoBN=Me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6$N-bPB7_YFsP96d1N4OuMv%T3 zWPnLt5yA!o)OVrK0s2A+BS>EiGQcFS2w{T(>bp?r0DU2Z5u`5$8DNrEHA5Hx00000 j000000002M>n45yf861J?TPT900000NkvXXu0mjf=Z;M@ literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`!vlOmTp28viF&Pl_3p?2|Nr@1RB9d{>3#N_bol>TXK-udbyCrY*qI~FYZ14^Y+bA9j)Vf+BdBYZ`m4M*OmvG zou@x_6OfWE3GxdDnv4@LM7BN80xIMz@Q5sCVBk9p!i>lBSEK+1Gdx`!LoEE?p5M-O zz<|f~qDb_+!m6+T>(h-S_DFo@^kYJ@1h5rq^#}W#nhqT}!_`J|q5;^~>c&B5PQ9AF@r54V9B- S6Hx=&$>8bg=d#Wzp$Pz4<(P2* diff --git a/assets/images/flags/chn.png b/assets/images/flags/chn.png index 7a03dd26ea68bb9b9121578c4ed78fff0879012e..d326f7afa3ec0efc90e70d8bd2bd9a143d529503 100644 GIT binary patch literal 840 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|V19 zPZ!6KiaBp*?9LVm6ghT$#tOms6%z8@Tun(eETTRhI~)VKn_K&jEfLumv1Up}dH~B> zvuxF-wR3xWJ33kwqB>ibYAAIW)*n%CKRJoFa>m^=Rq5~k{(W%Z>ARbW&wjtVQ~XYa z6KFXcIE0)~Rhl#{vw`v4d#1w-?Tmr>g`RoY2d-|tv^4Y{YuELL<-3=*-`>kDGM_Oy zdI`VnrGC4Y(d)nb+fY)xxP0Lw!vm_9{;s|B#6imZkf{BBHk+HOw)eI7zM3YN^I0#b zkXIsduA4FI4b@8tcP%bttYz%?3flVQucGK$M)~SXO|zQWLrd7^#4G-l^mu&e)SLXe z9l^Wqyo^2YM=Igy=4&UnESeDJeW~K(_U+dsKYV+zh0*NXt7Y!yp80$p@%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iONUlr})TTN{2F0r7a% zM~Y6gkY)`zxXj@Uk+CG$|1^8#O6*WVT<3FVgHYcMfU%e;#^})v?Rn+1Z)5xVY%@Wy|3kp_vLn5U7=vl~@wg@vYOey}Z06 zyI$I%UTndrT*;g$d6N%$4-J_QP9y<{%7(9*C@Kbg`|I;*Gu~G6>*VNm#Jcva*i5I|!Sm~FA8ZZ}JEsUB*D#;Nar~a!y@z$ls%4mj(7M6^0000 diff --git a/assets/images/flags/col.png b/assets/images/flags/col.png index 9a0fc6ac169953ac83b00dbcdef14529a6242e0f..798cd637404bfaeafc120824f91bf4a9c2531ed4 100644 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TSJ zr;B4q#hkZy4t5@K5OBV@&vMlIr|oVIYC>P}?Nx+nQC$-$=eE$frk4ACj# zhuN;|F+Oy(p@Qo+_X+Nc_oE!YSKhK+pLw8RGOq+PAG2HdolT7V%$GFxfb7{0Hsc&n zM?2$3k$WJ=M1w6#zxVgAW7_(%*QUG@8#Xg0A4og!qAS`g!BAl?lI7ok8fODFZWEs% sz9=*xjz@aK^SkwR>bx*-Gpw2al)184!*<&}c|DMzr>mdKI;Vst0Jg%72><{9 literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`B?5dxT>qbCcy)kV)V7Afpj}Y6VY{&D2?0HzWXq&w4}cU$NswRge+Xc> z*St3pD8^af5n0T@z;_sg8IR|$NC66(dAc};Sops^wUd{@fQQ-e`PF~YyDu_a=kO4` zrjxic>cIMoRt(oUcjzfZnLnsvxX!&NXraqgsb|pwjmIy3SPC?O!PC{xWt~$(69A0L BN8tbf diff --git a/assets/images/flags/czk.png b/assets/images/flags/czk.png index a6c13a7738cb9601c3f9279ec6e887dd752ac6cf..e4578e86c30c4fea54b712a01db32c9a760e2574 100644 GIT binary patch delta 822 zcm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FoC^c*rGY#jT}YVTca<&~JeLk2Tyf2Usxesnz~DiO=iwL_8SbIo!N{)?GUio;%oM=z0VpM zw4x0dr!ctf-;v5($K`gu1SR2xdTZ?it>%>e7X z@j0bsJHsR09PtU}i}r$aCY+xvc#o-L`-WJDdmZ1JKBe7gu=RJVsJCtSZDPB=QlVkC z?hJ-?5QoVzE{VROr;zVb?O17?b6~Ezat*6Me&TMRQ{S>aJ-dOid|uB7QHMRPZ-GwT qB0k0ZFxwrVQ@=k(_?O|e{YUnuyXJ*KVZWF`LE!1?=d#Wzp$P#09f)B7 delta 694 zcmV;n0!jVy0>1?ziBL{Q4GJ0x0000DNk~Le0000g0000Q2nGNE0KvJ=_K_hMe*gh< zQb$4nuFf3k00004XF*Lt006O%3;baP00071Nkl$V5Uq5#ID+B}TzbV{ za3#3#C;WzCHZ#BA|M&&7b1Nv!Mpq(omx2%Q(rwd^Or2<&*wfC;GWS4P)k!5DE9qDj zqGyOAnNFt;w3Jf3@+lC<^#8|Lf5*^H&Nm~b05U9MJRXbd^(qE~0j*Xm)d%~0K8xLM zCv!iH`u)C|quFdq?H>ezs8lLa_hTH|Mx&9$JZMLoIj^?Y>osjQn{+an$k}X$IZ~4- z2)bbymdfR_8%2?b<5<*cHIPz>ePQtsNcF*?cQ}gJA8%w2-gxy~Ud03tj&9{W<&tGEIXPrG z@Df62M6rpDjiG(D zz!$pP?W(z;@vMEBWZ3C+Zu|W{0w;Qu%SFg84Dy!-`uTAo;pF>@E*Wx{7Y@C+kbqy& c#e>FgB@n_Wbe`jN3;+NC07*qoM6N<$f{4mSssI20 diff --git a/assets/images/flags/dnk.png b/assets/images/flags/dnk.png index 69dd1b2b8d6117df195668916b901d61126123d6..e02d42bfefa7c501c7e03b7dd44f4828a1f129b4 100644 GIT binary patch delta 375 zcmZ3;*37Kf8Q|y6%O%Cdz`(%k>ERLtq!U1xgAGVNno({sQBk~}(bUt$F{EP7+gskN zm;*Un1J$4XQCE(UX0hLXk0ufFsy`~LoSzH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U1dBqg*mrk>|DFkZgKnAhOI7Tz|-Hpa;HI~>>~Kw&fk7)Hmy tVH8p4$|22mf(W7L^Sp@Q2eLSvA2IJ(b8=DX<9DSX2~Sr)mvv4FO#mrU=(hj> literal 431 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`>jHd2T+a!ro#jyI{>_N!JF%(%LEzul57)ncdHCY`!gmjM zzJId+{gVTCkCtBAe9jvD7udy2bFM1F~So;zc2xMbVkAm_vU%i8nZ@5oP>7veNWpXohsP;lzZZ>6>& zHLrHedv7Jt;@@o0b(o>~L*}Hk?Is5ma%SC^cMS})RQs_1n(yte{ya@zmP#GVtm2no jdAa7{{$StgB|&<=8CeUry$hKKbPt24tDnm{r-UW|um;*( diff --git a/assets/images/flags/esp.png b/assets/images/flags/esp.png index 0193a6a44bf2ffce70281ce6137a2301239dcb15..6b12aff49d000a6dfdc2dec326ef044842ad74aa 100644 GIT binary patch literal 1874 zcma)-X*|@69>)Kp8Ow|i;}{{?Wx0)|Oxb3}HnzD#oUw0(=?H_I#!NCoNLeabQdvTT ztk?KBvP^M}ZKRBhHCeKb1{YCBZ|{9`KcC<8d)__Ii|55Rm4LT74m}A40N}VS&eHkF z{eDSU@aTWey@5J15i-s_3IJeIzXSsE3lIPx1h%!rxKIk#@?!{(q7gk=vJ>7rSNuV` zxW1sO-{pt&okmzH5CTL3O#QRg)B;?CjQlPuLpHmjPXMH%L zJa4r=q`s`|$II}Bv!{kpmwuw!y(wk}L;c_1FgNz*zV9h)v|6A6j0E_<@1B+k3m`xy znnZE*2Wwyzkewv5vY7!~JSKnxR@|40q&v)n#X~Wx%t8b7h5fr?{%RtAW-!x6fia=k zBHff&#C1VU8{c82DpgQ_a8XYV5uj2EKTjUzp~bl(3sM3#9tphc=+&2AR~;Y+vkzv= z({XTVUCXPsIyJ^BjNmE@**bwA%L}u{-%WW1_ukUOl&6gPHY?5u0&b!)Es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zK)`t@O`u+`Gg59UjFERi9<$eAm%5XFqMJ_7jdWl|? zkCJ>PJmKy+xQh{WB#+{ma= zMdBEjBWr6x0X0E;lv&$`!{MMzk80L71|{@mGCiudp3)4k40tu&e(Ny-ix-OpM$+mT zECDin#vCrfttYbTCb>iDZZ;bilPyU{!3_OKzjr*$#nmK;8J+odc7PTCY$KD0Ow%o{; zWV6}SYmuZr+agK7(P&&&t5rap;F>OHAt@N7iw4}k79?c)SyquDRlJaJryxOgS%nA2 ZAB{+&z3z1gMF0Q*2>?k&PDHLkV1m3;H;@1T diff --git a/assets/images/flags/gbr.png b/assets/images/flags/gbr.png index 151f06db5d24edc7968bac82d4d4745723bc5ea4..8b53f88518fa62d52323e49d268d3beb3aa10e53 100644 GIT binary patch literal 1944 zcmV;J2WR++P)T;MwRTY&*~g%*qQnFJjoz zS&Bu>bi^o>wtYP?{M4PUJ9zyXSXQpcijOEju(tIf?xj_ zg*ewJ01#tYaPIApd_jl;a6fYH-v=>^nMw$cHv-4MdjRG2okiCJ%IYt`(Ju#JVlte3 zDI;OO4hOhC zIRxz7*^=?t+uI=e{8>64)dC2`b?^g-JDpTQ*quSXYtA$Q4jjD$7JDFh<9HnW=gxw; zs$4P-b9E*EcYd#X)*@`_lDzqx5)nRMmL z7xTf1$2vLs?pUF*t-D|aXlU(*?jBS6`smmgICgH6tRDrBzo zXj2F@ykvc_=aBMB&kzAJCoO*dl@c(P<9`>2`^vy zvNtYEuW8DIXjjT!}LZOsd zOU6UmPzS-j9$6!+(E0-k%2{qPrDZ{ZU0mMdD<(5yKq^XqYs>_#TbyXT8D>ID;G`4@(2hU$fAFLCj z_V7lg;h0JQv5}QTc;GHr*RNHctb9JzMpkB;k0^0_nG>gnsrNEe$CoUYwBh*7`4O@J zyph$GGO`kgPfo(bXGdk1YqrhJ5PA4Ovyqj_(;+>v;h2OP_Z?9Hsv6Vg+ba3<#2J;E zG#Xi%JReidG8_}2^`Gh%fV5?wIC40>W!GzDWeVV+w%Bk?f^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I`#>D}AlmBWz%LZ<5#2 zpd)t+%Wnl_vdBoU)aSOad*mmr)!MMWc;c08@1xrj31XthRoc$*1ZH>43gPUj1&5GamEiEPAV}JZHqso<)cvK6mz2 z?OQ5rV7BW@-7f2_PgO;K7t|Vyo?5pgY|TyssTI$owHUj(C+6G_(oH+C{kZi1r5_$= z>WKTZ9Syxw=Vtx>5=TX~zD}OQ|K0c2ZJl2j?Q^pV{-vtHogW#d>7-_zC4 JWt~$(6980(P;&qP literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`O9OmDT+a!ro#j)z8>DzINb$Ol!r#kc|F4Oy=;ix!QSA2xvF~Taew`O{ zw`TisPHaXUubnZgsSYbU8{?0&Vq2#P$Vq~%`gK9<^C?jcMP?y>rvH~j|6dW?JyRgs zi~aT%q0nB#us%bF8vUSdLxxNThAan$Y*ltb__vSfin$JCxm@chPN#aSWcWelF{r5}E+EySQ}# diff --git a/assets/images/flags/gtm.png b/assets/images/flags/gtm.png index 2083ad806201dab8c664d23f312a03005a84ae58..8841a352a0b0659868ef8e059b3c4a016305d8fb 100644 GIT binary patch literal 1691 zcmV;M24wk(P)AE}Z^gwrAZFOC{ zU}=$25XN#)lyWej#Bd0wGzbAKrw|fhMM26U$YDhhgdl8-L5_hOeo07;)?R&f44rhS zj$mhX4}Cr}?@aQ(&o2zWZ=Uyk4!>;MCJ2Hc2!bF8f*=TjAP9mW2!bF8KPyztL0;xi z{DJ@Ic-jB22;dh1!~>p%Y(YWUf)qIeNW##dgrSP$0g{NRBoPZpCM>0h zpp+sMsRc-fK)@J937N$v?BcgX~?LgArp{}n6xB=(vno9C;VcY@-D^q)Ok~1 zEw^XJM1U9ZRK&bviP5PW=$f*acP!#i+)vmXE{UMvLIy6c_o<&@?ylkM`56{gm*lC4 z=M|u^@iVfjj*z6=i`sbfiFJ=}jjB!^Z>fJpr0y;5Ip#O4Pur)^n>8F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i^7VwSH}af5P7Ln)x^C>6Y%0w@w@ z?N+?seE_L<;|Mj>d<|A&&isaB$K$y1CW8B|VRSbiL$s$0tHspR6hfhp!^;gl&vHoM)W@fo z->@H(yP6T&R0%D)6Wg;}F#Pc#+P5s?!iN{=d~ydeAd)Vp{LpuGe_^$VkX(Lz6Q}1t zL*FqE+>Y|1>g1}K+z9jVdFa+6(AbUC;GPKyPj3_52S}PFPxWAq^3UD_6+Hk$gQ|nibC>Dn578=2vh&Kz%kvlf-2Xj;47OEgadC4z7h(=IlVkniLqx3;WHAaEu=8lvyB>8X z(t`)Xkj1Cq4_te67Tbs%Vlj+gy@}{O1+RwW$K>}Fdt7H1e@&ZK`ho_6rr9}%BEjBe zj4u?w$1#lF5P397WHUUO+?{zTzywP{k}*3w>vD5uJ(mHpo07GJuIo-o#1KUlxXi#h z11(LK&>fFb0cMSij8Jk}a+}6Afi*@oT$V!5WbM4-j@rP)#6*C;`zoh`ck9RcO6lP( z&N#0)WUTwgfAHISA#C}1P1Ec|B9So+BNL0on5gA`nTV)GooRA+if0;?u1?EB122(D zf?F1E|FUgD=(H_!+W!9j+1ltulco6svjE`(#5SuPyEdT%j07*qoM6N<$f_QWN A{r~^~ diff --git a/assets/images/flags/hun.png b/assets/images/flags/hun.png index 9722561a8b65934e625e2106dafa76132c2f4a36..397910aa3824250defc881a91dca9bf3418de7be 100644 GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TSF zr;B4q#hkZSFLtsT@;G0dVru_VJ$C6qhZ$UZLV2pzoM$yvIC%}I5(*r&v-%c&oXO5K z<7N|Q0@s4C-O^?W913?26){#SpW;3>JCQlfUh<)4Lk0I~)+fCh`WpFdyfgl$v@B-ojK&=*W0rz;M3x1#E zh-W+!T@mAOuj4W6)3X~Gx6kkSAnLFOP0@XM{)D&7U;I47%=jkfAj<~U3%`!?N`C-3 z?J3hIHyyA;ZU7y!9q5o4J%#)upPD|U-DtS$?^eOBa1Tw<_kMPmj~N(x{vVMq)xCC- SdCev>kf^7tpUXO@geCxO<&RPT delta 719 zcmV;=0xvp>mQYj_wf7v87Y1{v2uC%0#*+#@PK!%%Wx7%X3+lgkgNu$w7 zk3rvTHexoLsn|b8jYdPSQ7V;`u|FIRBAd-BGmd%aYqeSm>!2Tf_PRzNkH<8bOu|m5 zqk6p_)(CB)An2V=r&K1B@y_S72!cT5^Ldcge-L^ql~U{Vn*N3O9HT$if6n)P#d=sS zmoF?Y!{IOxLTDEgv-cK@Mf%h4^iM(Rft-N)^|tE0VkPMJ`xl=TxL&dsrJ$4}Bmwcj zyXWyPUhpMNH=ikw9D~hClH#Fbf5qL002ovPDHLkV1lns BP4@r* diff --git a/assets/images/flags/idn.png b/assets/images/flags/idn.png index 52c9659213385314b3c321c31eaace4332e5df9e..d1f01d8b52358d1da592bfcd2abb229923edde2b 100644 GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TR! zr;B4q#hkZS8#`G7IGhjOpYhjR`9#=*(2XgU&mE;a7FF^CwL*Z!(QDCF@t++Srs~dM z@M2gVe`hnJKf_D0b=)VUH^v3rsY@R2Gaua7go_^DI7?^z>*TC@RU4};(S z9qG(=Odi`e#5&yT_}26(?MA~+b!8i-4(f>5%fUR#!0_RpaD9V;Vsm1fl|M+-)78&q Iol`;+0F{}y4013oTcCoD6OSGx%1^ZB`x)yv&;u`CQTD2xPrpSNtC1&^Mh<73M)d`pkK`z1!`?e!oxW^SN3smzX0piGrXThGC^v ztGQ7W$vBQ>v)Ke`{SVQuR4VFvy^8;#IELH5wevhrQ9JE+y9w!Jv)RN_f69Mz5PNqr znZN}n5@mys8&BlCKO`O;ssE7c9r7ab<4afq3iTI7&!s3Pcy{;&<&-NdgUQJemIEIl zbVd|OEG)z2auK|GWJK|m3(L@IwK7gthyM9|rrfrgXuI9cdz2H_W@w_Eur?zfdMoxM zLqy5)gr&enaI`({==FNSe>T8*)oN9H)Dsp1&ZG4`Tkx&^kob(tCu?hg12v#M%B*d} z{eD-bM>T634<*={Opof&qs$PNftIHHUQY#BdN>>ss{X!(B}misn`*d(LJzVkSKN{I z&gZj7#g>CqFpqv{e@YLtI743XVWK!k(bfdpV!Z3R%J=K8n&+SH|q4j#b4qgPdWq~d9U@*{gLF1WiiDcOC_g|;e zDFP?)E|<%YT^JNE4fy$eA>kC?m0dCvE-xJM;X(p-Wfu>OziJI8Xh{@s+W-In07*qo IM6N<$f|&p~Z~y=R diff --git a/assets/images/flags/irn.png b/assets/images/flags/irn.png index 151a039194fca308ba1f7ec415d6cadeb04737ae..ec59e48c35666557441d538bdc037275e2338606 100644 GIT binary patch literal 1150 zcmV-^1cCdBP)j?R}jYi9|00^xJ$@y-~@vZs0B4|K->4;=u2Bv z?v=_dp#s`UtqLt@+dj2V6|{kd04jJLUx*z$cI>?+n@E12YG&mn<)L|sW{>@S(kQd% z?1}cw@0^))oJv6u1VIo4K@bE%5ClOG1VIo4LC`=cYvl-*TelbhfTg>@0Kfu(flhHL z)PNiSXs^O7c7T2$vPePt!9WeL2G3B0EdWqog<0$X{Xk@qg7kxd8ek2cp$J<5puP&T z*a7;1$RY*l2P2U+AP83owz6(90Dw?;f%OG|_Tl55Y9zZg=mv`p>$52$|WvKaf^#(n%w z_2kFoOg~ls?!Exfxb-#JTek`X=Y>t}2Y*U?=kLdq->^Zf^Jq%i7=)WIP-kjd#>{{7 zt@`&H4PgGe?XWerqf$u6KTvXWw6p0kF?)&D(e6xjZ%|&$Z7_Q}u%n)#qU>0I$`i@*8iG zztExfUz4)3`BdW+%hGRe-YmvGA6L0>=QnMVQxT8hvGMLmh#3VSU=;C(q3wf8v@L28dHy%K++Lo3jt;pqSWRwcqwu!ON zZMD;9;u?`uGaEn{8UM=3r<-04u!qu#{N=N+0Qinat)G9D<7xTGQAt1fp&>Ee1>DAc z{0_gX{k?q$An1Wu49S~siO=@~HukxVe*xA0zP<+#7;XR%CLBOFlO|Yt-C_U$8Qld2 z02u%n=oFVi4M+ok_A2aR2j~Z)ixi|E4Ag+k;2DZ=1_0DoVHZ0S0f*=TjAP9mW2!bF8f*=TjQvIZV0ogs8bdqQ9 Qr~m)}07*qoM6N<$f(zFmVE_OC literal 615 zcmV-t0+{`YP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0sKisK~z{r?NmW) z6G0UIW@dMjHkT+xu=G$BBGf}~y$Sva^{juO*Zzebd-3YUi+Jr15WMx4TS+lq#2^F- zfh8MfcEpiaNZ%-5p^ixMrmjYOI#_1NEzwp z&AE>cn(1lHg*Ekb=J&LZPcPoj{4E%L(|#8o-+3sUH{lH#yqP2OnsQ8sXD)-$28oH0 z+L0KF=zx(U9@V7ZI{R-u@su_5dXtFm%kV2+KY6~~DBY;=^W?wvB#5rT6F z<1sW1M6gyu@9fAr@*IfhP2@XGgKO{UO|vpY+{3@XN_`yv?*B_a>mzQjuW|S6Y`M|y z!9j=*4~26xiPvf`ZX1=+3KdEL@C&cMcXNVJ|C9g#002ovPDHLkV1m^= BADsXI diff --git a/assets/images/flags/isl.png b/assets/images/flags/isl.png index ed545e9056f6309113a5556ce16425a617dc4251..d24f29abbac82b2957a536cf05d85123c26cf4c2 100644 GIT binary patch delta 412 zcmaFNwt`u)Gr-TCmrII^fq{Y7)59eQNGE_W2OE%lG^5;NqM~>`W0a?hV@SoEx3?Vg zS`2tv6XSWF@>u5NwYFF^YL|vzF_PMP=t9l@C$ikf_{#p=a{+3Fg5Zn4PG~3H{iZ+B zd(N?sKUd%Tyxy5{7t;@>a~GQ0#HOS*DBj_DSioJxE4yxCCjW*G)9#2HEuMnSA{#F? zbrkkWY!7xmd9l7(=5F4Cx1X7-YMmsF_S&tK+4ygcg=w;ckuzgaS@6Ff&g;8sKF16C z^RnI$IUrupCbs4JwgusPBaW;uTEO7_Rxzl-m2p{Kaw1y`Q^@>7Us$iGD{WoyE9FiR zTf~vFsDQfS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zc*tgdf4_;^ZbwmPGMNUYvy0NBj_BX@HpW7+bx~DposuJ%$DTK8_lf2Ht zPXJ$J;F|2{I^i|9wzf>eFp?Ai`Fx)0g^XYzJNSa^4i68rjP*crZIBFgB**|WGc)XH zcXu~svsns*#l=O+<#HsmN8{t;zV=vx3kwUp?ASSU4gxqhH#f&oK_56B6r-b~+y{Lz zMo`EN2S*Kd6cG(N8KStff3(E1+zd4~+aC*5DVJ;X>2#WZbY*3QrlzK7XlRJSAR5#V zgJUv85zb;#J@tjFH|fir1;@$8g9m8esS|YI!g-eUR8LGyP+wmkkL9-nmY0{o3IdMu z8qg`o3vdc4L-dhCJ$-BEFH-sWiyiieY~k81Dm{Keo%es)B8me8e*-i!GQx7uOagF} zdCZR=u>lZO&9&RK;c`;P*6THnHX@5YV`F1nhfKYpq8RPy=!mVZu70JEcyuyL z`#!AI=*vbU*Ou5O(`u&l(}xrmy}iAAW3kvbnZXJ+lRmIOydhaOP;I)5d13 zhwvR9^-Dd78cqW9^YgrGnF-Ez)8e!D^zv=dvtM6VD@~s3f8n+|+0ak%uwswhU|AMt z8W9!XGe3I5T2T{$Vsx@!xpImwolR4+HSXvV@dnoAE+5}91_&M}Tgao7eKT;Wm21@U zyL!pfM9j|43Q5>vaBxsePfyp_6gR$$^-tv*z3L}}BG%W}x$TFZo}L!6uX*}r^8GDD z04c}K2`R&Je{draZ{*^Jy51#|NggA}Maa&wb9)NB+u`y^OPEc8l%o&&sxkb4 z+kTC%tE($60zy6&M7==TgQBgiEoQ&j97Le3R4VVpe**YoKSh{A6(ylIWon~%lE}3D zkzaRvwABMei~4x7U6p5iMY0SYct5=QspqO^aX)$8FEagl20OKCyX`f-KA(H;zq*IG fVfe`ZVob(QBp$46n)2^-00000NkvXXu0mjfRsR@` diff --git a/assets/images/flags/mar.png b/assets/images/flags/mar.png index 65b31c8922927a7de8b332a4ddf9af8c22f061e8..dda3a0131f837726ae2e041ef3c8e185a4f00af3 100644 GIT binary patch literal 849 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|PU& zr;B4q#hkY@&U%L=iX1y%v*PTHp2d%AUYyxmzCmiU(di>SN~=%GczZ2Bb8LMSOW^5_ zjwUl!R^2ETN2l&6x9%o0$Jr}ITR5=^@Jz64% zyt?Z@23YI2H$VDYeUD*l*!oMpck0c~N2lkMJ(JnDd-Kw7H@jn8y7$%IdX{wcnR@Km zM}L2vV{kp<-RmePe==+1>cg6GSsbrE?A^FM^nZSV(sB8u#E*8h*$qmMKD%GOW1U)f zz2`9Vv^*e@=}BuqgyW|q1?CfboH&Ge o1nh}VG^?I-BBw(TyW!6f|Fgvlk5Bxm?FQm|y85}Sb4q9e0L8(3kN^Mx literal 429 zcmeAS@N?(olHy`uVBq!ia0vp^T0ktt!3-q7rQ00=QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`a{_!qTo0=29#+?#X{>idO*hQL;E=lRQ8nESI(kVi21^X|;$00goD7QX z^}W3f{k;tLYv@ie(+~7CXtL4|@-$edt9MvUcekc)vWtOrfMK?yL7S!i7HwV2K*PzV zdQ(jGavcqJXzA|M(%q+_3$*a`(uX!cN~I*oFZe%Uz!0Is%L`P`S>O>_%)r2R7=#&* z=dVZs3eNI$aSXBWzkB{PU$cUML!gM`(d|u-ZlC)9KUvyJ(bwAd#*U2lY%}HvC>-1U zTI1sj{tSUO#+=xAjb0_LXmKaW=Qe(merz<5xM`>9?K(|7HS)`?Pu_0;QT zrL4-*PMxpVb(hLju{NhmsFuvxGVj>-{)HuRM|O3kwkfv+ZhhMxw7vFo#evLTtG5SR jgZ9WTnHTHWyOa5&v_*(i>NO6aD;Ydp{an^LB{Ts53(lu; diff --git a/assets/images/flags/mex.png b/assets/images/flags/mex.png index 9531a3ea2d50531dc9fb94d7bfd80ac3b540c52d..f81102912d513273712d7307e6955a42e6bffa94 100644 GIT binary patch delta 1618 zcmV-Y2Cez^2h)*QX}S~PME9+hO7vdydW~;jA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qM_~hc=sv(2GhsS;E;4oM@f2nXd_z<#e5#>z`hoMj?K;9lLqI}BXFa(3a7AGBDM5UZZ z;`w8IO-`aGdKedP-ht=;0PJFUdD-y!e5T$tqDxEPkbU_OrSyBuOif`n@do8jDcrdK z40h4e)5G_@2LOJCqx zsY6@xAU~gg5)4Dp3K+U|&m>u^Rj{~}M=%h^X0Yk&Nz-&JE~fE3U4-F^;pBx81P`6S zizg4TbI)$LeL6)MRoKOv>xr)dJMeDtBQux6Q2Z<&m4kRXFOc0DhW|1V4n&aoIs<>u z{s(W(^%M$)U%0sL3WB7SxRKA$}YFxYw0qkNdU^F`8qICJ{iPyOfsx&;~I%E;QW z;DDOJL|c)$)3C6xAgmrWSvxT(;V+Zbqvq0cngNG_4w4~tf77FsfElS&stF-x;Sd-Q zvy{U%Y3Z4)_$9d`sps=~osun;w}LhFV|~5tVNK3>U-6Q$-abdWtrgOi$7`A*23ZNN+y%3GbgO3%bn1AFlc`?koDCE3AMei(<4LMJ34gdfE07*qoM6N<$f-Z*O_5c6? diff --git a/assets/images/flags/mmr.png b/assets/images/flags/mmr.png index 7fc6e1661e30095a674fc29adc152e21974b3022..c2f9fec10f6886b8d184cb7431a32d7ce5d7188c 100644 GIT binary patch literal 1041 zcmV+s1n&EZP)^Y9Ywm#VVxZeD--l%d1Wo~glk$C7Q@{)$ z><7XFiND4Bv6=vH5q{w|Ak1PdanJAWk^Nctupcc(v{%_G z7Z4cgO(`HS^jf?>Qw!L8b0yMI+ptQ!Ptyu$>^hxRz^%up#rrg^0N>z?v;z7+KNs&) zw*p+AI)t?l^vYOd6xSb~z-H$ha|#%*eGO~i|I!1!@qYL%4m7Sa_YRn-@(V@iczz8r z#GnTr^tNEz#d*^{w{8SX)S32bDB)qT;6tM$sPC-F*}S?F;BeZo>-tjkeDLNx{Ju}m zP;+B>PG{An0Eg3t&8~v@@7DcnS9$Q=mIiFLv0vtcPm^|Y=#iv$ntlFiD!H1c?>7O;k4n%olO}F z7=I7xISebn<*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~!vV|fg ztgPUqZXv^)!Q%m^=11>RwDDtzQXmAfyQ^rIlY}BE!$3y5@7WEaoM?ukqL0F_$VPK` cj7J0i0iaD6g5?oxDgXcg07*qoM6N<$g0{o7^8f$< diff --git a/assets/images/flags/mys.png b/assets/images/flags/mys.png index 022476291461fe068760cc472e5ea14c49b156cc..d151a3e4f14a96253cbbbcdea1417280c203c656 100644 GIT binary patch literal 1436 zcmb_cdpHvc9GzCeCi2d1t*@C~k6I{hr0ZE`ERp9Wl=owKZi`mC3)$X{Z%u>+)}Z-{1G0-}%mW&L8KmLw3QOQB=@Y0001rC*e2t^o@!TWOG-2 zep`OS+{HtydtkvNU#oyjQhDmfnl||x3f6agCxPjlWSS-!{>PgO%r0XwtSRtx^*FcD z!=tu|=TqOvsJ86D2|u^U6EOUik}r}d7A}{dH1S=WeBqjs2576xPsa`bEh1oPK@Dr} zOaKUMCF_(n34f8UQt5YN83H|+!Lt_o%+A##Z02S)1w*eqY1NlfLGvx6UNvu!RhheZ zn!_ZvI76Z@rGUN6JBpHO7r#n|3^GqO{yOtzj8{y1Eso%Iao zs|*YpQ@W-u;E_gR6B9NDM-+yxCkc&{>H<%2UO*6%$@35Lp7fz!m01Kb6J|U^D1)q7 zihehgv;Xu8!`z)rfw&><@W03JGw^p`xN^(qJ*xH)0|sofH*n%Qb{wEC?Uf?KWfKcR zBUHjUDMz%Eb@IFTBC215aeJ187V4ivysa160LVMts zq*EJp1xflQ-Jt{JW6*Znt5|#xd(9K^WIR#}6H;5;6Cdj1DW+?KcUg=YJgH=iKBUCq>fn^Xp5g-fpH7kINaa zF;mZp@Duw_*hF2MGRqJQQlSIN@TFQaY4~S*)QAm1$|>1Ui>H+G71y)aELfGs3eRXR zM_m}$;7yn^x_5IeZc%&XO0$WpNUUg<-Z(wEBN}Pw3YQB-Us$xv$AzlG)3``oT`aS` zOWgb6rET{yHBIj6$Js@CL=-I8F#0G}hI;F*yWHKDs0@8z^Pi?PgVM8mc47=Rf>t=4 zfQ4F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+B`_t1vJy5Ji4Gq4yl_Q0nXJ>pK4TRSE@>`VmMMIjbM;!&#|RVu?gzcklC! z;kR`|*iwH@f74jCT5YCMDLOCFDb#lIQ6y?(V*~#Lb?i{XqbrwGaNun;sgk7PZr`)5 z3LVojE@x+FYugB6D+<|??Ca~}W09n~utk#f?(Xhw%d#583HFZ5L2xb%nD5d+)b}nV uRR1#;aLM4iyinnQ3kkAg0T&MfzW_q{PP*S@o+AJN3IG5}MNUMnLSTXza`YJh diff --git a/assets/images/flags/nga.png b/assets/images/flags/nga.png index ebfd82449d575856a0f2622a4cb1dacd2a8c8107..26efc073e8c39b2247fd0571e654bcec0bbd0ef1 100644 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TR= zr;B4q#hkad5Aq%g;Bh%PWo!G|iC(&{>l8{DwkssKEn*OHoRq)+F;G7cH0+<`zTVot z_?^3bd40V2gA&F+OmQE@L+TwL%RNw&F@N|~R(iYbNWTND9+QTYJ`G zb?4Su7G=)5&yN+oyVbXCUfk=Ki}?jITo!EPlI*-B&D6_f;Nn{1``2&1HTp8K}MJFb_`ugGj|NlU-HHv!^fD~&O!RVdW437PqN=TC$;DyMmM$ eb*F6Fz`$_p497z6(Qse`+-^u_bk{WY4+gTWWjw* z9os+bXxJloocq-5MCLqu$%onv73hlW`Q&I_)&; zlimohLpA^%k`Hvqju?k~9Zy-Gp54H>dw$OcF^4^9ir&lf!+gxZAo0J`zE*-kVq(xC PageB|tDnm{r-UW|Hs^*> delta 753 zcmV&-hc4qt#;ubQgwA*b5wNgqxf2NaA98>==unzjsXRfQ|(P$*b<8jz( zwN$6m!5X1S6a?MV>6E&=yK^s>i}Zb8=JR=w<{yNdN~P3lwGw|qe2$j?e^t-(JVkO? zDwP7NgTY|nODWmJg4nzB`8@sc`|7I{@|Cav#QNL)%NMV6xtvdy4L$0U%jHs@&u8#{ z`r8@)FQgRD7K?>TE)!5w!Fk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ecw_bLAF1bytgy&z5Mpgf9!k#G=sG&>2z8n$vJ23Y+4k}Y2U?Hb4bl)tB45@ z87wT7O0iO@#HOdGVRLg+w2@vY6xiY6A$PqPOiWCO7$YMiT-sME6&4DGxNIjss+*mi zW!>f77fu(Pvc&&|#8rKKf`VLOQuLA_S11%`%(^m@I{Ow(k;f5XE>TKpmD zfk1%g^Lgk5w~y4l+8KtyQMY5Un1#~X*w`=`V~ih|*UMK0_oDQJf5CgOR-2 z)mfjq(zZ<-8}k&yD~`W@vBTl8(3^;c7hgg@ICp0Oe-~g-h|bK=d@giBlm;wLx-kFX zwdWvPyO|Sx@7Jk(dx0P-2kfi&-=G&1OO>8|JKbdX-VNBAM&!&=0Kr{k~%~A$(r#iRI4Px1bF*frzS|x!+JM z7P&K{g0&wvCDCYpQMx}J_1;4|RVWJ_IS6c1qb!NGxL1OEv=0dc`IoP}LaWO>u! z4yBRJW({2TH5v-etsm*_hKKWTM&pXQjC6Mlx2+S>mi%>H=jC$QOe7L?ULvBlT0)Vi zjg@swcMTmXcytw#3I?vCNtq-SXMMxAEOp$L3AwhmR;ePSP^~OvOLBaCT*M+t&(ao2 z)<#E1t4Bvib>ak#<8mvg3j_D1fqZUUNNDc1R+kK}%L@(KTu6{ztBVJTf8aCZ8PR=& Qy8r+H07*qoM6N<$f-xhZO8@`> diff --git a/assets/images/flags/nzl.png b/assets/images/flags/nzl.png index 11c6ade9cd644d01e7dbaf97538302ba811d55cc..306fdc77864f157879ae836d48175cc4b9377a95 100644 GIT binary patch literal 2096 zcmV-02+#M4P)k7RCt{2TnSSYR}l73B_1W`b4BnlqfAYf$KgIyL_c43#jI`!T%!_2~-%pSV^Rdtoc&di(X zuV43jU%ztJECd39Kp+qZ1OkCTAP@)y0)apv5C{Y!qF_}hK!~?JI!HNK0}NZ>m2r@N z{)xyqc>5fNEr7&~Drjxjf+7DlC}J4;9AEAaNApO4B6=?9f6WE3T6w40>~{G3@q1Xj z>2Xj9h}~EOdH1`()Y1y-gm`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jz?6kl8Pw1i?am-zHupnwlRcxcqBv9#jo zYC3!Cg7G3R-vRNV4(s)Y_r@C#{25;}a^;wR_J3&;fcVda03-rXJ_`j_fO;bYN|1Up z&;z7?LKBt9(E6vuz(z1Nv>rqj-JDoE1`2~BDE)F_ddG!RMLG>~XO0T*ms=t>D8x-oG_K;y>( zjWH%o{i-ISU|a|)E_7vLLue|OKl@7!O` zx%b@jU|IiDN$o&YOMngNLW^g!F5ORTWhOm}w0A5um#61a&JBapu)wZac&BC84y=aB z1tWQfRL9Z?di$~+^m+y|Q;6M|uzxTAKt;e3^wRIFySI_cEWOR4Q@e#n<`z0;*T9(B9w6 zH*cMySjcmH_)S0}ob+0!Rq9p=VHQ>N~eVYIX1%uU# zb3-D6F$P-OI5F}z`H2Y%T0~ZLBY_a8SfHur9V)D$@Nagaa| zH$O+QGl6vVRKCA8q%WXiSx|)Ek{7GC*Is&~%#a!dyC$#3KrjR?E#*>`b;~xn^+V{- zt&a!!?7P#rSr>qvTOQ_vq0LJojLTby__#?aZ5tbY7{jvRUhqA?`W*3?t# zPeiNU1S|`kz5!I)lJ)75!`$ZH$4XFS?CBMD_4Ngn?cq^)W7zo>>4}|iFH6c zffjOPCsJg+5?FRQ&Ff<2lIAs6mKFo`uVGe2T7u9L{D-|s)v+{!dfen!DSeCV{ ZzX9uZNFJe!mcal3002ovPDHLkV1n|ltBn8v diff --git a/assets/images/flags/phl.png b/assets/images/flags/phl.png index b453f3933bef2d4dff687e33c06ef62e44e38e70..3c2ce7bf3940d32ad9f44dc13432b7cf8a8d1ef8 100644 GIT binary patch delta 1562 zcmV+#2Icvi37rffiBL{Q4GJ0x0000DNk~Le0001B0001B2nGNE0OFW;IFTV2e+AD; zL_t(|ob8%zY*SSj#|xSmrba=d5%i;elK27i6Re5~7(l(l7-k|4Au$38Bw(U`AsS{P zeqlyGEzym!Hx-uw-Npnr$A;+GWXbB-8w2OMb-lN5>t4Fj{>?e%)~@Z^b!&5Od!K*u zBzL#xEbH?-&v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C@y)5+qyLywz%R)Gj+W}m>qTgU0Q{e}I8o^3<4wY9a(L8ixw zBm*%>+FPxMK7dRAS_mI8nN0Tg8KmC(2OOPC{m2{nU>n#`QR3&^`Au?}y(d>S`jd95akWiPC+uS;)46>F80@W0RB7g&T!hrCc` zpFdTz#ZnFYf6t^N${JNu&&Ldv<~{lYmOdS>s}6SqZA~sE&d@~p0OpR5k2~qf-xe3n zzSB|fDXs(;a*@t(4oy8LCbH~sM>ep$yd0pzmc>%=rhZ&EIjaxe!x`&JClmfL{Jvgj zU+!<)w#;NQg+wC3=OrfUn(T>)y40AbaObE)mX5BPfv zCnhGcI|S{k3;VL|=;%;mvE^s&OC)n`ZEZXA^YeM;gwk=j63m5x|I$D|mo6kM|GP?; n48F??3%guMuwSK%2aW##N(*w>#@c-p00000NkvXXu0mjfjH^P1 diff --git a/assets/images/flags/pol.png b/assets/images/flags/pol.png index 30d5a937142eed15a38ddce4a631634da569e945..1188eccd10748b7b8b9228c1868f93b71d716eff 100644 GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TRi zr;B4q#hkZS4|cLR@;G1YS|wcYZ>EHg^WF5t5+-Zzv#Tncyk-g14FLzVs_yacjsNVx zFj;p7gB!!@_&XaJ*E3ww%@LnqzG&})J(6Y#-%fJ$Gd!Y-$oYQug4aJUd^Y803AowB zxqxNEucNZkA2<~59(v96$t^}-BfpJzMXk{x)rJc0_1q_<3&BoU0Cd81pcD4!DdZpd z+Vm;yM#C+2=C@qeQI_hbJqNx0#1c{Xa;?K%n0)<1H*IskL){+OMTqi Rw3GuR>gnp|vd$@?2>>=*i|zmb delta 698 zcmV;r0!97q0>cF%iBL{Q4GJ0x0000DNk~Le0000g0000Q2nGNE0KvJ=_K_hMe*gh< zQb$4nuFf3k00004XF*Lt006O%3;baP00075Nkl$V5Ka2w0~AykmtJu_ zJ6D1OZv6oN$N%vs+zPtXg)ky_si1;j+xDZTPHv~k?ddynmpKrtI$bG`l~lz*Q-1n4pjJI zVlWseAMJLVw0#f+vR2wm7$$Gtxf2EWkKA62b z8jb24@*`P-G)<4w>9h)N2&9LP^Z6`auNR{GCM*F*@$Gavxx8c&ek3ej71mm<<_gQe zOTy8*BP<6J8!{(~L=l#OryfxSFPRfXrVGo!B~NoAtEZmpYCg+W6YX}pxvq%n1#2_Z z9*YHQV=|d}gMv@G^Y@Qmf5ImCKYcRGlTyruYZJ2aB=VifCBEk88veFe%&Du5~!9PV5tZl5L*qO|Ts${BED%KG-Iq8U|`~5yi ziQa`JNJ+f&sUzX3|NC&q(&O6Y;h!}QSvcV7fzZ)c=F~i#-EKE(f3;d4wXfi#Xlp{- zV!Z3R^mshte!m}QMAJO$5moMt_?R2=fPfdWl4$Js$tDj-G_yameQ3SWXehZ_t%4^* z+v)~e$X>6fd_m$_+cL?J*XHwhJVxLovg2|Y@(TkhTpH-->_WmRzN3;$hQj5ABfhwh gfE|@wJZSs@bICd!5IYUJga7~l07*qoM6N<$g0#0tp8x;= diff --git a/assets/images/flags/prt.png b/assets/images/flags/prt.png index ff5a25fa9ddfb8672af0b9d1e1b0b4f2d32cd314..26867667933a2001c192be5f23275e4ac50e1320 100644 GIT binary patch literal 2611 zcmV-33e5G1P)*eX&XDq#+cZ_ z_)0XOVpavF)@W)H4H(6U#u`8rF|ATvM5D4Rpn@v~P~YpqZU<=^1`b{8T!8$+j-T?oD(#hE5ZhIn{f~i9JXhi z0W|Lf&-;Rv^TD>)l~1G(T@rTP_$t-k~YR@y^b7%VK2D7$S#fw!cZZbU1Nr5lk)6a0!ky-oiy@)GQ zz~arIxdLo3gC)zsn>HYBk1)V_%@}?a{TMG_22W)7;X6U2AK3Rn2Hc5Du3&jQ*xn8n z27?_vAU`N-z?e18+DdBp7Zlz=~^G2U+c}%b>1vp>&@@h zEM(SdPnP+4vwW?${8x%n-=#FI@MP+8SC;!MVao1l7862j|4C5PfR!NwnUVs=#oIAH zayE-z1!Go%QSX4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(C=sex@AmLR$~A`X;#}=`R)wpOP(wqhN=A(C-}&J2}I-f8t;wzDC^E2HRr3 z=XrX+-v_l?4fzs?hS7yjL__L4leDiE?;nl? zw&ey}$ZEA})`G+{+Y-rBrBXT0X0tOmiEFx?gs5N;FBV5 diff --git a/assets/images/flags/rus.png b/assets/images/flags/rus.png index 2633dcbd057fd6d6a0839c5213d01d3c3f52384c..460c7b8138c69e826822f7a70548d73cefc95560 100644 GIT binary patch literal 371 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TR~ zr;B4q#hkZS8GBg_d7Li_t?pWw(C%;TQl#M)7kh8I&w;W>hCs~_&=5A~x7gnKl?n~B zb!RZFV~ET%f1ulG}8_CD^PIE|K_Ac_Ktf?9S(hBfm7XUHW~JnTb6%ALEIc zG0}U7qBfmQJxHaLcxF@3Jlp;se{(%cdO6#Sm56xKmM`s{U$zFx0sv)RbWWTIxX8Pljy3;Y*Xf!g9 zYN94!U4|xV0@h`GyyFQ+e}Rkm<9KSf+vFPHJmb-T90r`n=lfe$#Vvc0*1x`!OZZm( zoaMwOvvw9pr~weoGIQ5(xm=X(QO(-Lqy+y=wnz2Wqs$=3z(0 zas=SQHC)PD53=fAamO+^91Z~&TOLBePW_-i3lFOfu?pI`{p4AA=J;%H<+t7X~VKX<(io7ZP56Och)*-Pza`sOW|0u(D1ao{Fa(e!t1o~gS$zQ{$sSC=)rS+A2uNq@ z{zYkTx49)neF%`3hvnJIbY>E`CE5N?fUF&obUv=v<;<;WW+GVJY<~jMf7yL?T;?8~ z%S-}`o9$1)?;%OzRlsIzy1_QG=!5N7AsK|;On1t6!lw9Id1_Z#}!+^ zpnuCLhb&+aKOdKiJ0gHvj?)o9a-7}?AURGiK_tiJ^9}$200000000000000e4HCZq XI;qe3)RpYl00000NkvXXu0mjf6!=J6 delta 1314 zcmV+-1>O4Y1*ZxjiBL{Q4GJ0x0000DNk~Le0000g0000Q2nGNE0KvJ=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P zJHBtstdljVy)^6x!+SIPX7c5mf48$UL(~n?tE{Z7Sg=w`(J!V)vCR1Y^tB9Yg<=C@ z3LwKpEG{mJYPBln=H_T?YfC+YUoMx$&d!bu{V|%Jo>pUwjEqPf-)J;MGMSY6Ir^b( zVPQdH9JHg&99R3>+uM}O<@}|kCAqe?hB17TCBp17D=xj0a3i=+LyIj5DX;`9y}!ZcO|2P z)kjL%<3=Wv34XNa)FU5J;up^U31W2fe|qO0+2_tEV)AE| z+;<;Td+Wt3t{=ae!0_;Jx1u^>O&}kCT)wH)OD^9I$U$kW1cL_F(I8>N04d~W6yTVZ zZ0;>Z3iI>-E>Bnrq6j_Pfuf_MqZBnjym&mW6m=-VfOx#V2MfNW2t)62_0Br7z=j%7 zifYzTL#0xYrlN|qf4M1%3h-qz6;)G@V+KVGyfk%x>-hlY=ks}wPk(z95%|8p$7eW? zrygWw*Wr$>Qz#T1K5SV?1#{~Mzh8Qohco1r-b{qY2*;YxvFLBxwyf9d?Ww6LoR>h< z557!H)aOQ*p6KX72 z)O9SAY>kbLHFtM+U2vk#ak&?Q3xn{bfv$HhB&_hWUY87^%L|M8Tu30U*TsXzZ^Tmp U`=k5dkN^Mx07*qoM6N<$f~h5^zW@LL diff --git a/assets/images/flags/usa.png b/assets/images/flags/usa.png index a8c44ce75b7960e2d1cd9cd820ebba0ad23c2334..30fc880b74cb7775b913419e21d038dd5c9ec206 100644 GIT binary patch literal 597 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|OJg zr;B4q#hkY@HhM8T3bZ};Ub;6)+uKokV~9)020=%`8ix4?qBe4wEfWybF%cB;77TRR zC@98vGR!IFW`iQ9RPMQ%cWUH$wwK>-`G5cBOwXlEK%0<&T8Cj@s_<6}F2R^m6=r4` zwh4^(2Sr1!mb1QnbC1t-Qh7QOoo9vi zw707j$$$6hT^vw;8PAMa)-Q!KioPxJZ&>u5zkmMj>P*`T)~WXzLKwbheV1K$$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=&cu^FYXf#TNjWqQVPESwmOeQ0FQIlDFUSgzD zslTa*5R1jy_E8~=Yewd)`_xO|t*OD+5y{J{=L=Y4ZEdZdS-k&DBP~ol0GsS*l}p|_ ztBK2<-FCTSYv%KLlmGX1oKJD|Qx%biuUn(e%NgcXe=rzq?tL9?bjCWNVo~2P47*$| z*T%-ia9;w^hOPpcXoHKFoc@d0vdZ(ZOzislx^>P_u__@J zHXII1Td??6u}rcuJUo29x3^aXC%U*UcSGyJp!3l{eP29C=$&QV9vM0wFLZj&g9PHb dJv=D<6$8r>xt=s2$20%{002ovPDHLkV1nqqMVtTt From ec8c404086f0c87e000afb881e9c4ba600e5602b Mon Sep 17 00:00:00 2001 From: cyan Date: Sat, 17 Aug 2024 04:25:10 +0200 Subject: [PATCH 52/77] fix rosseta builds (#1593) --- scripts/macos/build_monero_all.sh | 11 +++++------ scripts/prepare_moneroc.sh | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/macos/build_monero_all.sh b/scripts/macos/build_monero_all.sh index 9f6130066..c934b4667 100755 --- a/scripts/macos/build_monero_all.sh +++ b/scripts/macos/build_monero_all.sh @@ -43,15 +43,14 @@ else WOWNERO_LIBS=" -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib" if [[ ! $(uname -m) == $ARCH ]]; then - PRC="arch -${ARCH}" + PRC="arch -${ARCH}" fi - pushd ../monero_c + pushd ../monero_c $PRC ./build_single.sh ${COIN} ${HOST} $NPROC - unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz - - popd - done + unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz + popd + done done fi diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index 2e53a54ea..94754c935 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -8,7 +8,7 @@ if [[ ! -d "monero_c" ]]; then git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip cd monero_c - git checkout bcb328a4956105dc182afd0ce2e48fe263f5f20b + git checkout 5de323b1ba7387cf73973042f06383d4dbe619f5 git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero From eef319658a1934c15768b335c7164b491de403f0 Mon Sep 17 00:00:00 2001 From: cyan Date: Sat, 17 Aug 2024 04:30:48 +0200 Subject: [PATCH 53/77] Fix legacy seeds not being displayed when polyseed is not supported (#1608) * Fix legacy seeds not being displayed when polyseed is not supported * fallback to english on Japanese, it errors with empty errorString - probably some kind of normalization issue --- cw_monero/lib/api/wallet.dart | 13 ++++++++++++- cw_monero/pubspec.lock | 9 +++++---- cw_monero/pubspec.yaml | 5 ++++- cw_wownero/lib/api/wallet.dart | 13 ++++++++++++- cw_wownero/pubspec.lock | 9 +++++---- cw_wownero/pubspec.yaml | 5 ++++- lib/src/widgets/seed_language_picker.dart | 2 +- pubspec_base.yaml | 5 ++++- 8 files changed, 47 insertions(+), 14 deletions(-) diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 973a38535..1a6e5315d 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -45,12 +45,23 @@ String getSeed() { String getSeedLegacy(String? language) { var legacy = monero.Wallet_seed(wptr!, seedOffset: ''); + switch (language) { + case "Chinese (Traditional)": language = "Chinese (simplified)"; break; + case "Chinese (Simplified)": language = "Chinese (simplified)"; break; + case "Korean": language = "English"; break; + case "Czech": language = "English"; break; + case "Japanese": language = "English"; break; + } if (monero.Wallet_status(wptr!) != 0) { monero.Wallet_setSeedLanguage(wptr!, language: language ?? "English"); legacy = monero.Wallet_seed(wptr!, seedOffset: ''); } if (monero.Wallet_status(wptr!) != 0) { - return monero.Wallet_errorString(wptr!); + final err = monero.Wallet_errorString(wptr!); + if (legacy.isNotEmpty) { + return "$err\n\n$legacy"; + } + return err; } return legacy; } diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 07c3b8876..51efd4076 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -575,10 +575,11 @@ packages: polyseed: dependency: "direct main" description: - name: polyseed - sha256: edf28042e7b0b28f97a0469aa98e6e4015937cef6b9340cd6ad2822139c95217 - url: "https://pub.dev" - source: hosted + path: "." + ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + url: "https://github.com/mrcyjanek/polyseed_dart" + source: git version: "0.0.5" pool: dependency: transitive diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index b5a13a126..7f5da2621 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -19,7 +19,10 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: ^0.0.5 + polyseed: + git: + url: https://github.com/mrcyjanek/polyseed_dart + ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f cw_core: path: ../cw_core monero: diff --git a/cw_wownero/lib/api/wallet.dart b/cw_wownero/lib/api/wallet.dart index 2ccd560ed..0a06a9950 100644 --- a/cw_wownero/lib/api/wallet.dart +++ b/cw_wownero/lib/api/wallet.dart @@ -47,12 +47,23 @@ String getSeed() { String getSeedLegacy(String? language) { var legacy = wownero.Wallet_seed(wptr!, seedOffset: ''); + switch (language) { + case "Chinese (Traditional)": language = "Chinese (simplified)"; break; + case "Chinese (Simplified)": language = "Chinese (simplified)"; break; + case "Korean": language = "English"; break; + case "Czech": language = "English"; break; + case "Japanese": language = "English"; break; + } if (wownero.Wallet_status(wptr!) != 0) { wownero.Wallet_setSeedLanguage(wptr!, language: language ?? "English"); legacy = wownero.Wallet_seed(wptr!, seedOffset: ''); } if (wownero.Wallet_status(wptr!) != 0) { - return wownero.Wallet_errorString(wptr!); + final err = wownero.Wallet_errorString(wptr!); + if (legacy.isNotEmpty) { + return "$err\n\n$legacy"; + } + return err; } return legacy; } diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index 85d856b35..f164b3086 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -567,10 +567,11 @@ packages: polyseed: dependency: "direct main" description: - name: polyseed - sha256: edf28042e7b0b28f97a0469aa98e6e4015937cef6b9340cd6ad2822139c95217 - url: "https://pub.dev" - source: hosted + path: "." + ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + url: "https://github.com/mrcyjanek/polyseed_dart" + source: git version: "0.0.5" pool: dependency: transitive diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index 7a45eb628..eb14286a9 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -19,7 +19,10 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: ^0.0.5 + polyseed: + git: + url: https://github.com/mrcyjanek/polyseed_dart + ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f cw_core: path: ../cw_core monero: diff --git a/lib/src/widgets/seed_language_picker.dart b/lib/src/widgets/seed_language_picker.dart index 3bb0376b1..5cb8f2fd3 100644 --- a/lib/src/widgets/seed_language_picker.dart +++ b/lib/src/widgets/seed_language_picker.dart @@ -17,7 +17,7 @@ class SeedLanguagePickerOption { final List seedLanguages = [ SeedLanguagePickerOption('English', S.current.seed_language_english, Image.asset('assets/images/flags/usa.png'), [SeedType.legacy, SeedType.polyseed]), - SeedLanguagePickerOption('Chinese (simplified)', S.current.seed_language_chinese, + SeedLanguagePickerOption('Chinese (Simplified)', S.current.seed_language_chinese, Image.asset('assets/images/flags/chn.png'), [SeedType.legacy, SeedType.polyseed]), SeedLanguagePickerOption('Chinese (Traditional)', S.current.seed_language_chinese_traditional, Image.asset('assets/images/flags/chn.png'), [SeedType.polyseed]), diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 567d1b210..a2f346bae 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -94,7 +94,10 @@ dependencies: # ref: main socks5_proxy: ^1.0.4 flutter_svg: ^2.0.9 - polyseed: ^0.0.5 + polyseed: + git: + url: https://github.com/mrcyjanek/polyseed_dart + ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f nostr_tools: ^1.0.9 solana: ^0.30.1 bitcoin_base: From e8a03fc00e22a6428996a5f4bf5ba1f127340bf1 Mon Sep 17 00:00:00 2001 From: tuxpizza Date: Sat, 17 Aug 2024 12:40:52 -0400 Subject: [PATCH 54/77] Update even more flags --- assets/images/flags/are.png | Bin 190 -> 376 bytes assets/images/flags/eur.png | Bin 1005 -> 1476 bytes assets/images/flags/swe.png | Bin 752 -> 390 bytes assets/images/flags/tha.png | Bin 774 -> 384 bytes assets/images/flags/tur.png | Bin 1037 -> 1088 bytes assets/images/flags/twn.png | Bin 373 -> 1005 bytes assets/images/flags/ven.png | Bin 1009 -> 887 bytes assets/images/flags/vnm.png | Bin 448 -> 882 bytes 8 files changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/flags/are.png b/assets/images/flags/are.png index 8eb1e2bd3815aa15b34deb6a323f0b55a87df21f..2df30486a8deca355ea0d7b2cacfe03f727fad2e 100644 GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|TR$ zr;B4q#hkZS4`#YL@;F~ysdeVj`Z@n%ULN?M_&epN6oH z`}08<8IPo3v!wmmEp@*b8kRw{23pJINP?Td}%LotUvt+!d9^xlXI zxW^-X;d4q$G{Z-+Jn;$UN!5;(#yJk>CkwtyWSsMR+3yO4hS|C;4C@%&_Ag0gzQ^RT z{lkuiJ%Y!%Pt8tbeg`y5yP<-+pZkP#;hqJ1B+VY2n=H7GsRLb+wNAsTMO8Ke4yoLV z4MGQAOy82@z^QQeP!Z5sr@%&K&Fd-PRJcb_gTe~DWM4f#2b#! delta 177 zcmeytw2x7-Gr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t=9=0NG-mO2wp@zU%*^=w8fnbHg_HSg0HTEqVdAm6ctc3XMbC^BKiLQenGR@Y_-Oava&%IbaZr7tObg1 zDa%UMhlYk~Jo$XS0iCFQUG4w>ES`*H)E$K Ur5XeJk^lez07*qoM6N<$f)!2PPyhe` diff --git a/assets/images/flags/swe.png b/assets/images/flags/swe.png index ef73086f6d3a0054edddd56f218f9f49a9908350..e5ee36d2feb051709c7cb0fcc6d9f303cbceba5e 100644 GIT binary patch delta 378 zcmeys+QzKd8Q|y6%O%Cdz`(%k>ERLtq!U1xgAGVNno({sQBk~}(ZbWkF{EP7+gqo3 z4?A$U2EJd>=(c=+W@Fn4tJxmYl!T8z_j;2oQP(fS4%7t!A2fo_ZxtRZO!f+}@U-%rrgo?AQ{Sgdp5Ao%r;M;5Xm~uof>Eif(~fN& QPaH_l)78&qol`;+0E=^y%m4rY delta 743 zcmV<1MmeQiBL{Q4GJ0x0000DNk~Le0000g0000Q2nGNE0KvJ=_K_hMe*gh< zQb$4nuFf3k00004XF*Lt006O%3;baP0007oNkled5UuVR6+!U@!rgd9 zvPhP}MFe!7kY(G_KqKVl3ArkJ(1VB!~<))^4}iZntC2 zW)nuEk$gw`X0u_l*-XU#7&ICU>7!IC31#m%4$EeeKxyeLNn+ zWHJdmosQ`BdgLS2i4sA}b=_1Zld(L{W4`aRd_GU4~3<#K>B7!HR%V@!q^kiE57EYe?|zP(4zw{QhMzq*4LHmx7 zY5*r-tGIYyCROY;AK-Qw(7IEw*2an+4$$^yfnbK+n)=p!T<5v4^8hGDf@ zfyy2cQTockFcb=fh?CJ%f4|@FL!}!{v{)=g5vBAb7c3@S2;aPh-$nc8{*T5d;rZxU zq|1n^1#2=MUV5TbU?S9P+p42dsQ~|YceR6mzt;miTD^mGI?c|Ang|LW=JzP!8~q`v zGp;&W8w)y66J$gcYtyjZZiOCE$=bw23GGaJMCH^|nE{3YQ`7lge~$%NIGs)d5aBm4 z1;_w#Nw-?9Js#)txksGfR4ykWx-f`e8mQ;fg#?ekOS)u;U0!gwa3Miqc=*Hv+rZ^y~)4<@0+!{H$O|j^mF7DVzyZxD29jI#8huNZ~`U!p%U1 zA`W|64|AW8Hk`9ykEB_`x5Q~<4Q16zBh&gjtR$Bawtqu$$32io`u-6}z# z3AceJY@7=;Vg8+lFa2j;pI2=V0t%l734;w@@arVUbfDfCknK-_w*Pnn3PULP>i>s9 W$i3~n=<1qzAR$jzKbLh*2~7aNMV3DR delta 765 zcmV0Icd?Rynx!zUF z`I5;wcjnCOx97|Z=M2#)jHuRVe>6-;A%t9|$>i+ic=we*FGvr3`}ipJn5ENdwOpGOxZY$h z^8T=NAqiY?^em2|iw{%v@}9CtGXy!=!GR|?SELm_+{l9o)hCKg{P6iD>4e$!Yf7b3 z@{swV$0;Yxz$AT6C!xRlfBc1X!g{^-5{ZP=Pl&#~eos0folfIEm%0qS+ORr95>-EU zI>RK*p`z^*oy}&XBUH3~qPbj-bOW6C$Au4Ey?I4C;r6zH`~7!T#mzrRm(QM(P5@Dr z$@fA0!sDc+-7cBJEn z9%Tk;2ELj+rOWGy3ovgu9J<{5oiqWsa1H0OH$hgM6n8A`>2zvyv1KAZ4W@q3(HFI7 zusFlMLNWn8yhhkI2xW`;mSu^}X5$o#Mbt|m>iHKw6ZN?B!0z5-UvTLvB^ochW0MUe zTCo3UyHPr)Wm2}=Q|;}Jp=?!yEo7lkkZVEWTiG(neLkPxjmP5yIMK0Oj)MPS5PmdJ v-^T|DGdvdc$PjwGFzKEL3D`wFJShAEs8qVcYmOlW00000NkvXXu0mjfi^^_d diff --git a/assets/images/flags/tur.png b/assets/images/flags/tur.png index 166c6313a131fbe928dda9d4811f343a79cf7a6d..e86b5a85e937ba903a7f14a47b000ec6f851ed47 100644 GIT binary patch literal 1088 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|WCX zPZ!6KiaBp*Wp?-_iX2~GtKOx?B_G(u?^Psux`#7)O=O$PH&gH40G?A)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3_h*hN0jSEFvu~0Em7ybbSMKnfqp@>l-am-hnnT(5pNknL3 zOsX}xtM}kO-r;c0y$4#=q$QMJ-pfAoUjnx&o3QaYRtux62B=iaBeBy*$B84j`g)PJ zZ3RG&zacjlB{MOJk@)=gH7bXKcq3y7iUNS~;UoFzJcU=UajaEw2K;32-Y0kOL0vWa zTa3z~AnR^k1wjDQL>n37dpLrbU;L@h>EDjCXBUO%FIJvWabqXGg{L^&ZU9ol=SW|^ zwv4DG&~=10ZJ4?NhOsiPS56+aK`t#kBOSTE`~zLLKJa=`hX=~25gKcz_P$>GoVhUt zX7wXi9U7qcO`~mhH~B~NWbe#0Zahg{o9%PqWvsHMI%Hf2_v0BK0a3&=dI3REY6AIx z4t)LXyOOJS?x@&rX0qg_XGxtp1BO9r=qzSBjT{O#R-^g3D9-MHWvpX|$xPj%~Um`>4`~-nr1P&rw66~cm)b94vNVn+NE$A)n;RX8lMs*`v;*|1i*9gJnHE| z1Xuenz0QE&mWR2xRMQOo;}z;UbO7&_aU7~zTA`1hpvU3}s@qzjx2MU?%+_^<)|5xZ z4ePB?vTrZamM#!Q^jMtS!>A>ZFJJ4PM_a+UX@hgCnznubZgRnjEZ(vm00000NkvXX Hu0mjfBSqfA diff --git a/assets/images/flags/twn.png b/assets/images/flags/twn.png index 4af8ba78d6a7e891800d67ee6be6c1eee9cd4883..34a2b37db2d786516482fa989fed3631412b64a8 100644 GIT binary patch literal 1005 zcmV_R;gf0pe^B_b%XelaMO$0r4p}dkF5tjV-aE@opF=sroN6-HU3&uVB z9ESDZ>vGo7vIrrB5JCtcgb+dqA%qY@2niIqN1n(*GEvrnG76w503%>0OsAAwrXc^F zRC=jh8wIfTzXn`6+4#@e{hFw@-R#X}1nkWry{!{cc=l<++R%&7GW7gY!rIl-P14!? zfdcp)0ij1D@^Si?E5iAswKDhnugw2h(VwwaaH>hBCw@r7!*>+GZvm>yBLW-|?v(V1 z!|jqD*ZH8TEJ6YN79cOXP8JtdwS#9Se@a`!m@7bA{g_?@*pruCM*;RCK>mqF>Fb!3 z*7{MoSJ5vQkJan-=-?Nz?RDvD8JEh^h+IA%(uU97;c@+4bTAfAQCYP*G9Ev8E6*C= z>wBj18zksY!q?6;%j{JAR4*;s+OY%uvvTWtSJG=Lin{fl=wM7=18@)Ai(OC}X~&z_ zak?Gn7hed=n^!SeUb3|zGHw=hxFXp0y6gO{of9J<4H2fszw5N)IDdX_MYggqzpB5( zo}TbT+9#hW$m0aGm&oHNxRp10^%_ooGVol0Jym59eGRU4T2uOXah1VHHIAH(q z>#thWROUt!^e!k_3PQn6hBKC^VhZv{0Bgj;4{Z+P!gZr= zs^TzipU2V86E4TmmYEka&Uk?@WUS15C5g7RldmNG7l1G2Ewe>I2 zEiNn{1`V*`9bTp1XqiZXP*WZ?P7z`)KvgNbRHgv5Mi=4m1#b1N&4$H(tsV3=ZU zy{@$M*!1aFu3ULrQgYPVdMyXX3_H8^4GpKheEIeN|Nqj`qaq9)q6{6H47INrxL+}F z|6yPR+A#Ii<8mM+UlQaO3{-{(Fr1Yv696jZEbxddW?liAS lxR#%7@O1TaS?83{1OP(Cm7xFt diff --git a/assets/images/flags/ven.png b/assets/images/flags/ven.png index fcc25ef2b301e4a653f2d467d7803d3e5b5e55cd..c189b05452fa2be94ea5dc3c09672d34b7e9bc25 100644 GIT binary patch delta 879 zcmey!{+&&+Gr-TCmrII^fq{Y7)59eQNGE_W2OE%lG^5;NqM~>`v!d2b_w?;P-g{%HxochV`+s#C9_;vTnZ0)NzP;af$vtloaNGcJP{kikvuWcYHt9}lNbu6r?g z-`e~7pO~IJIl5uX3c>Joc23#9V`Z$0WOugq*1v5&{{d!}2iFAa=sUTg;v1HINy*xi z^?m98qMQrtwW|Nqc#h4IzMajOm9@KY^?yk>cl#vQlbu_RC-WSuPx3kTEw16uqqLrV ze_1{~dC74~``psC8eh&zv=~a>u4d$ue|vP}uh|ubfAa2i9gOHXdE*}U1mox_bARil zr>;5ijiJs@<95lhH3FW=eD%M!O#I69Vg8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&rZC_*KEMUVi?Z!tgS$P>CgZ5I$Ok=)I9bm82a~_MrF!6 z$33&Vy5m4_sDbZ-!pAOKb8asJQl&B17Zy5)N4A9Qlizu(vRDGbR!2_VaN1^NsQKz!SH7r}th&1Bg;nF*k8!uI)JZTN zTR8v4U+3jk>nm3>fBsz&m8bP0 Hl+XkKu%*pp From 83ef61e92877dfaa7b506df2982d983162c8f0cc Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Sat, 17 Aug 2024 19:10:27 -0400 Subject: [PATCH 55/77] Cw 565 sign messages (#1378) * version bump to 3.13.9, auth working on mac * bump flutter version in workflow file * workflow fix * test fix * downgrade flutter version * test fix * test fix * update gradle version * start working on ui for message signing * updates * sign working for a few wallet types * updates & verification for electrum currencies * nano support * sign/verify working on eth, bitcoin broken * update translations * Implement Verify Message for Monero * save [skip ci] * pub key extraction working * fixes for electrum signing * verify working for solana! * electrum still not working :( [skip ci] * electrum messages working! * fixes for updated dart version, localization file updates * remove accidental inclusion * missed some unimplemented throws * Update res/values/strings_de.arb Co-authored-by: Konstantin Ullrich * Apply suggestions from code review Co-authored-by: Konstantin Ullrich * review suggestions and updates [skip ci] * [skip ci] add polygon * [skip ci] merge mac-auth/update version * fix litecoin * bio auth mac fix * remove comment and change duration from 2 to 0 * cherry pick previous changes * litecoin fixes, sign form fixes, use new walletAddressPicker * support accounts * verify messages working for monero * working sign and verify messages for nano * electrum signing working [skip ci] * additional nano fixes * update translations * attempt to decode signatures with base64 * workaround for secure storage bug on mac * bump version to 3.19.5 (because breez will need this version anyways) * some code cleanup * some changess didn't get saved * just documenting the issue [skip ci] * undo accidental removal + minor code cleanup * merge conflicts * merge fixes [skip ci] * add tron support * [wip] fixing * remove duplicate references to electrum path for maintainability * fixes * minor fix * fixes * undo debug comment * update migration for all electrum based wallets * hotfixes * copy over the rest of the fixes * minor code cleanup [skip ci] * updates * electrum signing workinggit statusgit statusgit statusgit status! * copy same fixes for litecoin * litecoin fixes * add v to litecoin signatures * fix dependencies * fix bitcoin_base version * merge fix * dep override * fix conflicts with main * trial fix for android build * fixes * fix * dep fix, should build * fix signing for bitcoin cash * [skip ci] minor code cleanup * [skip ci] minor code cleanup 2 * forgot wonero, various other fixes * more fixes * fix solana (untested) --------- Co-authored-by: Konstantin Ullrich Co-authored-by: Omar Hatem --- cw_bitcoin/lib/electrum_wallet.dart | 73 ++++++- cw_bitcoin/lib/litecoin_wallet.dart | 131 +++++++++++- cw_bitcoin/pubspec.yaml | 8 +- .../lib/src/bitcoin_cash_wallet.dart | 11 +- cw_bitcoin_cash/pubspec.yaml | 8 +- cw_core/lib/wallet_base.dart | 5 +- cw_evm/lib/evm_chain_wallet.dart | 20 +- cw_evm/pubspec.yaml | 2 + cw_monero/lib/api/wallet.dart | 4 + cw_monero/lib/monero_wallet.dart | 8 + cw_nano/lib/nano_block_info_response.dart | 37 ++++ cw_nano/lib/nano_client.dart | 87 ++++++-- cw_nano/lib/nano_wallet.dart | 25 ++- cw_nano/pubspec.lock | 8 +- cw_nano/pubspec.yaml | 3 +- cw_solana/lib/solana_wallet.dart | 54 ++++- cw_tron/lib/tron_wallet.dart | 14 +- cw_wownero/lib/api/wallet.dart | 4 + cw_wownero/lib/wownero_wallet.dart | 7 + lib/bitcoin/cw_bitcoin.dart | 4 +- lib/buy/dfx/dfx_buy_provider.dart | 4 +- lib/buy/robinhood/robinhood_buy_provider.dart | 6 +- lib/di.dart | 16 +- lib/router.dart | 14 ++ lib/routes.dart | 2 + .../cake_pay_confirm_purchase_card_page.dart | 18 +- .../dashboard/pages/cake_features_page.dart | 14 ++ lib/src/screens/dashboard/sign_page.dart | 202 ++++++++++++++++++ .../screens/dashboard/widgets/sign_form.dart | 98 +++++++++ .../dashboard/widgets/verify_form.dart | 92 ++++++++ .../screens/receive/address_list_page.dart | 31 +++ lib/src/screens/receive/receive_page.dart | 104 +-------- .../screens/receive/widgets/address_list.dart | 120 +++++++++++ lib/src/widgets/address_text_field.dart | 194 ++++++++++------- .../dashboard/dashboard_view_model.dart | 36 +++- lib/view_model/dashboard/sign_view_model.dart | 55 +++++ .../wallet_address_list_view_model.dart | 9 + lib/view_model/wallet_creation_vm.dart | 8 +- pubspec_base.yaml | 6 +- res/values/strings_ar.arb | 8 + res/values/strings_bg.arb | 8 + res/values/strings_cs.arb | 8 + res/values/strings_de.arb | 8 + res/values/strings_en.arb | 8 + res/values/strings_es.arb | 8 + res/values/strings_fr.arb | 8 + res/values/strings_ha.arb | 8 + res/values/strings_hi.arb | 8 + res/values/strings_hr.arb | 8 + res/values/strings_id.arb | 8 + res/values/strings_it.arb | 8 + res/values/strings_ja.arb | 8 + res/values/strings_ko.arb | 8 + res/values/strings_my.arb | 8 + res/values/strings_nl.arb | 8 + res/values/strings_pl.arb | 8 + res/values/strings_pt.arb | 8 + res/values/strings_ru.arb | 8 + res/values/strings_th.arb | 8 + res/values/strings_tl.arb | 8 + res/values/strings_tr.arb | 8 + res/values/strings_uk.arb | 8 + res/values/strings_ur.arb | 8 + res/values/strings_yo.arb | 8 + res/values/strings_zh.arb | 8 + 65 files changed, 1479 insertions(+), 271 deletions(-) create mode 100644 cw_nano/lib/nano_block_info_response.dart create mode 100644 lib/src/screens/dashboard/sign_page.dart create mode 100644 lib/src/screens/dashboard/widgets/sign_form.dart create mode 100644 lib/src/screens/dashboard/widgets/verify_form.dart create mode 100644 lib/src/screens/receive/address_list_page.dart create mode 100644 lib/src/screens/receive/widgets/address_list.dart create mode 100644 lib/view_model/dashboard/sign_view_model.dart diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 9dc8de083..8f2360f26 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -42,6 +42,7 @@ import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:rxdart/subjects.dart'; +import 'package:http/http.dart' as http; import 'package:sp_scanner/sp_scanner.dart'; part 'electrum_wallet.g.dart'; @@ -132,6 +133,7 @@ abstract class ElectrumWalletBase final String? _mnemonic; Bip32Slip10Secp256k1 get hd => accountHD.childKey(Bip32KeyIndex(0)); + Bip32Slip10Secp256k1 get sideHd => accountHD.childKey(Bip32KeyIndex(1)); final EncryptionFileUtils encryptionFileUtils; final String? passphrase; @@ -591,7 +593,7 @@ abstract class ElectrumWalletBase } final derivationPath = - "${_hardenedDerivationPath(walletInfo.derivationInfo?.derivationPath ?? "m/0'")}" + "${_hardenedDerivationPath(walletInfo.derivationInfo?.derivationPath ?? electrum_path)}" "/${utx.bitcoinAddressRecord.isHidden ? "1" : "0"}" "/${utx.bitcoinAddressRecord.index}"; publicKeys[address.pubKeyHash()] = PublicKeyWithDerivationPath(pubKeyHex, derivationPath); @@ -1869,11 +1871,70 @@ abstract class ElectrumWalletBase ? walletAddresses.allAddresses.firstWhere((element) => element.address == address).index : null; final HD = index == null ? hd : hd.childKey(Bip32KeyIndex(index)); - final priv = ECPrivate.fromWif( - WifEncoder.encode(HD.privateKey.raw, netVer: network.wifNetVer), - netVersion: network.wifNetVer, - ); - return priv.signMessage(StringUtils.encode(message)); + final priv = ECPrivate.fromHex(HD.privateKey.privKey.toHex()); + + String messagePrefix = '\x18Bitcoin Signed Message:\n'; + final hexEncoded = priv.signMessage(utf8.encode(message), messagePrefix: messagePrefix); + final decodedSig = hex.decode(hexEncoded); + return base64Encode(decodedSig); + } + + @override + Future verifyMessage(String message, String signature, {String? address = null}) async { + if (address == null) { + return false; + } + + List sigDecodedBytes = []; + + if (signature.endsWith('=')) { + sigDecodedBytes = base64.decode(signature); + } else { + sigDecodedBytes = hex.decode(signature); + } + + if (sigDecodedBytes.length != 64 && sigDecodedBytes.length != 65) { + throw ArgumentException( + "signature must be 64 bytes without recover-id or 65 bytes with recover-id"); + } + + String messagePrefix = '\x18Bitcoin Signed Message:\n'; + final messageHash = QuickCrypto.sha256Hash( + BitcoinSignerUtils.magicMessage(utf8.encode(message), messagePrefix)); + + List correctSignature = + sigDecodedBytes.length == 65 ? sigDecodedBytes.sublist(1) : List.from(sigDecodedBytes); + List rBytes = correctSignature.sublist(0, 32); + List sBytes = correctSignature.sublist(32); + final sig = ECDSASignature(BigintUtils.fromBytes(rBytes), BigintUtils.fromBytes(sBytes)); + + List possibleRecoverIds = [0, 1]; + + final baseAddress = addressTypeFromStr(address, network); + + for (int recoveryId in possibleRecoverIds) { + final pubKey = sig.recoverPublicKey(messageHash, Curves.generatorSecp256k1, recoveryId); + + final recoveredPub = ECPublic.fromBytes(pubKey!.toBytes()); + + String? recoveredAddress; + + if (baseAddress is P2pkAddress) { + recoveredAddress = recoveredPub.toP2pkAddress().toAddress(network); + } else if (baseAddress is P2pkhAddress) { + recoveredAddress = recoveredPub.toP2pkhAddress().toAddress(network); + } else if (baseAddress is P2wshAddress) { + recoveredAddress = recoveredPub.toP2wshAddress().toAddress(network); + } else if (baseAddress is P2wpkhAddress) { + recoveredAddress = recoveredPub.toP2wpkhAddress().toAddress(network); + } + + if (recoveredAddress == address) { + return true; + } + } + + return false; } Future _setInitialHeight() async { diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index d8c04dba6..890d98342 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -1,6 +1,9 @@ -import 'package:bip39/bip39.dart' as bip39; +import 'dart:convert'; + import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; +import 'package:blockchain_utils/signer/ecdsa_signing_key.dart'; +import 'package:bip39/bip39.dart' as bip39; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; @@ -17,6 +20,9 @@ import 'package:cw_core/wallet_keys_file.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; +import 'package:bitcoin_base/src/crypto/keypair/sign_utils.dart'; +import 'package:pointycastle/ecc/api.dart'; +import 'package:pointycastle/ecc/curves/secp256k1.dart'; part 'litecoin_wallet.g.dart'; @@ -167,4 +173,127 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { return 0; } + + @override + Future signMessage(String message, {String? address = null}) async { + final index = address != null + ? walletAddresses.allAddresses.firstWhere((element) => element.address == address).index + : null; + final HD = index == null ? hd : hd.childKey(Bip32KeyIndex(index)); + final priv = ECPrivate.fromHex(HD.privateKey.privKey.toHex()); + + final privateKey = ECDSAPrivateKey.fromBytes( + priv.toBytes(), + Curves.generatorSecp256k1, + ); + + final signature = + signLitecoinMessage(utf8.encode(message), privateKey: privateKey, bipPrive: priv.prive); + + return base64Encode(signature); + } + + List _magicPrefix(List message, List messagePrefix) { + final encodeLength = IntUtils.encodeVarint(message.length); + + return [...messagePrefix, ...encodeLength, ...message]; + } + + List signLitecoinMessage(List message, + {required ECDSAPrivateKey privateKey, required Bip32PrivateKey bipPrive}) { + String messagePrefix = '\x19Litecoin Signed Message:\n'; + final messageHash = QuickCrypto.sha256Hash(magicMessage(message, messagePrefix)); + final signingKey = EcdsaSigningKey(privateKey); + ECDSASignature ecdsaSign = + signingKey.signDigestDeterminstic(digest: messageHash, hashFunc: () => SHA256()); + final n = Curves.generatorSecp256k1.order! >> 1; + BigInt newS; + if (ecdsaSign.s.compareTo(n) > 0) { + newS = Curves.generatorSecp256k1.order! - ecdsaSign.s; + } else { + newS = ecdsaSign.s; + } + final rawSig = ECDSASignature(ecdsaSign.r, newS); + final rawSigBytes = rawSig.toBytes(BitcoinSignerUtils.baselen); + + final pub = bipPrive.publicKey; + final ECDomainParameters curve = ECCurve_secp256k1(); + final point = curve.curve.decodePoint(pub.point.toBytes()); + + final rawSigEc = ECSignature(rawSig.r, rawSig.s); + + final recId = SignUtils.findRecoveryId( + SignUtils.getHexString(messageHash, offset: 0, length: messageHash.length), + rawSigEc, + Uint8List.fromList(pub.uncompressed), + ); + + final v = recId + 27 + (point!.isCompressed ? 4 : 0); + + final combined = Uint8List.fromList([v, ...rawSigBytes]); + + return combined; + } + + List magicMessage(List message, String messagePrefix) { + final prefixBytes = StringUtils.encode(messagePrefix); + final magic = _magicPrefix(message, prefixBytes); + return QuickCrypto.sha256Hash(magic); + } + + @override + Future verifyMessage(String message, String signature, {String? address = null}) async { + if (address == null) { + return false; + } + + List sigDecodedBytes = []; + + if (signature.endsWith('=')) { + sigDecodedBytes = base64.decode(signature); + } else { + sigDecodedBytes = hex.decode(signature); + } + + if (sigDecodedBytes.length != 64 && sigDecodedBytes.length != 65) { + throw ArgumentException( + "litecoin signature must be 64 bytes without recover-id or 65 bytes with recover-id"); + } + + String messagePrefix = '\x19Litecoin Signed Message:\n'; + final messageHash = QuickCrypto.sha256Hash(magicMessage(utf8.encode(message), messagePrefix)); + + List correctSignature = + sigDecodedBytes.length == 65 ? sigDecodedBytes.sublist(1) : List.from(sigDecodedBytes); + List rBytes = correctSignature.sublist(0, 32); + List sBytes = correctSignature.sublist(32); + final sig = ECDSASignature(BigintUtils.fromBytes(rBytes), BigintUtils.fromBytes(sBytes)); + + List possibleRecoverIds = [0, 1]; + + final baseAddress = addressTypeFromStr(address, network); + + for (int recoveryId in possibleRecoverIds) { + final pubKey = sig.recoverPublicKey(messageHash, Curves.generatorSecp256k1, recoveryId); + final recoveredPub = ECPublic.fromBytes(pubKey!.toBytes()); + + String? recoveredAddress; + + if (baseAddress is P2pkAddress) { + recoveredAddress = recoveredPub.toP2pkAddress().toAddress(network); + } else if (baseAddress is P2pkhAddress) { + recoveredAddress = recoveredPub.toP2pkhAddress().toAddress(network); + } else if (baseAddress is P2wshAddress) { + recoveredAddress = recoveredPub.toP2wshAddress().toAddress(network); + } else if (baseAddress is P2wpkhAddress) { + recoveredAddress = recoveredPub.toP2wpkhAddress().toAddress(network); + } + + if (recoveredAddress == address) { + return true; + } + } + + return false; + } } diff --git a/cw_bitcoin/pubspec.yaml b/cw_bitcoin/pubspec.yaml index 449833220..2af1ac54e 100644 --- a/cw_bitcoin/pubspec.yaml +++ b/cw_bitcoin/pubspec.yaml @@ -25,10 +25,6 @@ dependencies: ref: Add-Support-For-OP-Return-data rxdart: ^0.27.5 cryptography: ^2.0.5 - bitcoin_base: - git: - url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v4 blockchain_utils: git: url: https://github.com/cake-tech/blockchain_utils @@ -57,6 +53,10 @@ dependency_overrides: url: https://github.com/cake-tech/ledger-flutter.git ref: cake-v3 watcher: ^1.1.0 + bitcoin_base: + git: + url: https://github.com/cake-tech/bitcoin_base + ref: cake-update-v5 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart index a59569ae6..5659528c0 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart @@ -202,11 +202,12 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { @override Future signMessage(String message, {String? address = null}) async { - final index = address != null - ? walletAddresses.allAddresses - .firstWhere((element) => element.address == AddressUtils.toLegacyAddress(address)) - .index - : null; + int? index; + try { + index = address != null + ? walletAddresses.allAddresses.firstWhere((element) => element.address == address).index + : null; + } catch (_) {} final HD = index == null ? hd : hd.childKey(Bip32KeyIndex(index)); final priv = ECPrivate.fromWif( WifEncoder.encode(HD.privateKey.raw, netVer: network.wifNetVer), diff --git a/cw_bitcoin_cash/pubspec.yaml b/cw_bitcoin_cash/pubspec.yaml index 3728bafc5..64bd38b1d 100644 --- a/cw_bitcoin_cash/pubspec.yaml +++ b/cw_bitcoin_cash/pubspec.yaml @@ -25,10 +25,6 @@ dependencies: git: url: https://github.com/cake-tech/bitbox-flutter.git ref: Add-Support-For-OP-Return-data - bitcoin_base: - git: - url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v4 blockchain_utils: git: url: https://github.com/cake-tech/blockchain_utils @@ -43,6 +39,10 @@ dev_dependencies: dependency_overrides: watcher: ^1.1.0 + bitcoin_base: + git: + url: https://github.com/cake-tech/bitcoin_base + ref: cake-update-v5 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/cw_core/lib/wallet_base.dart b/cw_core/lib/wallet_base.dart index f7af15224..14ba898a7 100644 --- a/cw_core/lib/wallet_base.dart +++ b/cw_core/lib/wallet_base.dart @@ -69,7 +69,6 @@ abstract class WalletBase renameWalletFiles(String newWalletName); - Future signMessage(String message, {String? address = null}) => throw UnimplementedError(); + Future signMessage(String message, {String? address = null}); + + Future verifyMessage(String message, String signature, {String? address = null}); bool? isTestnet; } diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index 80a366e6f..bbf972f0d 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -35,6 +35,7 @@ import 'package:mobx/mobx.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:web3dart/crypto.dart'; import 'package:web3dart/web3dart.dart'; +import 'package:eth_sig_util/eth_sig_util.dart'; import 'evm_chain_transaction_info.dart'; import 'evm_erc20_balance.dart'; @@ -500,7 +501,7 @@ abstract class EVMChainWalletBase } final methodSignature = - transactionInput.length >= 10 ? transactionInput.substring(0, 10) : null; + transactionInput.length >= 10 ? transactionInput.substring(0, 10) : null; return methodSignatureToType[methodSignature]; } @@ -692,8 +693,21 @@ abstract class EVMChainWalletBase } @override - Future signMessage(String message, {String? address}) async => - bytesToHex(await _evmChainPrivateKey.signPersonalMessage(ascii.encode(message))); + Future signMessage(String message, {String? address}) async { + return bytesToHex(await _evmChainPrivateKey.signPersonalMessage(ascii.encode(message))); + } + + @override + Future verifyMessage(String message, String signature, {String? address}) async { + if (address == null) { + return false; + } + final recoveredAddress = EthSigUtil.recoverPersonalSignature( + message: ascii.encode(message), + signature: signature, + ); + return recoveredAddress.toUpperCase() == address.toUpperCase(); + } Web3Client? getWeb3Client() => _client.getWeb3Client(); diff --git a/cw_evm/pubspec.yaml b/cw_evm/pubspec.yaml index b24e375a7..3e12834b1 100644 --- a/cw_evm/pubspec.yaml +++ b/cw_evm/pubspec.yaml @@ -13,6 +13,8 @@ dependencies: flutter: sdk: flutter web3dart: ^2.7.1 + eth_sig_util: ^0.0.9 + erc20: ^1.0.1 bip39: ^1.0.6 bip32: ^2.0.0 hex: ^0.2.0 diff --git a/cw_monero/lib/api/wallet.dart b/cw_monero/lib/api/wallet.dart index 1a6e5315d..b493e536e 100644 --- a/cw_monero/lib/api/wallet.dart +++ b/cw_monero/lib/api/wallet.dart @@ -316,3 +316,7 @@ Future trustedDaemon() async => monero.Wallet_trustedDaemon(wptr!); String signMessage(String message, {String address = ""}) { return monero.Wallet_signMessage(wptr!, message: message, address: address); } + +bool verifyMessage(String message, String address, String signature) { + return monero.Wallet_verifySignedMessage(wptr!, message: message, address: address, signature: signature); +} \ No newline at end of file diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 31e09ca2d..f5fa0ec7e 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -783,4 +783,12 @@ abstract class MoneroWalletBase extends WalletBase verifyMessage(String message, String signature, {String? address = null}) async { + if (address == null) return false; + + return monero_wallet.verifyMessage(message, address, signature); + } + } diff --git a/cw_nano/lib/nano_block_info_response.dart b/cw_nano/lib/nano_block_info_response.dart new file mode 100644 index 000000000..d2f000b9d --- /dev/null +++ b/cw_nano/lib/nano_block_info_response.dart @@ -0,0 +1,37 @@ +class BlockContentsResponse { + String type; + String account; + String previous; + String representative; + String balance; + String link; + String linkAsAccount; + String signature; + String work; + + BlockContentsResponse({ + required this.type, + required this.account, + required this.previous, + required this.representative, + required this.balance, + required this.link, + required this.linkAsAccount, + required this.signature, + required this.work, + }); + + factory BlockContentsResponse.fromJson(Map json) { + return BlockContentsResponse( + type: json['type'] as String, + account: json['account'] as String, + previous: json['previous'] as String, + representative: json['representative'] as String, + balance: json['balance'] as String, + link: json['link'] as String, + linkAsAccount: json['link_as_account'] as String, + signature: json['signature'] as String, + work: json['work'] as String, + ); + } +} diff --git a/cw_nano/lib/nano_client.dart b/cw_nano/lib/nano_client.dart index 8d8bef13d..478a6c125 100644 --- a/cw_nano/lib/nano_client.dart +++ b/cw_nano/lib/nano_client.dart @@ -2,11 +2,11 @@ import 'dart:async'; import 'dart:convert'; import 'package:cw_core/nano_account_info_response.dart'; +import 'package:cw_nano/nano_block_info_response.dart'; import 'package:cw_core/n2_node.dart'; import 'package:cw_nano/nano_balance.dart'; import 'package:cw_nano/nano_transaction_model.dart'; import 'package:http/http.dart' as http; -import 'package:nanodart/nanodart.dart'; import 'package:cw_core/node.dart'; import 'package:nanoutil/nanoutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -111,6 +111,27 @@ class NanoClient { } } + Future getBlockContents(String block) async { + try { + final response = await http.post( + _node!.uri, + headers: CAKE_HEADERS, + body: jsonEncode( + { + "action": "block_info", + "json_block": "true", + "hash": block, + }, + ), + ); + final data = await jsonDecode(response.body); + return BlockContentsResponse.fromJson(data["contents"] as Map); + } catch (e) { + print("error while getting block info $e"); + return null; + } + } + Future changeRep({ required String privateKey, required String repAddress, @@ -135,8 +156,8 @@ class NanoClient { }; // sign the change block: - final String hash = NanoBlocks.computeStateHash( - NanoAccountType.NANO, + final String hash = NanoSignatures.computeStateHash( + NanoBasedCurrency.NANO, changeBlock["account"]!, changeBlock["previous"]!, changeBlock["representative"]!, @@ -248,7 +269,7 @@ class NanoClient { } final String representative = infoResponse.representative; // link = destination address: - final String link = NanoAccounts.extractPublicKey(destinationAddress); + final String link = NanoDerivations.addressToPublicKey(destinationAddress); final String linkAsAccount = destinationAddress; // construct the send block: @@ -262,8 +283,8 @@ class NanoClient { }; // sign the send block: - final String hash = NanoBlocks.computeStateHash( - NanoAccountType.NANO, + final String hash = NanoSignatures.computeStateHash( + NanoBasedCurrency.NANO, sendBlock["account"]!, sendBlock["previous"]!, sendBlock["representative"]!, @@ -285,7 +306,6 @@ class NanoClient { Future receiveBlock({ required String blockHash, - required String source, required String amountRaw, required String destinationAddress, required String privateKey, @@ -310,15 +330,56 @@ class NanoClient { representative = infoData.representative; } + if ((BigInt.tryParse(amountRaw) ?? BigInt.zero) <= BigInt.zero) { + throw Exception("amountRaw must be greater than zero"); + } + + BlockContentsResponse? frontierContents; + + if (!openBlock) { + // get the block info of the frontier block: + frontierContents = await getBlockContents(frontier); + + if (frontierContents == null) { + throw Exception("error while getting frontier block info"); + } + + final String frontierHash = NanoSignatures.computeStateHash( + NanoBasedCurrency.NANO, + frontierContents.account, + frontierContents.previous, + frontierContents.representative, + BigInt.parse(frontierContents.balance), + frontierContents.link, + ); + + bool valid = await NanoSignatures.verify( + frontierHash, + frontierContents.signature, + destinationAddress, + ); + + if (!valid) { + throw Exception( + "Frontier block signature is invalid! Potentially malicious block detected!"); + } + } + // first get the account balance: - final BigInt currentBalance = (await getBalance(destinationAddress)).currentBalance; + late BigInt currentBalance; + if (!openBlock) { + currentBalance = BigInt.parse(frontierContents!.balance); + } else { + currentBalance = BigInt.zero; + } final BigInt txAmount = BigInt.parse(amountRaw); final BigInt balanceAfterTx = currentBalance + txAmount; // link = send block hash: final String link = blockHash; // this "linkAsAccount" is meaningless: - final String linkAsAccount = NanoAccounts.createAccount(NanoAccountType.NANO, blockHash); + final String linkAsAccount = + NanoDerivations.publicKeyToAddress(blockHash, currency: NanoBasedCurrency.NANO); // construct the receive block: Map receiveBlock = { @@ -332,8 +393,8 @@ class NanoClient { }; // sign the receive block: - final String hash = NanoBlocks.computeStateHash( - NanoAccountType.NANO, + final String hash = NanoSignatures.computeStateHash( + NanoBasedCurrency.NANO, receiveBlock["account"]!, receiveBlock["previous"]!, receiveBlock["representative"]!, @@ -345,7 +406,7 @@ class NanoClient { // get PoW for the receive block: String? work; if (openBlock) { - work = await requestWork(NanoAccounts.extractPublicKey(destinationAddress)); + work = await requestWork(NanoDerivations.addressToPublicKey(destinationAddress)); } else { work = await requestWork(frontier); } @@ -409,10 +470,8 @@ class NanoClient { for (final blockHash in blocks.keys) { final block = blocks[blockHash]; final String amountRaw = block["amount"] as String; - final String source = block["source"] as String; await receiveBlock( blockHash: blockHash, - source: source, amountRaw: amountRaw, privateKey: privateKey, destinationAddress: destinationAddress, diff --git a/cw_nano/lib/nano_wallet.dart b/cw_nano/lib/nano_wallet.dart index cba8d09a0..700710c2e 100644 --- a/cw_nano/lib/nano_wallet.dart +++ b/cw_nano/lib/nano_wallet.dart @@ -27,7 +27,6 @@ import 'package:cw_nano/nano_wallet_addresses.dart'; import 'package:cw_nano/nano_wallet_keys.dart'; import 'package:cw_nano/pending_nano_transaction.dart'; import 'package:mobx/mobx.dart'; -import 'package:nanodart/nanodart.dart'; import 'package:nanoutil/nanoutil.dart'; part 'nano_wallet.g.dart'; @@ -107,7 +106,6 @@ abstract class NanoWalletBase if (_derivationType == DerivationType.unknown) { _derivationType = DerivationType.nano; } - final String type = (_derivationType == DerivationType.nano) ? "standard" : "hd"; // our "mnemonic" is actually a hex form seed: if (!_mnemonic.contains(' ')) { @@ -122,8 +120,10 @@ abstract class NanoWalletBase _hexSeed = await NanoDerivations.hdMnemonicListToSeed(_mnemonic.split(' ')); } } - NanoDerivationType derivationType = - type == "standard" ? NanoDerivationType.STANDARD : NanoDerivationType.HD; + + final String type = (_derivationType == DerivationType.nano) ? "standard" : "hd"; + NanoDerivationType derivationType = NanoDerivations.stringToType(type); + _privateKey = await NanoDerivations.universalSeedToPrivate( _hexSeed!, index: 0, @@ -216,8 +216,8 @@ abstract class NanoWalletBase balanceAfterTx: runningBalance, previousHash: previousHash, ); - previousHash = NanoBlocks.computeStateHash( - NanoAccountType.NANO, + previousHash = NanoSignatures.computeStateHash( + NanoBasedCurrency.NANO, block["account"]!, block["previous"]!, block["representative"]!, @@ -535,4 +535,17 @@ abstract class NanoWalletBase // Delete old name's dir and files await Directory(currentDirPath).delete(recursive: true); } + + @override + Future signMessage(String message, {String? address = null}) async { + return NanoSignatures.signMessage(message, privateKey!); + } + + @override + Future verifyMessage(String message, String signature, {String? address = null}) async { + if (address == null) { + return false; + } + return await NanoSignatures.verifyMessage(message, signature, address); + } } diff --git a/cw_nano/pubspec.lock b/cw_nano/pubspec.lock index bbe909199..ef9de14f9 100644 --- a/cw_nano/pubspec.lock +++ b/cw_nano/pubspec.lock @@ -513,7 +513,7 @@ packages: source: hosted version: "2.3.0" nanodart: - dependency: "direct main" + dependency: transitive description: name: nanodart sha256: "4b2f42d60307b54e8cf384d6193a567d07f8efd773858c0d5948246153c13282" @@ -524,11 +524,11 @@ packages: dependency: "direct main" description: path: "." - ref: c37e72817cf0a28162f43124f79661d6c8e0098f - resolved-ref: c37e72817cf0a28162f43124f79661d6c8e0098f + ref: c01a9c552917008d8fbc6b540db657031625b04f + resolved-ref: c01a9c552917008d8fbc6b540db657031625b04f url: "https://github.com/perishllc/nanoutil.git" source: git - version: "1.0.0" + version: "1.0.3" package_config: dependency: transitive description: diff --git a/cw_nano/pubspec.yaml b/cw_nano/pubspec.yaml index 6fae6a895..3ddd9769e 100644 --- a/cw_nano/pubspec.yaml +++ b/cw_nano/pubspec.yaml @@ -15,7 +15,6 @@ dependencies: mobx: ^2.0.7+4 bip39: ^1.0.6 bip32: ^2.0.0 - nanodart: ^2.0.0 decimal: ^2.3.3 libcrypto: ^0.2.2 ed25519_hd_key: ^2.2.0 @@ -25,7 +24,7 @@ dependencies: nanoutil: git: url: https://github.com/perishllc/nanoutil.git - ref: c37e72817cf0a28162f43124f79661d6c8e0098f + ref: c01a9c552917008d8fbc6b540db657031625b04f cw_core: path: ../cw_core diff --git a/cw_solana/lib/solana_wallet.dart b/cw_solana/lib/solana_wallet.dart index 66b8bca42..4e69db3b8 100644 --- a/cw_solana/lib/solana_wallet.dart +++ b/cw_solana/lib/solana_wallet.dart @@ -32,6 +32,8 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:solana/base58.dart'; import 'package:solana/metaplex.dart' as metaplex; import 'package:solana/solana.dart'; +import 'package:solana/src/crypto/ed25519_hd_keypair.dart'; +import 'package:cryptography/cryptography.dart'; part 'solana_wallet.g.dart'; @@ -571,17 +573,59 @@ abstract class SolanaWalletBase }); } - Future signSolanaMessage(String message) async { + @override + Future signMessage(String message, {String? address}) async { // Convert the message to bytes final messageBytes = utf8.encode(message); // Sign the message bytes with the wallet's private key - final signature = await _walletKeyPair!.sign(messageBytes); + final signature = (await _walletKeyPair!.sign(messageBytes)).toString(); - // Convert the signature to a hexadecimal string - final hex = HEX.encode(signature.bytes); + return HEX.encode(utf8.encode(signature)).toUpperCase(); + } - return hex; + List> bytesFromSigString(String signatureString) { + final regex = RegExp(r'Signature\(\[(.+)\], publicKey: (.+)\)'); + final match = regex.firstMatch(signatureString); + + if (match != null) { + final bytesString = match.group(1)!; + final base58EncodedPublicKeyString = match.group(2)!; + final sigBytes = bytesString.split(', ').map(int.parse).toList(); + + List pubKeyBytes = base58decode(base58EncodedPublicKeyString); + + return [sigBytes, pubKeyBytes]; + } else { + throw const FormatException('Invalid Signature string format'); + } + } + + @override + Future verifyMessage(String message, String signature, {String? address}) async { + String signatureString = utf8.decode(HEX.decode(signature)); + + List> bytes = bytesFromSigString(signatureString); + + final messageBytes = utf8.encode(message); + final sigBytes = bytes[0]; + final pubKeyBytes = bytes[1]; + + if (address == null) { + return false; + } + + // make sure the address derived from the public key provided matches the one we expect + final pub = Ed25519HDPublicKey(pubKeyBytes); + if (address != pub.toBase58()) { + return false; + } + + return await verifySignature( + message: messageBytes, + signature: sigBytes, + publicKey: Ed25519HDPublicKey(pubKeyBytes), + ); } SolanaClient? get solanaClient => _client.getSolanaClient; diff --git a/cw_tron/lib/tron_wallet.dart b/cw_tron/lib/tron_wallet.dart index 7dc43b4bb..f5841d894 100644 --- a/cw_tron/lib/tron_wallet.dart +++ b/cw_tron/lib/tron_wallet.dart @@ -580,8 +580,18 @@ abstract class TronWalletBase } @override - Future signMessage(String message, {String? address}) async => - _tronPrivateKey.signPersonalMessage(ascii.encode(message)); + Future signMessage(String message, {String? address}) async { + return _tronPrivateKey.signPersonalMessage(ascii.encode(message)); + } + + @override + Future verifyMessage(String message, String signature, {String? address}) async { + if (address == null) { + return false; + } + TronPublicKey pubKey = TronPublicKey.fromPersonalSignature(ascii.encode(message), signature)!; + return pubKey.toAddress().toString() == address; + } String getTronBase58AddressFromHex(String hexAddress) => TronAddress(hexAddress).toAddress(); diff --git a/cw_wownero/lib/api/wallet.dart b/cw_wownero/lib/api/wallet.dart index 0a06a9950..56f54dfac 100644 --- a/cw_wownero/lib/api/wallet.dart +++ b/cw_wownero/lib/api/wallet.dart @@ -320,3 +320,7 @@ Future trustedDaemon() async => wownero.Wallet_trustedDaemon(wptr!); String signMessage(String message, {String address = ""}) { return wownero.Wallet_signMessage(wptr!, message: message, address: address); } + +bool verifyMessage(String message, String address, String signature) { + return wownero.Wallet_verifySignedMessage(wptr!, message: message, address: address, signature: signature); +} \ No newline at end of file diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index 85f5e4b2f..c3f4bcb69 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -743,4 +743,11 @@ abstract class WowneroWalletBase final useAddress = address ?? ""; return wownero_wallet.signMessage(message, address: useAddress); } + + @override + Future verifyMessage(String message, String signature, {String? address = null}) async { + if (address == null) return false; + + return wownero_wallet.verifyMessage(message, address, signature); + } } diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index 989cd2b35..e87773f97 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -275,7 +275,7 @@ class CWBitcoin extends Bitcoin { return [DerivationType.bip39, DerivationType.electrum]; } - int _countOccurrences(String str, String charToCount) { + int _countCharOccurrences(String str, String charToCount) { int count = 0; for (int i = 0; i < str.length; i++) { if (str[i] == charToCount) { @@ -330,7 +330,7 @@ class CWBitcoin extends Bitcoin { ); String balancePath = dInfoCopy.derivationPath!; - int derivationDepth = _countOccurrences(balancePath, "/"); + int derivationDepth = _countCharOccurrences(balancePath, '/'); // for BIP44 if (derivationDepth == 3 || derivationDepth == 1) { diff --git a/lib/buy/dfx/dfx_buy_provider.dart b/lib/buy/dfx/dfx_buy_provider.dart index 2a7e2ab13..b3ed72498 100644 --- a/lib/buy/dfx/dfx_buy_provider.dart +++ b/lib/buy/dfx/dfx_buy_provider.dart @@ -124,12 +124,12 @@ class DFXBuyProvider extends BuyProvider { switch (wallet.type) { case WalletType.ethereum: case WalletType.polygon: - return wallet.signMessage(message); + return await wallet.signMessage(message); case WalletType.monero: case WalletType.litecoin: case WalletType.bitcoin: case WalletType.bitcoinCash: - return wallet.signMessage(message, address: walletAddress); + return await wallet.signMessage(message, address: walletAddress); default: throw Exception("WalletType is not available for DFX ${wallet.type}"); } diff --git a/lib/buy/robinhood/robinhood_buy_provider.dart b/lib/buy/robinhood/robinhood_buy_provider.dart index ab58754dd..2d809772e 100644 --- a/lib/buy/robinhood/robinhood_buy_provider.dart +++ b/lib/buy/robinhood/robinhood_buy_provider.dart @@ -37,15 +37,15 @@ class RobinhoodBuyProvider extends BuyProvider { String get _apiSecret => secrets.exchangeHelperApiKey; - Future getSignature(String message) { + Future getSignature(String message) async { switch (wallet.type) { case WalletType.ethereum: case WalletType.polygon: - return wallet.signMessage(message); + return await wallet.signMessage(message); case WalletType.litecoin: case WalletType.bitcoin: case WalletType.bitcoinCash: - return wallet.signMessage(message, address: wallet.walletAddresses.address); + return await wallet.signMessage(message, address: wallet.walletAddresses.address); default: throw Exception("WalletType is not available for Robinhood ${wallet.type}"); } diff --git a/lib/di.dart b/lib/di.dart index 7c22e809c..1967c9227 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -30,6 +30,12 @@ import 'package:cake_wallet/entities/contact.dart'; import 'package:cake_wallet/entities/contact_record.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/parse_address_from_domain.dart'; +import 'package:cake_wallet/src/screens/receive/address_list_page.dart'; +import 'package:cake_wallet/view_model/link_view_model.dart'; +import 'package:cake_wallet/tron/tron.dart'; +import 'package:cake_wallet/src/screens/transaction_details/rbf_details_page.dart'; +import 'package:cake_wallet/view_model/dashboard/sign_view_model.dart'; +import 'package:cw_core/receive_page_option.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/entities/qr_view_data.dart'; import 'package:cake_wallet/entities/template.dart'; @@ -159,7 +165,6 @@ import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/node.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_page.dart'; -import 'package:cake_wallet/src/screens/transaction_details/rbf_details_page.dart'; import 'package:cake_wallet/src/screens/transaction_details/transaction_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_list_page.dart'; @@ -179,7 +184,6 @@ import 'package:cake_wallet/store/templates/exchange_template_store.dart'; import 'package:cake_wallet/store/templates/send_template_store.dart'; import 'package:cake_wallet/store/wallet_list_store.dart'; import 'package:cake_wallet/store/yat/yat_store.dart'; -import 'package:cake_wallet/tron/tron.dart'; import 'package:cake_wallet/view_model/auth_view_model.dart'; import 'package:cake_wallet/view_model/backup_view_model.dart'; import 'package:cake_wallet/view_model/buy/buy_amount_view_model.dart'; @@ -193,7 +197,6 @@ import 'package:cake_wallet/view_model/edit_backup_password_view_model.dart'; import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart'; import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; -import 'package:cake_wallet/view_model/link_view_model.dart'; import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart'; import 'package:cake_wallet/view_model/monero_account_list/monero_account_edit_or_create_view_model.dart'; import 'package:cake_wallet/view_model/monero_account_list/monero_account_list_view_model.dart'; @@ -224,7 +227,6 @@ import 'package:cake_wallet/view_model/wallet_unlock_loadable_view_model.dart'; import 'package:cake_wallet/view_model/wallet_unlock_verifiable_view_model.dart'; import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/crypto_currency.dart'; -import 'package:cw_core/receive_page_option.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; @@ -853,6 +855,8 @@ Future setup({ getIt.registerFactoryParam( (ContactRecord? contact, _) => ContactPage(getIt.get(param1: contact))); + getIt.registerFactory(() => AddressListPage(getIt.get())); + getIt.registerFactory(() { final appStore = getIt.get(); return NodeListViewModel(_nodeSource, appStore); @@ -1271,9 +1275,11 @@ Future setup({ getIt.registerFactory( () => WalletConnectConnectionsView(web3walletService: getIt.get())); - + getIt.registerFactory(() => NFTViewModel(appStore, getIt.get())); getIt.registerFactory(() => TorPage(getIt.get())); + getIt.registerFactory(() => SignViewModel(getIt.get().wallet!)); + _isSetupFinished = true; } diff --git a/lib/router.dart b/lib/router.dart index 498077511..25af39043 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -27,6 +27,7 @@ import 'package:cake_wallet/src/screens/dashboard/edit_token_page.dart'; import 'package:cake_wallet/src/screens/dashboard/home_settings_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/address_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/nft_details_page.dart'; +import 'package:cake_wallet/src/screens/dashboard/sign_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/transactions_page.dart'; import 'package:cake_wallet/src/screens/disclaimer/disclaimer_page.dart'; import 'package:cake_wallet/src/screens/exchange/exchange_page.dart'; @@ -42,6 +43,8 @@ import 'package:cake_wallet/src/screens/new_wallet/new_wallet_page.dart'; import 'package:cake_wallet/src/screens/new_wallet/new_wallet_type_page.dart'; import 'package:cake_wallet/src/screens/nodes/node_create_or_edit_page.dart'; import 'package:cake_wallet/src/screens/nodes/pow_node_create_or_edit_page.dart'; +import 'package:cake_wallet/src/screens/receive/address_list_page.dart'; +import 'package:cake_wallet/src/screens/restore/sweeping_wallet_page.dart'; import 'package:cake_wallet/src/screens/order_details/order_details_page.dart'; import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart'; import 'package:cake_wallet/src/screens/receive/anonpay_invoice_page.dart'; @@ -99,6 +102,7 @@ import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/nft_view_model.dart'; +import 'package:cake_wallet/view_model/dashboard/sign_view_model.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart'; import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; @@ -465,6 +469,9 @@ Route createRoute(RouteSettings settings) { return MaterialPageRoute( builder: (_) => getIt.get(param1: selectedCurrency)); + case Routes.pickerWalletAddress: + return MaterialPageRoute(builder: (_) => getIt.get()); + case Routes.addressBookAddContact: return CupertinoPageRoute( builder: (_) => getIt.get(param1: settings.arguments as ContactRecord?)); @@ -696,6 +703,13 @@ Route createRoute(RouteSettings settings) { case Routes.torPage: return MaterialPageRoute(builder: (_) => getIt.get()); + case Routes.signPage: + return MaterialPageRoute( + builder: (_) => SignPage( + getIt.get(), + ), + ); + case Routes.connectDevices: final params = settings.arguments as ConnectDevicePageParams; return MaterialPageRoute( diff --git a/lib/routes.dart b/lib/routes.dart index caa7eb39e..9c421cab5 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -31,6 +31,7 @@ class Routes { static const nanoAccountCreation = '/nano_account_new'; static const addressBook = '/address_book'; static const pickerAddressBook = '/picker_address_book'; + static const pickerWalletAddress = '/picker_wallet_address'; static const addressBookAddContact = '/address_book_add_contact'; static const showKeys = '/show_keys'; static const exchangeConfirm = '/exchange_confirm'; @@ -103,5 +104,6 @@ class Routes { static const nftDetailsPage = '/nft_details_page'; static const importNFTPage = '/import_nft_page'; static const torPage = '/tor_page'; + static const signPage = '/sign_page'; static const connectDevices = '/device/connect'; } diff --git a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart index 02ddf037d..81f6a354f 100644 --- a/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart +++ b/lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart @@ -322,31 +322,31 @@ class CakePayBuyCardDetailPage extends BasePage { await showPopUp( context: context, - builder: (_) { + builder: (popupContext) { return Observer( builder: (_) => ConfirmSendingAlert( - alertTitle: S.of(context).confirm_sending, - paymentId: S.of(context).payment_id, + alertTitle: S.of(popupContext).confirm_sending, + paymentId: S.of(popupContext).payment_id, paymentIdValue: order?.orderId, expirationTime: cakePayPurchaseViewModel.formattedRemainingTime, onDispose: () => _handleDispose(disposer), - amount: S.of(context).send_amount, + amount: S.of(popupContext).send_amount, amountValue: pendingTransaction.amountFormatted, fiatAmountValue: cakePayPurchaseViewModel.sendViewModel.pendingTransactionFiatAmountFormatted, - fee: S.of(context).send_fee, + fee: S.of(popupContext).send_fee, feeValue: pendingTransaction.feeFormatted, feeFiatAmount: cakePayPurchaseViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted, feeRate: pendingTransaction.feeRate, outputs: cakePayPurchaseViewModel.sendViewModel.outputs, - rightButtonText: S.of(context).send, - leftButtonText: S.of(context).cancel, + rightButtonText: S.of(popupContext).send, + leftButtonText: S.of(popupContext).cancel, actionRightButton: () async { - Navigator.of(context).pop(); + Navigator.of(popupContext).pop(); await cakePayPurchaseViewModel.sendViewModel.commitTransaction(); }, - actionLeftButton: () => Navigator.of(context).pop())); + actionLeftButton: () => Navigator.of(popupContext).pop())); }, ); } diff --git a/lib/src/screens/dashboard/pages/cake_features_page.dart b/lib/src/screens/dashboard/pages/cake_features_page.dart index b034fb799..0c953c892 100644 --- a/lib/src/screens/dashboard/pages/cake_features_page.dart +++ b/lib/src/screens/dashboard/pages/cake_features_page.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.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'; +import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -64,6 +65,19 @@ class CakeFeaturesPage extends StatelessWidget { subTitle: S.of(context).nanogpt_subtitle, onTap: () => _launchUrl("cake.nano-gpt.com"), ), + SizedBox(height: 20), + Observer( + builder: (context) { + if (!dashboardViewModel.hasSignMessages) { + return const SizedBox(); + } + return DashBoardRoundedCardWidget( + onTap: () => Navigator.of(context).pushNamed(Routes.signPage), + title: S.current.sign_verify_message, + subTitle: S.current.sign_verify_message_sub, + ); + }, + ), ], ), ), diff --git a/lib/src/screens/dashboard/sign_page.dart b/lib/src/screens/dashboard/sign_page.dart new file mode 100644 index 000000000..05cf63728 --- /dev/null +++ b/lib/src/screens/dashboard/sign_page.dart @@ -0,0 +1,202 @@ +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/screens/dashboard/widgets/sign_form.dart'; +import 'package:cake_wallet/src/screens/dashboard/widgets/verify_form.dart'; +import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; +import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; +import 'package:cake_wallet/src/widgets/primary_button.dart'; +import 'package:cake_wallet/themes/extensions/keyboard_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/utils/show_pop_up.dart'; +import 'package:cake_wallet/view_model/dashboard/sign_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:keyboard_actions/keyboard_actions.dart'; +import 'package:mobx/mobx.dart'; +import 'package:smooth_page_indicator/smooth_page_indicator.dart'; + +class SignPage extends BasePage { + SignPage(this.signViewModel) + : signFormKey = GlobalKey(), + verifyFormKey = GlobalKey(), + _pages = [], + _controller = PageController(initialPage: 0) { + _pages.add(SignForm( + key: signFormKey, + type: signViewModel.wallet.type, + includeAddress: signViewModel.signIncludesAddress, + )); + _pages.add(VerifyForm( + key: verifyFormKey, + type: signViewModel.wallet.type, + )); + } + + @override + Widget middle(BuildContext context) => Observer( + builder: (_) => Text( + S.current.sign_verify_title, + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + fontFamily: 'Lato', + color: titleColor(context), + ), + )); + + final SignViewModel signViewModel; + final PageController _controller; + final List _pages; + final GlobalKey signFormKey; + final GlobalKey verifyFormKey; + bool _isEffectsInstalled = false; + + @override + Widget body(BuildContext context) { + _setEffects(context); + + return KeyboardActions( + config: KeyboardActionsConfig( + keyboardActionsPlatform: KeyboardActionsPlatform.IOS, + keyboardBarColor: Theme.of(context).extension()!.keyboardBarColor, + nextFocus: false, + actions: [ + KeyboardActionsItem( + focusNode: FocusNode(), + toolbarButtons: [(_) => KeyboardDoneButton()], + ) + ], + ), + child: Container( + height: 0, + color: Theme.of(context).colorScheme.background, + child: Center( + child: ConstrainedBox( + constraints: + BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: PageView.builder( + onPageChanged: (page) { + signViewModel.isSigning = page == 0; + }, + controller: _controller, + itemCount: _pages.length, + itemBuilder: (_, index) => SingleChildScrollView(child: _pages[index]), + ), + ), + if (_pages.length > 1) + Padding( + padding: EdgeInsets.only(top: 10), + child: SmoothPageIndicator( + controller: _controller, + count: _pages.length, + effect: ColorTransitionEffect( + spacing: 6.0, + radius: 6.0, + dotWidth: 6.0, + dotHeight: 6.0, + dotColor: Theme.of(context).hintColor.withOpacity(0.5), + activeDotColor: Theme.of(context).hintColor, + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 20, bottom: 24, left: 24, right: 24), + child: Column( + children: [ + Observer( + builder: (context) { + return LoadingPrimaryButton( + onPressed: () async { + await _confirmForm(context); + }, + text: signViewModel.isSigning + ? S.current.sign_message + : S.current.verify_message, + color: Theme.of(context) + .extension()! + .createNewWalletButtonBackgroundColor, + textColor: Theme.of(context) + .extension()! + .restoreWalletButtonTextColor, + isLoading: signViewModel.state is IsExecutingState, + isDisabled: signViewModel.state is IsExecutingState, + ); + }, + ), + ], + ), + ) + ], + ), + ), + ), + ), + ); + } + + void _setEffects(BuildContext context) async { + if (_isEffectsInstalled) { + return; + } + _isEffectsInstalled = true; + + reaction((_) => signViewModel.state, (ExecutionState state) { + if (state is FailureState) { + WidgetsBinding.instance.addPostFrameCallback((_) { + showPopUp( + context: context, + builder: (_) { + return AlertWithOneAction( + alertTitle: S.current.error, + alertContent: state.error, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop(), + ); + }); + }); + } + if (state is ExecutedSuccessfullyState) { + if (signViewModel.isSigning) { + signFormKey.currentState!.signatureController.text = state.payload as String; + } else { + WidgetsBinding.instance.addPostFrameCallback((_) { + showPopUp( + context: context, + builder: (_) { + return AlertWithOneAction( + alertTitle: S.current.successful, + alertContent: S.current.message_verified, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop(), + ); + }); + }); + } + } + }); + } + + Future _confirmForm(BuildContext context) async { + FocusManager.instance.primaryFocus?.unfocus(); + + if (signViewModel.isSigning) { + String message = signFormKey.currentState!.messageController.text; + String? address; + if (signViewModel.signIncludesAddress) { + address = signFormKey.currentState!.addressController.text; + } + await signViewModel.sign(message, address: address); + } else { + String message = verifyFormKey.currentState!.messageController.text; + String signature = verifyFormKey.currentState!.signatureController.text; + String address = verifyFormKey.currentState!.addressController.text; + await signViewModel.verify(message, signature, address: address); + } + } +} diff --git a/lib/src/screens/dashboard/widgets/sign_form.dart b/lib/src/screens/dashboard/widgets/sign_form.dart new file mode 100644 index 000000000..c0f8ba328 --- /dev/null +++ b/lib/src/screens/dashboard/widgets/sign_form.dart @@ -0,0 +1,98 @@ +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/widgets/address_text_field.dart'; +import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; +import 'package:cake_wallet/utils/show_bar.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class SignForm extends StatefulWidget { + SignForm({ + Key? key, + required this.type, + required this.includeAddress, + }) : super(key: key); + + final WalletType type; + final bool includeAddress; + + @override + SignFormState createState() => SignFormState(); +} + +class SignFormState extends State { + SignFormState() + : formKey = GlobalKey(), + messageController = TextEditingController(), + addressController = TextEditingController(), + signatureController = TextEditingController(); + + final TextEditingController messageController; + final TextEditingController addressController; + final TextEditingController signatureController; + final GlobalKey formKey; + + @override + void initState() { + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only(left: 24, right: 24), + child: Column( + children: [ + Form( + key: formKey, + child: Column( + children: [ + AddressTextField( + controller: messageController, + placeholder: S.current.message, + options: [AddressTextFieldOption.paste], + buttonColor: Theme.of(context).hintColor, + ), + if (widget.includeAddress) ...[ + const SizedBox(height: 20), + AddressTextField( + controller: addressController, + options: [ + AddressTextFieldOption.paste, + AddressTextFieldOption.walletAddresses + ], + buttonColor: Theme.of(context).hintColor, + onSelectedContact: (contact) { + addressController.text = contact.address; + }, + selectedCurrency: walletTypeToCryptoCurrency(widget.type), + ), + ], + ], + )), + const SizedBox(height: 20), + GestureDetector( + onTap: () async { + final text = signatureController.text; + if (text.isEmpty) { + return; + } + Clipboard.setData(ClipboardData(text: text)); + showBar(context, S.of(context).transaction_details_copied(text)); + }, + child: BaseTextFormField( + enabled: false, + controller: signatureController, + hintText: S.current.signature, + ), + ), + ], + ), + ); + } +} diff --git a/lib/src/screens/dashboard/widgets/verify_form.dart b/lib/src/screens/dashboard/widgets/verify_form.dart new file mode 100644 index 000000000..d59261494 --- /dev/null +++ b/lib/src/screens/dashboard/widgets/verify_form.dart @@ -0,0 +1,92 @@ +import 'package:cake_wallet/core/wallet_name_validator.dart'; +import 'package:cake_wallet/entities/generate_name.dart'; +import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/widgets/address_text_field.dart'; +import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; +import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart'; +import 'package:cake_wallet/src/widgets/picker.dart'; +import 'package:cake_wallet/src/widgets/seed_language_picker.dart'; +import 'package:cake_wallet/src/widgets/seed_widget.dart'; +import 'package:cake_wallet/themes/extensions/address_theme.dart'; +import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; +import 'package:cake_wallet/utils/show_bar.dart'; +import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:mobx/mobx.dart'; +import 'package:polyseed/polyseed.dart'; + +class VerifyForm extends StatefulWidget { + VerifyForm({ + Key? key, + required this.type, + }) : super(key: key); + + final WalletType type; + + @override + VerifyFormState createState() => VerifyFormState(); +} + +class VerifyFormState extends State { + VerifyFormState() + : formKey = GlobalKey(), + messageController = TextEditingController(), + addressController = TextEditingController(), + signatureController = TextEditingController(); + + final TextEditingController messageController; + final TextEditingController addressController; + final TextEditingController signatureController; + final GlobalKey formKey; + + @override + void initState() { + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only(left: 24, right: 24), + child: Form( + key: formKey, + child: Column( + children: [ + AddressTextField( + controller: messageController, + placeholder: S.current.message, + options: [AddressTextFieldOption.paste], + buttonColor: Theme.of(context).hintColor, + ), + const SizedBox(height: 20), + AddressTextField( + controller: addressController, + options: [AddressTextFieldOption.paste, AddressTextFieldOption.walletAddresses], + buttonColor: Theme.of(context).hintColor, + onSelectedContact: (contact) { + addressController.text = contact.address; + }, + selectedCurrency: walletTypeToCryptoCurrency(widget.type), + ), + const SizedBox(height: 20), + AddressTextField( + controller: signatureController, + placeholder: S.current.signature, + options: [AddressTextFieldOption.paste], + buttonColor: Theme.of(context).hintColor, + ), + ], + ), + ), + ); + } +} diff --git a/lib/src/screens/receive/address_list_page.dart b/lib/src/screens/receive/address_list_page.dart new file mode 100644 index 000000000..5f6794715 --- /dev/null +++ b/lib/src/screens/receive/address_list_page.dart @@ -0,0 +1,31 @@ +import 'package:cake_wallet/src/screens/receive/widgets/address_list.dart'; +import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/screens/base_page.dart'; + +class AddressListPage extends BasePage { + AddressListPage(this.addressListViewModel); + + final WalletAddressListViewModel addressListViewModel; + + @override + String get title => S.current.accounts_subaddresses; + + @override + Widget body(BuildContext context) { + return SingleChildScrollView( + child: Column( + children: [ + AddressList( + addressListViewModel: addressListViewModel, + onSelect: (String address) async { + Navigator.of(context).pop(address); + }, + ), + ], + ), + ); + } +} diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 03524ef79..724e5c3bd 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/src/screens/nano_accounts/nano_account_list_page.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/address_list.dart'; import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; @@ -122,108 +123,7 @@ class ReceivePage extends BasePage { amountController: _amountController, isLight: currentTheme.type == ThemeType.light), ), - Observer( - builder: (_) => ListView.separated( - padding: EdgeInsets.all(0), - separatorBuilder: (context, _) => const HorizontalSectionDivider(), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemCount: addressListViewModel.items.length, - itemBuilder: (context, index) { - final item = addressListViewModel.items[index]; - Widget cell = Container(); - - if (item is WalletAccountListHeader) { - cell = HeaderTile( - showTrailingButton: true, - walletAddressListViewModel: addressListViewModel, - trailingButtonTap: () async { - if (addressListViewModel.type == WalletType.monero || - addressListViewModel.type == WalletType.wownero || - addressListViewModel.type == WalletType.haven) { - await showPopUp( - context: context, - builder: (_) => getIt.get()); - } else { - await showPopUp( - context: context, - builder: (_) => getIt.get()); - } - }, - title: S.of(context).accounts, - trailingIcon: Icon( - Icons.arrow_forward_ios, - size: 14, - color: Theme.of(context).extension()!.iconsColor, - )); - } - - if (item is WalletAddressListHeader) { - final hasTitle = item.title != null; - - cell = HeaderTile( - title: hasTitle ? item.title! : S.of(context).addresses, - walletAddressListViewModel: addressListViewModel, - showTrailingButton: - !addressListViewModel.isAutoGenerateSubaddressEnabled && !hasTitle, - showSearchButton: true, - trailingButtonTap: () => - Navigator.of(context).pushNamed(Routes.newSubaddress), - trailingIcon: hasTitle - ? null - : Icon( - Icons.add, - size: 20, - color: - Theme.of(context).extension()!.iconsColor, - ), - ); - } - - if (item is WalletAddressListItem) { - cell = Observer(builder: (_) { - final isCurrent = item.address == addressListViewModel.address.address; - final backgroundColor = isCurrent - ? Theme.of(context) - .extension()! - .currentTileBackgroundColor - : Theme.of(context) - .extension()! - .tilesBackgroundColor; - final textColor = isCurrent - ? Theme.of(context) - .extension()! - .currentTileTextColor - : Theme.of(context).extension()!.tilesTextColor; - - return AddressCell.fromItem( - item, - isCurrent: isCurrent, - hasBalance: addressListViewModel.isElectrumWallet, - backgroundColor: backgroundColor, - textColor: textColor, - onTap: item.isOneTimeReceiveAddress == true - ? null - : (_) => addressListViewModel.setAddress(item), - onEdit: item.isOneTimeReceiveAddress == true || item.isPrimary - ? null - : () => Navigator.of(context) - .pushNamed(Routes.newSubaddress, arguments: item), - onDelete: !addressListViewModel.isSilentPayments || item.isPrimary - ? null - : () => addressListViewModel.deleteAddress(item), - ); - }); - } - - return index != 0 - ? cell - : ClipRRect( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), topRight: Radius.circular(30)), - child: cell, - ); - })), + AddressList(addressListViewModel: addressListViewModel), Padding( padding: EdgeInsets.fromLTRB(24, 24, 24, 32), child: Text( diff --git a/lib/src/screens/receive/widgets/address_list.dart b/lib/src/screens/receive/widgets/address_list.dart new file mode 100644 index 000000000..8dfbedec1 --- /dev/null +++ b/lib/src/screens/receive/widgets/address_list.dart @@ -0,0 +1,120 @@ +import 'package:cake_wallet/di.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/routes.dart'; +import 'package:cake_wallet/src/screens/monero_accounts/monero_account_list_page.dart'; +import 'package:cake_wallet/src/screens/nano_accounts/nano_account_list_page.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/address_cell.dart'; +import 'package:cake_wallet/src/screens/receive/widgets/header_tile.dart'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; +import 'package:cake_wallet/themes/extensions/receive_page_theme.dart'; +import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cake_wallet/view_model/wallet_address_list/wallet_account_list_header.dart'; +import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_header.dart'; +import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart'; +import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; + +class AddressList extends StatelessWidget { + const AddressList({ + super.key, + required this.addressListViewModel, + this.onSelect, + }); + + final WalletAddressListViewModel addressListViewModel; + final Function(String)? onSelect; + + @override + Widget build(BuildContext context) { + bool editable = onSelect == null; + return Observer( + builder: (_) => ListView.separated( + padding: EdgeInsets.all(0), + separatorBuilder: (context, _) => const HorizontalSectionDivider(), + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: addressListViewModel.items.length, + itemBuilder: (context, index) { + final item = addressListViewModel.items[index]; + Widget cell = Container(); + + if (item is WalletAccountListHeader) { + cell = HeaderTile( + showTrailingButton: true, + walletAddressListViewModel: addressListViewModel, + trailingButtonTap: () async { + if (addressListViewModel.type == WalletType.monero || + addressListViewModel.type == WalletType.haven) { + await showPopUp( + context: context, builder: (_) => getIt.get()); + } else { + await showPopUp( + context: context, builder: (_) => getIt.get()); + } + }, + title: S.of(context).accounts, + trailingIcon: Icon( + Icons.arrow_forward_ios, + size: 14, + color: Theme.of(context).extension()!.iconsColor, + )); + } + + if (item is WalletAddressListHeader) { + cell = HeaderTile( + title: S.of(context).addresses, + walletAddressListViewModel: addressListViewModel, + showTrailingButton: !addressListViewModel.isAutoGenerateSubaddressEnabled, + showSearchButton: true, + trailingButtonTap: () => Navigator.of(context).pushNamed(Routes.newSubaddress), + trailingIcon: Icon( + Icons.add, + size: 20, + color: Theme.of(context).extension()!.iconsColor, + )); + } + + if (item is WalletAddressListItem) { + cell = Observer(builder: (_) { + final isCurrent = item.address == addressListViewModel.address.address && editable; + final backgroundColor = isCurrent + ? Theme.of(context).extension()!.currentTileBackgroundColor + : Theme.of(context).extension()!.tilesBackgroundColor; + final textColor = isCurrent + ? Theme.of(context).extension()!.currentTileTextColor + : Theme.of(context).extension()!.tilesTextColor; + + return AddressCell.fromItem( + item, + isCurrent: isCurrent, + hasBalance: addressListViewModel.isElectrumWallet, + backgroundColor: backgroundColor, + textColor: textColor, + onTap: (_) { + if (onSelect != null) { + onSelect!(item.address); + return; + } + addressListViewModel.setAddress(item); + }, + onEdit: editable + ? () => Navigator.of(context).pushNamed(Routes.newSubaddress, arguments: item) + : null, + ); + }); + } + + return index != 0 + ? cell + : ClipRRect( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30), topRight: Radius.circular(30)), + child: cell, + ); + }, + ), + ); + } +} diff --git a/lib/src/widgets/address_text_field.dart b/lib/src/widgets/address_text_field.dart index f79da8069..f229ea8ef 100644 --- a/lib/src/widgets/address_text_field.dart +++ b/lib/src/widgets/address_text_field.dart @@ -12,7 +12,7 @@ import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/utils/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart'; -enum AddressTextFieldOption { paste, qrCode, addressBook } +enum AddressTextFieldOption { paste, qrCode, addressBook, walletAddresses } class AddressTextField extends StatelessWidget { AddressTextField( @@ -34,6 +34,7 @@ class AddressTextField extends StatelessWidget { this.validator, this.onPushPasteButton, this.onPushAddressBookButton, + this.onPushAddressPickerButton, this.onSelectedContact, this.selectedCurrency}); @@ -56,6 +57,7 @@ class AddressTextField extends StatelessWidget { final FocusNode? focusNode; final Function(BuildContext context)? onPushPasteButton; final Function(BuildContext context)? onPushAddressBookButton; + final Function(BuildContext context)? onPushAddressPickerButton; final Function(ContactBase contact)? onSelectedContact; final CryptoCurrency? selectedCurrency; @@ -70,16 +72,13 @@ class AddressTextField extends StatelessWidget { enabled: isActive, controller: controller, focusNode: focusNode, - style: textStyle ?? TextStyle( fontSize: 16, color: Theme.of(context).extension()!.titleColor), decoration: InputDecoration( - suffixIcon: SizedBox( width: prefixIconWidth * options.length + (spaceBetweenPrefixIcons * options.length), ), - hintStyle: hintStyle ?? TextStyle(fontSize: 16, color: Theme.of(context).hintColor), hintText: placeholder ?? S.current.widgets_address, focusedBorder: isBorderExist @@ -104,90 +103,122 @@ class AddressTextField extends StatelessWidget { top: 2, right: 0, child: SizedBox( - width: prefixIconWidth * options.length + (spaceBetweenPrefixIcons * options.length), + width: + (prefixIconWidth * options.length) + (spaceBetweenPrefixIcons * options.length), child: Row( mainAxisAlignment: responsiveLayoutUtil.shouldRenderMobileUI ? MainAxisAlignment.spaceBetween : MainAxisAlignment.end, children: [ - SizedBox(width: 5), if (this.options.contains(AddressTextFieldOption.paste)) ...[ + SizedBox(width: 5), Container( - width: prefixIconWidth, - height: prefixIconHeight, - padding: EdgeInsets.only(top: 0), - child: Semantics( - label: S.of(context).paste, - child: InkWell( - onTap: () async => _pasteAddress(context), - child: Container( - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: buttonColor ?? - Theme.of(context).dialogTheme.backgroundColor, - borderRadius: BorderRadius.all(Radius.circular(6))), - child: Image.asset( - 'assets/images/paste_ios.png', - color: iconColor ?? - Theme.of(context) - .extension()! - .textFieldButtonIconColor, - )), - ), - )), + width: prefixIconWidth, + height: prefixIconHeight, + padding: EdgeInsets.only(top: 0), + child: Semantics( + label: S.of(context).paste, + child: InkWell( + onTap: () async => _pasteAddress(context), + child: Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: + buttonColor ?? Theme.of(context).dialogTheme.backgroundColor, + borderRadius: BorderRadius.all(Radius.circular(6))), + child: Image.asset( + 'assets/images/paste_ios.png', + color: iconColor ?? + Theme.of(context) + .extension()! + .textFieldButtonIconColor, + )), + ), + ), + ), ], if (this.options.contains(AddressTextFieldOption.qrCode) && DeviceInfo.instance.isMobile) ...[ - Container( - width: prefixIconWidth, - height: prefixIconHeight, - padding: EdgeInsets.only(top: 0), - child: Semantics( - label: S.of(context).scan_qr_code, - child: InkWell( - onTap: () async => _presentQRScanner(context), - child: Container( - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: buttonColor ?? - Theme.of(context).dialogTheme.backgroundColor, - borderRadius: BorderRadius.all(Radius.circular(6))), - child: Image.asset( - 'assets/images/qr_code_icon.png', - color: iconColor ?? - Theme.of(context) - .extension()! - .textFieldButtonIconColor, - )), - ), - )) - ] else SizedBox(width: 5), - if (this.options.contains(AddressTextFieldOption.addressBook)) ...[ Container( - width: prefixIconWidth, - height: prefixIconHeight, - padding: EdgeInsets.only(top: 0), - child: Semantics( - label: S.of(context).address_book, - child: InkWell( - onTap: () async => _presetAddressBookPicker(context), - child: Container( - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: buttonColor ?? - Theme.of(context).dialogTheme.backgroundColor, - borderRadius: BorderRadius.all(Radius.circular(6))), - child: Image.asset( - 'assets/images/open_book.png', - color: iconColor ?? - Theme.of(context) - .extension()! - .textFieldButtonIconColor, - )), - ), - )) - ] + width: prefixIconWidth, + height: prefixIconHeight, + padding: EdgeInsets.only(top: 0), + child: Semantics( + label: S.of(context).scan_qr_code, + child: InkWell( + onTap: () async => _presentQRScanner(context), + child: Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: + buttonColor ?? Theme.of(context).dialogTheme.backgroundColor, + borderRadius: BorderRadius.all(Radius.circular(6))), + child: Image.asset( + 'assets/images/qr_code_icon.png', + color: iconColor ?? + Theme.of(context) + .extension()! + .textFieldButtonIconColor, + )), + ), + ), + ), + ], + if (this.options.contains(AddressTextFieldOption.addressBook)) ...[ + SizedBox(width: 5), + Container( + width: prefixIconWidth, + height: prefixIconHeight, + padding: EdgeInsets.only(top: 0), + child: Semantics( + label: S.of(context).address_book, + child: InkWell( + onTap: () async => _presetAddressBookPicker(context), + child: Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: + buttonColor ?? Theme.of(context).dialogTheme.backgroundColor, + borderRadius: BorderRadius.all(Radius.circular(6))), + child: Image.asset( + 'assets/images/open_book.png', + color: iconColor ?? + Theme.of(context) + .extension()! + .textFieldButtonIconColor, + )), + ), + ), + ), + ], + if (this.options.contains(AddressTextFieldOption.walletAddresses)) ...[ + SizedBox(width: 5), + Container( + width: prefixIconWidth, + height: prefixIconHeight, + padding: EdgeInsets.only(top: 0), + child: Semantics( + label: S.of(context).address_book, + child: InkWell( + onTap: () async => _presetWalletAddressPicker(context), + child: Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: + buttonColor ?? Theme.of(context).dialogTheme.backgroundColor, + borderRadius: BorderRadius.all(Radius.circular(6))), + child: Image.asset( + 'assets/images/open_book.png', + color: iconColor ?? + Theme.of(context) + .extension()! + .textFieldButtonIconColor, + )), + ), + ), + ) + ], ], ), )) @@ -197,7 +228,7 @@ class AddressTextField extends StatelessWidget { Future _presentQRScanner(BuildContext context) async { bool isCameraPermissionGranted = - await PermissionHandler.checkPermission(Permission.camera, context); + await PermissionHandler.checkPermission(Permission.camera, context); if (!isCameraPermissionGranted) return; final code = await presentQRScanner(); if (code.isEmpty) { @@ -224,6 +255,15 @@ class AddressTextField extends StatelessWidget { } } + Future _presetWalletAddressPicker(BuildContext context) async { + final address = await Navigator.of(context).pushNamed(Routes.pickerWalletAddress); + + if (address is String) { + controller?.text = address; + onPushAddressPickerButton?.call(context); + } + } + Future _pasteAddress(BuildContext context) async { final clipboard = await Clipboard.getData('text/plain'); final address = clipboard?.text ?? ''; diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index e98412dce..56a0e061b 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -182,7 +182,8 @@ abstract class DashboardViewModelBase with Store { final _accountTransactions = _wallet.transactionHistory.transactions.values .where((tx) => - wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id) + wow.wownero!.getTransactionInfoAccountId(tx) == + wow.wownero!.getCurrentAccount(wallet).id) .toList(); final sortedTransactions = [..._accountTransactions]; @@ -482,6 +483,27 @@ abstract class DashboardViewModelBase with Store { @computed bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano; + @computed + bool get hasSignMessages { + switch (wallet.type) { + case WalletType.monero: + case WalletType.litecoin: + case WalletType.bitcoin: + case WalletType.bitcoinCash: + case WalletType.ethereum: + case WalletType.polygon: + case WalletType.solana: + case WalletType.nano: + case WalletType.banano: + case WalletType.tron: + case WalletType.wownero: + return true; + case WalletType.haven: + case WalletType.none: + return false; + } + } + bool get showRepWarning { if (wallet.type != WalletType.nano) { return false; @@ -575,7 +597,8 @@ abstract class DashboardViewModelBase with Store { } if (wallet.type == WalletType.wownero) { - return wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id; + return wow.wownero!.getTransactionInfoAccountId(tx) == + wow.wownero!.getCurrentAccount(wallet).id; } return true; @@ -600,8 +623,8 @@ abstract class DashboardViewModelBase with Store { .getTransactionHistory(wallet) .transactions .values - .where( - (tx) => monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id) + .where((tx) => + monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id) .toList(); transactions.addAll(_accountTransactions.map((transaction) => TransactionListItem( @@ -613,8 +636,9 @@ abstract class DashboardViewModelBase with Store { .getTransactionHistory(wallet) .transactions .values - .where( - (tx) => wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id) + .where((tx) => + wow.wownero!.getTransactionInfoAccountId(tx) == + wow.wownero!.getCurrentAccount(wallet).id) .toList(); transactions.addAll(_accountTransactions.map((transaction) => TransactionListItem( diff --git a/lib/view_model/dashboard/sign_view_model.dart b/lib/view_model/dashboard/sign_view_model.dart new file mode 100644 index 000000000..5b1b4fc00 --- /dev/null +++ b/lib/view_model/dashboard/sign_view_model.dart @@ -0,0 +1,55 @@ +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cw_core/wallet_base.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:mobx/mobx.dart'; + +part 'sign_view_model.g.dart'; + +class SignViewModel = SignViewModelBase with _$SignViewModel; + +abstract class SignViewModelBase with Store { + SignViewModelBase(this.wallet) : state = InitialExecutionState(); + + final WalletBase wallet; + + @observable + ExecutionState state; + + @observable + bool isSigning = true; + + bool get signIncludesAddress => [ + WalletType.monero, + WalletType.bitcoin, + WalletType.bitcoinCash, + WalletType.litecoin, + WalletType.haven, + ].contains(wallet.type); + + @action + Future sign(String message, {String? address}) async { + state = IsExecutingState(); + try { + final signature = await wallet.signMessage(message, address: address); + state = ExecutedSuccessfullyState(payload: signature); + } catch (e) { + state = FailureState(e.toString()); + } + } + + @action + Future verify(String message, String signature, {String? address}) async { + state = IsExecutingState(); + try { + final sig = await wallet.verifyMessage(message, signature, address: address); + if (sig) { + state = ExecutedSuccessfullyState(); + } else { + state = FailureState(S.current.signature_invalid_error); + } + } catch (e) { + state = FailureState(e.toString()); + } + } +} diff --git a/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart b/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart index 6c274bb7b..0bd936720 100644 --- a/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart +++ b/lib/view_model/wallet_address_list/wallet_address_list_view_model.dart @@ -6,6 +6,7 @@ import 'package:cake_wallet/ethereum/ethereum.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/haven/haven.dart'; import 'package:cake_wallet/monero/monero.dart'; +import 'package:cake_wallet/nano/nano.dart'; import 'package:cake_wallet/polygon/polygon.dart'; import 'package:cake_wallet/solana/solana.dart'; import 'package:cake_wallet/store/app_store.dart'; @@ -438,6 +439,14 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo addressList.add(WalletAddressListItem(isPrimary: true, name: null, address: primaryAddress)); } + if (wallet.type == WalletType.nano) { + addressList.add(WalletAddressListItem( + isPrimary: true, + name: null, + address: wallet.walletAddresses.address, + )); + } + if (wallet.type == WalletType.tron) { final primaryAddress = tron!.getAddress(wallet); diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index 5a9a1d093..e14934986 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -117,9 +117,7 @@ abstract class WalletCreationVMBase with Store { DerivationInfo? getDefaultDerivation() { switch (this.type) { case WalletType.nano: - return DerivationInfo( - derivationType: DerivationType.nano, - ); + return DerivationInfo(derivationType: DerivationType.nano); case WalletType.bitcoin: case WalletType.litecoin: return bitcoin!.getElectrumDerivations()[DerivationType.electrum]!.first; @@ -131,9 +129,7 @@ abstract class WalletCreationVMBase with Store { DerivationInfo? getCommonRestoreDerivation() { switch (this.type) { case WalletType.nano: - return DerivationInfo( - derivationType: DerivationType.nano, - ); + return DerivationInfo(derivationType: DerivationType.nano); case WalletType.bitcoin: return DerivationInfo( derivationType: DerivationType.bip39, diff --git a/pubspec_base.yaml b/pubspec_base.yaml index a2f346bae..07dc7f5af 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -103,7 +103,7 @@ dependencies: bitcoin_base: git: url: https://github.com/cake-tech/bitcoin_base - ref: cake-update-v4 + ref: cake-update-v5 ledger_flutter: ^1.0.1 hashlib: 1.12.0 @@ -138,6 +138,10 @@ dependency_overrides: url: https://github.com/cake-tech/web3dart.git ref: cake flutter_secure_storage_platform_interface: 1.0.2 + bitcoin_base: + git: + url: https://github.com/cake-tech/bitcoin_base + ref: cake-update-v5 flutter_icons: image_path: "assets/images/app_logo.png" diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index a73067383..f84f6102b 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -370,6 +370,7 @@ "max_value": "الحد الأقصى: ${value} ${currency}", "memo": "مذكرة:", "message": "ﺔﻟﺎﺳﺭ", + "message_verified": "تم التحقق من الرسالة بنجاح", "methods": " ﻕﺮﻃُ", "min_amount": "الحد الأدنى: ${value}", "min_value": "الحد الأدنى: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "اظهار السييد / المفاتيح", "show_market_place": "إظهار السوق", "show_seed": "عرض السييد", + "sign_message": "تسجيل رسالة", "sign_up": "اشتراك", + "sign_verify_message": "توقيع أو التحقق من الرسالة", + "sign_verify_message_sub": "قم بتوقيع أو التحقق من رسالة باستخدام المفتاح الخاص بك", + "sign_verify_title": "تسجيل / تحقق", + "signature": "إمضاء", + "signature_invalid_error": "التوقيع غير صالح للرسالة المقدمة", "signTransaction": " ﺔﻠﻣﺎﻌﻤﻟﺍ ﻊﻴﻗﻮﺗ", "signup_for_card_accept_terms": "قم بالتسجيل للحصول على البطاقة وقبول الشروط.", "silent_payments": "مدفوعات صامتة", @@ -822,6 +829,7 @@ "value_type": "نوع القيمة", "variable_pair_not_supported": "هذا الزوج المتغير غير مدعوم في التبادلات المحددة", "verification": "تَحَقّق", + "verify_message": "تحقق من الرسالة", "verify_with_2fa": "تحقق مع Cake 2FA", "version": "الإصدار ${currentVersion}", "view_all": "مشاهدة الكل", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index b60cbc55c..0b6b688bb 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -370,6 +370,7 @@ "max_value": "Макс: ${value} ${currency}", "memo": "Мемо:", "message": "Съобщение", + "message_verified": "Съобщението беше успешно проверено", "methods": "Методи", "min_amount": "Мин: ${value}", "min_value": "Мин: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Покажи seed/keys", "show_market_place": "Покажи пазар", "show_seed": "Покажи seed", + "sign_message": "Съобщение за подписване", "sign_up": "Регистрация", + "sign_verify_message": "Подпишете или проверете съобщението", + "sign_verify_message_sub": "Подпишете или проверете съобщение с помощта на вашия личен ключ", + "sign_verify_title": "Подпишете / проверете", + "signature": "Подпис", + "signature_invalid_error": "Подписът не е валиден за даденото съобщение", "signTransaction": "Подпишете транзакция", "signup_for_card_accept_terms": "Регистрайте се за картата и приемете условията.", "silent_payments": "Мълчаливи плащания", @@ -822,6 +829,7 @@ "value_type": "Тип стойност", "variable_pair_not_supported": "Този variable pair не се поддържа от избраната борса", "verification": "Потвърждаване", + "verify_message": "Проверете съобщението", "verify_with_2fa": "Проверете с Cake 2FA", "version": "Версия ${currentVersion}", "view_all": "Виж всички", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 537695dd9..ef225041d 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Zpráva", + "message_verified": "Zpráva byla úspěšně ověřena", "methods": "Metody", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Zobrazit seed/klíče", "show_market_place": "Zobrazit trh", "show_seed": "Zobrazit seed", + "sign_message": "Podepsat zprávu", "sign_up": "Registrovat se", + "sign_verify_message": "Podepište nebo ověřte zprávu", + "sign_verify_message_sub": "Podepište nebo ověřte zprávu pomocí soukromého klíče", + "sign_verify_title": "Podepsat / ověřit", + "signature": "Podpis", + "signature_invalid_error": "Podpis není platný pro danou zprávu", "signTransaction": "Podepsat transakci", "signup_for_card_accept_terms": "Zaregistrujte se pro kartu a souhlaste s podmínkami.", "silent_payments": "Tiché platby", @@ -822,6 +829,7 @@ "value_type": "Typ hodnoty", "variable_pair_not_supported": "Tento pár s tržním kurzem není ve zvolené směnárně podporován", "verification": "Ověření", + "verify_message": "Ověřit zprávu", "verify_with_2fa": "Ověřte pomocí Cake 2FA", "version": "Verze ${currentVersion}", "view_all": "Zobrazit vše", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 052015367..393c3d928 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Nachricht", + "message_verified": "Die Nachricht wurde erfolgreich überprüft", "methods": "Methoden", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Seed/Schlüssel anzeigen", "show_market_place": "Marktplatz anzeigen", "show_seed": "Seed zeigen", + "sign_message": "Nachricht unterschreiben", "sign_up": "Anmelden", + "sign_verify_message": "Nachricht unterschreiben oder überprüfen", + "sign_verify_message_sub": "Unterschreiben oder überprüfen Sie eine Nachricht mit Ihrem privaten Schlüssel", + "sign_verify_title": "Zeichen / überprüfen", + "signature": "Signatur", + "signature_invalid_error": "Die Signatur gilt nicht für die angegebene Nachricht", "signTransaction": "Transaktion unterzeichnen", "signup_for_card_accept_terms": "Melden Sie sich für die Karte an und akzeptieren Sie die Bedingungen.", "silent_payments": "Stille Zahlungen", @@ -824,6 +831,7 @@ "value_type": "Werttyp", "variable_pair_not_supported": "Dieses Variablenpaar wird von den ausgewählten Börsen nicht unterstützt", "verification": "Verifizierung", + "verify_message": "Nachricht überprüfen", "verify_with_2fa": "Verifizieren Sie mit Cake 2FA", "version": "Version ${currentVersion}", "view_all": "Alle anzeigen", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 0f0ebd470..4ac7dd8fd 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Message", + "message_verified": "The message was successfully verified", "methods": "Methods", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Show seed/keys", "show_market_place": "Show Marketplace", "show_seed": "Show seed", + "sign_message": "Sign Message", "sign_up": "Sign Up", + "sign_verify_message": "Sign or verify message", + "sign_verify_message_sub": "Sign or verify a message using your private key", + "sign_verify_title": "Sign / Verify", + "signature": "Signature", + "signature_invalid_error": "The signature is not valid for the message given", "signTransaction": "Sign Transaction", "signup_for_card_accept_terms": "Sign up for the card and accept the terms.", "silent_payments": "Silent Payments", @@ -823,6 +830,7 @@ "value_type": "Value Type", "variable_pair_not_supported": "This variable pair is not supported with the selected exchanges", "verification": "Verification", + "verify_message": "Verify Message", "verify_with_2fa": "Verify with Cake 2FA", "version": "Version ${currentVersion}", "view_all": "View all", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 1e6eeae59..02d17ac96 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memorándum:", "message": "Mensaje", + "message_verified": "El mensaje fue verificado con éxito", "methods": "Métodos", "min_amount": "Mínimo: ${value}", "min_value": "Min: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Mostrar semilla/claves", "show_market_place": "Mostrar mercado", "show_seed": "Mostrar semilla", + "sign_message": "Mensaje de firma", "sign_up": "Registrarse", + "sign_verify_message": "Firmar o verificar el mensaje", + "sign_verify_message_sub": "Firmar o verificar un mensaje usando su clave privada", + "sign_verify_title": "Firmar / verificar", + "signature": "Firma", + "signature_invalid_error": "La firma no es válida para el mensaje dado", "signTransaction": "Firmar transacción", "signup_for_card_accept_terms": "Regístrese para obtener la tarjeta y acepte los términos.", "silent_payments": "Pagos silenciosos", @@ -823,6 +830,7 @@ "value_type": "Tipo de valor", "variable_pair_not_supported": "Este par de variables no es compatible con los intercambios seleccionados", "verification": "Verificación", + "verify_message": "Mensaje de verificación", "verify_with_2fa": "Verificar con Cake 2FA", "version": "Versión ${currentVersion}", "view_all": "Ver todo", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index a64a69514..4bc5c9809 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Mémo :", "message": "Message", + "message_verified": "Le message a été vérifié avec succès", "methods": "Méthodes", "min_amount": "Min : ${value}", "min_value": "Min: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Visualiser la phrase secrète (seed) et les clefs", "show_market_place": "Afficher la place de marché", "show_seed": "Visualiser la phrase secrète (seed)", + "sign_message": "Signer le message", "sign_up": "S'inscrire", + "sign_verify_message": "Signer ou vérifier le message", + "sign_verify_message_sub": "Signez ou vérifiez un message en utilisant votre clé privée", + "sign_verify_title": "Signe / vérifier", + "signature": "Signature", + "signature_invalid_error": "La signature n'est pas valable pour le message donné", "signTransaction": "Signer une transaction", "signup_for_card_accept_terms": "Inscrivez-vous pour la carte et acceptez les conditions.", "silent_payments": "Paiements silencieux", @@ -822,6 +829,7 @@ "value_type": "Type de valeur", "variable_pair_not_supported": "Cette paire variable n'est pas prise en charge avec les échanges sélectionnés", "verification": "Vérification", + "verify_message": "Vérifier le message", "verify_with_2fa": "Vérifier avec Cake 2FA", "version": "Version ${currentVersion}", "view_all": "Voir tout", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 219b3c939..025a33f6b 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Sako", + "message_verified": "An yi nasarar tabbatar da sakon", "methods": "Hanyoyin", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -663,7 +664,13 @@ "show_keys": "Nuna iri/maɓallai", "show_market_place": "Nuna dan kasuwa", "show_seed": "Nuna iri", + "sign_message": "Sa hannu", "sign_up": "Shiga", + "sign_verify_message": "Shiga ko Tabbatar da Saƙo", + "sign_verify_message_sub": "Shiga ko tabbatar da saƙo ta amfani da Maɓallinku na sirri", + "sign_verify_title": "Sa hannu / Tabbatar", + "signature": "Sa hannu", + "signature_invalid_error": "Sa hannu ba shi da inganci ga sakon da aka bayar", "signTransaction": "Sa hannu Ma'amala", "signup_for_card_accept_terms": "Yi rajista don katin kuma karɓi sharuɗɗan.", "silent_payments": "Biya silent", @@ -824,6 +831,7 @@ "value_type": "Nau'in darajar", "variable_pair_not_supported": "Ba a samun goyan bayan wannan m biyu tare da zaɓaɓɓun musayar", "verification": "tabbatar", + "verify_message": "Tabbatar saƙon", "verify_with_2fa": "Tabbatar da Cake 2FA", "version": "Sigar ${currentVersion}", "view_all": "Duba duka", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index b711939a4..346c420a9 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -370,6 +370,7 @@ "max_value": "मैक्स: ${value} ${currency}", "memo": "ज्ञापन:", "message": "संदेश", + "message_verified": "संदेश को सफलतापूर्वक सत्यापित किया गया था", "methods": "तरीकों", "min_amount": "न्यूनतम: ${value}", "min_value": "मिन: ${value} ${currency}", @@ -663,7 +664,13 @@ "show_keys": "बीज / कुंजियाँ दिखाएँ", "show_market_place": "बाज़ार दिखाएँ", "show_seed": "बीज दिखाओ", + "sign_message": "हस्ताक्षर संदेश", "sign_up": "साइन अप करें", + "sign_verify_message": "संदेश पर हस्ताक्षर या सत्यापित करें", + "sign_verify_message_sub": "अपनी निजी कुंजी का उपयोग करके किसी संदेश पर हस्ताक्षर या सत्यापित करें", + "sign_verify_title": "हस्ताक्षर / सत्यापित करें", + "signature": "हस्ताक्षर", + "signature_invalid_error": "हस्ताक्षर दिए गए संदेश के लिए मान्य नहीं है", "signTransaction": "लेन-देन पर हस्ताक्षर करें", "signup_for_card_accept_terms": "कार्ड के लिए साइन अप करें और शर्तें स्वीकार करें।", "silent_payments": "मूक भुगतान", @@ -824,6 +831,7 @@ "value_type": "मान प्रकार", "variable_pair_not_supported": "यह परिवर्तनीय जोड़ी चयनित एक्सचेंजों के साथ समर्थित नहीं है", "verification": "सत्यापन", + "verify_message": "संदेश सत्यापित करें", "verify_with_2fa": "केक 2FA के साथ सत्यापित करें", "version": "संस्करण ${currentVersion}", "view_all": "सभी देखें", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 401514735..6f5bc88a6 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -370,6 +370,7 @@ "max_value": "Maks.: ${value} ${currency}", "memo": "Memo:", "message": "Poruka", + "message_verified": "Poruka je uspješno provjerena", "methods": "Metode", "min_amount": "Minimalno: ${value}", "min_value": "Min.: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Prikaži pristupni izraz/ključ", "show_market_place": "Prikaži tržište", "show_seed": "Prikaži pristupni izraz", + "sign_message": "Poruka", "sign_up": "Prijavite se", + "sign_verify_message": "Potpisati ili provjeriti poruku", + "sign_verify_message_sub": "Potpišite ili provjerite poruku pomoću privatnog ključa", + "sign_verify_title": "Potpisati / provjeriti", + "signature": "Potpis", + "signature_invalid_error": "Potpis ne vrijedi za danu poruku", "signTransaction": "Potpišite transakciju", "signup_for_card_accept_terms": "Prijavite se za karticu i prihvatite uvjete.", "silent_payments": "Tiha plaćanja", @@ -822,6 +829,7 @@ "value_type": "Tipa vrijednosti", "variable_pair_not_supported": "Ovaj par varijabli nije podržan s odabranim burzama", "verification": "Potvrda", + "verify_message": "Provjerite poruku", "verify_with_2fa": "Provjerite s Cake 2FA", "version": "Verzija ${currentVersion}", "view_all": "Prikaži sve", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index b6210b5dd..2bc298aa7 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Pesan", + "message_verified": "Pesan itu berhasil diverifikasi", "methods": "Metode", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -664,7 +665,13 @@ "show_keys": "Tampilkan seed/kunci", "show_market_place": "Tampilkan Pasar", "show_seed": "Tampilkan seed", + "sign_message": "Pesan tanda", "sign_up": "Daftar", + "sign_verify_message": "Tanda tangan atau verifikasi pesan", + "sign_verify_message_sub": "Menandatangani atau memverifikasi pesan menggunakan kunci pribadi Anda", + "sign_verify_title": "Tanda / verifikasi", + "signature": "Tanda tangan", + "signature_invalid_error": "Tanda tangan tidak valid untuk pesan yang diberikan", "signTransaction": "Tandatangani Transaksi", "signup_for_card_accept_terms": "Daftar untuk kartu dan terima syarat dan ketentuan.", "silent_payments": "Pembayaran diam", @@ -825,6 +832,7 @@ "value_type": "Jenis Nilai", "variable_pair_not_supported": "Pasangan variabel ini tidak didukung dengan bursa yang dipilih", "verification": "Verifikasi", + "verify_message": "Verifikasi pesan", "verify_with_2fa": "Verifikasi dengan Cake 2FA", "version": "Versi ${currentVersion}", "view_all": "Lihat Semua", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index fc4abf7c4..0548b0ad2 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -371,6 +371,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Messaggio", + "message_verified": "Il messaggio è stato verificato con successo", "methods": "Metodi", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -663,7 +664,13 @@ "show_keys": "Mostra seme/chiavi", "show_market_place": "Mostra mercato", "show_seed": "Mostra seme", + "sign_message": "Messaggio di firma", "sign_up": "Registrati", + "sign_verify_message": "Firmare o verificare il messaggio", + "sign_verify_message_sub": "Firma o verifica un messaggio utilizzando la chiave privata", + "sign_verify_title": "Firmare / verificare", + "signature": "Firma", + "signature_invalid_error": "La firma non è valida per il messaggio dato", "signTransaction": "Firma la transazione", "signup_for_card_accept_terms": "Registrati per la carta e accetta i termini.", "silent_payments": "Pagamenti silenziosi", @@ -824,6 +831,7 @@ "value_type": "Tipo di valore", "variable_pair_not_supported": "Questa coppia di variabili non è supportata con gli scambi selezionati", "verification": "Verifica", + "verify_message": "Verificare il messaggio", "verify_with_2fa": "Verifica con Cake 2FA", "version": "Versione ${currentVersion}", "view_all": "Visualizza tutto", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 98495fc8b..c53a6d001 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -371,6 +371,7 @@ "max_value": "マックス: ${value} ${currency}", "memo": "メモ:", "message": "メッセージ", + "message_verified": "メッセージは正常に検証されました", "methods": "メソッド", "min_amount": "最小: ${value}", "min_value": "分: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "シード/キーを表示する", "show_market_place": "マーケットプレイスを表示", "show_seed": "シードを表示", + "sign_message": "署名メッセージ", "sign_up": "サインアップ", + "sign_verify_message": "メッセージに署名または確認します", + "sign_verify_message_sub": "秘密鍵を使用してメッセージに署名または確認します", + "sign_verify_title": "署名 /検証", + "signature": "サイン", + "signature_invalid_error": "署名は、指定されたメッセージに対して無効です", "signTransaction": "トランザクションに署名する", "signup_for_card_accept_terms": "カードにサインアップして、利用規約に同意してください。", "silent_payments": "サイレント支払い", @@ -823,6 +830,7 @@ "value_type": "値タイプ", "variable_pair_not_supported": "この変数ペアは、選択した取引所ではサポートされていません", "verification": "検証", + "verify_message": "メッセージを確認します", "verify_with_2fa": "Cake 2FA で検証する", "version": "バージョン ${currentVersion}", "view_all": "すべて表示", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 60c52b21f..be6757d99 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -370,6 +370,7 @@ "max_value": "맥스: ${value} ${currency}", "memo": "메모:", "message": "메시지", + "message_verified": "메시지가 성공적으로 확인되었습니다", "methods": "행동 양식", "min_amount": "최소: ${value}", "min_value": "최소: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "시드 / 키 표시", "show_market_place": "마켓플레이스 표시", "show_seed": "종자 표시", + "sign_message": "서명 메시지", "sign_up": "가입", + "sign_verify_message": "메시지에 서명하거나 확인하십시오", + "sign_verify_message_sub": "개인 키를 사용하여 메시지에 서명하거나 확인하십시오", + "sign_verify_title": "서명 / 확인", + "signature": "서명", + "signature_invalid_error": "서명은 주어진 메시지에 유효하지 않습니다", "signTransaction": "거래 서명", "signup_for_card_accept_terms": "카드에 가입하고 약관에 동의합니다.", "silent_payments": "조용한 지불", @@ -823,6 +830,7 @@ "value_type": "가치 유형", "variable_pair_not_supported": "이 변수 쌍은 선택한 교환에서 지원되지 않습니다.", "verification": "검증", + "verify_message": "메시지를 확인하십시오", "verify_with_2fa": "케이크 2FA로 확인", "version": "버전 ${currentVersion}", "view_all": "모두 보기", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 42643be48..c53dffb6b 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -370,6 +370,7 @@ "max_value": "အများဆုံး- ${value} ${currency}", "memo": "မှတ်စုတို:", "message": "မက်ဆေ့ချ်", + "message_verified": "မက်ဆေ့ခ်ျကိုအောင်မြင်စွာအတည်ပြုခဲ့သည်", "methods": "နည်းလမ်းများ", "min_amount": "အနည်းဆုံး- ${value}", "min_value": "အနည်းဆုံး- ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "မျိုးစေ့ /သော့များကို ပြပါ။", "show_market_place": "စျေးကွက်ကိုပြသပါ။", "show_seed": "မျိုးစေ့ကိုပြပါ။", + "sign_message": "လက်မှတ်စာ", "sign_up": "ဆိုင်းအပ်", + "sign_verify_message": "မက်ဆေ့ခ်ျကိုလက်မှတ်ထိုးသို့မဟုတ်အတည်ပြုရန်", + "sign_verify_message_sub": "သင်၏ကိုယ်ပိုင်သော့ကို သုံး. မက်ဆေ့ခ်ျကိုလက်မှတ်ထိုးပါ", + "sign_verify_title": "လက်မှတ်ထိုး / အတည်ပြုရန်", + "signature": "လက်မှတ်", + "signature_invalid_error": "အဆိုပါလက်မှတ်ပေးထားသောမက်ဆေ့ခ်ျကိုများအတွက်မမှန်ကန်ပါ", "signTransaction": "ငွေလွှဲဝင်ပါ။", "signup_for_card_accept_terms": "ကတ်အတွက် စာရင်းသွင်းပြီး စည်းကမ်းချက်များကို လက်ခံပါ။", "silent_payments": "အသံတိတ်ငွေပေးချေမှု", @@ -822,6 +829,7 @@ "value_type": "Value အမျိုးအစား", "variable_pair_not_supported": "ရွေးချယ်ထားသော ဖလှယ်မှုများဖြင့် ဤပြောင်းလဲနိုင်သောအတွဲကို ပံ့ပိုးမထားပါ။", "verification": "စိစစ်ခြင်း။", + "verify_message": "မက်ဆေ့ခ်ျကိုအတည်ပြုရန်", "verify_with_2fa": "Cake 2FA ဖြင့် စစ်ဆေးပါ။", "version": "ဗားရှင်း ${currentVersion}", "view_all": "အားလုံးကိုကြည့်ရှုပါ။", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 0f6149182..2d55344f5 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Bericht", + "message_verified": "Het bericht is succesvol geverifieerd", "methods": "Methoden", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Toon zaad/sleutels", "show_market_place": "Toon Marktplaats", "show_seed": "Toon zaad", + "sign_message": "Aanmeldingsbericht", "sign_up": "Aanmelden", + "sign_verify_message": "Teken of verifieer bericht", + "sign_verify_message_sub": "Teken of verifieer een bericht met uw privésleutel", + "sign_verify_title": "Ondertekenen / verifiëren", + "signature": "Handtekening", + "signature_invalid_error": "De handtekening is niet geldig voor het gegeven bericht", "signTransaction": "Transactie ondertekenen", "signup_for_card_accept_terms": "Meld je aan voor de kaart en accepteer de voorwaarden.", "silent_payments": "Stille betalingen", @@ -822,6 +829,7 @@ "value_type": "Waarde type", "variable_pair_not_supported": "Dit variabelenpaar wordt niet ondersteund met de geselecteerde uitwisselingen", "verification": "Verificatie", + "verify_message": "Verifieer bericht", "verify_with_2fa": "Controleer met Cake 2FA", "version": "Versie ${currentVersion}", "view_all": "Alles bekijken", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 48d6e38f6..833fc0308 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Notatka:", "message": "Wiadomość", + "message_verified": "Wiadomość została pomyślnie zweryfikowana", "methods": "Metody", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Pokaż seed/klucze", "show_market_place": "Pokaż rynek", "show_seed": "Pokaż frazy seed", + "sign_message": "Podpisuj wiadomość", "sign_up": "Zarejestruj się", + "sign_verify_message": "Podpisz lub zweryfikuj wiadomość", + "sign_verify_message_sub": "Podpisz lub zweryfikuj wiadomość za pomocą klucza prywatnego", + "sign_verify_title": "Podpisać / weryfikować", + "signature": "Podpis", + "signature_invalid_error": "Podpis nie jest ważny dla podanej wiadomości", "signTransaction": "Podpisz transakcję", "signup_for_card_accept_terms": "Zarejestruj się, aby otrzymać kartę i zaakceptuj warunki.", "silent_payments": "Ciche płatności", @@ -822,6 +829,7 @@ "value_type": "Typ wartości", "variable_pair_not_supported": "Ta para zmiennych nie jest obsługiwana na wybranych giełdach", "verification": "Weryfikacja", + "verify_message": "Sprawdź wiadomość", "verify_with_2fa": "Sprawdź za pomocą Cake 2FA", "version": "Wersja ${currentVersion}", "view_all": "Wyświetl wszystko", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 070f3f776..bd6d9b506 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -371,6 +371,7 @@ "max_value": "Máx: ${value} ${currency}", "memo": "Memorando:", "message": "Mensagem", + "message_verified": "A mensagem foi verificada com sucesso", "methods": "Métodos", "min_amount": "Mínimo: ${valor}", "min_value": "Mín: ${value} ${currency}", @@ -663,7 +664,13 @@ "show_keys": "Mostrar semente/chaves", "show_market_place": "Mostrar mercado", "show_seed": "Mostrar semente", + "sign_message": "Mensagem de assinar", "sign_up": "Inscrever-se", + "sign_verify_message": "Assinar ou verificar mensagem", + "sign_verify_message_sub": "Assine ou verifique uma mensagem usando sua chave privada", + "sign_verify_title": "Assinar / verificar", + "signature": "Assinatura", + "signature_invalid_error": "A assinatura não é válida para a mensagem dada", "signTransaction": "Assinar transação", "signup_for_card_accept_terms": "Cadastre-se no cartão e aceite os termos.", "silent_payments": "Pagamentos silenciosos", @@ -824,6 +831,7 @@ "value_type": "Tipo de valor", "variable_pair_not_supported": "Este par de variáveis não é compatível com as trocas selecionadas", "verification": "Verificação", + "verify_message": "Verifique a mensagem", "verify_with_2fa": "Verificar com Cake 2FA", "version": "Versão ${currentVersion}", "view_all": "Ver todos", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 695877c77..d43572351 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -370,6 +370,7 @@ "max_value": "Макс: ${value} ${currency}", "memo": "Памятка:", "message": "Сообщение", + "message_verified": "Сообщение было успешно проверено", "methods": "Методы", "min_amount": "Минимум: ${value}", "min_value": "Мин: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Показать мнемоническую фразу/ключи", "show_market_place": "Показать торговую площадку", "show_seed": "Показать мнемоническую фразу", + "sign_message": "Сообщение о знаке", "sign_up": "Зарегистрироваться", + "sign_verify_message": "Подписать или проверить сообщение", + "sign_verify_message_sub": "Подписать или проверить сообщение, используя свой закрытый ключ", + "sign_verify_title": "Знак / проверка", + "signature": "Подпись", + "signature_invalid_error": "Подпись недопустима для данного сообщения", "signTransaction": "Подписать транзакцию", "signup_for_card_accept_terms": "Подпишитесь на карту и примите условия.", "silent_payments": "Молчаливые платежи", @@ -823,6 +830,7 @@ "value_type": "Тип значения", "variable_pair_not_supported": "Эта пара переменных не поддерживается выбранными биржами.", "verification": "Проверка", + "verify_message": "Проверьте сообщение", "verify_with_2fa": "Подтвердить с помощью Cake 2FA", "version": "Версия ${currentVersion}", "view_all": "Просмотреть все", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 5757eed0b..d948ba6d6 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -370,6 +370,7 @@ "max_value": "ขั้นสูง: ${value} ${currency}", "memo": "หมายเหตุ:", "message": "ข้อความ", + "message_verified": "ข้อความได้รับการตรวจสอบอย่างประสบความสำเร็จ", "methods": "วิธีการ", "min_amount": "จำนวนขั้นต่ำ: ${value}", "min_value": "ขั้นต่ำ: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "แสดงซีด/คีย์", "show_market_place": "แสดงตลาดกลาง", "show_seed": "แสดงซีด", + "sign_message": "ลงนามข้อความ", "sign_up": "สมัครสมาชิก", + "sign_verify_message": "ลงชื่อเข้าใช้หรือตรวจสอบข้อความ", + "sign_verify_message_sub": "ลงชื่อเข้าใช้หรือตรวจสอบข้อความโดยใช้คีย์ส่วนตัวของคุณ", + "sign_verify_title": "ลงชื่อ / ตรวจสอบ", + "signature": "ลายเซ็น", + "signature_invalid_error": "ลายเซ็นไม่ถูกต้องสำหรับข้อความที่ให้ไว้", "signTransaction": "ลงนามในการทำธุรกรรม", "signup_for_card_accept_terms": "ลงทะเบียนสำหรับบัตรและยอมรับเงื่อนไข", "silent_payments": "การชำระเงินเงียบ", @@ -822,6 +829,7 @@ "value_type": "ประเภทค่า", "variable_pair_not_supported": "คู่ความสัมพันธ์ที่เปลี่ยนแปลงได้นี้ไม่สนับสนุนกับหุ้นที่เลือก", "verification": "การตรวจสอบ", + "verify_message": "ยืนยันข้อความ", "verify_with_2fa": "ตรวจสอบกับ Cake 2FA", "version": "เวอร์ชัน ${currentVersion}", "view_all": "ดูทั้งหมด", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 7fc83afd8..a0ab030c8 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -370,6 +370,7 @@ "max_value": "Max: ${value} ${currency}", "memo": "Memo:", "message": "Mensahe", + "message_verified": "Ang mensahe ay matagumpay na na -verify", "methods": "Mga Paraan", "min_amount": "Min: ${value}", "min_value": "Min: ${value} ${currency}", @@ -660,6 +661,12 @@ "show_details": "Ipakita ang mga detalye", "show_keys": "Ipakita ang mga seed/key", "show_market_place": "Ipakita ang Marketplace", + "sign_message": "Mag -sign Message", + "sign_verify_message": "Mag -sign o i -verify ang mensahe", + "sign_verify_message_sub": "Mag -sign o i -verify ang isang mensahe gamit ang iyong pribadong key", + "sign_verify_title": "Mag -sign / Mag -verify", + "signature": "Lagda", + "signature_invalid_error": "Ang lagda ay hindi wasto para sa ibinigay na mensahe", "show_seed": "Ipakita ang seed", "sign_up": "Mag-sign Up", "signTransaction": "Mag-sign ang Transaksyon", @@ -820,6 +827,7 @@ "use_testnet": "Gumamit ng testnet", "value": "Halaga", "value_type": "Uri ng halaga", + "verify_message": "I -verify ang mensahe", "variable_pair_not_supported": "Ang variable na pares na ito ay hindi suportado sa mga napiling exchange", "verification": "Pag-verify", "verify_with_2fa": "Mag-verify sa Cake 2FA", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 4d1aa43e4..e7cdc5b12 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -370,6 +370,7 @@ "max_value": "En fazla: ${value} ${currency}", "memo": "Memo:", "message": "İleti", + "message_verified": "Mesaj başarıyla doğrulandı", "methods": "Yöntemler", "min_amount": "Min: ${value}", "min_value": "En az: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "Tohumları/anahtarları göster", "show_market_place": "Pazar Yerini Göster", "show_seed": "Tohumları göster", + "sign_message": "İşaret mesajı", "sign_up": "Kaydol", + "sign_verify_message": "Mesajı işaretleyin veya doğrulayın", + "sign_verify_message_sub": "Özel anahtarınızı kullanarak bir mesajı imzalayın veya doğrulayın", + "sign_verify_title": "İşaretle / Doğrula", + "signature": "İmza", + "signature_invalid_error": "İmza verilen mesaj için geçerli değil", "signTransaction": "İşlem İmzala", "signup_for_card_accept_terms": "Kart için kaydol ve koşulları kabul et.", "silent_payments": "Sessiz ödemeler", @@ -822,6 +829,7 @@ "value_type": "Değer türü", "variable_pair_not_supported": "Bu değişken paritesi seçilen borsalarda desteklenmemekte", "verification": "Doğrulama", + "verify_message": "Mesajı Doğrula", "verify_with_2fa": "Cake 2FA ile Doğrulayın", "version": "Sürüm ${currentVersion}", "view_all": "Hepsini göster", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 22edec0d5..91b5b5266 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -370,6 +370,7 @@ "max_value": "Макс: ${value} ${currency}", "memo": "Пам’ятка:", "message": "повідомлення", + "message_verified": "Повідомлення було успішно перевірено", "methods": "методи", "min_amount": "Мінімум: ${value}", "min_value": "Мін: ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Показати мнемонічну фразу/ключі", "show_market_place": "Відображати маркетплейс", "show_seed": "Показати мнемонічну фразу", + "sign_message": "Підпишіть повідомлення", "sign_up": "Зареєструватися", + "sign_verify_message": "Підпишіть або перевірити повідомлення", + "sign_verify_message_sub": "Підпишіть або перевірте повідомлення за допомогою вашого приватного ключа", + "sign_verify_title": "Знак / Перевірка", + "signature": "Підпис", + "signature_invalid_error": "Підпис не є дійсним для наведеного повідомлення", "signTransaction": "Підписати транзакцію", "signup_for_card_accept_terms": "Зареєструйтеся на картку та прийміть умови.", "silent_payments": "Мовчазні платежі", @@ -823,6 +830,7 @@ "value_type": "Тип значення", "variable_pair_not_supported": "Ця пара змінних не підтримується вибраними біржами", "verification": "Перевірка", + "verify_message": "Перевірте повідомлення", "verify_with_2fa": "Перевірте за допомогою Cake 2FA", "version": "Версія ${currentVersion}", "view_all": "Переглянути все", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 590f344d8..e54a0db34 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -370,6 +370,7 @@ "max_value": "زیادہ سے زیادہ: ${value} ${currency}", "memo": "میمو:", "message": "ﻡﺎﻐﯿﭘ", + "message_verified": "پیغام کی کامیابی کے ساتھ تصدیق کی گئی", "methods": "ﮯﻘﯾﺮﻃ", "min_amount": "کم سے کم: ${value}", "min_value": "کم سے کم: ${value} ${currency}", @@ -663,7 +664,13 @@ "show_keys": "بیج / چابیاں دکھائیں۔", "show_market_place": "بازار دکھائیں۔", "show_seed": "بیج دکھائیں۔", + "sign_message": "سائن پیغام", "sign_up": "سائن اپ", + "sign_verify_message": "پیغام پر دستخط کریں یا تصدیق کریں", + "sign_verify_message_sub": "اپنی نجی کلید کا استعمال کرتے ہوئے کسی پیغام پر دستخط کریں یا اس کی تصدیق کریں", + "sign_verify_title": "سائن / تصدیق کریں", + "signature": "دستخط", + "signature_invalid_error": "دستخط دیئے گئے پیغام کے لئے درست نہیں ہے", "signTransaction": "۔ﮟﯾﺮﮐ ﻂﺨﺘﺳﺩ ﺮﭘ ﻦﯾﺩ ﻦﯿﻟ", "signup_for_card_accept_terms": "کارڈ کے لیے سائن اپ کریں اور شرائط کو قبول کریں۔", "silent_payments": "خاموش ادائیگی", @@ -824,6 +831,7 @@ "value_type": "قدر کی قسم", "variable_pair_not_supported": "یہ متغیر جوڑا منتخب ایکسچینجز کے ساتھ تعاون یافتہ نہیں ہے۔", "verification": "تصدیق", + "verify_message": "پیغام کی تصدیق کریں", "verify_with_2fa": "کیک 2FA سے تصدیق کریں۔", "version": "ورژن ${currentVersion}", "view_all": "سب دیکھیں", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index e5cf3d3f9..8f47d8543 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -371,6 +371,7 @@ "max_value": "kò gbọ́dọ̀ tóbi ju ${value} ${currency}", "memo": "Àkọsílẹ̀:", "message": "Ifiranṣẹ", + "message_verified": "Ifiranṣẹ naa ni aṣeyọri ni ifijišẹ", "methods": "Awọn ọna", "min_amount": "kò kéré ju: ${value}", "min_value": "kò gbọ́dọ̀ kéré ju ${value} ${currency}", @@ -662,7 +663,13 @@ "show_keys": "Wo hóró / àwọn kọ́kọ́rọ́", "show_market_place": "Wa Sopọ Pataki", "show_seed": "Wo hóró", + "sign_message": "Ifiranṣẹ Ami", "sign_up": "Forúkọ sílẹ̀", + "sign_verify_message": "Ami tabi ṣayẹwo ifiranṣẹ", + "sign_verify_message_sub": "Wọle tabi ṣayẹwo ifiranṣẹ kan nipa lilo bọtini ikọkọ rẹ", + "sign_verify_title": "Ami / Daju", + "signature": "Ibọwọlu", + "signature_invalid_error": "Ibuwọlu ko wulo fun ifiranṣẹ ti a fun", "signTransaction": "Wole Idunadura", "signup_for_card_accept_terms": "Ẹ f'orúkọ sílẹ̀ láti gba káàdì àti àjọrò.", "silent_payments": "Awọn sisanwo ipalọlọ", @@ -823,6 +830,7 @@ "value_type": "Iru iye", "variable_pair_not_supported": "A kì í ṣe k'á fi àwọn ilé pàṣípààrọ̀ yìí ṣe pàṣípààrọ̀ irú owó méji yìí", "verification": "Ìjẹ́rìísí", + "verify_message": "Daju ifiranṣẹ", "verify_with_2fa": "Ṣeẹda pẹlu Cake 2FA", "version": "Àtúnse ${currentVersion}", "view_all": "Wo gbogbo nǹkan kan", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 25024d0ed..c864a529b 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -370,6 +370,7 @@ "max_value": "最大: ${value} ${currency}", "memo": "备忘录:", "message": "信息", + "message_verified": "该消息已成功验证", "methods": "方法", "min_amount": "最小值: ${value}", "min_value": "最小: ${value} ${currency}", @@ -661,7 +662,13 @@ "show_keys": "显示种子/密钥", "show_market_place": "显示市场", "show_seed": "显示种子", + "sign_message": "标志消息", "sign_up": "注册", + "sign_verify_message": "签名或验证消息", + "sign_verify_message_sub": "使用您的私钥签名或验证消息", + "sign_verify_title": "签名 /验证", + "signature": "签名", + "signature_invalid_error": "签名对于给出的消息无效", "signTransaction": "签署交易", "signup_for_card_accept_terms": "注册卡并接受条款。", "silent_payments": "无声付款", @@ -822,6 +829,7 @@ "value_type": "值类型", "variable_pair_not_supported": "所选交易所不支持此变量对", "verification": "验证", + "verify_message": "验证消息", "verify_with_2fa": "用 Cake 2FA 验证", "version": "版本 ${currentVersion}", "view_all": "查看全部", From 7c9b72483a66e113db6fee8c23d3b8616c76c41f Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Sat, 17 Aug 2024 19:28:45 -0400 Subject: [PATCH 56/77] Socket null handling (#1610) * return null if in connection failure state * reconnect on connection failure * better connection handling * probably not necessary but just incase * connection handling updates * add cancelOnError: true --- cw_bitcoin/lib/electrum.dart | 54 +++++++++++++++++------------ cw_bitcoin/lib/electrum_wallet.dart | 22 +++++------- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index 69b07d7c1..28043d0c0 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -66,6 +66,7 @@ class ElectrumClient { try { await socket?.close(); + socket = null; } catch (_) {} try { @@ -90,33 +91,40 @@ class ElectrumClient { } _setConnectionStatus(ConnectionStatus.connected); - socket!.listen((Uint8List event) { - try { - final msg = utf8.decode(event.toList()); - final messagesList = msg.split("\n"); - for (var message in messagesList) { - if (message.isEmpty) { - continue; + socket!.listen( + (Uint8List event) { + try { + final msg = utf8.decode(event.toList()); + final messagesList = msg.split("\n"); + for (var message in messagesList) { + if (message.isEmpty) { + continue; + } + _parseResponse(message); } - _parseResponse(message); + } catch (e) { + print(e.toString()); } - } catch (e) { - print(e.toString()); - } - }, onError: (Object error) { - final errorMsg = error.toString(); - print(errorMsg); - unterminatedString = ''; + }, + onError: (Object error) { + socket = null; + final errorMsg = error.toString(); + print(errorMsg); + unterminatedString = ''; - final currentHost = socket?.address.host; - final isErrorForCurrentHost = errorMsg.contains(" ${currentHost} "); + final currentHost = socket?.address.host; + final isErrorForCurrentHost = errorMsg.contains(" ${currentHost} "); - if (currentHost != null && isErrorForCurrentHost) - _setConnectionStatus(ConnectionStatus.failed); - }, onDone: () { - unterminatedString = ''; - if (host == socket?.address.host) _setConnectionStatus(ConnectionStatus.disconnected); - }); + if (currentHost != null && isErrorForCurrentHost) + _setConnectionStatus(ConnectionStatus.failed); + }, + onDone: () { + socket = null; + unterminatedString = ''; + if (host == socket?.address.host) _setConnectionStatus(ConnectionStatus.disconnected); + }, + cancelOnError: true, + ); keepAlive(); } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 8f2360f26..b8d9adb14 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -218,10 +218,7 @@ abstract class ElectrumWalletBase if (electrumClient.isConnected) { syncStatus = SyncedSyncStatus(); } else { - if (electrumClient.uri != null) { - await electrumClient.connectToUri(electrumClient.uri!, useSSL: electrumClient.useSSL); - startSync(); - } + syncStatus = NotConnectedSyncStatus(); } } } @@ -265,6 +262,7 @@ abstract class ElectrumWalletBase Future? _isolate; void Function(FlutterErrorDetails)? _onError; + Timer? _reconnectTimer; Timer? _autoSaveTimer; static const int _autoSaveInterval = 30; @@ -1980,13 +1978,6 @@ abstract class ElectrumWalletBase break; case ConnectionStatus.failed: syncStatus = LostConnectionSyncStatus(); - // wait for 5 seconds and then try to reconnect: - Future.delayed(Duration(seconds: 5), () { - electrumClient.connectToUri( - node!.uri, - useSSL: node!.useSSL ?? false, - ); - }); break; case ConnectionStatus.connecting: syncStatus = ConnectingSyncStatus(); @@ -1996,7 +1987,11 @@ abstract class ElectrumWalletBase } void _syncStatusReaction(SyncStatus syncStatus) async { - if (syncStatus is NotConnectedSyncStatus) { + if (syncStatus is SyncingSyncStatus) { + return; + } + + if (syncStatus is NotConnectedSyncStatus || syncStatus is LostConnectionSyncStatus) { // Needs to re-subscribe to all scripthashes when reconnected _scripthashesUpdateSubject = {}; @@ -2004,7 +1999,8 @@ abstract class ElectrumWalletBase _isTryingToConnect = true; - Future.delayed(Duration(seconds: 10), () { + _reconnectTimer?.cancel(); + _reconnectTimer = Timer(Duration(seconds: 10), () { if (this.syncStatus is! SyncedSyncStatus && this.syncStatus is! SyncedTipSyncStatus) { this.electrumClient.connectToUri( node!.uri, From c59d39d42d4a8a27208ea3bad5144781801823a5 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Sun, 18 Aug 2024 03:37:15 +0300 Subject: [PATCH 57/77] Generic fixes (#1619) * update fee rates * periodically update fees * minor enhancements * minor enhancements * some improvements add solana node * handle empty hex as null * minor improvement * fix imports * fix app hanging on splash screen * update app versions temporarily disable sign/verify for hardware wallets --- assets/solana_node_list.yml | 3 +++ assets/text/Monerocom_Release_Notes.txt | 5 ++--- assets/text/Release_Notes.txt | 7 ++----- cw_bitcoin/lib/electrum_wallet.dart | 12 +++++++++--- cw_evm/lib/evm_chain_wallet.dart | 5 ++++- cw_monero/lib/monero_wallet_service.dart | 6 +++--- cw_monero/pubspec.lock | 15 +++++++-------- cw_monero/pubspec.yaml | 5 +---- cw_wownero/pubspec.lock | 19 +++++++++---------- cw_wownero/pubspec.yaml | 5 +---- lib/core/wallet_loading_service.dart | 8 ++++++-- lib/reactions/bootstrap.dart | 2 +- .../on_authentication_state_change.dart | 17 ++++------------- .../screens/dashboard/pages/balance_page.dart | 4 ++-- .../dashboard/dashboard_view_model.dart | 4 +++- .../exchange/exchange_view_model.dart | 9 +++++++++ macos/Podfile.lock | 18 ++++++------------ pubspec_base.yaml | 7 ++----- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- scripts/linux/app_env.sh | 4 ++-- scripts/macos/app_env.sh | 8 ++++---- scripts/windows/build_exe_installer.iss | 2 +- 23 files changed, 89 insertions(+), 92 deletions(-) diff --git a/assets/solana_node_list.yml b/assets/solana_node_list.yml index 4a2e12161..e3ff9138e 100644 --- a/assets/solana_node_list.yml +++ b/assets/solana_node_list.yml @@ -1,4 +1,7 @@ - uri: rpc.ankr.com is_default: true + useSSL: true +- + uri: api.mainnet-beta.solana.com:443 useSSL: true \ No newline at end of file diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index c90d54524..11a3ad803 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,4 +1,3 @@ -Monero synchronization improvements -Enhance error handling -UI enhancements +Scan and verify messages +Synchronization enhancements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 34bca2e5e..11a3ad803 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,6 +1,3 @@ -Wallets enhancements -Monero synchronization improvements -Improve wallet backups -Enhance error handling -UI enhancements +Scan and verify messages +Synchronization enhancements Bug fixes \ No newline at end of file diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index b8d9adb14..2d0b989d7 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -264,7 +264,8 @@ abstract class ElectrumWalletBase void Function(FlutterErrorDetails)? _onError; Timer? _reconnectTimer; Timer? _autoSaveTimer; - static const int _autoSaveInterval = 30; + Timer? _updateFeeRateTimer; + static const int _autoSaveInterval = 1; Future init() async { await walletAddresses.init(); @@ -272,7 +273,7 @@ abstract class ElectrumWalletBase await save(); _autoSaveTimer = - Timer.periodic(Duration(seconds: _autoSaveInterval), (_) async => await save()); + Timer.periodic(Duration(minutes: _autoSaveInterval), (_) async => await save()); } @action @@ -425,6 +426,10 @@ abstract class ElectrumWalletBase await updateTransactions(); await updateAllUnspents(); await updateBalance(); + updateFeeRates(); + + _updateFeeRateTimer ??= + Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates()); if (alwaysScan == true) { _setListeners(walletInfo.restoreHeight); @@ -1213,6 +1218,7 @@ abstract class ElectrumWalletBase await electrumClient.close(); } catch (_) {} _autoSaveTimer?.cancel(); + _updateFeeRateTimer?.cancel(); } @action @@ -1371,7 +1377,7 @@ abstract class ElectrumWalletBase if (confirmations > 0) return false; - if (transactionHex == null) { + if (transactionHex == null || transactionHex.isEmpty) { return false; } diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index bbf972f0d..0ade2215e 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -113,6 +113,8 @@ abstract class EVMChainWalletBase int? gasBaseFee = 0; int estimatedGasUnits = 0; + Timer? _updateFeesTimer; + bool _isTransactionUpdating; // TODO: remove after integrating our own node and having eth_newPendingTransactionFilter @@ -263,6 +265,7 @@ abstract class EVMChainWalletBase void close() { _client.stop(); _transactionsUpdateTimer?.cancel(); + _updateFeesTimer?.cancel(); } @action @@ -297,7 +300,7 @@ abstract class EVMChainWalletBase await _updateEstimatedGasFeeParams(); - Timer.periodic(const Duration(seconds: 10), (timer) async { + _updateFeesTimer ??= Timer.periodic(const Duration(seconds: 30), (timer) async { await _updateEstimatedGasFeeParams(); }); diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index d771d1815..f9973f430 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -119,7 +119,7 @@ class MoneroWalletService extends WalletService< } @override - Future openWallet(String name, String password) async { + Future openWallet(String name, String password, {bool? retryOnFailure}) async { MoneroWallet? wallet; try { final path = await pathForWallet(name: name, type: getType()); @@ -181,12 +181,12 @@ class MoneroWalletService extends WalletService< wallet.onError != null) { wallet.onError!(FlutterErrorDetails(exception: e, stack: s)); } - if (invalidPassword) { + if (invalidPassword || retryOnFailure == false) { rethrow; } await restoreOrResetWalletFiles(name); - return openWallet(name, password); + return openWallet(name, password, retryOnFailure: false); } } diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 51efd4076..13c70cfad 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -295,10 +295,10 @@ packages: dependency: transitive description: name: hashlib - sha256: "5037d3b8c36384c03a728543ae67d962a56970c5432a50862279fe68ee4c8411" + sha256: d41795742c10947930630118c6836608deeb9047cd05aee32d2baeb697afd66a url: "https://pub.dev" source: hosted - version: "1.19.1" + version: "1.19.2" hashlib_codecs: dependency: transitive description: @@ -575,12 +575,11 @@ packages: polyseed: dependency: "direct main" description: - path: "." - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - url: "https://github.com/mrcyjanek/polyseed_dart" - source: git - version: "0.0.5" + name: polyseed + sha256: "11d4dbee409db053c5e9cd77382b2f5115f43fc2529158a826a96f3ba505d770" + url: "https://pub.dev" + source: hosted + version: "0.0.6" pool: dependency: transitive description: diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 7f5da2621..3053977de 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -19,10 +19,7 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 cw_core: path: ../cw_core monero: diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index f164b3086..58831085f 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -295,18 +295,18 @@ packages: dependency: transitive description: name: hashlib - sha256: "71bf102329ddb8e50c8a995ee4645ae7f1728bb65e575c17196b4d8262121a96" + sha256: d41795742c10947930630118c6836608deeb9047cd05aee32d2baeb697afd66a url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.19.2" hashlib_codecs: dependency: transitive description: name: hashlib_codecs - sha256: "49e2a471f74b15f1854263e58c2ac11f2b631b5b12c836f9708a35397d36d626" + sha256: "2b570061f5a4b378425be28a576c1e11783450355ad4345a19f606ff3d96db0f" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.5.0" hive: dependency: transitive description: @@ -567,12 +567,11 @@ packages: polyseed: dependency: "direct main" description: - path: "." - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - url: "https://github.com/mrcyjanek/polyseed_dart" - source: git - version: "0.0.5" + name: polyseed + sha256: "11d4dbee409db053c5e9cd77382b2f5115f43fc2529158a826a96f3ba505d770" + url: "https://pub.dev" + source: hosted + version: "0.0.6" pool: dependency: transitive description: diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index eb14286a9..b9306711d 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -19,10 +19,7 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 cw_core: path: ../cw_core monero: diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 2b570f14c..0087b1332 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -60,7 +60,9 @@ class WalletLoadingService { String corruptedWalletsSeeds = "Corrupted wallets seeds (if retrievable, empty otherwise):"; try { corruptedWalletsSeeds += await _getCorruptedWalletSeeds(name, type); - } catch (_) {} + } catch (e) { + corruptedWalletsSeeds += "\nFailed to fetch $name seeds: $e"; + } // try opening another wallet that is not corrupted to give user access to the app final walletInfoSource = await CakeHive.openBox(WalletInfo.boxName); @@ -90,7 +92,9 @@ class WalletLoadingService { if (!corruptedWalletsSeeds.contains(seeds)) { corruptedWalletsSeeds += seeds; } - } catch (_) {} + } catch (e) { + corruptedWalletsSeeds += "\nFailed to fetch $name seeds: $e"; + } } } diff --git a/lib/reactions/bootstrap.dart b/lib/reactions/bootstrap.dart index 5b1a0ace7..bf045c0dd 100644 --- a/lib/reactions/bootstrap.dart +++ b/lib/reactions/bootstrap.dart @@ -27,7 +27,7 @@ Future bootstrap(GlobalKey navigatorKey) async { authenticationStore.installed(); } - await startAuthenticationStateChange(authenticationStore, navigatorKey); + startAuthenticationStateChange(authenticationStore, navigatorKey); startCurrentWalletChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatApiModeChangeReaction(appStore, settingsStore, fiatConversionStore); diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index 014306b98..1aa0a12c6 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -7,26 +7,17 @@ import 'package:flutter/widgets.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/entities/load_current_wallet.dart'; import 'package:cake_wallet/store/authentication_store.dart'; +import 'package:rxdart/subjects.dart'; ReactionDisposer? _onAuthenticationStateChange; dynamic loginError; -StreamController authenticatedErrorStreamController = StreamController(); +StreamController authenticatedErrorStreamController = BehaviorSubject(); -Future reInitializeStreamController() async { - if (!authenticatedErrorStreamController.isClosed) { - await authenticatedErrorStreamController.close(); - } - - authenticatedErrorStreamController = StreamController(); -} - -Future startAuthenticationStateChange( +void startAuthenticationStateChange( AuthenticationStore authenticationStore, GlobalKey navigatorKey, -) async { - await reInitializeStreamController(); - +) { authenticatedErrorStreamController.stream.listen((event) { if (authenticationStore.state == AuthenticationState.allowed) { ExceptionHandler.showError(event.toString(), delayInSeconds: 3); diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 770cda6f9..57f908986 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -287,8 +287,8 @@ class CryptoBalanceWidget extends StatelessWidget { padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), child: DashBoardRoundedCardWidget( customBorder: 30, - title: "Monero wallet is broken", - subTitle: "Here are the things that are broken:\n - " + title: "This wallet has encountered an issue", + subTitle: "Here are the things that you should note:\n - " +dashboardViewModel.isMoneroWalletBrokenReasons.join("\n - ") +"\n\nPlease restart your wallet and if it doesn't help contact our support.", onTap: () {}, diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 56a0e061b..d58d7535c 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -32,7 +32,6 @@ import 'package:cake_wallet/view_model/dashboard/trade_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/transaction_list_item.dart'; import 'package:cake_wallet/view_model/settings/sync_mode.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; -import 'package:cake_wallet/wownero/wownero.dart' as wow; import 'package:cryptography/cryptography.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/cake_hive.dart'; @@ -485,6 +484,9 @@ abstract class DashboardViewModelBase with Store { @computed bool get hasSignMessages { + if (wallet.isHardwareWallet) { + return false; + } switch (wallet.type) { case WalletType.monero: case WalletType.litecoin: diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 3e45e8ba1..f2ea8eeb4 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -142,8 +142,17 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with _bestRate = 0; _calculateBestRate(); }); + + if (isElectrumWallet) { + bitcoin!.updateFeeRates(wallet); + } } + bool get isElectrumWallet => + wallet.type == WalletType.bitcoin || + wallet.type == WalletType.litecoin || + wallet.type == WalletType.bitcoinCash; + bool _useTorOnly; final Box trades; final ExchangeTemplateStore _exchangeTemplateStore; diff --git a/macos/Podfile.lock b/macos/Podfile.lock index c2f37a3f3..8951a2dd1 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -17,15 +17,13 @@ PODS: - in_app_review (0.2.0): - FlutterMacOS - OrderedSet (5.0.0) - - package_info (0.0.1): - - FlutterMacOS - package_info_plus (0.0.1): - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - ReachabilitySwift (5.0.0) - - share_plus_macos (0.0.1): + - share_plus (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): - Flutter @@ -46,10 +44,9 @@ DEPENDENCIES: - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - in_app_review (from `Flutter/ephemeral/.symlinks/plugins/in_app_review/macos`) - - package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) + - 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`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) @@ -77,14 +74,12 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral in_app_review: :path: Flutter/ephemeral/.symlinks/plugins/in_app_review/macos - package_info: - :path: Flutter/ephemeral/.symlinks/plugins/package_info/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - share_plus_macos: - :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos + share_plus: + :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos shared_preferences_foundation: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin sp_scanner: @@ -104,11 +99,10 @@ SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c - package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 - package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce + package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 + share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303 url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 07dc7f5af..0d99c1c8c 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -94,10 +94,7 @@ dependencies: # ref: main socks5_proxy: ^1.0.4 flutter_svg: ^2.0.9 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 nostr_tools: ^1.0.9 solana: ^0.30.1 bitcoin_base: @@ -105,7 +102,7 @@ dependencies: url: https://github.com/cake-tech/bitcoin_base ref: cake-update-v5 ledger_flutter: ^1.0.1 - hashlib: 1.12.0 + hashlib: ^1.19.2 dev_dependencies: flutter_test: diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index c91f24622..324d2d2ae 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.16.3" -MONERO_COM_BUILD_NUMBER=97 +MONERO_COM_VERSION="1.16.4" +MONERO_COM_BUILD_NUMBER=98 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.19.3" -CAKEWALLET_BUILD_NUMBER=224 +CAKEWALLET_VERSION="4.19.4" +CAKEWALLET_BUILD_NUMBER=225 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 e32b3e9f3..1405f7939 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.16.3" -MONERO_COM_BUILD_NUMBER=95 +MONERO_COM_VERSION="1.16.4" +MONERO_COM_BUILD_NUMBER=96 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.3" -CAKEWALLET_BUILD_NUMBER=262 +CAKEWALLET_VERSION="4.19.4" +CAKEWALLET_BUILD_NUMBER=263 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 729cf376b..bc2965193 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.9.2" -CAKEWALLET_BUILD_NUMBER=30 +CAKEWALLET_VERSION="1.9.4" +CAKEWALLET_BUILD_NUMBER=31 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 2f6d51a93..9487be2c8 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.6.2" -MONERO_COM_BUILD_NUMBER=27 +MONERO_COM_VERSION="1.6.4" +MONERO_COM_BUILD_NUMBER=28 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.12.2" -CAKEWALLET_BUILD_NUMBER=83 +CAKEWALLET_VERSION="1.12.4" +CAKEWALLET_BUILD_NUMBER=84 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 216f367ca..4d7838723 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.0.4" +#define MyAppVersion "0.0.5" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe" From fe4b3e4eb05ca5037500778102e031a67243a9ee Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Sun, 18 Aug 2024 03:48:25 +0300 Subject: [PATCH 58/77] push haven fix --- cw_bitcoin/pubspec.lock | 6 +++--- cw_haven/lib/haven_wallet.dart | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index 12274c1e6..cdb88946e 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -67,11 +67,11 @@ packages: source: git version: "1.0.1" bitcoin_base: - dependency: "direct main" + dependency: "direct overridden" description: path: "." - ref: cake-update-v4 - resolved-ref: "574486bfcdbbaf978dcd006b46fc8716f880da29" + ref: cake-update-v5 + resolved-ref: ff2b10eb27b0254ce4518d054332d97d77d9b380 url: "https://github.com/cake-tech/bitcoin_base" source: git version: "4.7.0" diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index c0ecbca68..317d9dc65 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -10,10 +10,8 @@ import 'package:cw_haven/haven_transaction_info.dart'; import 'package:cw_haven/haven_wallet_addresses.dart'; import 'package:cw_core/monero_wallet_utils.dart'; import 'package:cw_haven/api/structs/pending_transaction.dart'; -import 'package:flutter/foundation.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_haven/api/transaction_history.dart' as haven_transaction_history; -//import 'package:cw_haven/wallet.dart'; import 'package:cw_haven/api/wallet.dart' as haven_wallet; import 'package:cw_haven/api/transaction_history.dart' as transaction_history; import 'package:cw_haven/api/monero_output.dart'; @@ -123,7 +121,8 @@ abstract class HavenWalletBase login: node.login, password: node.password, useSSL: node.useSSL ?? false, - isLightWallet: false, // FIXME: hardcoded value + isLightWallet: false, + // FIXME: hardcoded value socksProxyAddress: node.socksProxyAddress); haven_wallet.setTrustedDaemon(node.trusted); @@ -419,4 +418,12 @@ abstract class HavenWalletBase @override String get password => _password; + + @override + Future signMessage(String message, {String? address = null}) => + throw UnimplementedError(); + + @override + Future verifyMessage(String message, String signature, {String? address = null}) => + throw UnimplementedError(); } From 4071e460f687d4fe2e72368dfd3ed5a30ca2ca1f Mon Sep 17 00:00:00 2001 From: cyan Date: Sun, 18 Aug 2024 14:25:44 +0200 Subject: [PATCH 59/77] fix universal build (#1621) --- scripts/macos/build_monero_all.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/macos/build_monero_all.sh b/scripts/macos/build_monero_all.sh index c934b4667..edc8efe81 100755 --- a/scripts/macos/build_monero_all.sh +++ b/scripts/macos/build_monero_all.sh @@ -23,12 +23,14 @@ then done else if [[ "x$1" == "xuniversal" ]]; then - ARCHS=(arm64 x86_64) + ARCHS=(x86_64 arm64) else ARCHS=$(uname -m) fi for COIN in monero wownero; do + MONERO_LIBS="" + WOWNERO_LIBS="" for ARCH in "${ARCHS[@]}"; do if [[ "$ARCH" == "arm64" ]]; then @@ -39,17 +41,19 @@ else HOST="${ARCH}-host-apple-darwin" fi - MONERO_LIBS=" -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib" - WOWNERO_LIBS=" -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib" + MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib" + WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib" - if [[ ! $(uname -m) == $ARCH ]]; then - PRC="arch -${ARCH}" - fi + if [[ ! $(uname -m) == $ARCH ]]; then + PRC="arch -${ARCH}" + else + PRC="" + fi - pushd ../monero_c - $PRC ./build_single.sh ${COIN} ${HOST} $NPROC - unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz - popd + pushd ../monero_c + $PRC ./build_single.sh ${COIN} ${HOST} $NPROC + unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz + popd done done fi From 19c600ba10c4d72c984388073b0820e362c12bc6 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Sun, 18 Aug 2024 17:15:23 +0300 Subject: [PATCH 60/77] update macos build number minor fixes --- .../desktop_widgets/desktop_wallet_selection_dropdown.dart | 4 ++-- lib/src/screens/dashboard/edit_token_page.dart | 2 +- lib/src/screens/exchange_trade/exchange_trade_page.dart | 2 +- lib/src/screens/new_wallet/new_wallet_page.dart | 2 +- lib/src/screens/root/root.dart | 2 +- lib/src/screens/send/widgets/send_card.dart | 2 +- scripts/macos/app_env.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart index 94489a945..fd0eecac3 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart @@ -200,14 +200,14 @@ class _DesktopWalletSelectionDropDownState extends State { ), contractAddress: _contractAddressController.text, ); - if (context.mounted) { + if (mounted) { Navigator.pop(context); } } diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index 4d3334f9f..0766a4562 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -284,7 +284,7 @@ class ExchangeTradeState extends State { if (state is TransactionCommitted) { WidgetsBinding.instance.addPostFrameCallback((_) { - if (context.mounted) { + if (mounted) { showPopUp( context: context, builder: (BuildContext popupContext) { diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index cb451c056..471240877 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -95,7 +95,7 @@ class _WalletNameFormState extends State { if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) { - if (context.mounted) { + if (mounted) { showPopUp( context: context, builder: (_) { diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 8ce0ddde9..76c6c5cfd 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -219,7 +219,7 @@ class RootState extends State with WidgetsBindingObserver { void waitForWalletInstance(BuildContext context) { WidgetsBinding.instance.addPostFrameCallback((_) { - if (context.mounted) { + if (mounted) { _walletReactionDisposer = reaction( (_) => widget.appStore.wallet, (WalletBase? wallet) { diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 0a3de3e58..214d162ed 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -82,7 +82,7 @@ class SendCardState extends State with AutomaticKeepAliveClientMixin( context: context, builder: (BuildContext context) { diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 9487be2c8..342831d65 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -22,7 +22,7 @@ MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.12.4" -CAKEWALLET_BUILD_NUMBER=84 +CAKEWALLET_BUILD_NUMBER=85 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then From 5449b94ba42c4e60d8cfd2a55696ee0f288a767a Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Mon, 19 Aug 2024 16:06:57 +0200 Subject: [PATCH 61/77] Windows fix (#1624) * CW-488 Fix missing Wownero logo * Temporary fix for windows --- .../desktop_wallet_selection_dropdown.dart | 29 +++++++++---------- lib/store/settings_store.dart | 10 +++++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart index fd0eecac3..0dd3458b6 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart @@ -1,5 +1,4 @@ import 'package:another_flushbar/flushbar.dart'; -import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/desktop_dropdown_item.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -8,8 +7,9 @@ import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_widget.dart'; import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/store/settings_store.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; @@ -122,9 +122,7 @@ class _DesktopWalletSelectionDropDownState extends State( @@ -149,9 +147,7 @@ class _DesktopWalletSelectionDropDownState extends State _loadWallet(WalletListItem wallet) async { if (SettingsStoreBase.walletPasswordDirectInput) { - Navigator.of(context).pushNamed( - Routes.walletUnlockLoadable, + Navigator.of(context).pushNamed(Routes.walletUnlockLoadable, arguments: WalletUnlockArguments( callback: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { if (isAuthenticatedSuccessfully) { auth.close(); setState(() {}); } - }, walletName: wallet.name, + }, + walletName: wallet.name, walletType: wallet.type)); return; } - widget._authService.authenticateAction(context, - onAuthSuccess: (isAuthenticatedSuccessfully) async { - if (!isAuthenticatedSuccessfully) { - return; - } + widget._authService.authenticateAction( + context, + onAuthSuccess: (isAuthenticatedSuccessfully) async { + if (!isAuthenticatedSuccessfully) return; try { if (mounted) { diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index df2c7767f..ee145195c 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -1549,8 +1549,14 @@ abstract class SettingsStoreBase with Store { final macInfo = await deviceInfoPlugin.macOsInfo; deviceName = macInfo.computerName; } else if (Platform.isWindows) { - final windowsInfo = await deviceInfoPlugin.windowsInfo; - deviceName = windowsInfo.productName; + try { + final windowsInfo = await deviceInfoPlugin.windowsInfo; + deviceName = windowsInfo.productName; + } catch (e) { + print(e); + print('likely digitalProductId is null wait till https://github.com/fluttercommunity/plus_plugins/pull/3188 is merged'); + deviceName = "Windows Device"; + } } return deviceName; From 49d2560eb94d97285fe9f594f7643f4c2265006e Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Wed, 21 Aug 2024 15:49:47 -0400 Subject: [PATCH 62/77] fix (#1633) --- cw_bitcoin/lib/electrum_wallet.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 2d0b989d7..047e5551d 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -1005,7 +1005,7 @@ abstract class ElectrumWalletBase if (estimatedTx.inputPrivKeyInfos.isEmpty) { error += "\nNo private keys generated."; } else { - error += "\nAddress: ${utxo.ownerDetails.address.toAddress()}"; + error += "\nAddress: ${utxo.ownerDetails.address.toAddress(network)}"; key = estimatedTx.inputPrivKeyInfos.firstWhereOrNull((element) { final elemPubkey = element.privkey.getPublic().toHex(); From c0e0cf02aa582e477d0602156a3b01fb4c9db771 Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 21 Aug 2024 19:31:20 -0300 Subject: [PATCH 63/77] Fix testnet (#1632) * fix: failed connection and misc changes * default isTestnet to false --------- Co-authored-by: OmarHatem --- cw_bitcoin/lib/electrum.dart | 6 ++++-- cw_bitcoin/lib/electrum_wallet.dart | 12 +++++++----- cw_core/lib/wallet_base.dart | 2 +- lib/bitcoin/cw_bitcoin.dart | 2 +- lib/view_model/node_list/node_list_view_model.dart | 2 +- lib/view_model/transaction_details_view_model.dart | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index 28043d0c0..6ac8edd1a 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -119,9 +119,11 @@ class ElectrumClient { _setConnectionStatus(ConnectionStatus.failed); }, onDone: () { - socket = null; unterminatedString = ''; - if (host == socket?.address.host) _setConnectionStatus(ConnectionStatus.disconnected); + if (host == socket?.address.host) { + socket = null; + _setConnectionStatus(ConnectionStatus.disconnected); + } }, cancelOnError: true, ); diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 047e5551d..da91a29e4 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -42,7 +42,6 @@ import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:rxdart/subjects.dart'; -import 'package:http/http.dart' as http; import 'package:sp_scanner/sp_scanner.dart'; part 'electrum_wallet.g.dart'; @@ -89,7 +88,7 @@ abstract class ElectrumWalletBase } : {}), this.unspentCoinsInfo = unspentCoinsInfo, - this.isTestnet = network == BitcoinNetwork.testnet, + this.isTestnet = !network.isMainnet, this._mnemonic = mnemonic, super(walletInfo) { this.electrumClient = electrumClient ?? ElectrumClient(); @@ -182,7 +181,7 @@ abstract class ElectrumWalletBase BasedUtxoNetwork network; @override - bool? isTestnet; + bool isTestnet; bool get hasSilentPaymentsScanning => type == WalletType.bitcoin; @@ -426,7 +425,7 @@ abstract class ElectrumWalletBase await updateTransactions(); await updateAllUnspents(); await updateBalance(); - updateFeeRates(); + await updateFeeRates(); _updateFeeRateTimer ??= Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates()); @@ -448,6 +447,8 @@ abstract class ElectrumWalletBase final feeRates = await electrumClient.feeRates(network: network); if (feeRates != [0, 0, 0]) { _feeRates = feeRates; + } else if (isTestnet) { + _feeRates = [1, 1, 1]; } } @@ -1944,8 +1945,9 @@ abstract class ElectrumWalletBase Future _setInitialHeight() async { if (_chainTipUpdateSubject != null) return; + _currentChainTip = await getUpdatedChainTip(); + if ((_currentChainTip == null || _currentChainTip! == 0) && walletInfo.restoreHeight == 0) { - await getUpdatedChainTip(); await walletInfo.updateRestoreHeight(_currentChainTip!); } diff --git a/cw_core/lib/wallet_base.dart b/cw_core/lib/wallet_base.dart index 14ba898a7..f55816bb7 100644 --- a/cw_core/lib/wallet_base.dart +++ b/cw_core/lib/wallet_base.dart @@ -95,5 +95,5 @@ abstract class WalletBase verifyMessage(String message, String signature, {String? address = null}); - bool? isTestnet; + bool isTestnet = false; } diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index e87773f97..5a71e3549 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -516,7 +516,7 @@ class CWBitcoin extends Bitcoin { @override bool isTestnet(Object wallet) { final bitcoinWallet = wallet as ElectrumWallet; - return bitcoinWallet.isTestnet ?? false; + return bitcoinWallet.isTestnet; } @override diff --git a/lib/view_model/node_list/node_list_view_model.dart b/lib/view_model/node_list/node_list_view_model.dart index ea1dd574e..2721fd7b3 100644 --- a/lib/view_model/node_list/node_list_view_model.dart +++ b/lib/view_model/node_list/node_list_view_model.dart @@ -52,7 +52,7 @@ abstract class NodeListViewModelBase with Store { switch (_appStore.wallet!.type) { case WalletType.bitcoin: - if (_appStore.wallet!.isTestnet == true) { + if (_appStore.wallet!.isTestnet) { node = getBitcoinTestnetDefaultElectrumServer(nodes: _nodeSource)!; } else { node = getBitcoinDefaultElectrumServer(nodes: _nodeSource)!; diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index ef6474974..18715e508 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -152,7 +152,7 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.monero: return 'https://monero.com/tx/${txId}'; case WalletType.bitcoin: - return 'https://mempool.space/${wallet.isTestnet == true ? "testnet/" : ""}tx/${txId}'; + return 'https://mempool.space/${wallet.isTestnet ? "testnet/" : ""}tx/${txId}'; case WalletType.litecoin: return 'https://blockchair.com/litecoin/transaction/${txId}'; case WalletType.bitcoinCash: From 3cefe3b28847000d29fa97fb29415c20d51b8605 Mon Sep 17 00:00:00 2001 From: cyan Date: Thu, 22 Aug 2024 02:36:11 +0200 Subject: [PATCH 64/77] update setup-java and switch distribution (#1629) --- .github/workflows/cache_dependencies.yml | 5 +++-- .github/workflows/pr_test_build_android.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 902a44a42..c0042bf5c 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -23,9 +23,10 @@ jobs: docker-images: true - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: - java-version: "17.x" + distribution: "temurin" + java-version: "17" - name: Configure placeholder git details run: | git config --global user.email "CI@cakewallet.com" diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index 5dbf1610f..b7b2aaa71 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -39,9 +39,10 @@ jobs: docker-images: true - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: - java-version: "17.x" + distribution: "temurin" + java-version: "17" - name: Configure placeholder git details run: | git config --global user.email "CI@cakewallet.com" From 799ddcdc6faa0e094f46bd1c37b068d3d8d721e3 Mon Sep 17 00:00:00 2001 From: Jorge Date: Thu, 22 Aug 2024 02:45:16 +0200 Subject: [PATCH 65/77] Fix Spanish string (#1622) --- res/values/strings_es.arb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 02d17ac96..c308f045a 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -387,7 +387,7 @@ "nano_current_rep": "Representante actual", "nano_gpt_thanks_message": "¡Gracias por usar nanogpt! ¡Recuerde regresar al navegador después de que se complete su transacción!", "nano_pick_new_rep": "Elija un nuevo representante", - "nanogpt_subtitle": "Todos los modelos más nuevos (GPT-4, Claude). \\ Nno suscripción, pague con cripto.", + "nanogpt_subtitle": "Todos los modelos más nuevos (GPT-4, Claude). \\nSin suscripción, pague con cripto.", "narrow": "Angosto", "new_first_wallet_text": "Mantenga fácilmente su criptomoneda segura", "new_node_testing": "Prueba de nuevos nodos", @@ -894,4 +894,4 @@ "you_will_get": "Convertir a", "you_will_send": "Convertir de", "yy": "YY" -} \ No newline at end of file +} From 92f87a53661b5b105c14e5fc27b6664e76083b5f Mon Sep 17 00:00:00 2001 From: smgthbusr <85361717+smgthbusr@users.noreply.github.com> Date: Thu, 22 Aug 2024 02:47:30 +0200 Subject: [PATCH 66/77] Add Armenian language (#1623) * Add Armenian strings * Add Armenian * Add Armenian flag --- assets/images/flags/arm.png | Bin 0 -> 4846 bytes lib/entities/language_service.dart | 2 + res/values/strings_hy.arb | 897 +++++++++++++++++++++++++++++ 3 files changed, 899 insertions(+) create mode 100644 assets/images/flags/arm.png create mode 100644 res/values/strings_hy.arb diff --git a/assets/images/flags/arm.png b/assets/images/flags/arm.png new file mode 100644 index 0000000000000000000000000000000000000000..7bdabd4ee76f5e86f5aa3c8722a2867cabe683dc GIT binary patch literal 4846 zcmeHLdsGuw8lQlVh))oFu%ID6z{ez$WI~cLK@cLu5}=R+L>KKOGYPYKk^~Y|gvFIA zzN?m2DPpVCg7^Zpt8Enl5sR-y>hV#ndd|YOqQ}RsRz&wsc<=U{J)X1uk8p18H~0R& z-~I0Ie)of6T|!*+XfJ;+2!ci{Vxkg3KN~cE<}mPG^VduN0^JodRiRTTWGlshR4Z!|Gx4j+MA>A0-hsW@MMuWZ>G(NC> zL0=9U^7y0O1QwseLpTC4@JIM4hKMm9%Hks!ieh{etj{Rz zi-=}=vw60*e8E{HB{;Uk?+Llnqxox)SzjpsaK~APl*`!8p_DBCOWqIye;xwT<5ah z-t2ra#rYV@t-7G93TEuzNfL>QprU1duaoJzagpp_8p`C(pC7X}DSqyuNUOh&UEbII6lUJTguFqh48LmUPfI~C+n zq{T+EP!7sLV7ZIR;Oq-UJXOU*dwEh%?w%6a9X*0UF zLuk3Aku(9Q9jwY5uq1usdOc_f^pwf!_5xxLKsqR0pI8H8qi5XP=^qGi@8unU?%BH= z3{XlX7G=?9(%~thWNdnUjId}a0&|-@F@f_?5ef?ggak(UJOUQ;a0C_!gd#+PkOBdY z_oGsn?GD_mC21-^&Y=L0MkLXaJYguT6Z3R{LL`7CT2umSg+f9r2$kSsT-T2x-bR6} z#Et!aQK7MsdqG0NDzRkwFq39b`? zJMbvnK?2g=I;`rc!*dWmhIEBb(`wLpLmb{@h}*WH_DIITJ?aO z$no;`4V%92xaK#iK<;Tj4abOUkL1V;BA%R;sJ5(q;IiDSX%o$SU1q8&-eClp3Mu4q KQ3n@%kpFL7qruVu literal 0 HcmV?d00001 diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index 23d27dd38..bb60c5cce 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -30,6 +30,7 @@ class LanguageService { 'yo': 'Yorùbá (Yoruba)', 'ha': 'Hausa Najeriya (Nigeria)', 'tl': 'Filipino (Tagalog)' + 'hy': 'Հայերեն (Armenian)', }; static const Map localeCountryCode = { @@ -59,6 +60,7 @@ class LanguageService { 'yo': 'nga', 'ha': 'hau', 'tl': 'phl' + 'hy': 'arm' }; static final list = {}; diff --git a/res/values/strings_hy.arb b/res/values/strings_hy.arb new file mode 100644 index 000000000..826bfa99a --- /dev/null +++ b/res/values/strings_hy.arb @@ -0,0 +1,897 @@ +{ + "about_cake_pay": "Cake Pay-ը Ձեզ թույլ է տալիս հեշտությամբ գնել նվեր քարտեր վիրտուալ ակտիվներով, որոնք անմիջապես ծախսվում են ԱՄՆ-ի 150,000-ից ավելի առևտրականների մոտ:", + "account": "Հաշիվ", + "accounts": "Հաշիվներ", + "accounts_subaddresses": "Հաշիվներ և ենթահասցեներ", + "activate": "Ակտիվացնել", + "active": "Ակտիվ", + "active_cards": "Ակտիվ քարտեր", + "activeConnectionsPrompt": "Ակտիվ կապերը կհայտնվեն այստեղ", + "add": "Ավելացնել", + "add_contact": "Ավելացնել կոնտակտ", + "add_contact_to_address_book": "Ուզում եք ավելացնել այս կոնտակտը Ձեր հասցեների գրքում?", + "add_custom_node": "Ավելացնել նոր պատվերով հանգույց", + "add_custom_redemption": "Ավելացնել պատվերով փրկագնում", + "add_fund_to_card": "Ավելացնել նախավճար քարտերի վրա (մինչև ${value})", + "add_new_node": "Ավելացնել նոր հանգույց", + "add_new_word": "Ավելացնել նոր բառ", + "add_receiver": "Ավելացնել ևս մեկ ստացող (ընտրովի)", + "add_secret_code": "Կամ ավելացրեք այս գաղտնի կոդը վավերացնող հավելվածում", + "add_tip": "Ավելացնել Թեյավճար", + "add_token_disclaimer_check": "Ես հաստատել եմ token-ի պայմանագրի հասցեն և տեղեկատվությունը վստահելի աղբյուրի օգտագործմամբ: Վնասակար կամ սխալ տեղեկատվության ավելացումը կարող է հանգեցնել միջոցների կորստի:", + "add_token_warning": "Մի խմբագրեք կամ ավելացրեք token-ներ, ինչպես կոչ են անում խարդախները:\nՄիշտ հաստատեք Token-ների հասցեները վստահելի աղբյուրներով:", + "add_value": "Ավելացնել արժեք", + "address": "Հասցե", + "address_book": "Հասցեագիրք", + "address_book_menu": "Հասցեագիրք", + "address_detected": "Հասցեն հայտնաբերված է", + "address_from_domain": "Այս հասցեն է ${domain} Unstoppable Domains-ից", + "address_from_yat": "Այս հասցեն է ${emoji} Yat-ից", + "address_label": "Հասցեի պիտակ", + "address_remove_contact": "Հեռացնել կոնտակտը", + "address_remove_content": "Վստահ եք, որ ուզում եք հեռացնել ընտրված կոնտակտը?", + "addresses": "Հասցեներ", + "advanced_settings": "Առաջադեմ կարգավորումներ", + "aggressive": "Ագրեսիվ", + "agree": "Համաձայն եմ", + "agree_and_continue": "Համաձայն եմ և շարունակեմ", + "agree_to": "Ստեղծելով հաշիվ դուք համաձայնում եք ", + "all": "Բոլորը", + "all_trades": "Բոլոր գործարքները", + "all_transactions": "Բոլոր գործառնությունները", + "alphabetical": "Այբբենական", + "already_have_account": "Արդեն ունե՞ք հաշիվ?", + "always": "Միշտ", + "amount": "Քանակ՝ ", + "amount_is_below_minimum_limit": "Ձեր հաշվի մնացորդը կազմում է ավելի քիչ, քան փոխանակման համար անհրաժեշտ նվազագույն վճարը (${min})", + "amount_is_estimate": "Ստացվող գումարը մոտավոր է", + "amount_is_guaranteed": "Ստացվող գումարը երաշխավորված է", + "and": "և", + "anonpay_description": "${type} ստեղծել: Ստացողը կարող է ${method} ցանկացած աջակցվող կրիպտոարժույթով, և դուք կստանաք միջոցներ այս դրամապանակում։", + "apk_update": "APK թարմացում", + "approve": "Հաստատել", + "arrive_in_this_address": "${currency} ${tag}կժամանի այս հասցեում", + "ascending": "Աճող", + "ask_each_time": "Հարցնել ամեն անգամ", + "auth_store_ban_timeout": "արգելափակման ժամանակ", + "auth_store_banned_for": "Արգելափակված է ", + "auth_store_banned_minutes": " րոպե", + "auth_store_incorrect_password": "Սխալ PIN", + "authenticated": "Վավերացված", + "authentication": "Վավերացում", + "auto_generate_addresses": "Ավտոմատ հասցեներ ստեղծել", + "auto_generate_subaddresses": "Ավտոմատ ենթահասցեներ ստեղծել", + "automatic": "Ավտոմատ", + "available_balance": "Հասանելի մնացորդ", + "available_balance_description": "«Հասանելի մնացորդ» կամ «Հաստատված մնացորդ»-ը միջոցներ են, որոնք կարող են անմիջապես ծախսվել։ Եթե միջոցները հայտնվում են ստորին մնացորդում, բայց ոչ վերևի մնացորդում, ապա դուք պետք է մի քանի րոպե սպասեք, մինչև ներգաղթող միջոցները ավելի ցանցի հաստատումներ ստանան։ Հաստատումներ ստանալուց հետո դրանք կարող են ծախսվել։", + "avg_savings": "Միջին խնայողություն", + "awaitDAppProcessing": "Խնդրեմ սպասեք, մինչև դիմումը կավարտի մշակումը։", + "awaiting_payment_confirmation": "Վճարման հաստատման սպասում", + "background_sync_mode": "Հետին պլանի համաժամացման ռեժիմ", + "backup": "Կրկնօրինակ", + "backup_file": "Կրկնօրինակի ֆայլ", + "backup_password": "Կրկնօրինակի գաղտնաբառ", + "balance": "Հաշվեկշիռ", + "balance_page": "Հաշվեկշռի էջ", + "bill_amount": "Հաշիվը", + "billing_address_info": "Եթե խնդրեն հաշվեվճարի հասցե, ապա տրամադրեք ձեր առաքման հասցեն", + "biometric_auth_reason": "Սկանավեք ձեր մատնահետքը նույնականացման համար", + "bitcoin_dark_theme": "Bitcoin մութ տեսք", + "bitcoin_light_theme": "Bitcoin պայծառ տեսք", + "bitcoin_payments_require_1_confirmation": "Bitcoin վճարումները պահանջում են 1 հաստատում, որը կարող է տևել 20 րոպե կամ ավելի: Շնորհակալություն ձեր համբերության համար: Դուք էլ. նամակ կստանաք, երբ վճարումը հաստատվի։", + "block_remaining": "1 Բլոկ է մնացել", + "Blocks_remaining": "${status} Բլոկ է մնացել", + "bluetooth": "Bluetooth", + "bright_theme": "Պայծառ", + "bump_fee": "Բարձրացնել միջնորդավճարը", + "buy": "Գնել", + "buy_alert_content": "Այժմ մենք աջակցում ենք միայն Bitcoin, Ethereum, Litecoin և Monero արժույթների գնմանը: Խնդրում ենք ստեղծել կամ վերածանցել Bitcoin, Ethereum, Litecoin կամ Monero արժույթների հաշիվը։", + "buy_bitcoin": "Գնել Bitcoin", + "buy_now": "Գնել հիմա", + "buy_provider_unavailable": "Տվյալ պահին մատակարարը անհասանելի է։", + "buy_with": "Գնել", + "by_cake_pay": "Cake Pay-ով", + "cake_2fa_preset": "Cake 2FA նախապես կանխորոշված", + "cake_dark_theme": "Cake մութ տեսք", + "cake_pay_account_note": "Գրանցվեք միայն էլ. փոստի միջոցով, որպեսզի տեսնեք և գնեք քարտեր: Որոշ քարտեր հասանելի են նույնիսկ զեղչով:", + "cake_pay_learn_more": "Վայրկյանապես գնեք և փոխանակեք նվեր քարտերը հավելվածում:\nՍահեցրեք ձախից աջ՝ ավելին իմանալու համար:", + "cake_pay_save_order": "Քարտը պետք է ուղարկված լինի ձեր էլ. փոստին 1 աշխատանքային օրվա ընթացքում \n Պահպանեք Ձեր պատվերի համարը՝", + "cake_pay_subtitle": "Գնեք համաշխարհային նախավճարային քարտեր և նվեր քարտեր", + "cake_pay_web_cards_subtitle": "Գնեք համաշխարհային նախավճարային քարտեր և նվեր քարտեր", + "cake_pay_web_cards_title": "Cake Pay Վեբ Քարտեր", + "cake_wallet": "Cake Գաղտնապահոց", + "cakepay_prepaid_card": "CakePay Նախավճարային Դեբետային Քարտ", + "camera_consent": "Ձեր տեսախցիկը կօգտագործվի ${provider}-ի կողմից ինքնությունը հաստատելու նպատակով: Խնդրում ենք ծանոթանալ նրանց Գաղտնիության Քաղաքականության հետ:", + "camera_permission_is_required": "Տեսախցիկի թույլտվություն է պահանջվում: \nԽնդրում ենք այն ակտիվացնել հավելվածի կարգավորումներից:", + "cancel": "Չեղարկել", + "card_address": "Հասցե։", + "cardholder_agreement": "Քարտապանի Պայմանագիր", + "cards": "Քարտեր", + "chains": "Շղթաներ", + "change": "Փոփոխել", + "change_backup_password_alert": "Ձեր նախորդ կրկնօրինակ ֆայլերը չեն հասանելի լինի ներմուծել նոր կրկնօրինակի գաղտնաբառով: Նոր կրկնօրինակի գաղտնաբառը կօգտագործվի միայն նոր կրկնօրինակ ֆայլերի համար: Վստահ եք, որ ցանկանում եք փոխել կրկնօրինակի գաղտնաբառը?", + "change_currency": "Փոխել արժույթը", + "change_current_node": "Վստահ եք, որ ցանկանում եք փոխել ընթացիկ հանգույցը ${node}?", + "change_current_node_title": "Փոխել ընթացիկ հանգույցը", + "change_exchange_provider": "Փոխել փոխանակման մատակարարին", + "change_language": "Փոխել լեզուն", + "change_language_to": "Փոխել լեզուն ${language}?", + "change_password": "Փոխել գաղտնաբառը", + "change_rep": "Փոխել ներկայացուցչին", + "change_rep_message": "Վստահ եք, որ ցանկանում եք փոխել ներկայացուցիչներին?", + "change_rep_successful": "Ներկայացուցչի փոփոխությունը հաջողությամբ կատարվեց", + "change_wallet_alert_content": "Ցանկանում եք փոխել ընթացիկ դրամապանակը ${wallet_name}?", + "change_wallet_alert_title": "Փոխել ընթացիկ դրամապանակը", + "choose_account": "Ընտրեք հաշիվը", + "choose_address": "\n\nԽնդրում ենք ընտրեք հասցեն", + "choose_card_value": "Ընտրեք քարտի արժեք", + "choose_derivation": "Ընտրեք դրամապանակի ածանցում", + "choose_from_available_options": "Ընտրեք առկա տարբերակներից", + "choose_one": "Ընտրեք մեկը", + "choose_relay": "Խնդրում ենք ընտրեք փոխանցման կետ", + "choose_wallet_currency": "Խնդրում ենք ընտրեք դրամապանակի արժույթը", + "clear": "Մաքրել", + "clearnet_link": "Բաց ցանցի հղում", + "close": "Փակել", + "coin_control": "Մետաղադրամի վերահսկում (ըստ ցանկության)", + "cold_or_recover_wallet": "Ավելացնել սառը դրամապանակ կամ վերականգնել թղթային դրամապանակ", + "color_theme": "Գույների տեսք", + "commit_transaction_amount_fee": "Հաստատել գործարքը\nՍկզբնական գումար. ${amount}\nՄիջնորդավճար. ${fee}", + "confirm": "Հաստատել", + "confirm_delete_template": "Այս գործողությունը կջնջի այս ձևանմուշը: Ցանկանու՞մ եք շարունակել։", + "confirm_delete_wallet": "Այս գործողությունը կջնջի այս դրամապանակը: Ցանկանու՞մ եք շարունակել։", + "confirm_fee_deduction": "Հաստատեք միջնորդավճար հանումը", + "confirm_fee_deduction_content": "Դուք համաձայն եք միջնորդավճար հանել արդյունքից?", + "confirm_sending": "Հաստատեք ուղարկումը", + "confirm_silent_payments_switch_node": "Ձեր ընթացիկ հանգույցը չի աջակցում Լուռ վճարումներին\nCake Wallet-ը կանցնի համատեղելի հանգույց, միայն սկանավորման համար", + "confirmations": "Հաստատումներ", + "confirmed": "Հաստատված մնացորդ", + "confirmed_tx": "Հաստատված", + "congratulations": "Շնորհավորանք!", + "connect_an_existing_yat": "Միացրեք գոյություն ունեցող Yat-ը", + "connect_yats": "Միացրեք Yat-ները", + "connect_your_hardware_wallet": "Միացրեք ձեր ապարատային դրամապանակը Bluetooth-ի կամ USB-ի միջոցով", + "connect_your_hardware_wallet_ios": "Միացրեք ձեր ապարատային դրամապանակը Bluetooth-ի միջոցով", + "connection_sync": "Կապ և սինխրոնիզացիա", + "connectWalletPrompt": "Միացրեք ձեր դրամապանակը WalletConnect-ի միջոցով գործարքներ կատարելու համար", + "contact": "Կոնտակտ", + "contact_list_contacts": "Կոնտակտներ", + "contact_list_wallets": "Իմ դրամապանակներ", + "contact_name": "Կոնտակտի անուն", + "contact_support": "Հետադարձ կապ", + "continue_text": "Շարունակել", + "contractName": "Գործարքի անուն", + "contractSymbol": "Գործարքի Նշան", + "copied_key_to_clipboard": "${key} պատճենված է տեքստի բուֆերում", + "copied_to_clipboard": "Պատճենված է տեքստի բուֆերում", + "copy": "Պատճենել", + "copy_address": "Պատճենել հասցեն", + "copy_id": "Պատճենել ID", + "copyWalletConnectLink": "Պատճենել WalletConnect հղումը dApp-ից և տեղադրել այստեղ", + "countries": "Երկրներ", + "create_account": "Ստեղծել հաշիվ", + "create_backup": "Ստեղծել կրկնօրինակ", + "create_donation_link": "Ստեղծել նվիրատվության հղում", + "create_invoice": "Ստեղծել հաշիվ-ապրանքագիր", + "create_new": "Ստեղծել նոր դրամապանակ", + "create_new_account": "Ստեղծել նոր հաշիվ", + "creating_new_wallet": "Նոր դրամապանակ ստեղծվում է", + "creating_new_wallet_error": "Սխալ: ${description}", + "creation_date": "Ստեղծման ամսաթիվ", + "custom": "Պատվերով", + "custom_drag": "Պատվերով (Պահել և Գցել)", + "custom_redeem_amount": "Պատվերով Փրկագնման Գումար", + "custom_value": "Պատվերով Արժեք", + "dark_theme": "Մութ", + "debit_card": "Դեբետային քարտ", + "debit_card_terms": "Ձեր վճարային քարտի համարի (և ձեր վճարային քարտի համարի համապատասխան վկայականներ) պահպանումն ու օգտագործումը այս թվային դրամապանակում ենթակա են վճարային քարտ թողարկող կողմի գործող պայմանների և պայմանագրի", + "decimal_places_error": "Խմբակային տեղերի սխալ", + "decimals_cannot_be_zero": "Խմբակային տեղերը չեն կարող լինել զրո", + "default_buy_provider": "Լռելյայն գնման մատակարար", + "default_sell_provider": "Լռելյայն վաճառքի մատակարար", + "delete": "Ջնջել", + "delete_account": "Ջնջել հաշիվը", + "delete_wallet": "Ջնջել դրամապանակը", + "delete_wallet_confirm_message": "Դուք վստահ եք, որ ուզում եք ջնջել ${wallet_name} դրամապանակը?", + "deleteConnectionConfirmationPrompt": "Դուք վստահ եք, որ ուզում եք ջնջել կապը", + "denominations": "Անվանակարգեր", + "descending": "Նվազող", + "description": "Նկարագրություն", + "destination_tag": "Նպատակակետի պիտակ:", + "dfx_option_description": "Գնեք կրիպտոարժույթ EUR և CHF: Կորպորատիվ և մանրածախ հաճախորդների համար Եվրոպայում", + "didnt_get_code": "Չեք ստացել կոդը?", + "digit_pin": "-նիշ ՊԻՆ", + "digital_and_physical_card": " թվային և ֆիզիկական նախավճարային դեբետային քարտ", + "disable": "Անջատել", + "disable_bulletin": "Անջատել ծառայության վիճակի տեղեկագիրը", + "disable_buy": "Անջատել գնում գործողությունը", + "disable_cake_2fa": "Անջատել Cake 2FA", + "disable_exchange": "Անջատել փոխանակումը", + "disable_fiat": "Անջատել ֆիատ", + "disable_sell": "Անջատել վաճառք գործողությունը", + "disableBatteryOptimization": "Անջատել մարտկոցի օպտիմիզացիան", + "disableBatteryOptimizationDescription": "Դուք ցանկանում եք անջատել մարտկոցի օպտիմիզացիան ֆոնային համաժամացման ավելի ազատ և հարթ ընթացքի համար?", + "disabled": "Անջատված", + "discount": "Խնայեք ${value}%", + "display_settings": "Ցուցադրման կարգավորումներ", + "displayable": "Ցուցադրվող", + "do_not_have_enough_gas_asset": "Դուք չունեք բավարար ${currency} տրանզակցիան կատարելու համար ընթացիկ բլոկչեյն ցանցի պայմաններում: Դուք պետք է ունենաք ավելի շատ ${currency} blockchain ցանցի միջնորդավճարները վճարելու համար, նույնիսկ եթե դուք այլ ակտիվ եք ուղարկում:", + "do_not_send": "Մի ուղարկեք", + "do_not_share_warning_text": "Մի կիսեք այս տեղեկատվությունը որևէ մեկի հետ, այդ թվում նաև աջակցության հետ: \n\nՁեր միջոցները կարող են գողանալ կորցնել!", + "do_not_show_me": "Մի ցուցադրեք ինձ նորից", + "domain_looks_up": "Դոմեյնի որոնում", + "donation_link_details": "Նվիրատվության հղումի մանրամասներ", + "e_sign_consent": "Էլեկտրոնային ստորագրության համաձայնություն", + "edit": "Խմբագրել", + "edit_backup_password": "Փոփոխել Կրկնօրինակի Գաղտնաբառը", + "edit_node": "Փոփոխել հանգույց", + "edit_token": "Փոփոխել տոկեն", + "electrum_address_disclaimer": "Մենք ստեղծում ենք նոր հասցե ամեն անգամ, երբ դուք օգտագործում եք այն, բայց նախորդ հասցեները շարունակում են աշխատել", + "email_address": "Էլ. փոստի հասցե", + "enable_replace_by_fee": "Միացնել փոխարինումը միջնորդավճարով", + "enable_silent_payments_scanning": "Միացնել Լուռ Վճարումների սկանավորումը", + "enabled": "Միացված", + "enter_amount": "Մուտքագրեք գումար", + "enter_backup_password": "Մուտքագրեք կրկնօրինակի գաղտնաբառը", + "enter_code": "Մուտքագրեք կոդը", + "enter_seed_phrase": "Մուտքագրեք սերմի արտահայտությունը", + "enter_totp_code": "Մուտքագրեք TOTP կոդը", + "enter_wallet_password": "Մուտքագրեք դրամապանակի գաղտնաբառը", + "enter_your_note": "Մուտքագրեք ձեր նշումը…", + "enter_your_pin": "Մուտքագրեք ձեր PIN-ը", + "enter_your_pin_again": "Մուտքագրեք ձեր PIN-ը կրկին", + "enterTokenID": "Մուտքագրեք Token ID֊ն", + "enterWalletConnectURI": "Մուտքագրեք WalletConnect URI", + "error": "Սխալ", + "error_dialog_content": "Օպս, մենք սխալ ենք ստացել: \n\nԽնդրում ենք ուղարկել սխալի հաշվետվությունը մեր աջակցության թիմին ծրագիրը բարելավելու համար:", + "error_text_account_name": "Հաշվի անունը կարող է պարունակել միայն տառեր և թվեր և պետք է լինի 1-15 նիշ", + "error_text_address": "Դրամապանակի հասցեն պետք է համապատասխանի կրիպտոարժույթի տեսակին", + "error_text_amount": "Գումարը կարող է պարունակել միայն թվեր", + "error_text_contact_name": "Կոնտակտի անունը չի կարող պարունակել ` , '' \" սիմվոլներ և պետք է լինի 1-32 նիշ", + "error_text_crypto_currency": "Կոտորակային մասը պետք է լինի 12 նիշից ցածր կամ հավասար", + "error_text_fiat": "Գումարը չի կարող գերազանցել մնացորդը: Կոտորակային մասը պետք է լինի 2 նիշից ցածր կամ հավասար", + "error_text_input_above_maximum_limit": "Գումարը ավելի է, քան առավելագույնը", + "error_text_input_below_minimum_limit": "Գումարը ցածր է, քան նվազագույնը", + "error_text_keys": "Դրամապանակի բանալիները կարող են պարունակել միայն 64 նիշ հեքսային կոդով", + "error_text_limits_loading_failed": "Առևտրի համար ${provider} չի ստեղծվել: Սահմանների բեռնում ձախողվել է", + "error_text_maximum_limit": "Առևտրի համար ${provider} չի ստեղծվել: Գումարը ավելի է, քան առավելագույն ${max} ${currency}", + "error_text_minimal_limit": "Առևտրի համար ${provider} չի ստեղծվել: Գումարը ցածր է, քան նվազագույն ${min} ${currency}", + "error_text_node_address": "Խնդրում ենք մուտքագրել iPv4 հասցե", + "error_text_node_port": "Հանգույցի պորտը կարող է պարունակել միայն թվեր 0-65535 միջակայքում", + "error_text_node_proxy_address": "Խնդրում ենք մուտքագրել :<պորտ>, օրինակ 127.0.0.1:9050", + "error_text_payment_id": "Վճարման ID-ն կարող է պարունակել 16-64 նիշ հեքսային կոդով", + "error_text_subaddress_name": "Ենթահասցեի անունը չի կարող պարունակել , '' \" նշանները\nև պետք է լինի 1-ից 20 նիշ երկարությամբ", + "error_text_template": "Տեսակի անունը և հասցեն չեն կարող պարունակել , '' \" նշանները\nև պետք է լինի 1-ից 106 նիշ երկարությամբ", + "error_text_wallet_name": "Գաղտնաբառը կարող է պարունակել միայն տառեր, թվեր, _ - նշաններ\nև պետք է լինի 1-ից 33 նիշ երկարությամբ", + "error_text_xmr": "XMR արժեքը չի կարող գերազանցել հասանելի մնացորդը:\nԿոտորակային թվերի քանակը պետք է լինի 12-ից պակաս կամ հավասար", + "errorGettingCredentials": "Սխալ. ծանրաբեռնված վստահագրեր ստանալիս", + "errorSigningTransaction": "Սխալ է տեղի ունեցել գործարքը ստորագրելիս", + "estimated": "Գնահատված", + "estimated_new_fee": "Գնահատված նոր միջնորդավճար", + "estimated_receive_amount": "Գնահատված ստացված գումար", + "etherscan_history": "Etherscan պատմություն", + "event": "Իրադարձություն", + "events": "Իրադարձություններ", + "exchange": "Փոխել", + "exchange_incorrect_current_wallet_for_xmr": "Եթե դուք ցանկանում եք փոխանակել XMR ձեր Cake Wallet Monero հաշվեհամարից, խնդրում ենք անցնել ձեր Monero հաշվեհամարին", + "exchange_new_template": "Նոր տեսակ", + "exchange_provider_unsupported": "${providerName} այլևս չի ապահովվում", + "exchange_result_confirm": "Սեղմելով հաստատել, դուք կուղարկեք ${fetchingLabel} ${from} ձեր հաշվեհամարից ${walletName} հետևյալ հասցեին: Կամ կարող եք ուղարկել ձեր արտաքին հաշվեհամարից հետևյալ հասցեին/QR կոդին:\n\nԽնդրում ենք սեղմել հաստատել կամ վերադառնալ գումարը փոխելու համար", + "exchange_result_description": "Դուք պետք է ուղարկեք նվազագույնը ${fetchingLabel} ${from} հետևյալ էջում ցուցադրված հասցեին: Եթե դուք ուղարկում եք ավելի ցածր գումար, քան ${fetchingLabel} ${from} այն կարող է չփոխանակվել և չվերադարձվել", + "exchange_result_write_down_ID": "*Խնդրում ենք պատճենել կամ գրել ձեր ID-ն վերևում", + "exchange_result_write_down_trade_id": "Խնդրում ենք պատճենել կամ գրել առևտրի ID-ն շարունակելու համար", + "exchange_sync_alert_content": "Խնդրում ենք սպասել մինչև ձեր հաշվեհամարը համաժամացվի", + "expired": "Վավերականությունը լրացել է", + "expires": "Վավերականությունը լրանում է", + "expiresOn": "Վավերականությունը լրանում է", + "expiry_and_validity": "Վավերականություն և լրացում", + "export_backup": "Արտահանել կրկնօրինակը", + "extra_id": "Լրացուցիչ ID", + "extracted_address_content": "Դուք կուղարկեք գումար ${recipient_name}", + "failed_authentication": "Վավերացումը ձախողվեց. ${state_error}", + "faq": "Հաճախ տրվող հարցեր", + "features": "Հատկանիշներ", + "fetching": "Ստացվում է", + "fiat_api": "Fiat API", + "fiat_balance": "Fiat մնացորդ", + "field_required": "Այս դաշտը պարտադիր է", + "fill_code": "Խնդրում ենք լրացնել հաստատման կոդը ձեր էլեկտրոնային փոստում", + "filter_by": "Ֆիլտրել ըստ", + "first_wallet_text": "Հիանալի հաշվեհամար Monero, Bitcoin, Ethereum, Litecoin և Haven արժույթների համար", + "fixed_pair_not_supported": "Այս ֆիքսված զույգը չի ապահովվում ընտրված փոխանակման կետերում", + "fixed_rate": "Ֆիքսված փոխարժեք", + "fixed_rate_alert": "Դուք կկարողանաք մուտքագրել ստացվող գումարը, երբ ֆիքսված փոխարժեքի ռեժիմը միացված է: Դուք ցանկանում եք անցնել ֆիքսված փոխարժեքի ռեժիմին?", + "forgot_password": "Մոռացել եմ գաղտնաբառը", + "freeze": "Կասեցնել", + "frequently_asked_questions": "Հաճախ տրվող հարցեր", + "frozen": "Կասեցված", + "full_balance": "Լրիվ մնացորդ", + "generate_name": "Գեներացնել անուն", + "generating_gift_card": "Գեներացնում է նվեր քարտ", + "get_a": "Ստանալ ", + "get_card_note": " որը կարող եք լրացնել թվային արժույթներով: Հավելյալ տեղեկատվություն պետք չէ!", + "get_your_yat": "Ստանալ ձեր Yat", + "gift_card_amount": "Նվեր քարտի չափ", + "gift_card_balance_note": "Նվեր քարտերը մնացորդով կհայտնվեն այստեղ", + "gift_card_is_generated": "Նվեր քարտ գեներացված է", + "gift_card_number": "Նվեր քարտի համար", + "gift_card_redeemed_note": "Նվեր քարտերը, որ դուք գնել եք, կհայտնվեն այստեղ", + "gift_cards": "Նվեր քարտեր", + "gift_cards_unavailable": "Նվեր քարտերը հասանելի են միայն Monero, Bitcoin և Litecoin արժույթների համար", + "got_it": "Հասկացա", + "gross_balance": "Ընդհանուր մնացորդ", + "group_by_type": "Խմբավորել ըստ տեսակի", + "haven_app": "Haven ծրագիր", + "haven_app_wallet_text": "Հիանալի հաշվեհամար Haven համար", + "help": "Օգնություն", + "hidden_balance": "Թաքնված մնացորդ", + "hide_details": "Թաքցնել մանրամասները", + "high_contrast_theme": "Բարձր հակադրության տեսք", + "home_screen_settings": "Գլխավոր էկրանի կարգավորումներ", + "how_to_use": "Ինչպես օգտագործել", + "how_to_use_card": "Ինչպես օգտագործել այս քարտը", + "id": "ID: ", + "ignor": "Անտեսել", + "import": "Ներմուծել", + "importNFTs": "Ներմուծել NFT-ներ", + "in_store": "Տեղում", + "incoming": "Մուտքային", + "incorrect_seed": "Տեքստը սխալ է", + "inputs": "Մուտքեր", + "insufficient_lamport_for_tx": "Դուք չունեք բավարար SOL՝ գործարքն և գործարքի վարձը ծածկելու համար։ Խնդրում ենք ավելացնել ավելի շատ SOL ձեր դրամապանակում կամ նվազեցնել ուղարկվող SOL-ի քանակը։", + "insufficient_lamports": "Դուք չունեք բավարար SOL՝ գործարքն և գործարքի վարձը ծածկելու համար։ Ձեզ անհրաժեշտ է առնվազն ${solValueNeeded} SOL։ Խնդրում ենք ավելացնել ավելի շատ SOL ձեր դրամապանակում կամ նվազեցնել ուղարկվող SOL-ի քանակը։", + "insufficientFundsForRentError": "Ձեր մնացորդը բավարար չէ վարձակալության համար: Խնդրում ենք ավելացնել մնացորդը կամ նվազեցնել ուղարկվող գումարը", + "introducing_cake_pay": "Ներկայացնում ենք Cake Pay!", + "invalid_input": "Սխալ մուտք", + "invalid_password": "Սխալ գաղտնաբառ", + "invoice_details": "Հաշիվ-ապրանքագրի մանրամասներ", + "is_percentage": "կազմում է", + "last_30_days": "Վերջին 30 օրը", + "learn_more": "Տեղեկանալ ավելին", + "ledger_connection_error": "Չկարողացանք կապ հաստատել Ledger-ի հետ: Խնդրում ենք փորձել նորից", + "ledger_error_device_locked": "Ledger-ը արգելափակված է", + "ledger_error_tx_rejected_by_user": "Գործարքը մերժված է օգտատերի կողմից", + "ledger_error_wrong_app": "Խնդրում ենք համոզվել, որ դուք բացել եք ճիշտ ծրագիրը ձեր Ledger-ում", + "ledger_please_enable_bluetooth": "Խնդրում ենք միացնել Bluetooth-ը ձեր Ledger-ը հայտնաբերելու համար", + "light_theme": "Լուսավոր", + "load_more": "Բեռնել ավելին", + "loading_your_wallet": "Ձեր հաշվեհամարը բեռնում է", + "login": "Մուտք", + "logout": "Ելք", + "low_fee": "Ցածր միջնորդավճար", + "low_fee_alert": "Դուք ներկայումս օգտագործում եք ցածր ցանցային միջնորդավճար: Սա կարող է հանգեցնել երկար սպասելու ժամանակի, տարբեր փոխարժեքների կամ չեղարկված առևտրի: Մենք առաջարկում ենք սահմանել ավելի բարձր միջնորդավճար ավելի լավ փորձ ունենալու համար", + "manage_nodes": "Կարգավորել հանգույցները", + "manage_pow_nodes": "Կարգավորել PoW հանգույցները", + "manage_yats": "Կառավարել Yats", + "mark_as_redeemed": "Նշել որպես մարված", + "market_place": "Շուկա", + "matrix_green_dark_theme": "Matrix Կանաչ Մութ տեսք", + "max_amount": "Առավելագույն գումար: ${value}", + "max_value": "Առավելագույն արժեք: ${value} ${currency}", + "memo": "Մեմո:", + "message": "Հաղորդագրություն", + "message_verified": "Հաղորդագրությունը հաջողությամբ հաստատվեց", + "methods": "Մեթոդներ", + "min_amount": "Նվազը: ${value}", + "min_value": "Նվազը: ${value} ${currency}", + "minutes_to_pin_code": "${minute} րոպե", + "mm": "ԱԱ", + "modify_2fa": "Փոփոխել Cake 2FA", + "monero_com": "Monero.com by Cake Wallet", + "monero_com_wallet_text": "Անհավանական դրամապանակ Monero-ի համար", + "monero_dark_theme": "Monero մութ տեսք", + "monero_light_theme": "Monero պայծառ տեսք", + "moonpay_alert_text": "Գումարի արժեքը պետք է լինի հավասար կամ ավելի քան ${minAmount} ${fiatCurrency}", + "more_options": "Այլ տարբերակներ", + "name": "Անուն", + "nano_current_rep": "Ընթացիկ ներկայացուցիչ", + "nano_gpt_thanks_message": "Շնորհակալություն NanoGPT-ն օգտագործելու համար: Հիշեք վերադառնալ դիտարկիչ ձեր փոխանցումն ավարտելուց հետո", + "nano_pick_new_rep": "Ընտրեք նոր ներկայացուցիչ", + "nanogpt_subtitle": "Բոլոր ամենանոր մոդելներ (GPT-4, Claude).\\nԱռանց բաժանորդագրության, վճարեք կրիպտոարժույթով", + "narrow": "Նեղ", + "new_first_wallet_text": "Ինչպես պահել ձեր կրիպտոգրաֆիան անվտանգ, կարկանդակ", + "new_node_testing": "Նոր հանգույցի փորձարկում", + "new_subaddress_create": "Ստեղծել", + "new_subaddress_label_name": "Պիտակի անուն", + "new_subaddress_title": "Նոր հասցե", + "new_template": "Նոր նմուշ", + "new_wallet": "Նոր դրամապանակ", + "newConnection": "Նոր կապ", + "no_cards_found": "Ոչ մի քարտ չի գտնվել", + "no_id_needed": "Ոչ մի փաստաթուղթ չի պահանջվում!", + "no_id_required": "Ոչ մի փաստաթուղթ չի պահանջվում։ Լրացրեք և ծախսեք ամենուր", + "no_relay_on_domain": "Տիրույթի համար ընդունող չկա կամ անհասանելի է։ Խնդրում ենք ընտրել ընդունող", + "no_relays": "Ընդունողներ չկան", + "no_relays_message": "Մենք գտել ենք Nostr NIP-05 գրառում այս օգտատիրոջ համար, բայց այն չի պարունակում ոչ մի ընդունող։ Խնդրում ենք հրահանգել ստացողին ավելացնել ընդունողներ իր Nostr գրառման մեջ", + "node_address": "Հանգույցի հասցե", + "node_connection_failed": "Հանգույցի միացումը ձախողվեց", + "node_connection_successful": "Հանգույցի միացումը հաջող է", + "node_new": "Նոր հանգույց", + "node_port": "Հանգույցի պորտ", + "node_reset_settings_title": "Հանգույցի կարգավորումների վերակայում", + "node_test": "Փորձարկում", + "nodes": "Հանգույցներ", + "nodes_list_reset_to_default_message": "Վերակայվում եք կարգավորումները լռությամբ?", + "none_of_selected_providers_can_exchange": "Ոչ մի ընտրված մատակարար չի կարող այս փոխանակումը կատարել", + "noNFTYet": "Դեռ ոչ մի NFT", + "normal": "Նորմալ", + "note_optional": "Նշում (ոչ պարտադիր)", + "note_tap_to_change": "Նշում (սեղմեք փոխելու համար)", + "nullURIError": "URI-ն դատարկ է", + "offer_expires_in": "Առաջարկը վաղեմության է հասնում ", + "offline": "Անցանց", + "ok": "Լավ", + "old_fee": "Հին վճար", + "onion_link": "Onion հղում", + "online": "Առցանց", + "onramper_option_description": "Արագ գնեք կրիպտոցուլեր շատ վճարման մեթոդներով։ Հասանելի է մեծ մասամբ երկրներում։ Տարածված և վճարները փոփոխվում են", + "open_gift_card": "Բացեք նվեր քարտ", + "optional_description": "Ոչ պարտադիր նկարագրություն", + "optional_email_hint": "Ոչ պարտադիր վճարողի ծանուցման էլեկտրոնային փոստ", + "optional_name": "Ոչ պարտադիր ստացողի անուն", + "optionally_order_card": "Ոչ պարտադիր պատվեր ֆիզիկական քարտ", + "orbot_running_alert": "Խնդրում ենք համոզվել, որ Orbot-ը աշխատում է այս հանգույցին միանալուց առաջ", + "order_by": "Պատվեր ըստ", + "order_id": "Պատվերի հերթական համար", + "order_physical_card": "Պատվիրել ֆիզիկական քարտ", + "other_settings": "Այլ կարգավորումներ", + "outdated_electrum_wallet_description": "Cake-ում ստեղծված նոր Bitcoin դրամապանակները ներկայում 24 բառանոց սերմ ունեն։ Դուք պետք է ստեղծեք նոր Bitcoin դրամապանակ և տեղափոխեք բոլոր միջոցները նոր 24 բառանոց դրամապանակ, և դադարեցրեք օգտագործել 12 բառանոց դրամապանակներ", + "outdated_electrum_wallet_receive_warning": "Եթե այս դրամապանակը 12 բառանոց սերմ ունի և ստեղծվել է Cake-ում, Bitcoin մուծել այս դրամապանակ մի տեղափոխեք։ Որեւէ Bitcoin այս դրամապանակ տեղափոխվել կարող է կորած լինել։ Ստեղծեք նոր 24-բառանոց Bitcoin դրամապանակ (սեղմեք վերևի աջ մենյուն, ընտրեք Դրամապանակներ, ընտրեք Նոր Դրամապանակ, ապա ընտրեք Bitcoin) և տեղափոխեք ձեր ԲԻՏԿ-ն այնտեղ", + "outgoing": "Ելքային", + "outputs": "Ելքեր", + "overwrite_amount": "Գրեք գումարը", + "pairingInvalidEvent": "Սխալ միացում", + "passphrase": "Պարող արտահայտություն (Ոչ պարտադիր)", + "password": "Գաղտնաբառ", + "paste": "Տեղադրել", + "pause_wallet_creation": "Հնարավորություն ստեղծել Haven Դրամապանակ ընթացիկ դադարեցված է", + "payment_id": "Վճարման հերթական համար", + "payment_was_received": "Վճարումը ստացված է", + "pending": " (մշակվում է)", + "percentageOf": "${amount}-ի տոկոս", + "pin_at_top": "${token} պին վերևում", + "pin_is_incorrect": "Պին-կոդը սխալ է", + "pin_number": "Պին-կոդ", + "placeholder_contacts": "Ձեր կոնտակտները այստեղ կցուցադրվեն", + "placeholder_transactions": "Ձեր գործարքները այստեղ կցուցադրվեն", + "please_fill_totp": "Խնդրում ենք լրացնել 8-նիշյա կոդը, որը կա ձեր այլ սարքի վրա", + "please_make_selection": "Խնդրում ենք ընտրություն կատարել ներքևում ձեր դրամապանակը ստեղծելու կամ վերականգնելու համար", + "please_reference_document": "Խնդրում ենք դիտել ներքևի փաստաթղթերը ավելի շատ տեղեկատվության համար", + "please_select": "Խնդրում ենք ընտրել", + "please_select_backup_file": "Խնդրում ենք ընտրել կրկնօրինակի ֆայլը և մուտքագրել կրկնօրինակի գաղտնաբառը", + "please_try_to_connect_to_another_node": "Խնդրում ենք փորձել միանալ այլ հանգույցի", + "please_wait": "Խնդրում ենք սպասել", + "polygonscan_history": "PolygonScan պատմություն", + "powered_by": "${title} կողմից ապահովված", + "pre_seed_button_text": "Ես հասկանում եմ։ Ցույց տվեք իմ սերմը", + "pre_seed_description": "Հաջորդ էջում դուք կտեսնեք ${words} բառերի շարք։ Սա ձեր յուրահատուկ և գաղտնի սերմն է, որը ձեր դրամապանակը վերականգնելու միակ միջոցն է կորուստի կամ սխալ գործարքի դեպքում։ Դուք պատասխանատու եք այն գրառել և ապահով վայրում պահել Cake Wallet հավելվածից դուրս", + "pre_seed_title": "ԿԱՐԵՎՈՐ", + "prepaid_cards": "Նախավճարային քարտեր", + "prevent_screenshots": "Կանխել էկրանի պատկերները և տեսագրությունը", + "privacy": "Գաղտնիություն", + "privacy_policy": "Գաղտնիության քաղաքականություն", + "privacy_settings": "Գաղտնիության կարգավորումներ", + "private_key": "Գաղտնի բանալի", + "proceed_after_one_minute": "Եթե էկրանը 1 րոպեից ավել չի անցնում, ստուգեք ձեր էլեկտրոնային փոստը", + "proceed_on_device": "Շարունակեք ձեր սարքի վրա", + "proceed_on_device_description": "Խնդրում ենք հետևել ձեր սարքի վրա ցուցադրվող հրահանգներին", + "profile": "Պրոֆիլ", + "provider_error": "${provider} սխալ", + "public_key": "Հանրային բանալի", + "purchase_gift_card": "Նվեր քարտ գնել", + "purple_dark_theme": "Մանուշակագույն մութ տեսք", + "qr_fullscreen": "Սեղմեք այստեղ բացելու ամբողջ էկրանը QR կոդ", + "qr_payment_amount": "Այս QR կոդը պարունակում է վճարման գումար։ Ուզում եք թարմացնել ընթացիկ արժեքը?", + "quantity": "Քանակ", + "question_to_disable_2fa": "Դուք վստահ եք, որ ուզում եք անջատել Cake 2FA-ն? 2FA կոդը այլևս չի պահանջվի դրամապանակ մուտք գործելու և որոշ ֆունկցիաներ օգտագործելու համար", + "receivable_balance": "Ստացվող հաշվեկշիռ", + "receive": "Ստանալ", + "receive_amount": "Գումար", + "received": "Ստացված", + "recipient_address": "Ստացողի հասցե", + "reconnect": "Վերակապվել", + "reconnect_alert_text": "Դուք վստահ եք, որ ուզում եք վերակապվել?", + "reconnection": "Վերակապում", + "red_dark_theme": "Կարմիր մութ տեսք", + "red_light_theme": "Կարմիր պայծառ տեսք", + "redeemed": "Փոխանակված", + "refund_address": "Վերադարձի հասցե", + "reject": "Մերժել", + "remaining": "Մնացած", + "remove": "Հեռացնել", + "remove_node": "Հեռացնել հանգույց", + "remove_node_message": "Դուք վստահ եք, որ ուզում եք հեռացնել ընտրված հանգույցը?", + "rename": "Վերանվանել", + "rep_warning": "Ներկայացուցիչ նախազգուշացում", + "rep_warning_sub": "Ձեր ներկայացուցիչը չի հայտնվում լավ վիճակում։ Սեղմեք այստեղ նոր ներկայացուցիչ ընտրելու համար", + "repeat_wallet_password": "Վերականգնել դրամապանակի գաղտնաբառ", + "repeated_password_is_incorrect": "Վերականգնված գաղտնաբառը սխալ է։ Խնդրում ենք վերականգնել դրամապանակի գաղտնաբառը", + "require_for_adding_contacts": "Պահանջվում է կոնտակտներ ավելացնելու համար", + "require_for_all_security_and_backup_settings": "Պահանջվում է բոլոր անվտանգության և կրկնօրինակման կարգավորումների համար", + "require_for_assessing_wallet": "Պահանջվում է դրամապանակ մուտք գործելու համար", + "require_for_creating_new_wallets": "Պահանջվում է նոր դրամապանակներ ստեղծելու համար", + "require_for_exchanges_to_external_wallets": "Պահանջվում է արտաքին դրամապանակների հետ փոխանակության համար", + "require_for_exchanges_to_internal_wallets": "Պահանջվում է ներքին դրամապանակների հետ փոխանակության համար", + "require_for_sends_to_contacts": "Պահանջվում է կոնտակտներին ուղարկելու համար", + "require_for_sends_to_internal_wallets": "Պահանջվում է ներքին դրամապանակներ ուղարկելու համար", + "require_for_sends_to_non_contacts": "Պահանջվում է ոչ կոնտակտ անձանց ուղարկելու համար", + "require_pin_after": "Պահանջվում է PIN-ը հետո", + "rescan": "Վերասկանավորել", + "resend_code": "Խնդրում ենք կրկին ուղարկել", + "reset": "Վերասահմանել", + "reset_password": "Վերասահմանել գաղտնաբառը", + "restore_active_seed": "Ակտիվ սերմ", + "restore_address": "Հասցե", + "restore_bitcoin_description_from_keys": "Վերականգնեք ձեր դրամապանակը ձեր գախտնի բանալիներից ստացված WIF տողից", + "restore_bitcoin_description_from_seed": "Վերականգնեք ձեր դրամապանակը 24 բառերի համադրությամբ", + "restore_bitcoin_title_from_keys": "Վերականգնել WIF-ից", + "restore_description_from_backup": "Դուք կարող եք վերականգնել ամբողջ Cake Wallet հավելվածը ձեր կրկնօրինակ ֆայլից", + "restore_description_from_hardware_wallet": "Վերականգնեք Ledger հարդվերային դրամապանակից", + "restore_description_from_keys": "Վերականգնեք ձեր դրամապանակը ձեր գախտնի բանալիների հիման վրա ստեղծված մուտքագրումներից", + "restore_description_from_seed": "Վերականգնեք ձեր դրամապպանակը 25 բառերի կամ 13 բառերի համադրությամբ", + "restore_description_from_seed_keys": "Վերականգնեք ձեր դրամապանակը սերմից/բանալիներից, որը դուք պահպանել եք ապահով վայրում", + "restore_from_date_or_blockheight": "Խնդրում ենք մուտքագրել այն ամսաթիվը, երբ դուք ստեղծել եք այս դրամապանակը։ Կամ, եթե դուք գիտեք բլոկի բարձրությունը, խնդրում ենք մուտքագրել այն", + "restore_from_seed_placeholder": "Խնդրում ենք մուտքագրել կամ տեղադրել ձեր սերմը այստեղ", + "restore_new_seed": "Նոր սերմ", + "restore_next": "Հաջորդ", + "restore_recover": "Վերականգնել", + "restore_restore_wallet": "Վերականգնել դրամապանակ", + "restore_seed_keys_restore": "Սերմ/բանալիներ վերականգնել", + "restore_spend_key_private": "Վճարման բանալի (գախտնի)", + "restore_title_from_backup": "Վերականգնել կրկնօրինակ ֆայլից", + "restore_title_from_hardware_wallet": "Վերականգնել հարդվերային դրամապանակից", + "restore_title_from_keys": "Վերականգնել բանալիներից", + "restore_title_from_seed": "Վերականգնել սերմից", + "restore_title_from_seed_keys": "Վերականգնել սերմ/բանալիներից", + "restore_view_key_private": "Տեսողական բանալի (գախտնի)", + "restore_wallet": "Վերականգնել դրամապանակ", + "restore_wallet_name": "Դրամապանակի անվանում", + "restore_wallet_restore_description": "Դրամապանակի վերականգնման նկարագրություն", + "robinhood_option_description": "Գնեք և տեղափոխեք ակնթարթորեն ձեր դեբետային քարտով, բանկային հաշվով կամ Robinhood հաշվեկշռով։ Միայն ԱՄՆ-ում։", + "router_no_route": "Ոչ մի երթուղի չի սահմանված ${name}", + "save": "Պահպանել", + "save_backup_password": "Խնդրում ենք հաստատել, որ դուք պահպանել եք ձեր կրկնօրինակի գաղտնաբառը։ Դուք չեք կարող ներմուծել ձեր կրկնօրինակ ֆայլերը առանց դրա։", + "save_backup_password_alert": "Պահպանել կրկնօրինակի գաղտնաբառը", + "save_to_downloads": "Պահպանել ներբեռնումներում", + "saved_the_trade_id": "Ես պահպանել եմ առևտրի ID-ն", + "scan_one_block": "Սկանավորել մեկ բլոկ", + "scan_qr_code": "Սկանավորել QR կոդ", + "scan_qr_code_to_get_address": "Սկանավորել QR կոդը հասցեն ստանալու համար", + "scan_qr_on_device": "Սկանավորել այս QR կոդը այլ սարքի վրա", + "search": "Որոնել", + "search_add_token": "Որոնել / Ավելացնել token", + "search_category": "Որոնել կատեգորիա", + "search_currency": "Որոնել արժույթ", + "search_language": "Որոնել լեզու", + "second_intro_content": "Ձեր Yat-ը միակ եզակի էմոջի հասցե է, որը փոխարինում է ձեր բոլոր արժույթների համար ձեր բոլոր երկար հեքսադեցիմալ հասցեները", + "second_intro_title": "Մի էմոջի հասցե, որը կառավարում է դրանք բոլորը", + "security_and_backup": "Անվտանգություն և կրկնօրինակ", + "seed_alert_back": "Վերադառնալ", + "seed_alert_content": "Սերմը վերականգնելու ձեր դրամապանակի միակ միջոցն է։ Դուք արդեն գրի եք առել այն?", + "seed_alert_title": "Ուշադրություն", + "seed_alert_yes": "Այո, ես արդեն գրի եմ առել այն", + "seed_choose": "Ընտրել սերմի լեզուն", + "seed_hex_form": "Դրամապանակի սերմ (hex ֆորմատ)", + "seed_key": "Սերմի բանալի", + "seed_language": "Սերմի լեզու", + "seed_language_chinese": "Չինարեն", + "seed_language_chinese_traditional": "Չինարեն (ավանդական)", + "seed_language_czech": "Չեխերեն", + "seed_language_dutch": "Հոլանդերեն", + "seed_language_english": "Անգլերեն", + "seed_language_french": "Ֆրանսերեն", + "seed_language_german": "Գերմաներեն", + "seed_language_italian": "Իտալերեն", + "seed_language_japanese": "Ճապոներեն", + "seed_language_korean": "Կորեերեն", + "seed_language_next": "Հաջորդ", + "seed_language_portuguese": "Պորտուգալերեն", + "seed_language_russian": "Ռուսերեն", + "seed_language_spanish": "Իսպաներեն", + "seed_phrase_length": "Սերմի արտահայտության երկարություն", + "seed_reminder": "Խնդրում ենք գրի առնել այս տեղեկությունը, եթե դուք կորցնեք կամ ջնջեք ձեր հեռախոսը", + "seed_share": "Կիսվել սերմով", + "seed_title": "Սերմ", + "seedtype": "Սերմի տեսակ", + "seedtype_legacy": "Legacy (25 բառ)", + "seedtype_polyseed": "Polyseed (16 բառ)", + "seedtype_wownero": "Wownero (14 բառ)", + "select_backup_file": "Ընտրել կրկնօրինակ ֆայլ", + "select_buy_provider_notice": "Ընտրեք գնման մատակարարը վերևում։ Դուք կարող եք բաց թողնել այս էկրանը ձեր լռելայն գնման մատակարարը հավելվածի կարգավորումներում սահմանելով", + "select_destination": "Խնդրում ենք ընտրել կրկնօրինակ ֆայլի նպատակակետը", + "select_sell_provider_notice": "Ընտրեք վաճառքի մատակարարը վերևում։ Դուք կարող եք բաց թողնել այս էկրանը ձեր լռելայն վաճառքի մատակարարը հավելվածի կարգավորումներում սահմանելով", + "sell": "Ծախել", + "sell_alert_content": "Մենք ներկայումս պաշտպանում ենք միայն Bitcoin, Ethereum և Litecoin վաճառքը։ Խնդրում ենք ստեղծել կամ միացնել ձեր Bitcoin, Ethereum կամ Litecoin դրամապանակը", + "sell_monero_com_alert_content": "Monero-ի վաճառքը դեռ չի պաշտպանվում", + "send": "Ուղարկել", + "send_address": "${cryptoCurrency} հասցե", + "send_amount": "Քանակ՝", + "send_creating_transaction": "Ստեղծել գործարք", + "send_error_currency": "Արժույթը կարող է պարունակել միայն թվեր", + "send_error_minimum_value": "Քանակի նվազագույն արժեքը 0.01 է", + "send_estimated_fee": "Գնահատված վարձը՝", + "send_fee": "Վարձը՝", + "send_name": "Անվանում", + "send_new": "Նոր", + "send_payment_id": "Վճարման ID (կամավոր)", + "send_priority": "Ներկայումս վարձը սահմանված է ${transactionPriority} առաջնահերթությամբ։ Գործարքի առաջնահերթությունը կարող է կարգավորվել կարգավորումներում", + "send_sending": "Ուղարկվում է...", + "send_success": "Ձեր ${crypto}-ն հաջողությամբ ուղարկվել է", + "send_templates": "Տեղակալներ", + "send_title": "Ուղարկել", + "send_to_this_address": "Ուղարկել ${currency} ${tag} այս հասցեով", + "send_xmr": "Ուղարկել XMR", + "send_your_wallet": "Ձեր դրամապանակ", + "sending": "Ուղարկում", + "sent": "Ուղարկված", + "service_health_disabled": "Ծառայության առողջությունը անջատված է", + "service_health_disabled_message": "Սա ծառայության առողջության էջն է, դուք կարող եք այս էջը միացնել Կարգավորումներ -> Գաղտնիություն", + "settings": "Կարգավորումներ", + "settings_all": "Բոլորը", + "settings_allow_biometrical_authentication": "Թույլատրել կենսաչափական վավերացում", + "settings_can_be_changed_later": "Այս կարգավորումները կարող են փոխվել ավելի ուշ հավելվածի կարգավորումներում", + "settings_change_language": "Փոխել լեզուն", + "settings_change_pin": "Փոխել PIN-ը", + "settings_currency": "Արժույթ", + "settings_current_node": "Ներկայիս հանգույց", + "settings_dark_mode": "Մութ ռեժիմ", + "settings_display_balance": "Ցուցադրել հաշիվը", + "settings_display_on_dashboard_list": "Ցուցադրել վահանակի ցանկում", + "settings_fee_priority": "Վարձի առաջնահերթություն", + "settings_nodes": "Հանգույցներ", + "settings_none": "Ոչինչ", + "settings_only_trades": "Միայն առևտուր", + "settings_only_transactions": "Միայն փոխանցումներ", + "settings_personal": "Անձնական", + "settings_save_recipient_address": "Պահպանել ստացողի հասցե", + "settings_support": "Աջակցություն", + "settings_terms_and_conditions": "Պայմաններ և պայմանավորվածություններ", + "settings_title": "Կարգավորումներ", + "settings_trades": "Առևտուր", + "settings_transactions": "Փոխանցումներ", + "settings_wallets": "Դրամապանակներ", + "setup_2fa": "Հավատարմագրել 2FA", + "setup_2fa_text": "Cake 2FA-ն աշխատում է TOTP-ի հետ որպես երկրորդ հավատարմագրման գործոն։\n\nCake 2FA-ի TOTP-ը պահանջում է SHA-512 և 8 թվանշանների աջակցություն; դա ավելի մեծ անվտանգություն է ապահովում։ Ավելի շատ տեղեկություն և աջակցվող հավելվածներ կարելի է գտնել ուղեցույցում։", + "setup_pin": "Հավատարմագրել PIN", + "setup_successful": "Ձեր PIN-ը հաջողությամբ հավատարմագրվել է!", + "setup_totp_recommended": "Հավատարմագրել TOTP", + "setup_warning_2fa_text": "Cake 2FA-ն երկրորդ վավերացում է որոշակի գործողությունների համար դրամապանակում։ Այն նույն անվտանգ չէ, ինչ ցուրտ պահեստավորումը.\n\nԵթե դուք կորցնեք ձեր 2FA հավելվածի կամատեղությունը կամ TOTP բանալիները, դուք կկորցնեք այս դրամապանակի հասանելիությունը։ Դուք կստիպվեք վերականգնել ձեր դրամապանակը մնեմոնիկ սերմերի միջոցով։\n\nCake աջակցությունը չի կարող օգնել ձեզ, եթե դուք կորցնեք ձեր 2FA կամ մնեմոնիկ սերմերը։ Խնդրում ենք կարդալ ուղեցույցը, նախքան Cake 2FA-ն օգտագործելը", + "setup_your_debit_card": "Հավատարմագրել ձեր դեբետային քարտ", + "share": "Կիսվել", + "share_address": "Կիսվել հասցեով", + "show_details": "Ցուցադրել մանրամասներ", + "show_keys": "Ցուցադրել բանալիներ", + "show_market_place": "Ցուցադրել շուկան", + "show_seed": "Ցուցադրել սերմ", + "sign_message": "Կնքել հաղորդագրություն", + "sign_up": "Գրանցվել", + "sign_verify_message": "Կնքել կամ ստուգել հաղորդագրություն", + "sign_verify_message_sub": "Կնքել կամ ստուգել հաղորդագրությունը ձեր գախտնի բանալիով", + "sign_verify_title": "Կնքել / Ստուգել", + "signature": "Կնիք", + "signature_invalid_error": "Կնիքը անվավեր է տրված հաղորդագրության համար", + "signTransaction": "Կնքել Գործարք", + "signup_for_card_accept_terms": "Գրանցվել քարտի համար և ընդունել պայմանները", + "silent_payments": "Լուռ Վճարումներ", + "silent_payments_always_scan": "Միացնել Լուռ Վճարումներ մշտական սկանավորումը", + "silent_payments_disclaimer": "Նոր հասցեները նոր ինքնություն չեն։ Դա այլ պիտակով գոյություն ունեցող ինքնության վերագործածում է", + "silent_payments_display_card": "Ցուցադրել Լուռ Վճարումներ քարտը", + "silent_payments_scan_from_date": "Սկանավորել ամսաթվից", + "silent_payments_scan_from_date_or_blockheight": "Խնդրում ենք մուտքագրել բլոկի բարձրությունը, որտեղից դուք ցանկանում եք սկսել սկանավորել մուտքային Լուռ Վճարումները կամ տեղափոխել ամսաթվի փոխարեն։ Դուք կարող եք ընտրել, արդյոք դրամապանակը շարունակելու է սկանավորել ամեն բլոկ կամ ստուգել միայն սահմանված բարձրությունը", + "silent_payments_scan_from_height": "Բլոկի բարձրությունից սկանավորել", + "silent_payments_scanned_tip": "ՍԿԱՆԱՎՈՐՎԵՑ ԹԵՅԱՎՃԱՐ! (${tip})", + "silent_payments_scanning": "Լուռ Վճարումներ Սկանավորում", + "silent_payments_settings": "Լուռ Վճարումներ Կարգավորումներ", + "slidable": "Սահելի", + "sort_by": "Դասավորել ըստ", + "spend_key_private": "Վճարման բանալի (գախտնի)", + "spend_key_public": "Վճարման բանալի (հանրային)", + "status": "Կարգավիճակ՝ ", + "string_default": "Լռելայն", + "subaddress_title": "Ենթահասցեների ցանկ", + "subaddresses": "Ենթահասցեներ", + "submit_request": "Ուղարկել հարցում", + "successful": "Հաջողված", + "support_description_guides": "Տարածված խնդիրների փաստաթղթավորում և աջակցություն", + "support_description_live_chat": "Անվճար և արագ աջակցություն! Պատրաստված մասնագետները պատրաստ են օգնել", + "support_description_other_links": "Միացեք մեր համայնքին կամ հասեք մեզ այլ միջոցներով", + "support_title_guides": "Cake Wallet ուղեցույց", + "support_title_live_chat": "Անմիջական աջակցություն", + "support_title_other_links": "Այլ աջակցության հղումներ", + "sweeping_wallet": "Դրամապանակը մաքրվում է", + "sweeping_wallet_alert": "Սա չի տևի երկար։ Խնդրում ենք չլքել այս էկրանը կամ մաքրված միջոցները կկորչեն։", + "switchToETHWallet": "Խնդրում ենք անցնել Ethereum դրամապանակ և փորձել կրկին", + "switchToEVMCompatibleWallet": "Խնդրում ենք անցնել EVM համատեղելի դրամապանակ և փորձել կրկին (Ethereum, Polygon)", + "symbol": "Նշան", + "sync_all_wallets": "Համաժամեցնել բոլոր դրամապանակները", + "sync_status_attempting_sync": "ՀԱՄԱԺԱՄԵՑՄԱՆ ՓՈՐՁ", + "sync_status_connected": "ՄԻԱՑՎԱԾԷ", + "sync_status_connecting": "ՄԻԱՑՎՈՒՄ Է", + "sync_status_failed_connect": "ՉՄԻԱՑԱՎ", + "sync_status_not_connected": "ՄԻԱՑՎԱԾ ՉԷ", + "sync_status_starting_scan": "ՍԿԱՆԱՎՈՐՈՒՄԸ ՍԿՍՎՈՒՄ Է", + "sync_status_starting_sync": "ՀԱՄԱԺԱՄԵՑՈՒՄԸ ՍԿՍՎՈՒՄ Է", + "sync_status_syncronized": "ՀԱՄԱԺԱՄԵՑՎԱԾԷ", + "sync_status_syncronizing": "ՀԱՄԱԺԱՄԵՑՎՈՒՄ Է", + "sync_status_timed_out": "Ժամանակը սպառվեց", + "sync_status_unsupported": "ՉԱՋԱԿՑՎՈՂ ՀԱՆԳՈՒՅՑ,", + "syncing_wallet_alert_content": "Ձեր հաշիվը և գործարքների ցանկը կարող են լինել անավարտ մինչև վերին մասում գրված լինի “ՀԱՂՈՒՄ”։ Սեղմեք/դիպեք ուսումնասիրելու համար։", + "syncing_wallet_alert_title": "Ձեր դրամապանակը համաժամացվում է", + "template": "Տարբերակ", + "template_name": "Տարբերակի անուն", + "testnet_coins_no_value": "Testnet արժույթները չունեն արժեք", + "third_intro_content": "Yats-ը ապրում է Cake Wallet-ի դրսում ևս: Երկրի ցանկացած դրամապանակի հասցե կարող է փոխարինվել Yat-ով!", + "third_intro_title": "Yat-ը լավ է համագործակցում ուրիշների հետ", + "thorchain_contract_address_not_supported": "THORChain-ը չի աջակցում պայմանագրի հասցե ուղարկելուն", + "thorchain_taproot_address_not_supported": "ThorChain մատակարարը չի աջակցում Taproot հասցեները: Խնդրում ենք փոխել հասցեն կամ ընտրել այլ մատակարար:", + "time": "${minutes}ր ${seconds}վ", + "tip": "Թեյավճար", + "today": "Այսօր", + "token_contract_address": "Token-ի պայմանագրի հասցե", + "token_decimal": "Token-ի տասանիշ", + "token_name": "Token-ի անուն, օրինակ՝ Tether", + "token_symbol": "Token-ի նշան, օրինակ՝ USDT", + "tokenID": "ID", + "tor_connection": "Tor կապ", + "tor_only": "Միայն Tor", + "total": "Ընդհանուր", + "total_saving": "Ընդհանուր խնայողություն", + "totp_2fa_failure": "Սխալ կոդ: Խնդրում ենք փորձել այլ կոդ կամ ստեղծել նոր գաղտնի բանալի: Օգտագործեք համատեղելի 2FA ծրագիր, որը աջակցում է 8-նիշերի կոդեր և SHA512:", + "totp_2fa_success": "Հաջողություն: Cake 2FA-ն ակտիվացված է այս դրամապանակի համար: Հիշեք Ձեր մնեմոնիկ սերմը, եթե կորցնեք դրամապանակի հասանելիությունը:", + "totp_auth_url": "TOTP հեղինակավորման URL", + "totp_code": "TOTP կոդ", + "totp_secret_code": "TOTP գաղտնի կոդ", + "totp_verification_success": "Ստուգումը հաջողվել է", + "track": "Հետևել", + "trade_details_copied": "${title} պատճենված է գրանցամատյան", + "trade_details_created_at": "Ստեղծվել է", + "trade_details_fetching": "Բեռնում", + "trade_details_id": "ID", + "trade_details_pair": "Զույգ", + "trade_details_provider": "Մատակարար", + "trade_details_state": "Կարգավիճակ", + "trade_details_title": "Գործարքի մանրամասներ", + "trade_for_not_created": "${title} գործարք չի ստեղծվել", + "trade_history_title": "Գործարքների պատմություն", + "trade_id": "Գործարքի ID", + "trade_id_not_found": "${tradeId} ${title} գործարք չի գտնվել", + "trade_is_powered_by": "Այս գործարքը աջակցվում է ${provider} կողմից", + "trade_not_created": "Գործարք չի ստեղծվել", + "trade_not_found": "Գործարք չի գտնվել", + "trade_state_btc_sent": "BTC ուղարկված է", + "trade_state_complete": "Ավարտված է", + "trade_state_confirming": "Հաստատվում է", + "trade_state_created": "Ստեղծված է", + "trade_state_finished": "Ավարտված է", + "trade_state_paid": "Վճարված է", + "trade_state_paid_unconfirmed": "Վճարված է, բայց չի հաստատվել", + "trade_state_pending": "Սպասման մեջ է", + "trade_state_timeout": "Ժամանակը սպառվել է", + "trade_state_to_be_created": "Ստեղծվելու է", + "trade_state_traded": "Գործարք է կատարվել", + "trade_state_trading": "Գործարք է կատարվում", + "trade_state_underpaid": "Վճարված է, բայց ոչ ամբողջությամբ", + "trade_state_unpaid": "Վճարված չէ", + "trades": "Գործարքներ", + "transaction_details_amount": "Գումար", + "transaction_details_copied": "${title} պատճենված է գրանցամատյան", + "transaction_details_date": "Ամսաթիվ", + "transaction_details_fee": "Տուրք", + "transaction_details_height": "Բլոկի համար", + "transaction_details_recipient_address": "Ստացողի հասցե", + "transaction_details_source_address": "Ուղարկողի հասցե", + "transaction_details_title": "Գործարքի մանրամասներ", + "transaction_details_transaction_id": "Գործարքի ID", + "transaction_key": "Գործարքի բանալի", + "transaction_priority_fast": "Արագ", + "transaction_priority_fastest": "Ամենաարագ", + "transaction_priority_medium": "Միջին", + "transaction_priority_regular": "Սովորական", + "transaction_priority_slow": "Դանդաղ", + "transaction_sent": "Փոխանցումն ուղարկված է", + "transaction_sent_notice": "Եթե էկրանը 1 րոպեի ընթացքում չի թարմանում, խնդրում ենք ստուգել բլոկի բացահայտիչը և Ձեր էլ. փոստը", + "transactions": "Փոխանցումներ", + "transactions_by_date": "Փոխանցումներ ամսաթվով", + "trongrid_history": "TronGrid պատմություն", + "trusted": "Վստահելի", + "tx_commit_exception_no_dust_on_change": "Փոխանցումը մերժվել է այս գումարով: Այս արժույթներով կարող եք ուղարկել ${min} առանց փոփոխության կամ ${max} որը վերադարձնում է փոփոխությունը", + "tx_commit_failed": "Փոխանցումը ձախողվել է: Խնդրում ենք դիմել աջակցությանը", + "tx_invalid_input": "Դուք օգտագործում եք սխալ մուտքային տիպ այս տեսակի վճարման համար", + "tx_no_dust_exception": "Փոխանցումը մերժվել է շատ փոքր գումարով: Խնդրում ենք փորձել ավելացնել գումարը", + "tx_not_enough_inputs_exception": "Չկան բավարար մուտքեր: Խնդրում ենք ընտրել ավելին Coin Control֊ում", + "tx_rejected_bip68_final": "Փոխանցումը մերժվել է չհաստատված մուտքերով և ձախողվել է փոխարինել վճարման համար", + "tx_rejected_dust_change": "Փոխանցումը մերժվել է ցածր փոփոխության գումարով (փոշի): Փորձեք ուղարկել ԲՈԼՈՐ կամ նվազեցնել գումարը", + "tx_rejected_dust_output": "Փոխանցումը մերժվել է ցածր ելքային գումարով (փոշի): Խնդրում ենք ավելացնել գումարը", + "tx_rejected_dust_output_send_all": "Փոխանցումը մերժվել է ցածր ելքային գումարով (փոշի): Խնդրում ենք ստուգել արժույթների հաշիվը մուտքային վերահսկողության տակ", + "tx_rejected_vout_negative": "Բավարար մնացորդ չկա այս փոխանցման վճարների համար։ Խնդրում ենք ստուգել արժույթների մնացորդը Coin Control-ում։", + "tx_wrong_balance_exception": "Դուք չունեք բավարար ${currency} այս գումարը ուղարկելու համար։", + "tx_wrong_balance_with_amount_exception": "Դուք չունեք բավարար ${currency} ${amount} գումարը ուղարկելու համար։", + "tx_zero_fee_exception": "Չի կարող ուղարկվել Փոխանցումը առանց վճարի։ Փորձեք բարձրացնել գինը կամ ստուգել ձեր կապը վերջին գնահատականների համար։", + "unavailable_balance": "Անհասանելի մնացորդ", + "unavailable_balance_description": "Անհասանելի մնացորդ: Այս ընդհանուր գումարը ներառում է այն միջոցները, որոնք արգելափակված են ընթացիկ գործարքներում և նրանք, որոնք դուք ակտիվորեն սառեցրել եք արժույթների վերահսկման կարգավորումների մեջ։ Արգելափակված մնացորդները կդառնան հասանելի, երբ համապատասխան գործարքները կավարտվեն, մինչդեռ սառեցված մնացորդները կմնան անհասանելի մինչև դուք որոշեք դրանք ապասառեցնել։", + "unconfirmed": "Չհաստատված մնացորդ", + "understand": "Ես հասկանում եմ", + "unlock": "Բացել", + "unmatched_currencies": "Ձեր ընթացիկ դրամապանակի արժույթը չի համապատասխանում սկանավորված QR կոդի արժույթին", + "unspent_change": "Մնացորդ", + "unspent_coins_details_title": "Չծախսված արժույթների մանրամասները", + "unspent_coins_title": "Չծախսված արժույթներ", + "unsupported_asset": "Մենք չենք աջակցում այս գործողությունը այս ակտիվի համար։ Խնդրում ենք ստեղծել կամ անցնել աջակցվող ակտիվի տեսակին համապատասխան դրամապանակի։", + "uptime": "Աշխատանքային ժամանակ", + "upto": "մինչև ${value}", + "usb": "USB", + "use": "Փոխեք ", + "use_card_info_three": "Օգտագործեք թվային քարտը առցանց կամ անշփման վճարման մեթոդներով։", + "use_card_info_two": "Միջոցները փոխարկվում են ԱՄՆ դոլար երբ դրանք պահվում են կանխավճարային հաշվեկշռում, ոչ թե թվային արժույթներում։", + "use_ssl": "Օգտագործել SSL", + "use_suggested": "Օգտագործել առաջարկվածը", + "use_testnet": "Օգտագործել Testnet", + "value": "Արժեք", + "value_type": "Արժեքի տեսակ", + "variable_pair_not_supported": "Այս փոփոխականի զույգը չի աջակցվում ընտրված բորսաների հետ", + "verification": "Ստուգում", + "verify_message": "Ստուգել հաղորդագրությունը", + "verify_with_2fa": "Ստուգեք Cake 2FA-ով", + "version": "Տարբերակ ${currentVersion}", + "view_all": "Դիտել բոլորը", + "view_in_block_explorer": "Դիտել Block Explorer-ում", + "view_key_private": "Դիտել բանալին (գախտնի)", + "view_key_public": "Դիտել բանալին (հանրային)", + "view_transaction_on": "Դիտել Գործարքը ", + "voting_weight": "Քվեարկության Քաշ", + "waitFewSecondForTxUpdate": "Խնդրում ենք սպասել մի քանի վայրկյան, որպեսզի գործարքը արտացոլվի գործարքների պատմության մեջ", + "wallet_keys": "Դրամապանակի սերմ/բանալիներ", + "wallet_list_create_new_wallet": "Ստեղծել Նոր Դրամապանակ", + "wallet_list_edit_wallet": "Խմբագրել դրամապանակը", + "wallet_list_failed_to_load": "Չհաջողվեց բեռնել ${wallet_name} դրամապանակը։ ${error}", + "wallet_list_failed_to_remove": "Չհաջողվեց հեռացնել ${wallet_name} դրամապանակը։ ${error}", + "wallet_list_load_wallet": "Բեռնել դրամապանակը", + "wallet_list_loading_wallet": "Բեռնվում է ${wallet_name} դրամապանակը", + "wallet_list_removing_wallet": "Հեռացվում է ${wallet_name} դրամապանակը", + "wallet_list_restore_wallet": "Վերականգնել դրամապանակը", + "wallet_list_title": "Monero Դրամապանակ", + "wallet_list_wallet_name": "Դրամապանակի անունը", + "wallet_menu": "Մենյու", + "wallet_name": "Դրամապանակի անունը", + "wallet_name_exists": "Այդ անունով դրամապանակ արդեն կա։ Խնդրում ենք ընտրել այլ անուն կամ վերանվանել մյուս դրամապանակը։", + "wallet_password_is_empty": "Դրամապանակի գաղտնաբառը դատարկ է։ Դրամապանակի գաղտնաբառը չպետք է դատարկ լինի", + "wallet_recovery_height": "Վերականգնման բարձրություն", + "wallet_restoration_store_incorrect_seed_length": "Սերմի երկարությունը սխալ է", + "wallet_seed": "Դրամապանակի սերմ", + "wallet_seed_legacy": "Legacy դրամապանակի սերմ", + "wallet_store_monero_wallet": "Monero Դրամապանակ", + "walletConnect": "WalletConnect", + "wallets": "Դրամապանակներ", + "warning": "Զգուշացում", + "welcome": "Բարի գալուստ", + "welcome_to_cakepay": "Բարի գալուստ Cake Pay!", + "what_is_silent_payments": "Ի՞նչ է Լուռ Վճարումները:", + "widgets_address": "Հասցե", + "widgets_or": "կամ", + "widgets_restore_from_blockheight": "Վերականգնել բլոկի բարձրությունից", + "widgets_restore_from_date": "Վերականգնել ամսաթվից", + "widgets_seed": "Սերմ", + "wouoldLikeToConnect": "ցանկանում է միանալ", + "write_down_backup_password": "Խնդրում ենք գրանցել ձեր կրկնօրինակի գաղտնաբառը, որը օգտագործվում է կրկնօրինակ ֆայլերի ներմուծման համար։", + "xlm_extra_info": "Խնդրում ենք չմոռանալ նշել Memo ID-ն երբ ուղարկում եք XLM գործարք փոխանակման համար", + "xmr_available_balance": "Հասանելի մնացորդ", + "xmr_full_balance": "Լրիվ մնացորդ", + "xmr_hidden": "Թաքնված", + "xmr_to_error": "XMR.TO սխալ", + "xmr_to_error_description": "Սխալ գումար։ Առավելագույն սահմանը 8 թվանշան է կետից հետո", + "xrp_extra_info": "Խնդրում ենք չմոռանալ նշել Destination Tag-ը երբ ուղարկում եք XRP գործարք փոխանակման համար", + "yat": "Yat", + "yat_address": "Yat Հասցե", + "yat_alert_content": "Cake Wallet-ի օգտատերերը այժմ կարող են ուղարկել և ստանալ իրենց սիրած արժույթները emoji-ների հիման վրա օգտագործվող անունով։", + "yat_alert_title": "Ուղարկել և ստանալ կրիպտո ավելի հեշտությամբ Yat-ի միջոցով", + "yat_error": "Yat սխալ", + "yat_error_content": "Այս Yat-ի հետ կապված հասցեներ չկան։ Փորձեք այլ Yat", + "yat_popup_content": "Այժմ դուք կարող եք ուղարկել և ստանալ կրիպտո Cake Wallet-ում ձեր Yat-ով՝ կարճ, emoji-ների վրա հիմնված օգտագործողի անունով։ Կառավարեք Yat-երը ցանկացած ժամանակ կարգավորումների էկրանին", + "yat_popup_title": "Ձեր դրամապանակի հասցեն կարող է emoji-ացվել։", + "yesterday": "Երեկ", + "you_now_have_debit_card": "Դուք այժմ ունեք դեբետային քարտ", + "you_pay": "Դուք վճարում եք", + "you_will_get": "Ստացեք", + "you_will_send": "Փոխանակեք", + "yy": "ՏՏ" +} \ No newline at end of file From 47ca649060a48f98469fcaf93de6196c8104b2d6 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Aug 2024 03:55:23 +0300 Subject: [PATCH 67/77] update translations --- README.md | 4 +++- tool/utils/translation/translation_constants.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e507bfcd..1c28f92a2 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,9 @@ The only parts to be translated, if needed, are the values m and s after the var 4. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language. -5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x26 pixels with a 3 pixels of transparent margin on all 4 sides. You can resize the flag with [paint.net](https://www.getpaint.net/) to 36x20 pixels, expand the canvas to 42x26 pixels with the flag anchored in the middle, and then manually delete the 3 pixels on each side to make transparent. Or you can use another program like Photoshop. +5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 letters localeCountryCode. The image must be 42x26 pixels with a 3 pixels of transparent margin on all 4 sides. You can resize the flag with [paint.net](https://www.getpaint.net/) to 36x20 pixels, expand the canvas to 42x26 pixels with the flag anchored in the middle, and then manually delete the 3 pixels on each side to make transparent. Or you can use another program like Photoshop. + +6. Add the new language code to `tool/utils/translation/translation_constants.dart` ## Add a new fiat currency diff --git a/tool/utils/translation/translation_constants.dart b/tool/utils/translation/translation_constants.dart index 3a472d8c4..3d1afe142 100644 --- a/tool/utils/translation/translation_constants.dart +++ b/tool/utils/translation/translation_constants.dart @@ -1,6 +1,6 @@ const defaultLang = "en"; const langs = [ - "ar", "bg", "cs", "de", "en", "es", "fr", "ha", "hi", "hr", "id", "it", + "ar", "bg", "cs", "de", "en", "es", "fr", "ha", "hi", "hr", "hy", "id", "it", "ja", "ko", "my", "nl", "pl", "pt", "ru", "th", "tl", "tr", "uk", "ur", "yo", "zh-cn" // zh, but Google Translate uses zh-cn for Chinese (Simplified) ]; From 9c3f0b329bba802787123d7c9ac5c745bf56121f Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Aug 2024 15:34:31 +0300 Subject: [PATCH 68/77] minor fix --- lib/entities/language_service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index bb60c5cce..260c8a27f 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -29,7 +29,7 @@ class LanguageService { 'id': 'Bahasa Indonesia (Indonesian)', 'yo': 'Yorùbá (Yoruba)', 'ha': 'Hausa Najeriya (Nigeria)', - 'tl': 'Filipino (Tagalog)' + 'tl': 'Filipino (Tagalog)', 'hy': 'Հայերեն (Armenian)', }; @@ -59,7 +59,7 @@ class LanguageService { 'id': 'idn', 'yo': 'nga', 'ha': 'hau', - 'tl': 'phl' + 'tl': 'phl', 'hy': 'arm' }; From 4c2d0613635a1457c2a63ba788f15dae170fcae9 Mon Sep 17 00:00:00 2001 From: Serhii Date: Fri, 23 Aug 2024 16:19:42 +0300 Subject: [PATCH 69/77] rbf fixes issues sum utxo and fee calculation (#1625) * total out amount issue * fix empty inputs and outputs addresses for new tx * fix sum value of utxo not spending * Update configure.dart * Update electrum_wallet.dart * receiving address * review fixes --- cw_bitcoin/lib/electrum_transaction_info.dart | 2 +- cw_bitcoin/lib/electrum_wallet.dart | 133 +++++++++++------- lib/bitcoin/cw_bitcoin.dart | 5 +- lib/view_model/send/send_view_model.dart | 44 ++++-- .../transaction_details_view_model.dart | 23 +-- tool/configure.dart | 3 +- 6 files changed, 132 insertions(+), 78 deletions(-) diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index ea4a3de33..ee3daa0e0 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -235,6 +235,6 @@ class ElectrumTransactionInfo extends TransactionInfo { } String toString() { - return 'ElectrumTransactionInfo(id: $id, height: $height, amount: $amount, fee: $fee, direction: $direction, date: $date, isPending: $isPending, confirmations: $confirmations, to: $to, unspent: $unspents)'; + return 'ElectrumTransactionInfo(id: $id, height: $height, amount: $amount, fee: $fee, direction: $direction, date: $date, isPending: $isPending, confirmations: $confirmations, to: $to, unspent: $unspents, inputAddresses: $inputAddresses, outputAddresses: $outputAddresses)'; } } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index da91a29e4..2a57c8d5c 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -132,6 +132,7 @@ abstract class ElectrumWalletBase final String? _mnemonic; Bip32Slip10Secp256k1 get hd => accountHD.childKey(Bip32KeyIndex(0)); + Bip32Slip10Secp256k1 get sideHd => accountHD.childKey(Bip32KeyIndex(1)); final EncryptionFileUtils encryptionFileUtils; @@ -1363,26 +1364,15 @@ abstract class ElectrumWalletBase } } - Future canReplaceByFee(String hash) async { - final verboseTransaction = await electrumClient.getTransactionVerbose(hash: hash); - - final String? transactionHex; - int confirmations = 0; - - if (verboseTransaction.isEmpty) { - transactionHex = await electrumClient.getTransactionHex(hash: hash); - } else { - confirmations = verboseTransaction['confirmations'] as int? ?? 0; - transactionHex = verboseTransaction['hex'] as String?; - } - - if (confirmations > 0) return false; - - if (transactionHex == null || transactionHex.isEmpty) { + Future canReplaceByFee(ElectrumTransactionInfo tx) async { + try { + final bundle = await getTransactionExpanded(hash: tx.txHash); + _updateInputsAndOutputs(tx, bundle); + if (bundle.confirmations > 0) return false; + return bundle.originalTransaction.canReplaceByFee; + } catch (e) { return false; } - - return BtcTransaction.fromRaw(transactionHex).canReplaceByFee; } Future isChangeSufficientForFee(String txId, int newFee) async { @@ -1458,47 +1448,59 @@ abstract class ElectrumWalletBase ); } - int totalOutAmount = bundle.originalTransaction.outputs - .fold(0, (previousValue, element) => previousValue + element.amount.toInt()); - - var currentFee = allInputsAmount - totalOutAmount; - int remainingFee = newFee - currentFee; - + // Create a list of available outputs final outputs = []; - - // Add outputs and deduct the fees from it - for (int i = bundle.originalTransaction.outputs.length - 1; i >= 0; i--) { - final out = bundle.originalTransaction.outputs[i]; + for (final out in bundle.originalTransaction.outputs) { final address = addressFromOutputScript(out.scriptPubKey, network); final btcAddress = addressTypeFromStr(address, network); + outputs.add(BitcoinOutput(address: btcAddress, value: BigInt.from(out.amount.toInt()))); + } - int newAmount; - if (out.amount.toInt() >= remainingFee) { - newAmount = out.amount.toInt() - remainingFee; - remainingFee = 0; + // Calculate the total amount and fees + int totalOutAmount = + outputs.fold(0, (previousValue, output) => previousValue + output.value.toInt()); + int currentFee = allInputsAmount - totalOutAmount; + int remainingFee = newFee - currentFee; - // if new amount of output is less than dust amount, then don't add this output as well - if (newAmount <= _dustAmount) { - continue; + if (remainingFee <= 0) { + throw Exception("New fee must be higher than the current fee."); + } + + // Deduct Remaining Fee from Main Outputs + if (remainingFee > 0) { + for (int i = outputs.length - 1; i >= 0; i--) { + int outputAmount = outputs[i].value.toInt(); + + if (outputAmount > _dustAmount) { + int deduction = (outputAmount - _dustAmount >= remainingFee) + ? remainingFee + : outputAmount - _dustAmount; + outputs[i] = BitcoinOutput( + address: outputs[i].address, value: BigInt.from(outputAmount - deduction)); + remainingFee -= deduction; + + if (remainingFee <= 0) break; } - } else { - remainingFee -= out.amount.toInt(); - continue; } - - outputs.add(BitcoinOutput(address: btcAddress, value: BigInt.from(newAmount))); } + // Final check if the remaining fee couldn't be deducted + if (remainingFee > 0) { + throw Exception("Not enough funds to cover the fee."); + } + + // Identify all change outputs final changeAddresses = walletAddresses.allAddresses.where((element) => element.isHidden); + final List changeOutputs = outputs + .where((output) => changeAddresses + .any((element) => element.address == output.address.toAddress(network))) + .toList(); - // look for a change address in the outputs - final changeOutput = outputs.firstWhereOrNull((output) => - changeAddresses.any((element) => element.address == output.address.toAddress(network))); + int totalChangeAmount = + changeOutputs.fold(0, (sum, output) => sum + output.value.toInt()); - // deduct the change amount from the output amount - if (changeOutput != null) { - totalOutAmount -= changeOutput.value.toInt(); - } + // The final amount that the receiver will receive + int sendingAmount = allInputsAmount - newFee - totalChangeAmount; final txb = BitcoinTransactionBuilder( utxos: utxos, @@ -1527,10 +1529,10 @@ abstract class ElectrumWalletBase transaction, type, electrumClient: electrumClient, - amount: totalOutAmount, + amount: sendingAmount, fee: newFee, network: network, - hasChange: changeOutput != null, + hasChange: changeOutputs.isNotEmpty, feeRate: newFee.toString(), )..addListener((transaction) async { transactionHistory.addOne(transaction); @@ -2026,6 +2028,39 @@ abstract class ElectrumWalletBase }); } } + + void _updateInputsAndOutputs(ElectrumTransactionInfo tx, ElectrumTransactionBundle bundle) { + tx.inputAddresses = tx.inputAddresses?.where((address) => address.isNotEmpty).toList(); + + if (tx.inputAddresses == null || + tx.inputAddresses!.isEmpty || + tx.outputAddresses == null || + tx.outputAddresses!.isEmpty) { + List inputAddresses = []; + List outputAddresses = []; + + for (int i = 0; i < bundle.originalTransaction.inputs.length; i++) { + final input = bundle.originalTransaction.inputs[i]; + final inputTransaction = bundle.ins[i]; + final vout = input.txIndex; + final outTransaction = inputTransaction.outputs[vout]; + final address = addressFromOutputScript(outTransaction.scriptPubKey, network); + + if (address.isNotEmpty) inputAddresses.add(address); + } + + for (int i = 0; i < bundle.originalTransaction.outputs.length; i++) { + final out = bundle.originalTransaction.outputs[i]; + final address = addressFromOutputScript(out.scriptPubKey, network); + + if (address.isNotEmpty) outputAddresses.add(address); + } + tx.inputAddresses = inputAddresses; + tx.outputAddresses = outputAddresses; + + transactionHistory.addOne(tx); + } + } } class ScanNode { diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index 5a71e3549..d979f9281 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -398,9 +398,10 @@ class CWBitcoin extends Bitcoin { } @override - Future canReplaceByFee(Object wallet, String transactionHash) async { + Future canReplaceByFee(Object wallet, Object transactionInfo) async { final bitcoinWallet = wallet as ElectrumWallet; - return bitcoinWallet.canReplaceByFee(transactionHash); + final tx = transactionInfo as ElectrumTransactionInfo; + return bitcoinWallet.canReplaceByFee(tx); } @override diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 863c83957..22c083455 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -18,6 +18,7 @@ import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/exceptions.dart'; +import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cake_wallet/view_model/send/send_template_view_model.dart'; @@ -392,25 +393,38 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor } @action - Future replaceByFee(String txId, String newFee) async { + Future replaceByFee(TransactionInfo tx, String newFee) async { state = IsExecutingState(); - final isSufficient = await bitcoin!.isChangeSufficientForFee(wallet, txId, newFee); + try { + final isSufficient = await bitcoin!.isChangeSufficientForFee(wallet, tx.id, newFee); - if (!isSufficient) { - state = AwaitingConfirmationState( - title: S.current.confirm_fee_deduction, - message: S.current.confirm_fee_deduction_content, - onConfirm: () async { - pendingTransaction = await bitcoin!.replaceByFee(wallet, txId, newFee); - state = ExecutedSuccessfullyState(); - }, - onCancel: () { - state = FailureState('Insufficient change for fee'); - }); - } else { - pendingTransaction = await bitcoin!.replaceByFee(wallet, txId, newFee); + if (!isSufficient) { + state = AwaitingConfirmationState( + title: S.current.confirm_fee_deduction, + message: S.current.confirm_fee_deduction_content, + onConfirm: () async => await _executeReplaceByFee(tx, newFee), + onCancel: () => state = FailureState('Insufficient change for fee')); + } else { + await _executeReplaceByFee(tx, newFee); + } + } catch (e) { + state = FailureState(e.toString()); + } + } + + Future _executeReplaceByFee(TransactionInfo tx, String newFee) async { + + + clearOutputs(); + final output = outputs.first; + output.address = tx.outputAddresses?.first ?? ''; + + try { + pendingTransaction = await bitcoin!.replaceByFee(wallet, tx.id, newFee); state = ExecutedSuccessfullyState(); + } catch (e) { + state = FailureState(e.toString()); } } diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index 18715e508..aa63ce860 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -52,7 +52,7 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.bitcoin: _addElectrumListItems(tx, dateFormat); _addBumpFeesListItems(tx); - _checkForRBF(); + _checkForRBF(tx); break; case WalletType.litecoin: case WalletType.bitcoinCash: @@ -349,12 +349,15 @@ abstract class TransactionDetailsViewModelBase with Store { void _addBumpFeesListItems(TransactionInfo tx) { transactionPriority = bitcoin!.getBitcoinTransactionPriorityMedium(); + final inputsCount = (transactionInfo.inputAddresses?.isEmpty ?? true) + ? 1 + : transactionInfo.inputAddresses!.length; + final outputsCount = (transactionInfo.outputAddresses?.isEmpty ?? true) + ? 1 + : transactionInfo.outputAddresses!.length; newFee = bitcoin!.getFeeAmountForPriority( - wallet, - bitcoin!.getBitcoinTransactionPriorityMedium(), - transactionInfo.inputAddresses?.length ?? 1, - transactionInfo.outputAddresses?.length ?? 1); + wallet, bitcoin!.getBitcoinTransactionPriorityMedium(), inputsCount, outputsCount); RBFListItems.add(StandartListItem(title: S.current.old_fee, value: tx.feeFormatted() ?? '0.0')); @@ -383,12 +386,12 @@ abstract class TransactionDetailsViewModelBase with Store { return setNewFee(value: sliderValue, priority: transactionPriority!); })); - if (transactionInfo.inputAddresses != null) { + if (transactionInfo.inputAddresses != null && transactionInfo.inputAddresses!.isNotEmpty) { RBFListItems.add(StandardExpandableListItem( title: S.current.inputs, expandableItems: transactionInfo.inputAddresses!)); } - if (transactionInfo.outputAddresses != null) { + if (transactionInfo.outputAddresses != null && transactionInfo.outputAddresses!.isNotEmpty) { RBFListItems.add(StandardExpandableListItem( title: S.current.outputs, expandableItems: transactionInfo.outputAddresses!)); } @@ -416,10 +419,10 @@ abstract class TransactionDetailsViewModelBase with Store { } @action - Future _checkForRBF() async { + Future _checkForRBF(TransactionInfo tx) async { if (wallet.type == WalletType.bitcoin && transactionInfo.direction == TransactionDirection.outgoing) { - if (await bitcoin!.canReplaceByFee(wallet, transactionInfo.id)) { + if (await bitcoin!.canReplaceByFee(wallet, tx)) { _canReplaceByFee = true; } } @@ -441,7 +444,7 @@ abstract class TransactionDetailsViewModelBase with Store { return bitcoin!.formatterBitcoinAmountToString(amount: newFee); } - void replaceByFee(String newFee) => sendViewModel.replaceByFee(transactionInfo.id, newFee); + void replaceByFee(String newFee) => sendViewModel.replaceByFee(transactionInfo, newFee,); @computed String get pendingTransactionFiatAmountValueFormatted => sendViewModel.isFiatDisabled diff --git a/tool/configure.dart b/tool/configure.dart index a0104c34e..c9b6bbdda 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -79,6 +79,7 @@ import 'dart:typed_data'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/view_model/send/output.dart'; +import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/output_info.dart'; @@ -204,7 +205,7 @@ abstract class Bitcoin { bool isTestnet(Object wallet); Future replaceByFee(Object wallet, String transactionHash, String fee); - Future canReplaceByFee(Object wallet, String transactionHash); + Future canReplaceByFee(Object wallet, Object tx); Future isChangeSufficientForFee(Object wallet, String txId, String newFee); int getFeeAmountForPriority(Object wallet, TransactionPriority priority, int inputsCount, int outputsCount, {int? size}); int getEstimatedFeeWithFeeRate(Object wallet, int feeRate, int? amount, From 8524e238b0b726ed5b71ebc38ae3b8d0477b2f66 Mon Sep 17 00:00:00 2001 From: cyan Date: Sat, 24 Aug 2024 03:42:50 +0200 Subject: [PATCH 70/77] make analyzer less red (#1628) * remove cw_*.dart files from analyzer * Run gen_framework.sh on iOS --- analysis_options.yaml | 13 ++++++++++++- tool/download_moneroc_prebuilds.dart | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 396904041..2063b5a8c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -10,7 +10,18 @@ analyzer: lib/generated/*.dart, cw_monero/ios/External/**, cw_shared_external/**, - shared_external/**] + shared_external/**, + lib/bitcoin/cw_bitcoin.dart, + lib/bitcoin_cash/cw_bitcoin_cash.dart, + lib/ethereum/cw_ethereum.dart, + lib/haven/cw_haven.dart, + lib/monero/cw_monero.dart, + lib/nano/cw_nano.dart, + lib/polygon/cw_polygon.dart, + lib/solana/cw_solana.dart, + lib/tron/cw_tron.dart, + lib/wownero/cw_wownero.dart, + ] language: strict-casts: true strict-raw-types: true diff --git a/tool/download_moneroc_prebuilds.dart b/tool/download_moneroc_prebuilds.dart index 58e8d4b03..9df0b4e7b 100644 --- a/tool/download_moneroc_prebuilds.dart +++ b/tool/download_moneroc_prebuilds.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:dio/dio.dart'; import 'package:archive/archive_io.dart'; @@ -47,4 +49,12 @@ Future main() async { outputStream.writeBytes(archive); } } + if (Platform.isMacOS) { + print("Generating ios framework"); + final result = Process.runSync("bash", [ + "-c", + "cd scripts/ios && ./gen_framework.sh && cd ../.." + ]); + print((result.stdout+result.stderr).toString().trim()); + } } \ No newline at end of file From 40f85d215b2a4064c3586ededd57dba67336af4e Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 24 Aug 2024 16:30:01 +0300 Subject: [PATCH 71/77] Rbf fixes issues op return data plus ThorChain (#1648) * total out amount issue * fix empty inputs and outputs addresses for new tx * fix sum value of utxo not spending * Update configure.dart * Update electrum_wallet.dart * receiving address * review fixes * add op_return data * fix rbf transaction with a memo * add memo check for ThorChain trade * code enhancement [skip ci] * code enhancement [skip ci] * directly use fromElectrumBundle function to update transaction info --------- Co-authored-by: Omar Hatem --- cw_bitcoin/lib/electrum_transaction_info.dart | 23 ++++++++- cw_bitcoin/lib/electrum_wallet.dart | 48 +++++++++++-------- .../exchange/exchange_view_model.dart | 7 +++ .../transaction_details_view_model.dart | 11 ++++- 4 files changed, 65 insertions(+), 24 deletions(-) diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index ee3daa0e0..ebd90ff2b 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cw_bitcoin/address_from_output.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; @@ -7,10 +9,12 @@ import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/format_amount.dart'; import 'package:cw_core/wallet_type.dart'; +import 'package:hex/hex.dart'; class ElectrumTransactionBundle { ElectrumTransactionBundle(this.originalTransaction, {required this.ins, required this.confirmations, this.time}); + final BtcTransaction originalTransaction; final List ins; final int? time; @@ -125,7 +129,24 @@ class ElectrumTransactionInfo extends TransactionInfo { for (final out in bundle.originalTransaction.outputs) { totalOutAmount += out.amount.toInt(); final addressExists = addresses.contains(addressFromOutputScript(out.scriptPubKey, network)); - outputAddresses.add(addressFromOutputScript(out.scriptPubKey, network)); + final address = addressFromOutputScript(out.scriptPubKey, network); + + if (address.isNotEmpty) outputAddresses.add(address); + + // Check if the script contains OP_RETURN + final script = out.scriptPubKey.script; + if (script.contains('OP_RETURN')) { + final index = script.indexOf('OP_RETURN'); + if (index + 1 <= script.length) { + try { + final opReturnData = script[index + 1].toString(); + final decodedString = utf8.decode(HEX.decode(opReturnData)); + outputAddresses.add('OP_RETURN:$decodedString'); + } catch (_) { + outputAddresses.add('OP_RETURN:'); + } + } + } if (addressExists) { receivedAmounts.add(out.amount.toInt()); diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 2a57c8d5c..b763b175b 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -43,6 +43,7 @@ import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:rxdart/subjects.dart'; import 'package:sp_scanner/sp_scanner.dart'; +import 'package:hex/hex.dart'; part 'electrum_wallet.g.dart'; @@ -1413,6 +1414,7 @@ abstract class ElectrumWalletBase List privateKeys = []; var allInputsAmount = 0; + String? memo; // Add inputs for (var i = 0; i < bundle.originalTransaction.inputs.length; i++) { @@ -1451,6 +1453,22 @@ abstract class ElectrumWalletBase // Create a list of available outputs final outputs = []; for (final out in bundle.originalTransaction.outputs) { + + // Check if the script contains OP_RETURN + final script = out.scriptPubKey.script; + if (script.contains('OP_RETURN') && memo == null) { + final index = script.indexOf('OP_RETURN'); + if (index + 1 <= script.length) { + try { + final opReturnData = script[index + 1].toString(); + memo = utf8.decode(HEX.decode(opReturnData)); + continue; + } catch (_) { + throw Exception('Cannot decode OP_RETURN data'); + } + } + } + final address = addressFromOutputScript(out.scriptPubKey, network); final btcAddress = addressTypeFromStr(address, network); outputs.add(BitcoinOutput(address: btcAddress, value: BigInt.from(out.amount.toInt()))); @@ -1507,6 +1525,8 @@ abstract class ElectrumWalletBase outputs: outputs, fee: BigInt.from(newFee), network: network, + memo: memo, + outputOrdering: BitcoinOrdering.none, enableRBF: true, ); @@ -2036,27 +2056,13 @@ abstract class ElectrumWalletBase tx.inputAddresses!.isEmpty || tx.outputAddresses == null || tx.outputAddresses!.isEmpty) { - List inputAddresses = []; - List outputAddresses = []; - - for (int i = 0; i < bundle.originalTransaction.inputs.length; i++) { - final input = bundle.originalTransaction.inputs[i]; - final inputTransaction = bundle.ins[i]; - final vout = input.txIndex; - final outTransaction = inputTransaction.outputs[vout]; - final address = addressFromOutputScript(outTransaction.scriptPubKey, network); - - if (address.isNotEmpty) inputAddresses.add(address); - } - - for (int i = 0; i < bundle.originalTransaction.outputs.length; i++) { - final out = bundle.originalTransaction.outputs[i]; - final address = addressFromOutputScript(out.scriptPubKey, network); - - if (address.isNotEmpty) outputAddresses.add(address); - } - tx.inputAddresses = inputAddresses; - tx.outputAddresses = outputAddresses; + tx = ElectrumTransactionInfo.fromElectrumBundle( + bundle, + walletInfo.type, + network, + addresses: addressesSet, + height: tx.height, + ); transactionHistory.addOne(tx); } diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index f2ea8eeb4..2bbe9954e 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -845,6 +845,13 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with ); } + if ((trade.memo == null || trade.memo!.isEmpty)) { + return CreateTradeResult( + result: false, + errorMessage: 'Memo is required for Thorchain trade', + ); + } + final currenciesToCheckPattern = RegExp('0x[0-9a-zA-Z]'); // Perform checks for payOutAddress diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index aa63ce860..e4f9c3786 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -392,8 +392,15 @@ abstract class TransactionDetailsViewModelBase with Store { } if (transactionInfo.outputAddresses != null && transactionInfo.outputAddresses!.isNotEmpty) { - RBFListItems.add(StandardExpandableListItem( - title: S.current.outputs, expandableItems: transactionInfo.outputAddresses!)); + final outputAddresses = transactionInfo.outputAddresses!.map((element) { + if (element.contains('OP_RETURN:') && element.length > 40) { + return element.substring(0, 40) + '...'; + } + return element; + }).toList(); + + RBFListItems.add( + StandardExpandableListItem(title: S.current.outputs, expandableItems: outputAddresses)); } } From ce21098e9824edf4f8d828f127e4d1aaeefee213 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Mon, 26 Aug 2024 19:06:54 +0200 Subject: [PATCH 72/77] Cw 488 seed offset (#1631) * CW-488 minor code cleanup * Add Derivation Path selector for BTC and LTC * CW-488 Initial Passphrase Impl * CW-488 Final Passphrase Impl * Quick Fix of language Service * CW-488 Implement PR Suggestions * CW-488 Implement PR Suggestions * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * remove monero and wownero support for passphrase until merged [skip ci] * CW-488 Apply requested change * CW-488 Add Passphrase to QR * CW-488 Fix Seed generation * CW-488 Implement Electrum Passphrases * CW-488 Add Seed Length Selector to BIP39 Seeds * CW-488 Minor fix [skip ci] --------- Co-authored-by: Omar Hatem --- cw_bitcoin/lib/bitcoin_mnemonic.dart | 18 +- .../lib/bitcoin_mnemonics_bip39.dart | 3 +- cw_bitcoin/lib/bitcoin_wallet.dart | 4 +- .../bitcoin_wallet_creation_credentials.dart | 16 +- cw_bitcoin/lib/bitcoin_wallet_service.dart | 16 +- cw_bitcoin/lib/electrum_derivations.dart | 3 +- cw_bitcoin/lib/electrum_wallet.dart | 2 + cw_bitcoin/lib/litecoin_wallet.dart | 34 +++- cw_bitcoin/lib/litecoin_wallet_service.dart | 16 +- .../lib/src/bitcoin_cash_base.dart | 1 - .../lib/src/bitcoin_cash_wallet.dart | 14 +- ...coin_cash_wallet_creation_credentials.dart | 18 +- .../lib/src/bitcoin_cash_wallet_service.dart | 30 ++-- cw_core/lib/wallet_base.dart | 2 + lib/bitcoin/cw_bitcoin.dart | 11 +- lib/bitcoin_cash/cw_bitcoin_cash.dart | 8 +- lib/core/wallet_creation_service.dart | 6 +- lib/di.dart | 34 ++-- lib/entities/language_service.dart | 2 +- lib/entities/preferences_key.dart | 1 + lib/entities/seed_type.dart | 46 +++-- lib/router.dart | 97 +++++------ .../dashboard/widgets/verify_form.dart | 16 -- .../advanced_privacy_settings_page.dart | 140 ++++++++++----- .../screens/new_wallet/new_wallet_page.dart | 61 ++++--- .../wallet_restore_from_seed_form.dart | 164 ++++++++++-------- .../screens/restore/wallet_restore_page.dart | 13 +- lib/src/widgets/seed_language_picker.dart | 34 ++-- lib/src/widgets/seed_language_selector.dart | 4 +- lib/store/seed_settings_store.dart | 11 ++ lib/store/settings_store.dart | 77 +++++--- .../advanced_privacy_settings_view_model.dart | 18 +- .../restore/restore_from_qr_vm.dart | 5 +- lib/view_model/seed_settings_view_model.dart | 34 ++++ lib/view_model/seed_type_view_model.dart | 19 -- lib/view_model/wallet_creation_vm.dart | 42 +++-- .../wallet_hardware_restore_view_model.dart | 12 +- lib/view_model/wallet_keys_view_model.dart | 3 +- lib/view_model/wallet_new_vm.dart | 66 ++++--- lib/view_model/wallet_restore_view_model.dart | 40 +++-- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 7 +- res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + tool/configure.dart | 6 +- 67 files changed, 741 insertions(+), 438 deletions(-) rename cw_bitcoin_cash/lib/src/mnemonic.dart => cw_bitcoin/lib/bitcoin_mnemonics_bip39.dart (65%) create mode 100644 lib/store/seed_settings_store.dart create mode 100644 lib/view_model/seed_settings_view_model.dart delete mode 100644 lib/view_model/seed_type_view_model.dart diff --git a/cw_bitcoin/lib/bitcoin_mnemonic.dart b/cw_bitcoin/lib/bitcoin_mnemonic.dart index 905aece28..0749627e9 100644 --- a/cw_bitcoin/lib/bitcoin_mnemonic.dart +++ b/cw_bitcoin/lib/bitcoin_mnemonic.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'dart:math'; import 'dart:typed_data'; + import 'package:crypto/crypto.dart'; import 'package:cryptography/cryptography.dart' as cryptography; import 'package:cw_core/sec_random_native.dart'; @@ -59,11 +60,7 @@ void maskBytes(Uint8List bytes, int bits) { } } -String bufferToBin(Uint8List data) { - final q1 = data.map((e) => e.toRadixString(2).padLeft(8, '0')); - final q2 = q1.join(''); - return q2; -} +String bufferToBin(Uint8List data) => data.map((e) => e.toRadixString(2).padLeft(8, '0')).join(''); String encode(Uint8List data) { final dataBitLen = data.length * 8; @@ -112,17 +109,18 @@ Future checkIfMnemonicIsElectrum2(String mnemonic) async { Future getMnemonicHash(String mnemonic) async { final hmacSha512 = Hmac(sha512, utf8.encode('Seed version')); final digest = hmacSha512.convert(utf8.encode(normalizeText(mnemonic))); - final hx = digest.toString(); - return hx; + return digest.toString(); } -Future mnemonicToSeedBytes(String mnemonic, {String prefix = segwit}) async { +Future mnemonicToSeedBytes(String mnemonic, + {String prefix = segwit, String passphrase = ''}) async { final pbkdf2 = cryptography.Pbkdf2(macAlgorithm: cryptography.Hmac.sha512(), iterations: 2048, bits: 512); final text = normalizeText(mnemonic); - // pbkdf2.deriveKey(secretKey: secretKey, nonce: nonce) + final passphraseBytes = utf8.encode(normalizeText(passphrase)); final key = await pbkdf2.deriveKey( - secretKey: cryptography.SecretKey(text.codeUnits), nonce: 'electrum'.codeUnits); + secretKey: cryptography.SecretKey(text.codeUnits), + nonce: [...'electrum'.codeUnits, ...passphraseBytes]); final bytes = await key.extractBytes(); return Uint8List.fromList(bytes); } diff --git a/cw_bitcoin_cash/lib/src/mnemonic.dart b/cw_bitcoin/lib/bitcoin_mnemonics_bip39.dart similarity index 65% rename from cw_bitcoin_cash/lib/src/mnemonic.dart rename to cw_bitcoin/lib/bitcoin_mnemonics_bip39.dart index 7aac1d5c4..ff02e875c 100644 --- a/cw_bitcoin_cash/lib/src/mnemonic.dart +++ b/cw_bitcoin/lib/bitcoin_mnemonics_bip39.dart @@ -7,5 +7,6 @@ class MnemonicBip39 { static String generate({int strength = 128}) => bip39.generateMnemonic(strength: strength); /// Create root seed from mnemonic - static Uint8List toSeed(String mnemonic) => bip39.mnemonicToSeed(mnemonic); + static Uint8List toSeed(String mnemonic, {String? passphrase}) => + bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? ''); } diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index e2e537ee8..30f04667a 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -115,7 +115,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { break; case DerivationType.electrum: default: - seedBytes = await mnemonicToSeedBytes(mnemonic); + seedBytes = await mnemonicToSeedBytes(mnemonic, passphrase: passphrase ?? ""); break; } return BitcoinWallet( @@ -195,7 +195,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { if (mnemonic != null) { switch (walletInfo.derivationInfo!.derivationType) { case DerivationType.electrum: - seedBytes = await mnemonicToSeedBytes(mnemonic); + seedBytes = await mnemonicToSeedBytes(mnemonic, passphrase: passphrase ?? ""); break; case DerivationType.bip39: default: diff --git a/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart b/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart index 91b8e4ae2..5c276390a 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_creation_credentials.dart @@ -3,16 +3,18 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class BitcoinNewWalletCredentials extends WalletCredentials { - BitcoinNewWalletCredentials( - {required String name, - WalletInfo? walletInfo, - String? password, - DerivationType? derivationType, - String? derivationPath}) - : super( + BitcoinNewWalletCredentials({ + required String name, + WalletInfo? walletInfo, + String? password, + DerivationType? derivationType, + String? derivationPath, + String? passphrase, + }) : super( name: name, walletInfo: walletInfo, password: password, + passphrase: passphrase, ); } diff --git a/cw_bitcoin/lib/bitcoin_wallet_service.dart b/cw_bitcoin/lib/bitcoin_wallet_service.dart index d6d97f3de..9f67f7807 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_service.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; +import 'package:cw_bitcoin/bitcoin_mnemonics_bip39.dart'; import 'package:cw_bitcoin/mnemonic_is_incorrect_exception.dart'; import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart'; import 'package:cw_core/encryption_file_utils.dart'; @@ -35,8 +36,21 @@ class BitcoinWalletService extends WalletService< final network = isTestnet == true ? BitcoinNetwork.testnet : BitcoinNetwork.mainnet; credentials.walletInfo?.network = network.value; + final String mnemonic; + switch ( credentials.walletInfo?.derivationInfo?.derivationType) { + case DerivationType.bip39: + final strength = credentials.seedPhraseLength == 24 ? 256 : 128; + + mnemonic = await MnemonicBip39.generate(strength: strength); + break; + case DerivationType.electrum: + default: + mnemonic = await generateElectrumMnemonic(); + break; + } + final wallet = await BitcoinWalletBase.create( - mnemonic: await generateElectrumMnemonic(), + mnemonic: mnemonic, password: credentials.password!, passphrase: credentials.passphrase, walletInfo: credentials.walletInfo!, diff --git a/cw_bitcoin/lib/electrum_derivations.dart b/cw_bitcoin/lib/electrum_derivations.dart index 749e5c7af..81a3626d2 100644 --- a/cw_bitcoin/lib/electrum_derivations.dart +++ b/cw_bitcoin/lib/electrum_derivations.dart @@ -109,5 +109,4 @@ Map> electrum_derivations = { ], }; - -String electrum_path = electrum_derivations[DerivationType.electrum]!.first.derivationPath!; \ No newline at end of file +String electrum_path = electrum_derivations[DerivationType.electrum]!.first.derivationPath!; diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index b763b175b..0ce4844c6 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -137,6 +137,8 @@ abstract class ElectrumWalletBase Bip32Slip10Secp256k1 get sideHd => accountHD.childKey(Bip32KeyIndex(1)); final EncryptionFileUtils encryptionFileUtils; + + @override final String? passphrase; @override diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 890d98342..12a43dbe6 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -7,6 +7,7 @@ import 'package:bip39/bip39.dart' as bip39; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; +import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/unspent_coins_info.dart'; @@ -36,6 +37,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { required Box unspentCoinsInfo, required Uint8List seedBytes, required EncryptionFileUtils encryptionFileUtils, + String? passphrase, String? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -51,6 +53,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { initialBalance: initialBalance, seedBytes: seedBytes, encryptionFileUtils: encryptionFileUtils, + passphrase: passphrase, currency: CryptoCurrency.ltc) { walletAddresses = LitecoinWalletAddresses( walletInfo, @@ -89,7 +92,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { break; case DerivationType.electrum: default: - seedBytes = await mnemonicToSeedBytes(mnemonic); + seedBytes = await mnemonicToSeedBytes(mnemonic, passphrase: passphrase ?? ""); break; } return LitecoinWallet( @@ -100,6 +103,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { initialAddresses: initialAddresses, initialBalance: initialBalance, encryptionFileUtils: encryptionFileUtils, + passphrase: passphrase, seedBytes: seedBytes, initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, @@ -143,6 +147,31 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { ); } + walletInfo.derivationInfo ??= DerivationInfo(); + + // set the default if not present: + walletInfo.derivationInfo!.derivationPath ??= snp?.derivationPath ?? electrum_path; + walletInfo.derivationInfo!.derivationType ??= snp?.derivationType ?? DerivationType.electrum; + + Uint8List? seedBytes = null; + final mnemonic = keysData.mnemonic; + final passphrase = keysData.passphrase; + + if (mnemonic != null) { + switch (walletInfo.derivationInfo?.derivationType) { + case DerivationType.bip39: + seedBytes = await bip39.mnemonicToSeed( + mnemonic, + passphrase: passphrase ?? "", + ); + break; + case DerivationType.electrum: + default: + seedBytes = await mnemonicToSeedBytes(mnemonic, passphrase: passphrase ?? ""); + break; + } + } + return LitecoinWallet( mnemonic: keysData.mnemonic!, password: password, @@ -150,7 +179,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { unspentCoinsInfo: unspentCoinsInfo, initialAddresses: snp?.addresses, initialBalance: snp?.balance, - seedBytes: await mnemonicToSeedBytes(keysData.mnemonic!), + seedBytes: seedBytes!, + passphrase: passphrase, encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, diff --git a/cw_bitcoin/lib/litecoin_wallet_service.dart b/cw_bitcoin/lib/litecoin_wallet_service.dart index a46b12a2e..c13265934 100644 --- a/cw_bitcoin/lib/litecoin_wallet_service.dart +++ b/cw_bitcoin/lib/litecoin_wallet_service.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'package:cw_bitcoin/bitcoin_mnemonics_bip39.dart'; import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:hive/hive.dart'; @@ -30,8 +31,21 @@ class LitecoinWalletService extends WalletService< @override Future create(BitcoinNewWalletCredentials credentials, {bool? isTestnet}) async { + final String mnemonic; + switch ( credentials.walletInfo?.derivationInfo?.derivationType) { + case DerivationType.bip39: + final strength = credentials.seedPhraseLength == 24 ? 256 : 128; + + mnemonic = await MnemonicBip39.generate(strength: strength); + break; + case DerivationType.electrum: + default: + mnemonic = await generateElectrumMnemonic(); + break; + } + final wallet = await LitecoinWalletBase.create( - mnemonic: await generateElectrumMnemonic(), + mnemonic: mnemonic, password: credentials.password!, passphrase: credentials.passphrase, walletInfo: credentials.walletInfo!, diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_base.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_base.dart index 4699b1649..950b440e7 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_base.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_base.dart @@ -3,5 +3,4 @@ export 'bitcoin_cash_wallet_addresses.dart'; export 'bitcoin_cash_wallet_creation_credentials.dart'; export 'bitcoin_cash_wallet_service.dart'; export 'exceptions/exceptions.dart'; -export 'mnemonic.dart'; export 'bitcoin_cash_address_utils.dart'; diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart index 5659528c0..b1e5e7bf6 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet.dart @@ -1,13 +1,14 @@ import 'package:bitbox/bitbox.dart' as bitbox; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; -import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; +import 'package:cw_bitcoin/bitcoin_mnemonics_bip39.dart'; import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; import 'package:cw_bitcoin/electrum_wallet.dart'; import 'package:cw_bitcoin/electrum_wallet_snapshot.dart'; import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; @@ -30,6 +31,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required Box unspentCoinsInfo, required Uint8List seedBytes, required EncryptionFileUtils encryptionFileUtils, + String? passphrase, BitcoinAddressType? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -45,7 +47,8 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { initialBalance: initialBalance, seedBytes: seedBytes, currency: CryptoCurrency.bch, - encryptionFileUtils: encryptionFileUtils) { + encryptionFileUtils: encryptionFileUtils, + passphrase: passphrase) { walletAddresses = BitcoinCashWalletAddresses( walletInfo, initialAddresses: initialAddresses, @@ -67,6 +70,7 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { required WalletInfo walletInfo, required Box unspentCoinsInfo, required EncryptionFileUtils encryptionFileUtils, + String? passphrase, String? addressPageType, List? initialAddresses, ElectrumBalance? initialBalance, @@ -79,11 +83,12 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { unspentCoinsInfo: unspentCoinsInfo, initialAddresses: initialAddresses, initialBalance: initialBalance, - seedBytes: await MnemonicBip39.toSeed(mnemonic), + seedBytes: await MnemonicBip39.toSeed(mnemonic, passphrase: passphrase), encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: initialRegularAddressIndex, initialChangeAddressIndex: initialChangeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, + passphrase: passphrase, ); } @@ -150,11 +155,12 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store { } }).toList(), initialBalance: snp?.balance, - seedBytes: await MnemonicBip39.toSeed(keysData.mnemonic!), + seedBytes: await MnemonicBip39.toSeed(keysData.mnemonic!, passphrase: keysData.passphrase), encryptionFileUtils: encryptionFileUtils, initialRegularAddressIndex: snp?.regularAddressIndex, initialChangeAddressIndex: snp?.changeAddressIndex, addressPageType: P2pkhAddressType.p2pkh, + passphrase: keysData.passphrase, ); } diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart index 017040c5d..bb93656f1 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_creation_credentials.dart @@ -2,17 +2,19 @@ import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; class BitcoinCashNewWalletCredentials extends WalletCredentials { - BitcoinCashNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}) - : super(name: name, walletInfo: walletInfo, password: password); + BitcoinCashNewWalletCredentials( + {required String name, WalletInfo? walletInfo, String? password, String? passphrase}) + : super(name: name, walletInfo: walletInfo, password: password, passphrase: passphrase); } class BitcoinCashRestoreWalletFromSeedCredentials extends WalletCredentials { - BitcoinCashRestoreWalletFromSeedCredentials( - {required String name, - required String password, - required this.mnemonic, - WalletInfo? walletInfo}) - : super(name: name, password: password, walletInfo: walletInfo); + BitcoinCashRestoreWalletFromSeedCredentials({ + required String name, + required String password, + required this.mnemonic, + WalletInfo? walletInfo, + String? passphrase, + }) : super(name: name, password: password, walletInfo: walletInfo, passphrase: passphrase); final String mnemonic; } diff --git a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart index a970be261..f004356b5 100644 --- a/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart +++ b/cw_bitcoin_cash/lib/src/bitcoin_cash_wallet_service.dart @@ -1,6 +1,8 @@ import 'dart:io'; import 'package:bip39/bip39.dart'; +import 'package:collection/collection.dart'; +import 'package:cw_bitcoin/bitcoin_mnemonics_bip39.dart'; import 'package:cw_bitcoin_cash/cw_bitcoin_cash.dart'; import 'package:cw_core/encryption_file_utils.dart'; import 'package:cw_core/pathForWallet.dart'; @@ -9,7 +11,6 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/wallet_type.dart'; -import 'package:collection/collection.dart'; import 'package:hive/hive.dart'; class BitcoinCashWalletService extends WalletService< @@ -35,11 +36,12 @@ class BitcoinCashWalletService extends WalletService< final strength = credentials.seedPhraseLength == 24 ? 256 : 128; final wallet = await BitcoinCashWalletBase.create( - mnemonic: await MnemonicBip39.generate(strength: strength), + mnemonic: await MnemonicBip39.generate(strength: strength), password: credentials.password!, walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, encryptionFileUtils: encryptionFileUtilsFor(isDirect), + passphrase: credentials.passphrase, ); await wallet.save(); await wallet.init(); @@ -54,11 +56,11 @@ class BitcoinCashWalletService extends WalletService< try { final wallet = await BitcoinCashWalletBase.open( - password: password, - name: name, - walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource, - encryptionFileUtils: encryptionFileUtilsFor(isDirect), + password: password, + name: name, + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); saveBackup(name); @@ -66,11 +68,11 @@ class BitcoinCashWalletService extends WalletService< } catch (_) { await restoreWalletFilesFromBackup(name); final wallet = await BitcoinCashWalletBase.open( - password: password, - name: name, - walletInfo: walletInfo, - unspentCoinsInfo: unspentCoinsInfoSource, - encryptionFileUtils: encryptionFileUtilsFor(isDirect), + password: password, + name: name, + walletInfo: walletInfo, + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect), ); await wallet.init(); return wallet; @@ -130,7 +132,9 @@ class BitcoinCashWalletService extends WalletService< mnemonic: credentials.mnemonic, walletInfo: credentials.walletInfo!, unspentCoinsInfo: unspentCoinsInfoSource, - encryptionFileUtils: encryptionFileUtilsFor(isDirect)); + encryptionFileUtils: encryptionFileUtilsFor(isDirect), + passphrase: credentials.passphrase + ); await wallet.save(); await wallet.init(); return wallet; diff --git a/cw_core/lib/wallet_base.dart b/cw_core/lib/wallet_base.dart index f55816bb7..48ea90f7c 100644 --- a/cw_core/lib/wallet_base.dart +++ b/cw_core/lib/wallet_base.dart @@ -46,6 +46,8 @@ abstract class WalletBase null; + String? get passphrase => null; + Object get keys; WalletAddresses get walletAddresses; diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index d979f9281..c016c1f2a 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -29,8 +29,9 @@ class CWBitcoin extends Bitcoin { @override WalletCredentials createBitcoinNewWalletCredentials( - {required String name, WalletInfo? walletInfo, String? password}) => - BitcoinNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); + {required String name, WalletInfo? walletInfo, String? password, String? passphrase}) => + BitcoinNewWalletCredentials( + name: name, walletInfo: walletInfo, password: password, passphrase: passphrase); @override WalletCredentials createBitcoinHardwareWalletCredentials( @@ -202,8 +203,8 @@ class CWBitcoin extends Bitcoin { await bitcoinWallet.updateAllUnspents(); } - WalletService createBitcoinWalletService( - Box walletInfoSource, Box unspentCoinSource, bool alwaysScan, bool isDirect) { + WalletService createBitcoinWalletService(Box walletInfoSource, + Box unspentCoinSource, bool alwaysScan, bool isDirect) { return BitcoinWalletService(walletInfoSource, unspentCoinSource, alwaysScan, isDirect); } @@ -315,7 +316,7 @@ class CWBitcoin extends Bitcoin { for (DerivationType dType in electrum_derivations.keys) { late Uint8List seedBytes; if (dType == DerivationType.electrum) { - seedBytes = await mnemonicToSeedBytes(mnemonic); + seedBytes = await mnemonicToSeedBytes(mnemonic, passphrase: passphrase ?? ""); } else if (dType == DerivationType.bip39) { seedBytes = bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? ''); } diff --git a/lib/bitcoin_cash/cw_bitcoin_cash.dart b/lib/bitcoin_cash/cw_bitcoin_cash.dart index fcb34a286..62ec1539b 100644 --- a/lib/bitcoin_cash/cw_bitcoin_cash.dart +++ b/lib/bitcoin_cash/cw_bitcoin_cash.dart @@ -15,14 +15,16 @@ class CWBitcoinCash extends BitcoinCash { required String name, WalletInfo? walletInfo, String? password, + String? passphrase, }) => - BitcoinCashNewWalletCredentials(name: name, walletInfo: walletInfo, password: password); + BitcoinCashNewWalletCredentials( + name: name, walletInfo: walletInfo, password: password, passphrase: passphrase); @override WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials( - {required String name, required String mnemonic, required String password}) => + {required String name, required String mnemonic, required String password, String? passphrase}) => BitcoinCashRestoreWalletFromSeedCredentials( - name: name, mnemonic: mnemonic, password: password); + name: name, mnemonic: mnemonic, password: password, passphrase: passphrase); @override TransactionPriority deserializeBitcoinCashTransactionPriority(int raw) => diff --git a/lib/core/wallet_creation_service.dart b/lib/core/wallet_creation_service.dart index 1e9299282..3ee630b33 100644 --- a/lib/core/wallet_creation_service.dart +++ b/lib/core/wallet_creation_service.dart @@ -75,8 +75,10 @@ class WalletCreationService { bool get _hasSeedPhraseLengthOption { switch (type) { - case WalletType.ethereum: + case WalletType.bitcoin: + case WalletType.litecoin: case WalletType.bitcoinCash: + case WalletType.ethereum: case WalletType.polygon: case WalletType.solana: case WalletType.tron: @@ -84,8 +86,6 @@ class WalletCreationService { case WalletType.monero: case WalletType.wownero: case WalletType.none: - case WalletType.bitcoin: - case WalletType.litecoin: case WalletType.haven: case WalletType.nano: case WalletType.banano: diff --git a/lib/di.dart b/lib/di.dart index 1967c9227..8d8c5a368 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -146,7 +146,7 @@ import 'package:cake_wallet/view_model/cake_pay/cake_pay_purchase_view_model.dar import 'package:cake_wallet/view_model/nano_account_list/nano_account_edit_or_create_view_model.dart'; import 'package:cake_wallet/view_model/nano_account_list/nano_account_list_view_model.dart'; import 'package:cake_wallet/view_model/node_list/pow_node_list_view_model.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cake_wallet/view_model/set_up_2fa_viewmodel.dart'; import 'package:cake_wallet/view_model/restore/restore_from_qr_vm.dart'; import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart'; @@ -179,6 +179,7 @@ import 'package:cake_wallet/store/dashboard/trades_store.dart'; import 'package:cake_wallet/store/dashboard/transaction_filter_store.dart'; import 'package:cake_wallet/store/node_list_store.dart'; import 'package:cake_wallet/store/secret_store.dart'; +import 'package:cake_wallet/store/seed_settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/templates/exchange_template_store.dart'; import 'package:cake_wallet/store/templates/send_template_store.dart'; @@ -331,6 +332,7 @@ Future setup({ YatStore(appStore: getIt.get(), secureStorage: getIt.get())..init()); getIt.registerSingleton( AnonpayTransactionsStore(anonpayInvoiceInfoSource: _anonpayInvoiceInfoSource)); + getIt.registerSingleton(SeedSettingsStore()); getIt.registerLazySingleton(() => LedgerViewModel()); @@ -361,6 +363,7 @@ Future setup({ getIt.get(param1: type), _walletInfoSource, getIt.get(param1: type), + getIt.get(), type: type)); getIt.registerFactoryParam((args, closable) { @@ -422,14 +425,21 @@ Future setup({ walletType: args.walletType ?? currentWalletType); }); - getIt.registerFactoryParam((WalletType type, _) { - return WalletRestorationFromQRVM(getIt.get(), - getIt.get(param1: type), _walletInfoSource, type); - }); + getIt.registerFactoryParam((WalletType type, _) => + WalletRestorationFromQRVM( + getIt.get(), + getIt.get(param1: type), + _walletInfoSource, + type, + getIt.get())); getIt.registerFactoryParam((type, _) => - WalletHardwareRestoreViewModel(getIt.get(), getIt.get(), - getIt.get(param1: type), _walletInfoSource, + WalletHardwareRestoreViewModel( + getIt.get(), + getIt.get(), + getIt.get(param1: type), + _walletInfoSource, + getIt.get(), type: type)); getIt.registerFactory(() => WalletAddressListViewModel( @@ -833,7 +843,7 @@ Future setup({ getIt.registerFactory(() => WalletSeedViewModel(getIt.get().wallet!)); - getIt.registerFactory(() => SeedTypeViewModel(getIt.get())); + getIt.registerFactory(() => SeedSettingsViewModel(getIt.get(), getIt.get())); getIt.registerFactoryParam((bool isWalletCreated, _) => WalletSeedPage(getIt.get(), isNewWalletCreated: isWalletCreated)); @@ -1018,12 +1028,12 @@ Future setup({ getIt.registerFactory(() => FaqPage(getIt.get())); getIt.registerFactoryParam((type, _) => - WalletRestoreViewModel( - getIt.get(), getIt.get(param1: type), _walletInfoSource, + WalletRestoreViewModel(getIt.get(), getIt.get(param1: type), + _walletInfoSource, getIt.get(), type: type)); getIt.registerFactoryParam((type, _) => WalletRestorePage( - getIt.get(param1: type), getIt.get())); + getIt.get(param1: type), getIt.get())); getIt.registerFactoryParam, void>( (derivations, _) => WalletRestoreChooseDerivationViewModel(derivationInfos: derivations)); @@ -1275,7 +1285,7 @@ Future setup({ getIt.registerFactory( () => WalletConnectConnectionsView(web3walletService: getIt.get())); - + getIt.registerFactory(() => NFTViewModel(appStore, getIt.get())); getIt.registerFactory(() => TorPage(getIt.get())); diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index 260c8a27f..4a6b358e1 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -60,7 +60,7 @@ class LanguageService { 'yo': 'nga', 'ha': 'hau', 'tl': 'phl', - 'hy': 'arm' + 'hy': 'arm', }; static final list = {}; diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index e1ee0ada3..743357f92 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -77,6 +77,7 @@ class PreferencesKey { static const exchangeProvidersSelection = 'exchange-providers-selection'; static const autoGenerateSubaddressStatusKey = 'auto_generate_subaddress_status'; static const moneroSeedType = 'monero_seed_type'; + static const bitcoinSeedType = 'bitcoin_seed_type'; static const clearnetDonationLink = 'clearnet_donation_link'; static const onionDonationLink = 'onion_donation_link'; static const donationLinkWalletName = 'donation_link_wallet_name'; diff --git a/lib/entities/seed_type.dart b/lib/entities/seed_type.dart index bc2f6cff7..f941c8a2d 100644 --- a/lib/entities/seed_type.dart +++ b/lib/entities/seed_type.dart @@ -1,18 +1,19 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cw_core/enumerable_item.dart'; +import 'package:cw_core/wallet_info.dart'; -class SeedType extends EnumerableItem with Serializable { - const SeedType({required String title, required int raw}) : super(title: title, raw: raw); +class MoneroSeedType extends EnumerableItem with Serializable { + const MoneroSeedType({required String title, required int raw}) : super(title: title, raw: raw); - static const all = [SeedType.legacy, SeedType.polyseed]; + static const all = [MoneroSeedType.legacy, MoneroSeedType.polyseed]; static const defaultSeedType = polyseed; - static const legacy = SeedType(raw: 0, title: 'Legacy (25 words)'); - static const polyseed = SeedType(raw: 1, title: 'Polyseed (16 words)'); - static const wowneroSeed = SeedType(raw: 2, title: 'Wownero (14 words)'); + static const legacy = MoneroSeedType(raw: 0, title: 'Legacy (25 words)'); + static const polyseed = MoneroSeedType(raw: 1, title: 'Polyseed (16 words)'); + static const wowneroSeed = MoneroSeedType(raw: 2, title: 'Wownero (14 words)'); - static SeedType deserialize({required int raw}) { + static MoneroSeedType deserialize({required int raw}) { switch (raw) { case 0: return legacy; @@ -28,14 +29,39 @@ class SeedType extends EnumerableItem with Serializable { @override String toString() { switch (this) { - case SeedType.legacy: + case MoneroSeedType.legacy: return S.current.seedtype_legacy; - case SeedType.polyseed: + case MoneroSeedType.polyseed: return S.current.seedtype_polyseed; - case SeedType.wowneroSeed: + case MoneroSeedType.wowneroSeed: return S.current.seedtype_wownero; default: return ''; } } } + +class BitcoinSeedType extends EnumerableItem with Serializable { + const BitcoinSeedType(this.type, {required String title, required int raw}) + : super(title: title, raw: raw); + + final DerivationType type; + + static const all = [BitcoinSeedType.electrum, BitcoinSeedType.bip39]; + + static const defaultDerivationType = bip39; + + static const electrum = BitcoinSeedType(DerivationType.electrum, raw: 0, title: 'Electrum'); + static const bip39 = BitcoinSeedType(DerivationType.bip39, raw: 1, title: 'BIP39'); + + static BitcoinSeedType deserialize({required int raw}) { + switch (raw) { + case 0: + return electrum; + case 1: + return bip39; + default: + throw Exception('Unexpected token: $raw for SeedType deserialize'); + } + } +} diff --git a/lib/router.dart b/lib/router.dart index 25af39043..281d50b69 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -17,6 +17,8 @@ import 'package:cake_wallet/src/screens/backup/edit_backup_password_page.dart'; import 'package:cake_wallet/src/screens/buy/buy_options_page.dart'; import 'package:cake_wallet/src/screens/buy/buy_webview_page.dart'; import 'package:cake_wallet/src/screens/buy/webview_page.dart'; +import 'package:cake_wallet/src/screens/cake_pay/auth/cake_pay_account_page.dart'; +import 'package:cake_wallet/src/screens/cake_pay/cake_pay.dart'; import 'package:cake_wallet/src/screens/connect_device/connect_device_page.dart'; import 'package:cake_wallet/src/screens/connect_device/select_hardware_wallet_account_page.dart'; import 'package:cake_wallet/src/screens/contact/contact_list_page.dart'; @@ -27,8 +29,8 @@ import 'package:cake_wallet/src/screens/dashboard/edit_token_page.dart'; import 'package:cake_wallet/src/screens/dashboard/home_settings_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/address_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/nft_details_page.dart'; -import 'package:cake_wallet/src/screens/dashboard/sign_page.dart'; import 'package:cake_wallet/src/screens/dashboard/pages/transactions_page.dart'; +import 'package:cake_wallet/src/screens/dashboard/sign_page.dart'; import 'package:cake_wallet/src/screens/disclaimer/disclaimer_page.dart'; import 'package:cake_wallet/src/screens/exchange/exchange_page.dart'; import 'package:cake_wallet/src/screens/exchange/exchange_template_page.dart'; @@ -43,10 +45,9 @@ import 'package:cake_wallet/src/screens/new_wallet/new_wallet_page.dart'; import 'package:cake_wallet/src/screens/new_wallet/new_wallet_type_page.dart'; import 'package:cake_wallet/src/screens/nodes/node_create_or_edit_page.dart'; import 'package:cake_wallet/src/screens/nodes/pow_node_create_or_edit_page.dart'; -import 'package:cake_wallet/src/screens/receive/address_list_page.dart'; -import 'package:cake_wallet/src/screens/restore/sweeping_wallet_page.dart'; import 'package:cake_wallet/src/screens/order_details/order_details_page.dart'; import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart'; +import 'package:cake_wallet/src/screens/receive/address_list_page.dart'; import 'package:cake_wallet/src/screens/receive/anonpay_invoice_page.dart'; import 'package:cake_wallet/src/screens/receive/anonpay_receive_page.dart'; import 'package:cake_wallet/src/screens/receive/fullscreen_qr_page.dart'; @@ -69,11 +70,9 @@ import 'package:cake_wallet/src/screens/settings/manage_nodes_page.dart'; import 'package:cake_wallet/src/screens/settings/other_settings_page.dart'; import 'package:cake_wallet/src/screens/settings/privacy_page.dart'; import 'package:cake_wallet/src/screens/settings/security_backup_page.dart'; -import 'package:cake_wallet/src/screens/cake_pay/auth/cake_pay_account_page.dart'; import 'package:cake_wallet/src/screens/settings/silent_payments_settings.dart'; import 'package:cake_wallet/src/screens/settings/tor_page.dart'; import 'package:cake_wallet/src/screens/settings/trocador_providers_page.dart'; -import 'package:cake_wallet/src/screens/settings/tor_page.dart'; import 'package:cake_wallet/src/screens/setup_2fa/modify_2fa_page.dart'; import 'package:cake_wallet/src/screens/setup_2fa/setup_2fa.dart'; import 'package:cake_wallet/src/screens/setup_2fa/setup_2fa_enter_code_page.dart'; @@ -85,19 +84,18 @@ import 'package:cake_wallet/src/screens/support/support_page.dart'; import 'package:cake_wallet/src/screens/support_chat/support_chat_page.dart'; import 'package:cake_wallet/src/screens/support_other_links/support_other_links_page.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_page.dart'; -import 'package:cake_wallet/src/screens/transaction_details/transaction_details_page.dart'; import 'package:cake_wallet/src/screens/transaction_details/rbf_details_page.dart'; +import 'package:cake_wallet/src/screens/transaction_details/transaction_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_list_page.dart'; import 'package:cake_wallet/src/screens/wallet/wallet_edit_page.dart'; import 'package:cake_wallet/src/screens/wallet_connect/wc_connections_listing_view.dart'; import 'package:cake_wallet/src/screens/wallet_keys/wallet_keys_page.dart'; import 'package:cake_wallet/src/screens/wallet_list/wallet_list_page.dart'; +import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_page.dart'; import 'package:cake_wallet/src/screens/welcome/create_welcome_page.dart'; import 'package:cake_wallet/store/settings_store.dart'; -import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; -import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; @@ -106,7 +104,7 @@ import 'package:cake_wallet/view_model/dashboard/sign_view_model.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart'; import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cake_wallet/view_model/wallet_hardware_restore_view_model.dart'; import 'package:cake_wallet/view_model/wallet_new_vm.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; @@ -120,7 +118,7 @@ import 'package:cw_core/wallet_type.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:cake_wallet/src/screens/cake_pay/cake_pay.dart'; + import 'src/screens/dashboard/pages/nft_import_page.dart'; late RouteSettings currentRouteSettings; @@ -135,7 +133,8 @@ Route createRoute(RouteSettings settings) { case Routes.newWalletFromWelcome: if (SettingsStoreBase.walletPasswordDirectInput) { if (availableWalletTypes.length == 1) { - return createRoute(RouteSettings(name: Routes.newWallet, arguments: availableWalletTypes.first)); + return createRoute( + RouteSettings(name: Routes.newWallet, arguments: availableWalletTypes.first)); } else { return createRoute(RouteSettings(name: Routes.newWalletType)); } @@ -162,10 +161,10 @@ Route createRoute(RouteSettings settings) { case Routes.newWallet: final type = settings.arguments as WalletType; final walletNewVM = getIt.get(param1: type); - final seedTypeViewModel = getIt.get(); + final seedSettingsViewModel = getIt.get(); return CupertinoPageRoute( - builder: (_) => NewWalletPage(walletNewVM, seedTypeViewModel)); + builder: (_) => NewWalletPage(walletNewVM, seedSettingsViewModel)); case Routes.chooseHardwareWalletAccount: final arguments = settings.arguments as List; @@ -348,16 +347,14 @@ Route createRoute(RouteSettings settings) { case Routes.auth: return MaterialPageRoute( fullscreenDialog: true, - builder: (_) - => SettingsStoreBase.walletPasswordDirectInput - ? getIt.get( - param1: WalletUnlockArguments( + builder: (_) => SettingsStoreBase.walletPasswordDirectInput + ? getIt.get( + param1: WalletUnlockArguments( callback: settings.arguments as OnAuthenticationFinished), - instanceName: 'wallet_unlock_verifiable', - param2: true) - : getIt.get( - param1: settings.arguments as OnAuthenticationFinished, - param2: true)); + instanceName: 'wallet_unlock_verifiable', + param2: true) + : getIt.get( + param1: settings.arguments as OnAuthenticationFinished, param2: true)); case Routes.totpAuthCodePage: final args = settings.arguments as TotpAuthArgumentsModel; @@ -371,28 +368,25 @@ Route createRoute(RouteSettings settings) { case Routes.walletUnlockLoadable: return MaterialPageRoute( fullscreenDialog: true, - builder: (_) - => getIt.get( + builder: (_) => getIt.get( param1: settings.arguments as WalletUnlockArguments, - instanceName: 'wallet_unlock_loadable', + instanceName: 'wallet_unlock_loadable', param2: true)); case Routes.unlock: return MaterialPageRoute( fullscreenDialog: true, - builder: (_) - => SettingsStoreBase.walletPasswordDirectInput - ? WillPopScope( - child: getIt.get( + builder: (_) => SettingsStoreBase.walletPasswordDirectInput + ? WillPopScope( + child: getIt.get( param1: WalletUnlockArguments( - callback: settings.arguments as OnAuthenticationFinished), + callback: settings.arguments as OnAuthenticationFinished), param2: false, instanceName: 'wallet_unlock_verifiable'), - onWillPop: () async => false) - : WillPopScope( - child: getIt.get( - param1: settings.arguments as OnAuthenticationFinished, - param2: false), + onWillPop: () async => false) + : WillPopScope( + child: getIt.get( + param1: settings.arguments as OnAuthenticationFinished, param2: false), onWillPop: () async => false)); case Routes.silentPaymentsSettings: @@ -437,11 +431,12 @@ Route createRoute(RouteSettings settings) { return CupertinoPageRoute( builder: (context) => WillPopScope( child: SettingsStoreBase.walletPasswordDirectInput - ? getIt.get(instanceName: 'wallet_password_login') - : getIt.get(instanceName: 'login'), + ? getIt.get(instanceName: 'wallet_password_login') + : getIt.get(instanceName: 'login'), onWillPop: () async => - // FIX-ME: Additional check does it works correctly - (await SystemChannels.platform.invokeMethod('SystemNavigator.pop') ?? false)), + // FIX-ME: Additional check does it works correctly + (await SystemChannels.platform.invokeMethod('SystemNavigator.pop') ?? + false)), fullscreenDialog: true); case Routes.newPowNode: @@ -537,8 +532,7 @@ Route createRoute(RouteSettings settings) { case Routes.support: return CupertinoPageRoute( - fullscreenDialog: true, - builder: (_) => getIt.get()); + fullscreenDialog: true, builder: (_) => getIt.get()); case Routes.supportLiveChat: return CupertinoPageRoute(builder: (_) => getIt.get()); @@ -567,8 +561,7 @@ Route createRoute(RouteSettings settings) { case Routes.cakePayBuyCardPage: final args = settings.arguments as List; - return CupertinoPageRoute( - builder: (_) => getIt.get(param1: args)); + return CupertinoPageRoute(builder: (_) => getIt.get(param1: args)); case Routes.cakePayBuyCardDetailPage: final args = settings.arguments as List; @@ -582,7 +575,8 @@ Route createRoute(RouteSettings settings) { case Routes.cakePayVerifyOtpPage: final args = settings.arguments as List; - return CupertinoPageRoute(builder: (_) => getIt.get(param1: args)); + return CupertinoPageRoute( + builder: (_) => getIt.get(param1: args)); case Routes.cakePayAccountPage: return CupertinoPageRoute(builder: (_) => getIt.get()); @@ -597,16 +591,19 @@ Route createRoute(RouteSettings settings) { case Routes.advancedPrivacySettings: final args = settings.arguments as Map; final type = args['type'] as WalletType; + final isFromRestore = args['isFromRestore'] as bool? ?? false; final useTestnet = args['useTestnet'] as bool; final toggleTestnet = args['toggleTestnet'] as Function(bool? val); return CupertinoPageRoute( builder: (_) => AdvancedPrivacySettingsPage( - useTestnet, - toggleTestnet, - getIt.get(param1: type), - getIt.get(param1: type, param2: false), - getIt.get(), + isFromRestore: isFromRestore, + useTestnet: useTestnet, + toggleUseTestnet: toggleTestnet, + advancedPrivacySettingsViewModel: + getIt.get(param1: type), + nodeViewModel: getIt.get(param1: type, param2: false), + seedSettingsViewModel: getIt.get(), )); case Routes.anonPayInvoicePage: @@ -709,7 +706,7 @@ Route createRoute(RouteSettings settings) { getIt.get(), ), ); - + case Routes.connectDevices: final params = settings.arguments as ConnectDevicePageParams; return MaterialPageRoute( diff --git a/lib/src/screens/dashboard/widgets/verify_form.dart b/lib/src/screens/dashboard/widgets/verify_form.dart index d59261494..bf6809586 100644 --- a/lib/src/screens/dashboard/widgets/verify_form.dart +++ b/lib/src/screens/dashboard/widgets/verify_form.dart @@ -1,23 +1,7 @@ -import 'package:cake_wallet/core/wallet_name_validator.dart'; -import 'package:cake_wallet/entities/generate_name.dart'; -import 'package:cake_wallet/entities/seed_type.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/address_text_field.dart'; -import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; -import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart'; -import 'package:cake_wallet/src/widgets/picker.dart'; -import 'package:cake_wallet/src/widgets/seed_language_picker.dart'; -import 'package:cake_wallet/src/widgets/seed_widget.dart'; -import 'package:cake_wallet/themes/extensions/address_theme.dart'; -import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; -import 'package:cake_wallet/utils/show_bar.dart'; -import 'package:cake_wallet/utils/show_pop_up.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:mobx/mobx.dart'; -import 'package:polyseed/polyseed.dart'; class VerifyForm extends StatefulWidget { VerifyForm({ diff --git a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart index 881d9f95a..ff8ec3dd2 100644 --- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart +++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart @@ -3,52 +3,61 @@ import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/fiat_api_mode.dart'; import 'package:cake_wallet/entities/seed_phrase_length.dart'; import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/nodes/widgets/node_form.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.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/themes/extensions/new_wallet_theme.dart'; -import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; -import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; -import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; -import 'package:cw_core/wallet_type.dart'; -import 'package:flutter_mobx/flutter_mobx.dart'; -import 'package:flutter/material.dart'; -import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; +import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; +import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; +import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; +import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; class AdvancedPrivacySettingsPage extends BasePage { - AdvancedPrivacySettingsPage(this.useTestnet, this.toggleUseTestnet, - this.advancedPrivacySettingsViewModel, this.nodeViewModel, this.seedTypeViewModel); + AdvancedPrivacySettingsPage({ + required this.isFromRestore, + required this.useTestnet, + required this.toggleUseTestnet, + required this.advancedPrivacySettingsViewModel, + required this.nodeViewModel, + required this.seedSettingsViewModel, + }); final AdvancedPrivacySettingsViewModel advancedPrivacySettingsViewModel; final NodeCreateOrEditViewModel nodeViewModel; - final SeedTypeViewModel seedTypeViewModel; + final SeedSettingsViewModel seedSettingsViewModel; @override String get title => S.current.privacy_settings; + final bool isFromRestore; final bool useTestnet; final Function(bool? val) toggleUseTestnet; @override - Widget body(BuildContext context) => AdvancedPrivacySettingsBody(useTestnet, toggleUseTestnet, - advancedPrivacySettingsViewModel, nodeViewModel, seedTypeViewModel); + Widget body(BuildContext context) => _AdvancedPrivacySettingsBody(isFromRestore, useTestnet, + toggleUseTestnet, advancedPrivacySettingsViewModel, nodeViewModel, seedSettingsViewModel); } -class AdvancedPrivacySettingsBody extends StatefulWidget { - const AdvancedPrivacySettingsBody(this.useTestnet, this.toggleUseTestnet, +class _AdvancedPrivacySettingsBody extends StatefulWidget { + const _AdvancedPrivacySettingsBody(this.isFromRestore, this.useTestnet, this.toggleUseTestnet, this.privacySettingsViewModel, this.nodeViewModel, this.seedTypeViewModel, {Key? key}) : super(key: key); final AdvancedPrivacySettingsViewModel privacySettingsViewModel; final NodeCreateOrEditViewModel nodeViewModel; - final SeedTypeViewModel seedTypeViewModel; + final SeedSettingsViewModel seedTypeViewModel; + final bool isFromRestore; final bool useTestnet; final Function(bool? val) toggleUseTestnet; @@ -56,15 +65,23 @@ class AdvancedPrivacySettingsBody extends StatefulWidget { _AdvancedPrivacySettingsBodyState createState() => _AdvancedPrivacySettingsBodyState(); } -class _AdvancedPrivacySettingsBodyState extends State { - _AdvancedPrivacySettingsBodyState(); - +class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBody> { + final TextEditingController passphraseController = TextEditingController(); final _formKey = GlobalKey(); bool? testnetValue; + @override + void initState() { + passphraseController.text = widget.seedTypeViewModel.passphrase ?? ''; + + passphraseController + .addListener(() => widget.seedTypeViewModel.setPassphrase(passphraseController.text)); + super.initState(); + } + @override Widget build(BuildContext context) { - if (testnetValue == null && widget.useTestnet != null) { + if (testnetValue == null && widget.useTestnet) { testnetValue = widget.useTestnet; } @@ -97,6 +114,52 @@ class _AdvancedPrivacySettingsBodyState extends State( + title: S.current.seedtype, + items: MoneroSeedType.all, + selectedItem: widget.seedTypeViewModel.moneroSeedType, + onItemSelected: widget.seedTypeViewModel.setMoneroSeedType, + ), + ); + }), + if ([WalletType.bitcoin, WalletType.litecoin] + .contains(widget.privacySettingsViewModel.type)) + Observer(builder: (_) { + return SettingsChoicesCell( + ChoicesListItem( + title: S.current.seedtype, + items: BitcoinSeedType.all, + selectedItem: widget.seedTypeViewModel.bitcoinSeedType, + onItemSelected: widget.seedTypeViewModel.setBitcoinSeedType, + ), + ); + }), + if (!widget.isFromRestore) ...[ + Observer(builder: (_) { + if (widget.privacySettingsViewModel.hasSeedPhraseLengthOption) + return SettingsPickerCell( + title: S.current.seed_phrase_length, + items: SeedPhraseLength.values, + selectedItem: widget.privacySettingsViewModel.seedPhraseLength, + onItemSelected: (SeedPhraseLength length) { + widget.privacySettingsViewModel.setSeedPhraseLength(length); + }, + ); + return Container(); + }), + if (widget.privacySettingsViewModel.hasPassphraseOption) + Padding( + padding: EdgeInsets.all(24), + child: BaseTextFormField( + hintText: S.current.passphrase, + controller: passphraseController, + obscureText: true, + ), + ), + ], Observer(builder: (_) { return Column( children: [ @@ -122,31 +185,9 @@ class _AdvancedPrivacySettingsBodyState extends State( - title: S.current.seed_phrase_length, - items: SeedPhraseLength.values, - selectedItem: widget.privacySettingsViewModel.seedPhraseLength, - onItemSelected: (SeedPhraseLength length) { - widget.privacySettingsViewModel.setSeedPhraseLength(length); - }, - ); - }), - if (widget.privacySettingsViewModel.hasSeedTypeOption) - Observer(builder: (_) { - return SettingsChoicesCell( - ChoicesListItem( - title: S.current.seedtype, - items: SeedType.all, - selectedItem: widget.seedTypeViewModel.moneroSeedType, - onItemSelected: widget.seedTypeViewModel.setMoneroSeedType, - ), - ); - }), if (widget.privacySettingsViewModel.type == WalletType.bitcoin) Builder(builder: (_) { - final val = testnetValue!; + final val = testnetValue ?? false; return SettingsSwitcherCell( title: S.current.use_testnet, value: val, @@ -154,7 +195,7 @@ class _AdvancedPrivacySettingsBodyState extends State widget.seedTypeViewModel.setPassphrase(passphraseController.text)); + super.dispose(); + } } diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index 471240877..8f61ebb38 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -1,36 +1,35 @@ +import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/core/wallet_name_validator.dart'; import 'package:cake_wallet/entities/generate_name.dart'; -import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart'; -import 'package:cake_wallet/src/widgets/picker.dart'; -import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/main.dart'; import 'package:cake_wallet/routes.dart'; -import 'package:cake_wallet/themes/theme_base.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/seed_type_view_model.dart'; -import 'package:mobx/mobx.dart'; -import 'package:flutter_mobx/flutter_mobx.dart'; -import 'package:flutter/material.dart'; -import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/core/wallet_name_validator.dart'; -import 'package:cake_wallet/src/widgets/seed_language_selector.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart'; +import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; +import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/seed_language_picker.dart'; -import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; -import 'package:cake_wallet/core/execution_state.dart'; -import 'package:cake_wallet/view_model/wallet_new_vm.dart'; +import 'package:cake_wallet/src/widgets/seed_language_selector.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; -import 'package:cake_wallet/entities/seed_type.dart'; - +import 'package:cake_wallet/themes/theme_base.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/seed_settings_view_model.dart'; +import 'package:cake_wallet/view_model/wallet_new_vm.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:mobx/mobx.dart'; class NewWalletPage extends BasePage { - NewWalletPage(this._walletNewVM, this._seedTypeViewModel); + NewWalletPage(this._walletNewVM, this._seedSettingsViewModel); final WalletNewVM _walletNewVM; - final SeedTypeViewModel _seedTypeViewModel; + final SeedSettingsViewModel _seedSettingsViewModel; final walletNameImage = Image.asset('assets/images/wallet_name.png'); @@ -51,15 +50,15 @@ class NewWalletPage extends BasePage { Widget body(BuildContext context) => WalletNameForm( _walletNewVM, currentTheme.type == ThemeType.dark ? walletNameImage : walletNameLightImage, - _seedTypeViewModel); + _seedSettingsViewModel); } class WalletNameForm extends StatefulWidget { - WalletNameForm(this._walletNewVM, this.walletImage, this._seedTypeViewModel); + WalletNameForm(this._walletNewVM, this.walletImage, this._seedSettingsViewModel); final WalletNewVM _walletNewVM; final Image walletImage; - final SeedTypeViewModel _seedTypeViewModel; + final SeedSettingsViewModel _seedSettingsViewModel; @override _WalletNameFormState createState() => _WalletNameFormState(_walletNewVM); @@ -110,7 +109,7 @@ class _WalletNameFormState extends State { } }); - _setSeedType(SeedType.defaultSeedType); + _setSeedType(MoneroSeedType.defaultSeedType); super.initState(); } @@ -285,12 +284,12 @@ class _WalletNameFormState extends State { builder: (BuildContext build) => Padding( padding: EdgeInsets.only(top: 24), child: SelectButton( - text: widget._seedTypeViewModel.moneroSeedType.title, + text: widget._seedSettingsViewModel.moneroSeedType.title, onTap: () async { await showPopUp( context: context, builder: (_) => Picker( - items: SeedType.all, + items: MoneroSeedType.all, selectedAtIndex: isPolyseed ? 1 : 0, onItemSelected: _setSeedType, isSeparated: false, @@ -308,8 +307,8 @@ class _WalletNameFormState extends State { key: _languageSelectorKey, initialSelected: defaultSeedLanguage, seedType: _walletNewVM.hasSeedType - ? widget._seedTypeViewModel.moneroSeedType - : SeedType.legacy, + ? widget._seedSettingsViewModel.moneroSeedType + : MoneroSeedType.legacy, ), ), ) @@ -380,10 +379,10 @@ class _WalletNameFormState extends State { _formProcessing = false; } - bool get isPolyseed => widget._seedTypeViewModel.moneroSeedType == SeedType.polyseed; + bool get isPolyseed => widget._seedSettingsViewModel.moneroSeedType == MoneroSeedType.polyseed; - void _setSeedType(SeedType item) { - widget._seedTypeViewModel.setMoneroSeedType(item); + void _setSeedType(MoneroSeedType item) { + widget._seedSettingsViewModel.setMoneroSeedType(item); _languageSelectorKey.currentState?.selected = defaultSeedLanguage; // Reset Seed language } } diff --git a/lib/src/screens/restore/wallet_restore_from_seed_form.dart b/lib/src/screens/restore/wallet_restore_from_seed_form.dart index ec40eb1c1..f295aab13 100644 --- a/lib/src/screens/restore/wallet_restore_from_seed_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_seed_form.dart @@ -9,35 +9,34 @@ import 'package:cake_wallet/src/widgets/seed_language_picker.dart'; import 'package:cake_wallet/src/widgets/seed_widget.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; import 'package:mobx/mobx.dart'; import 'package:polyseed/polyseed.dart'; class WalletRestoreFromSeedForm extends StatefulWidget { - WalletRestoreFromSeedForm( - {Key? key, - required this.displayLanguageSelector, - required this.displayBlockHeightSelector, - required this.displayPassphrase, - required this.type, - required this.displayWalletPassword, - required this.seedTypeViewModel, - this.blockHeightFocusNode, - this.onHeightOrDateEntered, - this.onSeedChange, - this.onLanguageChange, - this.onPasswordChange, - this.onRepeatedPasswordChange}) - : super(key: key); + WalletRestoreFromSeedForm({Key? key, + required this.displayLanguageSelector, + required this.displayBlockHeightSelector, + required this.displayPassphrase, + required this.type, + required this.displayWalletPassword, + required this.seedSettingsViewModel, + this.blockHeightFocusNode, + this.onHeightOrDateEntered, + this.onSeedChange, + this.onLanguageChange, + this.onPasswordChange, + this.onRepeatedPasswordChange, + }) : super(key: key); final WalletType type; final bool displayLanguageSelector; final bool displayBlockHeightSelector; final bool displayWalletPassword; final bool displayPassphrase; - final SeedTypeViewModel seedTypeViewModel; + final SeedSettingsViewModel seedSettingsViewModel; final FocusNode? blockHeightFocusNode; final Function(bool)? onHeightOrDateEntered; final void Function(String)? onSeedChange; @@ -58,7 +57,9 @@ class WalletRestoreFromSeedFormState extends State { languageController = TextEditingController(), nameTextEditingController = TextEditingController(), passwordTextEditingController = displayWalletPassword ? TextEditingController() : null, - repeatedPasswordTextEditingController = displayWalletPassword ? TextEditingController() : null, + repeatedPasswordTextEditingController = displayWalletPassword + ? TextEditingController() + : null, passphraseController = TextEditingController(), seedTypeController = TextEditingController(); @@ -75,10 +76,11 @@ class WalletRestoreFromSeedFormState extends State { String language; void Function()? passwordListener; void Function()? repeatedPasswordListener; + void Function()? passphraseListener; @override void initState() { - _setSeedType(widget.seedTypeViewModel.moneroSeedType); + _setSeedType(widget.seedSettingsViewModel.moneroSeedType); _setLanguageLabel(language); if (passwordTextEditingController != null) { @@ -87,14 +89,19 @@ class WalletRestoreFromSeedFormState extends State { } if (repeatedPasswordTextEditingController != null) { - repeatedPasswordListener = () => widget.onRepeatedPasswordChange?.call(repeatedPasswordTextEditingController!.text); + repeatedPasswordListener = + () => widget.onRepeatedPasswordChange?.call(repeatedPasswordTextEditingController!.text); repeatedPasswordTextEditingController?.addListener(repeatedPasswordListener!); } + + passphraseListener = () => widget.seedSettingsViewModel.setPassphrase(passphraseController.text); + passphraseController.addListener(passphraseListener!); + moneroSeedTypeReaction = - reaction((_) => widget.seedTypeViewModel.moneroSeedType, (SeedType item) { - _setSeedType(item); - _changeLanguage('English'); - }); + reaction((_) => widget.seedSettingsViewModel.moneroSeedType, (MoneroSeedType item) { + _setSeedType(item); + _changeLanguage('English'); + }); super.initState(); } @@ -110,6 +117,9 @@ class WalletRestoreFromSeedFormState extends State { if (repeatedPasswordListener != null) { repeatedPasswordTextEditingController?.removeListener(repeatedPasswordListener!); } + + passphraseController.removeListener(passphraseListener!); + super.dispose(); } @@ -118,11 +128,13 @@ class WalletRestoreFromSeedFormState extends State { Polyseed.isValidSeed(seed)) { final lang = PolyseedLang.getByPhrase(seed); - _changeSeedType(SeedType.polyseed); + _changeSeedType(MoneroSeedType.polyseed); _changeLanguage(lang.nameEnglish); } - if (widget.type == WalletType.wownero && seed.split(" ").length == 14) { - _changeSeedType(SeedType.wowneroSeed); + if (widget.type == WalletType.wownero && seed + .split(" ") + .length == 14) { + _changeSeedType(MoneroSeedType.wowneroSeed); _changeLanguage("English"); } widget.onSeedChange?.call(seed); @@ -140,7 +152,9 @@ class WalletRestoreFromSeedFormState extends State { children: [ BaseTextFormField( controller: nameTextEditingController, - hintText: S.of(context).wallet_name, + hintText: S + .of(context) + .wallet_name, suffixIcon: IconButton( onPressed: () async { final rName = await generateName(); @@ -156,7 +170,9 @@ class WalletRestoreFromSeedFormState extends State { padding: const EdgeInsets.all(8), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6.0), - color: Theme.of(context).hintColor, + color: Theme + .of(context) + .hintColor, ), width: 34, height: 34, @@ -183,13 +199,14 @@ class WalletRestoreFromSeedFormState extends State { onTap: () async { await showPopUp( context: context, - builder: (_) => Picker( + builder: (_) => + Picker( items: _getItems(), selectedAtIndex: isPolyseed ? 1 : seedTypeController.value.text.contains("14") - ? 2 - : 0, + ? 2 + : 0, mainAxisAlignment: MainAxisAlignment.start, onItemSelected: _changeSeedType, isSeparated: false, @@ -211,37 +228,43 @@ class WalletRestoreFromSeedFormState extends State { if (widget.displayWalletPassword) ...[BaseTextFormField( controller: passwordTextEditingController, - hintText: S.of(context).password, + hintText: S + .of(context) + .password, obscureText: true), BaseTextFormField( controller: repeatedPasswordTextEditingController, - hintText: S.of(context).repeat_wallet_password, - obscureText: true)], + hintText: S + .of(context) + .repeat_wallet_password, + obscureText: true) + ], if (widget.displayLanguageSelector) - if (!seedTypeController.value.text.contains("14") && widget.displayLanguageSelector) - GestureDetector( - onTap: () async { - await showPopUp( - context: context, - builder: (_) => SeedLanguagePicker( - selected: language, - onItemSelected: _changeLanguage, - seedType: isPolyseed ? SeedType.polyseed : SeedType.legacy, - )); - }, - child: Container( - color: Colors.transparent, - padding: EdgeInsets.only(top: 20.0), - child: IgnorePointer( - child: BaseTextFormField( - controller: languageController, - enableInteractiveSelection: false, - readOnly: true, - suffixIcon: expandIcon, + if (!seedTypeController.value.text.contains("14") && widget.displayLanguageSelector) + GestureDetector( + onTap: () async { + await showPopUp( + context: context, + builder: (_) => + SeedLanguagePicker( + selected: language, + onItemSelected: _changeLanguage, + seedType: isPolyseed ? MoneroSeedType.polyseed : MoneroSeedType.legacy, + )); + }, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.only(top: 20.0), + child: IgnorePointer( + child: BaseTextFormField( + controller: languageController, + enableInteractiveSelection: false, + readOnly: true, + suffixIcon: expandIcon, + ), ), ), ), - ), if ((!isPolyseed) && widget.displayBlockHeightSelector) BlockchainHeightWidget( focusNode: widget.blockHeightFocusNode, @@ -262,17 +285,20 @@ class WalletRestoreFromSeedFormState extends State { } bool get isPolyseed => - widget.seedTypeViewModel.moneroSeedType == SeedType.polyseed && - (widget.type == WalletType.monero || widget.type == WalletType.wownero); + widget.seedSettingsViewModel.moneroSeedType == MoneroSeedType.polyseed && + (widget.type == WalletType.monero || widget.type == WalletType.wownero); - Widget get expandIcon => Container( + Widget get expandIcon => + Container( padding: EdgeInsets.all(18), width: 24, height: 24, child: Image.asset( 'assets/images/arrow_bottom_purple_icon.png', height: 8, - color: Theme.of(context).hintColor, + color: Theme + .of(context) + .hintColor, ), ); @@ -280,8 +306,8 @@ class WalletRestoreFromSeedFormState extends State { final setLang = isPolyseed ? "POLYSEED_$language" : seedTypeController.value.text.contains("14") - ? "WOWSEED_" + language - : language; + ? "WOWSEED_" + language + : language; setState(() { this.language = setLang; seedWidgetStateKey.currentState!.changeSeedLanguage(setLang); @@ -293,24 +319,24 @@ class WalletRestoreFromSeedFormState extends State { void _setLanguageLabel(String language) => languageController.text = '${language.replaceAll("POLYSEED_", "")} (Seed language)'; - void _changeSeedType(SeedType item) { + void _changeSeedType(MoneroSeedType item) { _setSeedType(item); _changeLanguage('English'); - widget.seedTypeViewModel.setMoneroSeedType(item); + widget.seedSettingsViewModel.setMoneroSeedType(item); } - void _setSeedType(SeedType item) { + void _setSeedType(MoneroSeedType item) { seedTypeController.text = item.toString(); } - List _getItems() { + List _getItems() { switch (widget.type) { case WalletType.monero: - return [SeedType.legacy, SeedType.polyseed]; + return [MoneroSeedType.legacy, MoneroSeedType.polyseed]; case WalletType.wownero: - return [SeedType.legacy, SeedType.polyseed, SeedType.wowneroSeed]; + return [MoneroSeedType.legacy, MoneroSeedType.polyseed, MoneroSeedType.wowneroSeed]; default: - return [SeedType.legacy]; + return [MoneroSeedType.legacy]; } } } diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index c8fa3665e..741befbc0 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -12,7 +12,7 @@ import 'package:cake_wallet/themes/extensions/wallet_list_theme.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/restore/restore_mode.dart'; -import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cake_wallet/view_model/wallet_restore_view_model.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; @@ -23,7 +23,7 @@ import 'package:mobx/mobx.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; class WalletRestorePage extends BasePage { - WalletRestorePage(this.walletRestoreViewModel, this.seedTypeViewModel) + WalletRestorePage(this.walletRestoreViewModel, this.seedSettingsViewModel) : walletRestoreFromSeedFormKey = GlobalKey(), walletRestoreFromKeysFormKey = GlobalKey(), _pages = [], @@ -33,7 +33,7 @@ class WalletRestorePage extends BasePage { switch (mode) { case WalletRestoreMode.seed: _pages.add(WalletRestoreFromSeedForm( - seedTypeViewModel: seedTypeViewModel, + seedSettingsViewModel: seedSettingsViewModel, displayBlockHeightSelector: walletRestoreViewModel.hasBlockchainHeightLanguageSelector, displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector, @@ -96,7 +96,7 @@ class WalletRestorePage extends BasePage { )); final WalletRestoreViewModel walletRestoreViewModel; - final SeedTypeViewModel seedTypeViewModel; + final SeedSettingsViewModel seedSettingsViewModel; final PageController _controller; final List _pages; final GlobalKey walletRestoreFromSeedFormKey; @@ -233,6 +233,7 @@ class WalletRestorePage extends BasePage { onTap: () { Navigator.of(context) .pushNamed(Routes.advancedPrivacySettings, arguments: { + 'isFromRestore': true, 'type': walletRestoreViewModel.type, 'useTestnet': walletRestoreViewModel.useTestnet, 'toggleTestnet': walletRestoreViewModel.toggleUseTestnet @@ -322,8 +323,7 @@ class WalletRestorePage extends BasePage { } if (walletRestoreViewModel.hasPassphrase) { - credentials['passphrase'] = - walletRestoreFromSeedFormKey.currentState!.passphraseController.text; + credentials['passphrase'] = seedSettingsViewModel.passphrase; } credentials['name'] = @@ -426,6 +426,7 @@ class WalletRestorePage extends BasePage { } await walletRestoreViewModel.create(options: _credentials()); + seedSettingsViewModel.setPassphrase(null); } catch (e) { _formProcessing = false; rethrow; diff --git a/lib/src/widgets/seed_language_picker.dart b/lib/src/widgets/seed_language_picker.dart index 5cb8f2fd3..4a63e3092 100644 --- a/lib/src/widgets/seed_language_picker.dart +++ b/lib/src/widgets/seed_language_picker.dart @@ -11,36 +11,36 @@ class SeedLanguagePickerOption { final String name; final String nameLocalized; final Image image; - final List supportedSeedTypes; + final List supportedSeedTypes; } final List seedLanguages = [ SeedLanguagePickerOption('English', S.current.seed_language_english, - Image.asset('assets/images/flags/usa.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/usa.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('Chinese (Simplified)', S.current.seed_language_chinese, - Image.asset('assets/images/flags/chn.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/chn.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('Chinese (Traditional)', S.current.seed_language_chinese_traditional, - Image.asset('assets/images/flags/chn.png'), [SeedType.polyseed]), + Image.asset('assets/images/flags/chn.png'), [MoneroSeedType.polyseed]), SeedLanguagePickerOption('Dutch', S.current.seed_language_dutch, - Image.asset('assets/images/flags/nld.png'), [SeedType.legacy]), + Image.asset('assets/images/flags/nld.png'), [MoneroSeedType.legacy]), SeedLanguagePickerOption('German', S.current.seed_language_german, - Image.asset('assets/images/flags/deu.png'), [SeedType.legacy]), + Image.asset('assets/images/flags/deu.png'), [MoneroSeedType.legacy]), SeedLanguagePickerOption('Japanese', S.current.seed_language_japanese, - Image.asset('assets/images/flags/jpn.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/jpn.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('Korean', S.current.seed_language_korean, - Image.asset('assets/images/flags/kor.png'), [SeedType.polyseed]), + Image.asset('assets/images/flags/kor.png'), [MoneroSeedType.polyseed]), SeedLanguagePickerOption('Portuguese', S.current.seed_language_portuguese, - Image.asset('assets/images/flags/prt.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/prt.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('Russian', S.current.seed_language_russian, - Image.asset('assets/images/flags/rus.png'), [SeedType.legacy]), + Image.asset('assets/images/flags/rus.png'), [MoneroSeedType.legacy]), SeedLanguagePickerOption('Czech', S.current.seed_language_czech, - Image.asset('assets/images/flags/czk.png'), [SeedType.polyseed]), + Image.asset('assets/images/flags/czk.png'), [MoneroSeedType.polyseed]), SeedLanguagePickerOption('Spanish', S.current.seed_language_spanish, - Image.asset('assets/images/flags/esp.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/esp.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('French', S.current.seed_language_french, - Image.asset('assets/images/flags/fra.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/fra.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), SeedLanguagePickerOption('Italian', S.current.seed_language_italian, - Image.asset('assets/images/flags/ita.png'), [SeedType.legacy, SeedType.polyseed]), + Image.asset('assets/images/flags/ita.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]), ]; const defaultSeedLanguage = 'English'; @@ -51,11 +51,11 @@ class SeedLanguagePicker extends StatefulWidget { SeedLanguagePicker( {Key? key, this.selected = defaultSeedLanguage, - this.seedType = SeedType.defaultSeedType, + this.seedType = MoneroSeedType.defaultSeedType, required this.onItemSelected}) : super(key: key); - final SeedType seedType; + final MoneroSeedType seedType; final String selected; final Function(String) onItemSelected; @@ -68,7 +68,7 @@ class SeedLanguagePickerState extends State { SeedLanguagePickerState( {required this.selected, required this.onItemSelected, required this.seedType}); - final SeedType seedType; + final MoneroSeedType seedType; final String selected; final Function(String) onItemSelected; diff --git a/lib/src/widgets/seed_language_selector.dart b/lib/src/widgets/seed_language_selector.dart index dde78c58c..87f3aa573 100644 --- a/lib/src/widgets/seed_language_selector.dart +++ b/lib/src/widgets/seed_language_selector.dart @@ -7,11 +7,11 @@ import 'package:flutter/material.dart'; class SeedLanguageSelector extends StatefulWidget { SeedLanguageSelector( - {Key? key, required this.initialSelected, this.seedType = SeedType.defaultSeedType}) + {Key? key, required this.initialSelected, this.seedType = MoneroSeedType.defaultSeedType}) : super(key: key); final String initialSelected; - final SeedType seedType; + final MoneroSeedType seedType; @override SeedLanguageSelectorState createState() => SeedLanguageSelectorState(selected: initialSelected); diff --git a/lib/store/seed_settings_store.dart b/lib/store/seed_settings_store.dart new file mode 100644 index 000000000..90c02ba97 --- /dev/null +++ b/lib/store/seed_settings_store.dart @@ -0,0 +1,11 @@ +import 'package:mobx/mobx.dart'; + +part 'seed_settings_store.g.dart'; + +class SeedSettingsStore = SeedSettingsStoreBase with _$SeedSettingsStore; + +abstract class SeedSettingsStoreBase with Store { + + @observable + String? passphrase; +} diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index ee145195c..ea5f43d98 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -1,45 +1,46 @@ import 'dart:io'; + import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; import 'package:cake_wallet/core/secure_storage.dart'; +import 'package:cake_wallet/di.dart'; +import 'package:cake_wallet/entities/action_list_display_mode.dart'; import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart'; -import 'package:cake_wallet/entities/provider_types.dart'; -import 'package:cake_wallet/entities/cake_2fa_preset_options.dart'; import 'package:cake_wallet/entities/background_tasks.dart'; +import 'package:cake_wallet/entities/balance_display_mode.dart'; +import 'package:cake_wallet/entities/cake_2fa_preset_options.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; +import 'package:cake_wallet/entities/fiat_api_mode.dart'; +import 'package:cake_wallet/entities/fiat_currency.dart'; +import 'package:cake_wallet/entities/language_service.dart'; import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; +import 'package:cake_wallet/entities/provider_types.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cake_wallet/entities/seed_phrase_length.dart'; import 'package:cake_wallet/entities/seed_type.dart'; import 'package:cake_wallet/entities/sort_balance_types.dart'; import 'package:cake_wallet/entities/wallet_list_order_types.dart'; -import 'package:cake_wallet/polygon/polygon.dart'; -import 'package:cake_wallet/exchange/provider/trocador_exchange_provider.dart'; -import 'package:cake_wallet/view_model/settings/sync_mode.dart'; -import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/ethereum/ethereum.dart'; -import 'package:cake_wallet/wallet_type_utils.dart'; -import 'package:cake_wallet/wownero/wownero.dart'; -import 'package:cw_core/transaction_priority.dart'; +import 'package:cake_wallet/exchange/provider/trocador_exchange_provider.dart'; +import 'package:cake_wallet/monero/monero.dart'; +import 'package:cake_wallet/polygon/polygon.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_list.dart'; +import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/package_info.dart'; +import 'package:cake_wallet/view_model/settings/sync_mode.dart'; +import 'package:cake_wallet/wallet_type_utils.dart'; +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/wallet_type.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; -import 'package:cake_wallet/utils/package_info.dart'; -import 'package:cake_wallet/di.dart'; -import 'package:cw_core/wallet_type.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:cake_wallet/entities/language_service.dart'; -import 'package:cake_wallet/entities/balance_display_mode.dart'; -import 'package:cake_wallet/entities/fiat_currency.dart'; -import 'package:cw_core/node.dart'; -import 'package:cake_wallet/monero/monero.dart'; -import 'package:cake_wallet/entities/action_list_display_mode.dart'; -import 'package:cake_wallet/entities/fiat_api_mode.dart'; -import 'package:cw_core/set_app_secure_native.dart'; part 'settings_store.g.dart'; @@ -55,7 +56,8 @@ abstract class SettingsStoreBase with Store { required BalanceDisplayMode initialBalanceDisplayMode, required bool initialSaveRecipientAddress, required AutoGenerateSubaddressStatus initialAutoGenerateSubaddressStatus, - required SeedType initialMoneroSeedType, + required MoneroSeedType initialMoneroSeedType, + required BitcoinSeedType initialBitcoinSeedType, required bool initialAppSecure, required bool initialDisableBuy, required bool initialDisableSell, @@ -128,6 +130,7 @@ abstract class SettingsStoreBase with Store { shouldSaveRecipientAddress = initialSaveRecipientAddress, autoGenerateSubaddressStatus = initialAutoGenerateSubaddressStatus, moneroSeedType = initialMoneroSeedType, + bitcoinSeedType = initialBitcoinSeedType, fiatApiMode = initialFiatMode, allowBiometricalAuthentication = initialAllowBiometricalAuthentication, selectedCake2FAPreset = initialCake2FAPresetOptions, @@ -329,9 +332,14 @@ abstract class SettingsStoreBase with Store { reaction( (_) => moneroSeedType, - (SeedType moneroSeedType) => + (MoneroSeedType moneroSeedType) => sharedPreferences.setInt(PreferencesKey.moneroSeedType, moneroSeedType.raw)); + reaction( + (_) => bitcoinSeedType, + (BitcoinSeedType bitcoinSeedType) => sharedPreferences.setInt( + PreferencesKey.bitcoinSeedType, bitcoinSeedType.raw)); + reaction( (_) => fiatApiMode, (FiatApiMode mode) => @@ -555,7 +563,8 @@ abstract class SettingsStoreBase with Store { static const defaultAutoGenerateSubaddressStatus = AutoGenerateSubaddressStatus.initialized; static final walletPasswordDirectInput = Platform.isLinux; static const defaultSeedPhraseLength = SeedPhraseLength.twelveWords; - static const defaultMoneroSeedType = SeedType.defaultSeedType; + static const defaultMoneroSeedType = MoneroSeedType.defaultSeedType; + static const defaultBitcoinSeedType = BitcoinSeedType.defaultDerivationType; @observable FiatCurrency fiatCurrency; @@ -585,7 +594,10 @@ abstract class SettingsStoreBase with Store { AutoGenerateSubaddressStatus autoGenerateSubaddressStatus; @observable - SeedType moneroSeedType; + MoneroSeedType moneroSeedType; + + @observable + BitcoinSeedType bitcoinSeedType; @observable bool isAppSecure; @@ -945,9 +957,15 @@ abstract class SettingsStoreBase with Store { final _moneroSeedType = sharedPreferences.getInt(PreferencesKey.moneroSeedType); final moneroSeedType = _moneroSeedType != null - ? SeedType.deserialize(raw: _moneroSeedType) + ? MoneroSeedType.deserialize(raw: _moneroSeedType) : defaultMoneroSeedType; + final _bitcoinSeedType = sharedPreferences.getInt(PreferencesKey.bitcoinSeedType); + + final bitcoinSeedType = _bitcoinSeedType != null + ? BitcoinSeedType.deserialize(raw: _bitcoinSeedType) + : defaultBitcoinSeedType; + final nodes = {}; final powNodes = {}; @@ -1111,6 +1129,7 @@ abstract class SettingsStoreBase with Store { initialSaveRecipientAddress: shouldSaveRecipientAddress, initialAutoGenerateSubaddressStatus: autoGenerateSubaddressStatus, initialMoneroSeedType: moneroSeedType, + initialBitcoinSeedType: bitcoinSeedType, initialAppSecure: isAppSecure, initialDisableBuy: disableBuy, initialDisableSell: disableSell, @@ -1233,9 +1252,15 @@ abstract class SettingsStoreBase with Store { final _moneroSeedType = sharedPreferences.getInt(PreferencesKey.moneroSeedType); moneroSeedType = _moneroSeedType != null - ? SeedType.deserialize(raw: _moneroSeedType) + ? MoneroSeedType.deserialize(raw: _moneroSeedType) : defaultMoneroSeedType; + final _bitcoinSeedType = sharedPreferences.getInt(PreferencesKey.bitcoinSeedType); + + bitcoinSeedType = _bitcoinSeedType != null + ? BitcoinSeedType.deserialize(raw: _bitcoinSeedType) + : defaultBitcoinSeedType; + balanceDisplayMode = BalanceDisplayMode.deserialize( raw: sharedPreferences.getInt(PreferencesKey.currentBalanceDisplayModeKey)!); shouldSaveRecipientAddress = diff --git a/lib/view_model/advanced_privacy_settings_view_model.dart b/lib/view_model/advanced_privacy_settings_view_model.dart index 73308f15a..da294cdea 100644 --- a/lib/view_model/advanced_privacy_settings_view_model.dart +++ b/lib/view_model/advanced_privacy_settings_view_model.dart @@ -30,6 +30,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { final SettingsStore _settingsStore; + @computed bool get hasSeedPhraseLengthOption { // convert to switch case so that it give a syntax error when adding a new wallet type // thus we don't forget about it @@ -40,11 +41,14 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { case WalletType.solana: case WalletType.tron: return true; + + case WalletType.bitcoin: + case WalletType.litecoin: + return _settingsStore.bitcoinSeedType == BitcoinSeedType.bip39; + case WalletType.monero: case WalletType.wownero: case WalletType.none: - case WalletType.bitcoin: - case WalletType.litecoin: case WalletType.haven: case WalletType.nano: case WalletType.banano: @@ -52,7 +56,13 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { } } - bool get hasSeedTypeOption => type == WalletType.monero || type == WalletType.wownero; + bool get hasSeedTypeOption => [WalletType.monero, WalletType.wownero].contains(type); + + bool get hasPassphraseOption => [ + WalletType.bitcoin, + WalletType.litecoin, + WalletType.bitcoinCash, + ].contains(type); @computed bool get addCustomNode => _addCustomNode; @@ -61,7 +71,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { SeedPhraseLength get seedPhraseLength => _settingsStore.seedPhraseLength; @computed - bool get isPolySeed => _settingsStore.moneroSeedType == SeedType.polyseed; + bool get isPolySeed => _settingsStore.moneroSeedType == MoneroSeedType.polyseed; @action void setFiatApiMode(FiatApiMode fiatApiMode) => _settingsStore.fiatApiMode = fiatApiMode; diff --git a/lib/view_model/restore/restore_from_qr_vm.dart b/lib/view_model/restore/restore_from_qr_vm.dart index f5938911b..789d7da52 100644 --- a/lib/view_model/restore/restore_from_qr_vm.dart +++ b/lib/view_model/restore/restore_from_qr_vm.dart @@ -7,6 +7,7 @@ import 'package:cake_wallet/solana/solana.dart'; import 'package:cake_wallet/tron/tron.dart'; 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:cake_wallet/wownero/wownero.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -26,13 +27,13 @@ class WalletRestorationFromQRVM = WalletRestorationFromQRVMBase with _$WalletRes abstract class WalletRestorationFromQRVMBase extends WalletCreationVM with Store { WalletRestorationFromQRVMBase(AppStore appStore, WalletCreationService walletCreationService, - Box walletInfoSource, WalletType type) + Box walletInfoSource, WalletType type, SeedSettingsViewModel seedSettingsViewModel) : height = 0, viewKey = '', spendKey = '', wif = '', address = '', - super(appStore, walletInfoSource, walletCreationService, type: type, isRecovery: true); + super(appStore, walletInfoSource, walletCreationService, seedSettingsViewModel, type: type, isRecovery: true); @observable int height; diff --git a/lib/view_model/seed_settings_view_model.dart b/lib/view_model/seed_settings_view_model.dart new file mode 100644 index 000000000..3a9536885 --- /dev/null +++ b/lib/view_model/seed_settings_view_model.dart @@ -0,0 +1,34 @@ +import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:cake_wallet/store/seed_settings_store.dart'; +import 'package:mobx/mobx.dart'; + +part 'seed_settings_view_model.g.dart'; + +class SeedSettingsViewModel = SeedSettingsViewModelBase with _$SeedSettingsViewModel; + +abstract class SeedSettingsViewModelBase with Store { + SeedSettingsViewModelBase(this._appStore, this._seedSettingsStore); + + @computed + MoneroSeedType get moneroSeedType => _appStore.settingsStore.moneroSeedType; + + @action + void setMoneroSeedType(MoneroSeedType seedType) => _appStore.settingsStore.moneroSeedType = seedType; + + @computed + BitcoinSeedType get bitcoinSeedType => _appStore.settingsStore.bitcoinSeedType; + + @action + void setBitcoinSeedType(BitcoinSeedType derivationType) => + _appStore.settingsStore.bitcoinSeedType = derivationType; + + @computed + String? get passphrase => this._seedSettingsStore.passphrase; + + @action + void setPassphrase(String? passphrase) => this._seedSettingsStore.passphrase = passphrase; + + final AppStore _appStore; + final SeedSettingsStore _seedSettingsStore; +} diff --git a/lib/view_model/seed_type_view_model.dart b/lib/view_model/seed_type_view_model.dart deleted file mode 100644 index e3597be1c..000000000 --- a/lib/view_model/seed_type_view_model.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:cake_wallet/entities/seed_type.dart'; -import 'package:cake_wallet/store/app_store.dart'; -import 'package:mobx/mobx.dart'; - -part 'seed_type_view_model.g.dart'; - -class SeedTypeViewModel = SeedTypeViewModelBase with _$SeedTypeViewModel; - -abstract class SeedTypeViewModelBase with Store { - SeedTypeViewModelBase(this._appStore); - - @computed - SeedType get moneroSeedType => _appStore.settingsStore.moneroSeedType; - - @action - void setMoneroSeedType(SeedType seedType) => _appStore.settingsStore.moneroSeedType = seedType; - - final AppStore _appStore; -} diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index e14934986..5760f5eec 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -1,20 +1,21 @@ import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/wallet_creation_service.dart'; -import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/entities/background_tasks.dart'; +import 'package:cake_wallet/entities/generate_name.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/view_model/restore/restore_wallet.dart'; -import 'package:hive/hive.dart'; -import 'package:mobx/mobx.dart'; -import 'package:cake_wallet/core/execution_state.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; +import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; -import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; -import 'package:cake_wallet/store/app_store.dart'; -import 'package:cake_wallet/entities/generate_name.dart'; +import 'package:hive/hive.dart'; +import 'package:mobx/mobx.dart'; import 'package:polyseed/polyseed.dart'; part 'wallet_creation_vm.g.dart'; @@ -23,6 +24,7 @@ class WalletCreationVM = WalletCreationVMBase with _$WalletCreationVM; abstract class WalletCreationVMBase with Store { WalletCreationVMBase(this._appStore, this._walletInfoSource, this.walletCreationService, + this.seedSettingsViewModel, {required this.type, required this.isRecovery}) : state = InitialExecutionState(), name = ''; @@ -44,7 +46,6 @@ abstract class WalletCreationVMBase with Store { @observable String? repeatedWalletPassword; - bool get hasWalletPassword => SettingsStoreBase.walletPasswordDirectInput; WalletType type; @@ -52,6 +53,7 @@ abstract class WalletCreationVMBase with Store { final WalletCreationService walletCreationService; final Box _walletInfoSource; final AppStore _appStore; + final SeedSettingsViewModel seedSettingsViewModel; bool isPolyseed(String seed) => (type == WalletType.monero || type == WalletType.wownero) && @@ -109,17 +111,35 @@ abstract class WalletCreationVMBase with Store { getIt.get().registerSyncTask(); _appStore.authenticationStore.allowed(); state = ExecutedSuccessfullyState(); - } catch (e, s) { + } catch (e, _) { state = FailureState(e.toString()); } } DerivationInfo? getDefaultDerivation() { - switch (this.type) { + final useBip39 = seedSettingsViewModel.bitcoinSeedType.type == DerivationType.bip39; + switch (type) { case WalletType.nano: return DerivationInfo(derivationType: DerivationType.nano); case WalletType.bitcoin: + if (useBip39) { + return DerivationInfo( + derivationType: DerivationType.bip39, + derivationPath: "m/84'/0'/0'", + description: "Standard BIP84 native segwit", + scriptType: "p2wpkh", + ); + } + return bitcoin!.getElectrumDerivations()[DerivationType.electrum]!.first; case WalletType.litecoin: + if (useBip39) { + return DerivationInfo( + derivationType: DerivationType.bip39, + derivationPath: "m/84'/2'/0'", + description: "Default Litecoin", + scriptType: "p2wpkh", + ); + } return bitcoin!.getElectrumDerivations()[DerivationType.electrum]!.first; default: return null; diff --git a/lib/view_model/wallet_hardware_restore_view_model.dart b/lib/view_model/wallet_hardware_restore_view_model.dart index 804ef7e3c..68bc95a00 100644 --- a/lib/view_model/wallet_hardware_restore_view_model.dart +++ b/lib/view_model/wallet_hardware_restore_view_model.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/polygon/polygon.dart'; import 'package:cake_wallet/store/app_store.dart'; 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/wallet_base.dart'; @@ -25,10 +26,15 @@ abstract class WalletHardwareRestoreViewModelBase extends WalletCreationVM with int _nextIndex = 0; - WalletHardwareRestoreViewModelBase(this.ledgerViewModel, AppStore appStore, - WalletCreationService walletCreationService, Box walletInfoSource, + WalletHardwareRestoreViewModelBase( + this.ledgerViewModel, + AppStore appStore, + WalletCreationService walletCreationService, + Box walletInfoSource, + SeedSettingsViewModel seedSettingsViewModel, {required WalletType type}) - : super(appStore, walletInfoSource, walletCreationService, type: type, isRecovery: true); + : super(appStore, walletInfoSource, walletCreationService, seedSettingsViewModel, + type: type, isRecovery: true); @observable String name = ""; diff --git a/lib/view_model/wallet_keys_view_model.dart b/lib/view_model/wallet_keys_view_model.dart index 1d5c27fed..9921ae30a 100644 --- a/lib/view_model/wallet_keys_view_model.dart +++ b/lib/view_model/wallet_keys_view_model.dart @@ -276,7 +276,8 @@ abstract class WalletKeysViewModelBase with Store { if (_appStore.wallet!.seed == null && _appStore.wallet!.privateKey != null) 'private_key': _appStore.wallet!.privateKey!, - if (restoreHeightResult != null) ...{'height': restoreHeightResult} + if (restoreHeightResult != null) ...{'height': restoreHeightResult}, + if (_appStore.wallet!.passphrase != null) 'passphrase': _appStore.wallet!.passphrase! }; } diff --git a/lib/view_model/wallet_new_vm.dart b/lib/view_model/wallet_new_vm.dart index a618695b1..8c0f4f95f 100644 --- a/lib/view_model/wallet_new_vm.dart +++ b/lib/view_model/wallet_new_vm.dart @@ -1,35 +1,42 @@ -import 'package:cake_wallet/ethereum/ethereum.dart'; +import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; -import 'package:cake_wallet/solana/solana.dart'; -import 'package:cake_wallet/tron/tron.dart'; -import 'package:cake_wallet/wownero/wownero.dart'; -import 'package:hive/hive.dart'; -import 'package:mobx/mobx.dart'; +import 'package:cake_wallet/core/wallet_creation_service.dart'; +import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/ethereum/ethereum.dart'; +import 'package:cake_wallet/haven/haven.dart'; import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/nano/nano.dart'; +import 'package:cake_wallet/solana/solana.dart'; import 'package:cake_wallet/store/app_store.dart'; +import 'package:cake_wallet/tron/tron.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; +import 'package:cake_wallet/view_model/wallet_creation_vm.dart'; +import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cw_core/wallet_base.dart'; -import 'package:cake_wallet/core/wallet_creation_service.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_type.dart'; -import 'package:cake_wallet/view_model/wallet_creation_vm.dart'; -import 'package:cake_wallet/bitcoin/bitcoin.dart'; -import 'package:cake_wallet/haven/haven.dart'; -import 'advanced_privacy_settings_view_model.dart'; +import 'package:hive/hive.dart'; +import 'package:mobx/mobx.dart'; import '../polygon/polygon.dart'; +import 'advanced_privacy_settings_view_model.dart'; part 'wallet_new_vm.g.dart'; class WalletNewVM = WalletNewVMBase with _$WalletNewVM; abstract class WalletNewVMBase extends WalletCreationVM with Store { - WalletNewVMBase(AppStore appStore, WalletCreationService walletCreationService, - Box walletInfoSource, this.advancedPrivacySettingsViewModel, + WalletNewVMBase( + AppStore appStore, + WalletCreationService walletCreationService, + Box walletInfoSource, + this.advancedPrivacySettingsViewModel, + SeedSettingsViewModel seedSettingsViewModel, {required WalletType type}) : selectedMnemonicLanguage = '', - super(appStore, walletInfoSource, walletCreationService, type: type, isRecovery: false); + super(appStore, walletInfoSource, walletCreationService, seedSettingsViewModel, + type: type, isRecovery: false); final AdvancedPrivacySettingsViewModel advancedPrivacySettingsViewModel; @@ -37,47 +44,58 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store { String selectedMnemonicLanguage; bool get hasLanguageSelector => - type == WalletType.monero || type == WalletType.haven || type == WalletType.wownero; + [WalletType.monero, WalletType.haven, WalletType.wownero].contains(type); int get seedPhraseWordsLength { switch (type) { case WalletType.monero: case WalletType.wownero: - if (advancedPrivacySettingsViewModel.isPolySeed) { - return 16; - } - return 25; + return advancedPrivacySettingsViewModel.isPolySeed ? 16 : 25; case WalletType.tron: case WalletType.solana: case WalletType.polygon: case WalletType.ethereum: case WalletType.bitcoinCash: return advancedPrivacySettingsViewModel.seedPhraseLength.value; + case WalletType.bitcoin: + case WalletType.litecoin: + return seedSettingsViewModel.bitcoinSeedType == BitcoinSeedType.bip39 + ? advancedPrivacySettingsViewModel.seedPhraseLength.value + : 24; default: return 24; } } - bool get hasSeedType => type == WalletType.monero || type == WalletType.wownero; + bool get hasSeedType => [WalletType.monero, WalletType.wownero].contains(type); @override WalletCredentials getCredentials(dynamic _options) { final options = _options as List?; + final passphrase = seedSettingsViewModel.passphrase; + seedSettingsViewModel.setPassphrase(null); + switch (type) { case WalletType.monero: return monero!.createMoneroNewWalletCredentials( - name: name, language: options!.first as String, password: walletPassword, isPolyseed: options.last as bool); + name: name, + language: options!.first as String, + password: walletPassword, + isPolyseed: options.last as bool); case WalletType.bitcoin: - return bitcoin!.createBitcoinNewWalletCredentials(name: name, password: walletPassword); + return bitcoin!.createBitcoinNewWalletCredentials( + name: name, password: walletPassword, passphrase: passphrase); case WalletType.litecoin: - return bitcoin!.createBitcoinNewWalletCredentials(name: name, password: walletPassword); + return bitcoin!.createBitcoinNewWalletCredentials( + name: name, password: walletPassword, passphrase: passphrase); case WalletType.haven: return haven!.createHavenNewWalletCredentials( name: name, language: options!.first as String, password: walletPassword); case WalletType.ethereum: return ethereum!.createEthereumNewWalletCredentials(name: name, password: walletPassword); case WalletType.bitcoinCash: - return bitcoinCash!.createBitcoinCashNewWalletCredentials(name: name, password: walletPassword); + return bitcoinCash!.createBitcoinCashNewWalletCredentials( + name: name, password: walletPassword, passphrase: passphrase); case WalletType.nano: case WalletType.banano: return nano!.createNanoNewWalletCredentials(name: name); diff --git a/lib/view_model/wallet_restore_view_model.dart b/lib/view_model/wallet_restore_view_model.dart index a38baabd8..a365a2040 100644 --- a/lib/view_model/wallet_restore_view_model.dart +++ b/lib/view_model/wallet_restore_view_model.dart @@ -1,25 +1,26 @@ import 'package:cake_wallet/bitcoin/bitcoin.dart'; -import 'package:cake_wallet/di.dart'; -import 'package:cake_wallet/nano/nano.dart'; -import 'package:cake_wallet/ethereum/ethereum.dart'; -import 'package:cake_wallet/wownero/wownero.dart'; import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; -import 'package:cake_wallet/polygon/polygon.dart'; -import 'package:cake_wallet/solana/solana.dart'; -import 'package:cake_wallet/tron/tron.dart'; -import 'package:hive/hive.dart'; -import 'package:mobx/mobx.dart'; -import 'package:cake_wallet/store/app_store.dart'; -import 'package:cw_core/wallet_base.dart'; import 'package:cake_wallet/core/generate_wallet_password.dart'; import 'package:cake_wallet/core/wallet_creation_service.dart'; -import 'package:cw_core/wallet_credentials.dart'; -import 'package:cw_core/wallet_type.dart'; -import 'package:cw_core/wallet_info.dart'; -import 'package:cake_wallet/view_model/wallet_creation_vm.dart'; -import 'package:cake_wallet/monero/monero.dart'; +import 'package:cake_wallet/di.dart'; +import 'package:cake_wallet/ethereum/ethereum.dart'; import 'package:cake_wallet/haven/haven.dart'; +import 'package:cake_wallet/monero/monero.dart'; +import 'package:cake_wallet/nano/nano.dart'; +import 'package:cake_wallet/polygon/polygon.dart'; +import 'package:cake_wallet/solana/solana.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:cake_wallet/tron/tron.dart'; import 'package:cake_wallet/view_model/restore/restore_mode.dart'; +import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; +import 'package:cake_wallet/view_model/wallet_creation_vm.dart'; +import 'package:cake_wallet/wownero/wownero.dart'; +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_type.dart'; +import 'package:hive/hive.dart'; +import 'package:mobx/mobx.dart'; part 'wallet_restore_view_model.g.dart'; @@ -27,7 +28,7 @@ class WalletRestoreViewModel = WalletRestoreViewModelBase with _$WalletRestoreVi abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store { WalletRestoreViewModelBase(AppStore appStore, WalletCreationService walletCreationService, - Box walletInfoSource, + Box walletInfoSource, SeedSettingsViewModel seedSettingsViewModel, {required WalletType type}) : hasSeedLanguageSelector = type == WalletType.monero || type == WalletType.haven || type == WalletType.wownero, @@ -41,7 +42,7 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store { type == WalletType.tron, isButtonEnabled = false, mode = WalletRestoreMode.seed, - super(appStore, walletInfoSource, walletCreationService, type: type, isRecovery: true) { + super(appStore, walletInfoSource, walletCreationService, seedSettingsViewModel, type: type, isRecovery: true) { switch (type) { case WalletType.monero: availableModes = WalletRestoreMode.values; @@ -76,7 +77,8 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store { final bool hasBlockchainHeightLanguageSelector; final bool hasRestoreFromPrivateKey; - bool get hasPassphrase => [WalletType.bitcoin, WalletType.litecoin].contains(type); + bool get hasPassphrase => + [WalletType.bitcoin, WalletType.litecoin, WalletType.bitcoinCash].contains(type); @observable WalletRestoreMode mode; diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index f84f6102b..89068d2d0 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "هل أنت متأكد أنك تريد حذف محفظة ${wallet_name}؟", "deleteConnectionConfirmationPrompt": "ـﺑ ﻝﺎﺼﺗﻻﺍ ﻑﺬﺣ ﺪﻳﺮﺗ ﻚﻧﺃ ﺪﻛﺄﺘﻣ ﺖﻧﺃ ﻞﻫ", "denominations": "الطوائف", + "derivationpath": "مسار الاشتقاق", "descending": "النزول", "description": "ﻒﺻﻭ", "destination_tag": "علامة الوجهة:", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 0b6b688bb..1ff8fdf85 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Сигурни ли сте, че искате да изтриете протфейла ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Сигурни ли сте, че искате да изтриете връзката към", "denominations": "Деноминации", + "derivationpath": "Пътят на производно", "descending": "Низходящ", "description": "Описание", "destination_tag": "Destination tag:", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index ef225041d..904c6d8e4 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Opravdu chcete smazat ${wallet_name} peněženku?", "deleteConnectionConfirmationPrompt": "Jste si jisti, že chcete smazat připojení k?", "denominations": "Označení", + "derivationpath": "Derivační cesta", "descending": "Klesající", "description": "Popis", "destination_tag": "Destination Tag:", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 393c3d928..860d4114d 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Sind Sie sicher, dass Sie das ${wallet_name} Wallet löschen möchten?", "deleteConnectionConfirmationPrompt": "Sind Sie sicher, dass Sie die Verbindung zu löschen möchten?", "denominations": "Konfessionen", + "derivationpath": "Ableitungspfad", "descending": "Absteigend", "description": "Beschreibung", "destination_tag": "Ziel-Tag:", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 4ac7dd8fd..9f89eb6ab 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Are you sure that you want to delete ${wallet_name} wallet?", "deleteConnectionConfirmationPrompt": "Are you sure that you want to delete the connection to", "denominations": "Denominations", + "derivationpath": "Derivation Path", "descending": "Descending", "description": "Description", "destination_tag": "Destination tag:", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index c308f045a..250decfc4 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "¿Está seguro de que desea eliminar la billetera ${wallet_name}?", "deleteConnectionConfirmationPrompt": "¿Está seguro de que desea eliminar la conexión a", "denominations": "Denominaciones", + "derivationpath": "Ruta de derivación", "descending": "Descendente", "description": "Descripción", "destination_tag": "Etiqueta de destino:", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 4bc5c9809..297019aa0 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Êtes-vous sûr de vouloir supprimer le portefeuille (wallet) ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Êtes-vous sûr de vouloir supprimer la connexion à", "denominations": "Dénominations", + "derivationpath": "Chemin de dérivation", "descending": "Descendant", "description": "Description", "destination_tag": "Tag de destination :", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 025a33f6b..05cdf27d4 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Shin kun tabbata cewa kuna son share jakar ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Shin kun tabbata cewa kuna son share haɗin zuwa", "denominations": "Denominations", + "derivationpath": "Hanyar Nasara", "descending": "Saukowa", "description": "Bayani", "destination_tag": "Tambarin makoma:", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 346c420a9..30f86d9ae 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "क्या आप वाकई ${wallet_name} वॉलेट हटाना चाहते हैं?", "deleteConnectionConfirmationPrompt": "क्या आप वाकई कनेक्शन हटाना चाहते हैं?", "denominations": "मूल्यवर्ग", + "derivationpath": "व्युत्पत्ति पथ", "descending": "अवरोही", "description": "विवरण", "destination_tag": "गंतव्य टैग:", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 6f5bc88a6..0d6e9a0d8 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Jeste li sigurni da želite izbrisati ${wallet_name} novčanik?", "deleteConnectionConfirmationPrompt": "Jeste li sigurni da želite izbrisati vezu s", "denominations": "Denominacije", + "derivationpath": "Put derivacije", "descending": "Silazni", "description": "Opis", "destination_tag": "Odredišna oznaka:", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 2bc298aa7..65703e0bc 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Apakah Anda yakin ingin menghapus dompet ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Apakah Anda yakin ingin menghapus koneksi ke", "denominations": "Denominasi", + "derivationpath": "Jalur derivasi", "descending": "Menurun", "description": "Keterangan", "destination_tag": "Tag tujuan:", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 0548b0ad2..c2ba20ce0 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -196,6 +196,7 @@ "delete_wallet_confirm_message": "Sei sicuro di voler eliminare il portafoglio ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Sei sicuro di voler eliminare la connessione a", "denominations": "Denominazioni", + "derivationpath": "Percorso di derivazione", "descending": "Discendente", "description": "Descrizione", "destination_tag": "Tag destinazione:", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index c53a6d001..ab6605257 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "${wallet_name} ウォレットを削除してもよろしいですか?", "deleteConnectionConfirmationPrompt": "への接続を削除してもよろしいですか?", "denominations": "宗派", + "derivationpath": "派生パス", "descending": "下降", "description": "説明", "destination_tag": "宛先タグ:", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index be6757d99..da10162ad 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "${wallet_name} 지갑을 삭제하시겠습니까?", "deleteConnectionConfirmationPrompt": "다음 연결을 삭제하시겠습니까?", "denominations": "교파", + "derivationpath": "파생 경로", "descending": "내림차순", "description": "설명", "destination_tag": "목적지 태그:", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index c53dffb6b..e04c75d62 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "${wallet_name} ပိုက်ဆံအိတ်ကို ဖျက်လိုသည်မှာ သေချာပါသလား။", "deleteConnectionConfirmationPrompt": "ချိတ်ဆက်မှုကို ဖျက်လိုသည်မှာ သေချာပါသလား။", "denominations": "ဂိုဏ်းချုပ်ပစ္စည်းများ", + "derivationpath": "derivation လမ်းကြောင်း", "descending": "ဆင်း", "description": "ဖော်ပြချက်", "destination_tag": "ခရီးဆုံးအမှတ်-", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 2d55344f5..dfa7c2d8f 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Weet u zeker dat u de portemonnee van ${wallet_name} wilt verwijderen?", "deleteConnectionConfirmationPrompt": "Weet u zeker dat u de verbinding met", "denominations": "Denominaties", + "derivationpath": "Afleidingspad", "descending": "Aflopend", "description": "Beschrijving", "destination_tag": "Bestemmingstag:", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 833fc0308..397ea2bcb 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Czy na pewno chcesz usunąć portfel ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Czy na pewno chcesz usunąć połączenie z", "denominations": "Wyznaczenia", + "derivationpath": "Ścieżka pochodna", "descending": "Schodzenie", "description": "Opis", "destination_tag": "Tag docelowy:", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index bd6d9b506..cbe66715a 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Tem certeza de que deseja excluir a carteira ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Tem certeza de que deseja excluir a conexão com", "denominations": "Denominações", + "derivationpath": "Caminho de derivação", "descending": "descendente", "description": "Descrição", "destination_tag": "Tag de destino:", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index d43572351..9976de9f8 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Вы уверены, что хотите удалить кошелек ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Вы уверены, что хотите удалить подключение к", "denominations": "Деноминации", + "derivationpath": "Путь получения", "descending": "Нисходящий", "description": "Описание", "destination_tag": "Целевой тег:", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index d948ba6d6..e873fe5eb 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "คุณแน่ใจหรือว่าต้องการลบกระเป๋า${wallet_name}?", "deleteConnectionConfirmationPrompt": "คุณแน่ใจหรือไม่ว่าต้องการลบการเชื่อมต่อไปยัง", "denominations": "นิกาย", + "derivationpath": "เส้นทางที่ได้มา", "descending": "ลงมา", "description": "คำอธิบาย", "destination_tag": "แท็กปลายทาง:", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index a0ab030c8..c1bd2bae7 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Sigurado ka ba na gusto mong tanggalin ang iyong ${wallet_name} wallet?", "deleteConnectionConfirmationPrompt": "Sigurado ka bang gusto mong tanggalin ang koneksyon sa", "denominations": "Mga Denominasyon", + "derivationpath": "Landas ng derivation", "descending": "Pababang", "description": "Paglalarawan", "destination_tag": "Tag ng patutunguhan:", @@ -661,14 +662,14 @@ "show_details": "Ipakita ang mga detalye", "show_keys": "Ipakita ang mga seed/key", "show_market_place": "Ipakita ang Marketplace", + "show_seed": "Ipakita ang seed", "sign_message": "Mag -sign Message", + "sign_up": "Mag-sign Up", "sign_verify_message": "Mag -sign o i -verify ang mensahe", "sign_verify_message_sub": "Mag -sign o i -verify ang isang mensahe gamit ang iyong pribadong key", "sign_verify_title": "Mag -sign / Mag -verify", "signature": "Lagda", "signature_invalid_error": "Ang lagda ay hindi wasto para sa ibinigay na mensahe", - "show_seed": "Ipakita ang seed", - "sign_up": "Mag-sign Up", "signTransaction": "Mag-sign ang Transaksyon", "signup_for_card_accept_terms": "Mag-sign up para sa card at tanggapin ang mga tuntunin.", "silent_payments": "Tahimik na pagbabayad", @@ -827,9 +828,9 @@ "use_testnet": "Gumamit ng testnet", "value": "Halaga", "value_type": "Uri ng halaga", - "verify_message": "I -verify ang mensahe", "variable_pair_not_supported": "Ang variable na pares na ito ay hindi suportado sa mga napiling exchange", "verification": "Pag-verify", + "verify_message": "I -verify ang mensahe", "verify_with_2fa": "Mag-verify sa Cake 2FA", "version": "Bersyon ${currentVersion}", "view_all": "Tingnan lahat", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index e7cdc5b12..ff7d9a120 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "${wallet_name} isimli cüzdanını silmek istediğinden emin misin?", "deleteConnectionConfirmationPrompt": "Bağlantıyı silmek istediğinizden emin misiniz?", "denominations": "Mezhepler", + "derivationpath": "Türev yolu", "descending": "Azalan", "description": "Tanım", "destination_tag": "Hedef Etiketi:", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 91b5b5266..95a3a38d8 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Ви впевнені, що хочете видалити гаманець ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Ви впевнені, що хочете видалити з’єднання з", "denominations": "Конфесія", + "derivationpath": "Шлях виведення", "descending": "Низхідний", "description": "опис", "destination_tag": "Тег призначення:", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index e54a0db34..5be1cb7a0 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "کیا آپ واقعی ${wallet_name} والیٹ کو حذف کرنا چاہتے ہیں؟", "deleteConnectionConfirmationPrompt": "۔ﮟﯿﮨ ﮯﺘﮨﺎﭼ ﺎﻧﺮﮐ ﻑﺬﺣ ﻮﮐ ﻦﺸﮑﻨﮐ ﭖﺁ ﮧﮐ ﮯﮨ ﻦﯿﻘﯾ ﻮﮐ ﭖﺁ ﺎﯿﮐ", "denominations": "فرق", + "derivationpath": "مشتق راستہ", "descending": "اترتے ہوئے", "description": "ﻞﯿﺼﻔﺗ", "destination_tag": "منزل کا ٹیگ:", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 8f47d8543..81d784d7f 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "Ṣó dá ẹ lójú pé ẹ fẹ́ pa àpamọ́wọ́ ${wallet_name}?", "deleteConnectionConfirmationPrompt": "Ṣe o da ọ loju pe o fẹ paarẹ asopọ si", "denominations": "Awọn ede", + "derivationpath": "Ọna Deriji", "descending": "Sọkalẹ", "description": "Apejuwe", "destination_tag": "Orúkọ tí ìbí tó a ránṣẹ́ sí:", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index c864a529b..876c3bbfb 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -195,6 +195,7 @@ "delete_wallet_confirm_message": "您确定要删除 ${wallet_name} 钱包吗?", "deleteConnectionConfirmationPrompt": "您确定要删除与", "denominations": "教派", + "derivationpath": "推导路径", "descending": "下降", "description": "描述", "destination_tag": "目标Tag:", diff --git a/tool/configure.dart b/tool/configure.dart index c9b6bbdda..b3194c4c8 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -151,7 +151,7 @@ abstract class Bitcoin { String? passphrase, }); WalletCredentials createBitcoinRestoreWalletFromWIFCredentials({required String name, required String password, required String wif, WalletInfo? walletInfo}); - WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password}); + WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? passphrase}); WalletCredentials createBitcoinHardwareWalletCredentials({required String name, required HardwareAccountData accountData, WalletInfo? walletInfo}); List getWordList(); Map getWalletKeys(Object wallet); @@ -1021,10 +1021,10 @@ abstract class BitcoinCash { Box walletInfoSource, Box unspentCoinSource, bool isDirect); WalletCredentials createBitcoinCashNewWalletCredentials( - {required String name, WalletInfo? walletInfo, String? password}); + {required String name, WalletInfo? walletInfo, String? password, String? passphrase}); WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials( - {required String name, required String mnemonic, required String password}); + {required String name, required String mnemonic, required String password, String? passphrase}); TransactionPriority deserializeBitcoinCashTransactionPriority(int raw); From 518bfbe40d1a70f08e9c25b0cf957f2b30eda282 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Mon, 26 Aug 2024 20:07:25 +0300 Subject: [PATCH 73/77] fetch accurate fee rates from Cake's mempool api (#1649) * fetch accurate fee rates from mempool api * remove duplicate exception handler onError call [skip ci] * add the domain name --- cw_bitcoin/lib/electrum_wallet.dart | 69 ++++++++++++++++--- cw_bitcoin/pubspec.lock | 63 ++++++++++++++++- cw_bitcoin/pubspec.yaml | 1 + cw_monero/lib/monero_wallet_service.dart | 38 +--------- lib/entities/preferences_key.dart | 1 + lib/src/screens/settings/privacy_page.dart | 29 ++++++++ lib/store/settings_store.dart | 10 +++ lib/utils/exception_handler.dart | 7 ++ .../settings/privacy_settings_view_model.dart | 11 +++ res/values/strings_ar.arb | 2 + res/values/strings_bg.arb | 2 + res/values/strings_cs.arb | 2 + res/values/strings_de.arb | 2 + res/values/strings_en.arb | 2 + res/values/strings_es.arb | 4 +- res/values/strings_fr.arb | 2 + res/values/strings_ha.arb | 2 + res/values/strings_hi.arb | 2 + res/values/strings_hr.arb | 2 + res/values/strings_hy.arb | 2 + res/values/strings_id.arb | 2 + res/values/strings_it.arb | 2 + res/values/strings_ja.arb | 2 + res/values/strings_ko.arb | 2 + res/values/strings_my.arb | 2 + res/values/strings_nl.arb | 2 + res/values/strings_pl.arb | 2 + res/values/strings_pt.arb | 2 + res/values/strings_ru.arb | 2 + res/values/strings_th.arb | 2 + res/values/strings_tl.arb | 2 + res/values/strings_tr.arb | 2 + res/values/strings_uk.arb | 2 + res/values/strings_ur.arb | 2 + res/values/strings_yo.arb | 2 + res/values/strings_zh.arb | 2 + 36 files changed, 239 insertions(+), 46 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 0ce4844c6..be4cee4d8 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -5,6 +5,7 @@ import 'dart:isolate'; import 'dart:math'; import 'package:bitcoin_base/bitcoin_base.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import 'package:cw_core/encryption_file_utils.dart'; import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:collection/collection.dart'; @@ -44,6 +45,7 @@ import 'package:mobx/mobx.dart'; import 'package:rxdart/subjects.dart'; import 'package:sp_scanner/sp_scanner.dart'; import 'package:hex/hex.dart'; +import 'package:http/http.dart' as http; part 'electrum_wallet.g.dart'; @@ -101,6 +103,8 @@ abstract class ElectrumWalletBase ); reaction((_) => syncStatus, _syncStatusReaction); + + sharedPrefs.complete(SharedPreferences.getInstance()); } static Bip32Slip10Secp256k1 getAccountHDWallet(CryptoCurrency? currency, BasedUtxoNetwork network, @@ -196,6 +200,13 @@ abstract class ElectrumWalletBase bool _isTryingToConnect = false; + Completer sharedPrefs = Completer(); + + Future checkIfMempoolAPIIsEnabled() async { + bool isMempoolAPIEnabled = (await sharedPrefs.future).getBool("use_mempool_fee_api") ?? true; + return isMempoolAPIEnabled; + } + @action Future setSilentPaymentsScanning(bool active) async { silentPaymentsScanningActive = active; @@ -448,6 +459,20 @@ abstract class ElectrumWalletBase @action Future updateFeeRates() async { + if (await checkIfMempoolAPIIsEnabled()) { + try { + final response = + await http.get(Uri.parse("http://mempool.cakewallet.com:8999/api/v1/fees/recommended")); + + final result = json.decode(response.body) as Map; + final slowFee = result['economyFee']?.toInt() ?? 0; + final mediumFee = result['hourFee']?.toInt() ?? 0; + final fastFee = result['fastestFee']?.toInt() ?? 0; + _feeRates = [slowFee, mediumFee, fastFee]; + return; + } catch (_) {} + } + final feeRates = await electrumClient.feeRates(network: network); if (feeRates != [0, 0, 0]) { _feeRates = feeRates; @@ -1455,7 +1480,6 @@ abstract class ElectrumWalletBase // Create a list of available outputs final outputs = []; for (final out in bundle.originalTransaction.outputs) { - // Check if the script contains OP_RETURN final script = out.scriptPubKey.script; if (script.contains('OP_RETURN') && memo == null) { @@ -2058,13 +2082,42 @@ abstract class ElectrumWalletBase tx.inputAddresses!.isEmpty || tx.outputAddresses == null || tx.outputAddresses!.isEmpty) { - tx = ElectrumTransactionInfo.fromElectrumBundle( - bundle, - walletInfo.type, - network, - addresses: addressesSet, - height: tx.height, - ); + List inputAddresses = []; + List outputAddresses = []; + + for (int i = 0; i < bundle.originalTransaction.inputs.length; i++) { + final input = bundle.originalTransaction.inputs[i]; + final inputTransaction = bundle.ins[i]; + final vout = input.txIndex; + final outTransaction = inputTransaction.outputs[vout]; + final address = addressFromOutputScript(outTransaction.scriptPubKey, network); + + if (address.isNotEmpty) inputAddresses.add(address); + } + + for (int i = 0; i < bundle.originalTransaction.outputs.length; i++) { + final out = bundle.originalTransaction.outputs[i]; + final address = addressFromOutputScript(out.scriptPubKey, network); + + if (address.isNotEmpty) outputAddresses.add(address); + + // Check if the script contains OP_RETURN + final script = out.scriptPubKey.script; + if (script.contains('OP_RETURN')) { + final index = script.indexOf('OP_RETURN'); + if (index + 1 <= script.length) { + try { + final opReturnData = script[index + 1].toString(); + final decodedString = utf8.decode(HEX.decode(opReturnData)); + outputAddresses.add('OP_RETURN:$decodedString'); + } catch (_) { + outputAddresses.add('OP_RETURN:'); + } + } + } + } + tx.inputAddresses = inputAddresses; + tx.outputAddresses = outputAddresses; transactionHistory.addOne(tx); } diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index cdb88946e..b5e59cd88 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -350,6 +350,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" frontend_server_client: dependency: transitive description: @@ -736,6 +741,62 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + url: "https://pub.dev" + source: hosted + version: "2.5.2" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "59dc807b94d29d52ddbb1b3c0d3b9d0a67fc535a64e62a5542c8db0513fcb6c2" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" shelf: dependency: transitive description: @@ -944,4 +1005,4 @@ packages: version: "2.2.1" sdks: dart: ">=3.3.0 <4.0.0" - flutter: ">=3.16.6" + flutter: ">=3.19.0" diff --git a/cw_bitcoin/pubspec.yaml b/cw_bitcoin/pubspec.yaml index 2af1ac54e..84164b884 100644 --- a/cw_bitcoin/pubspec.yaml +++ b/cw_bitcoin/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: mobx: ^2.0.7+4 flutter_mobx: ^2.0.6+1 intl: ^0.18.0 + shared_preferences: ^2.0.15 cw_core: path: ../cw_core bitbox: diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index f9973f430..7f4672d43 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -9,11 +9,9 @@ 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/get_height_by_date.dart'; -import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart'; import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager; import 'package:cw_monero/api/wallet_manager.dart'; import 'package:cw_monero/monero_wallet.dart'; -import 'package:flutter/widgets.dart'; import 'package:hive/hive.dart'; import 'package:polyseed/polyseed.dart'; import 'package:monero/monero.dart' as monero; @@ -120,7 +118,6 @@ class MoneroWalletService extends WalletService< @override Future openWallet(String name, String password, {bool? retryOnFailure}) async { - MoneroWallet? wallet; try { final path = await pathForWallet(name: name, type: getType()); @@ -147,41 +144,10 @@ class MoneroWalletService extends WalletService< await wallet.init(); return wallet; - } catch (e, s) { + } catch (e) { // TODO: Implement Exception for wallet list service. - final bool isBadAlloc = e.toString().contains('bad_alloc') || - (e is WalletOpeningException && - (e.message == 'std::bad_alloc' || e.message.contains('bad_alloc'))); - - final bool doesNotCorrespond = e.toString().contains('does not correspond') || - (e is WalletOpeningException && e.message.contains('does not correspond')); - - final bool isMissingCacheFilesIOS = e.toString().contains('basic_string') || - (e is WalletOpeningException && e.message.contains('basic_string')); - - final bool isMissingCacheFilesAndroid = e.toString().contains('input_stream') || - e.toString().contains('input stream error') || - (e is WalletOpeningException && - (e.message.contains('input_stream') || e.message.contains('input stream error'))); - - final bool invalidSignature = e.toString().contains('invalid signature') || - (e is WalletOpeningException && e.message.contains('invalid signature')); - - final bool invalidPassword = e.toString().contains('invalid password') || - (e is WalletOpeningException && e.message.contains('invalid password')); - - if (!isBadAlloc && - !doesNotCorrespond && - !isMissingCacheFilesIOS && - !isMissingCacheFilesAndroid && - !invalidSignature && - !invalidPassword && - wallet != null && - wallet.onError != null) { - wallet.onError!(FlutterErrorDetails(exception: e, stack: s)); - } - if (invalidPassword || retryOnFailure == false) { + if (retryOnFailure == false) { rethrow; } diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index 743357f92..714612ff1 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -61,6 +61,7 @@ class PreferencesKey { static const useEtherscan = 'use_etherscan'; static const usePolygonScan = 'use_polygonscan'; static const useTronGrid = 'use_trongrid'; + static const useMempoolFeeAPI = 'use_mempool_fee_api'; static const defaultNanoRep = 'default_nano_representative'; static const defaultBananoRep = 'default_banano_representative'; static const lookupsTwitter = 'looks_up_twitter'; diff --git a/lib/src/screens/settings/privacy_page.dart b/lib/src/screens/settings/privacy_page.dart index 0eaf3ffbd..7db244460 100644 --- a/lib/src/screens/settings/privacy_page.dart +++ b/lib/src/screens/settings/privacy_page.dart @@ -6,7 +6,9 @@ import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; +import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; import 'package:cake_wallet/view_model/settings/privacy_settings_view_model.dart'; import 'package:flutter/material.dart'; @@ -111,6 +113,33 @@ class PrivacyPage extends BasePage { _privacySettingsViewModel.setUseTronGrid(value); }, ), + if (_privacySettingsViewModel.canUseMempoolFeeAPI) + SettingsSwitcherCell( + title: S.current.live_fee_rates, + value: _privacySettingsViewModel.useMempoolFeeAPI, + onValueChange: (BuildContext _, bool isEnabled) async { + if (!isEnabled) { + final bool confirmation = await showPopUp( + context: context, + builder: (BuildContext context) { + return AlertWithTwoActions( + alertTitle: S.of(context).warning, + alertContent: S.of(context).disable_fee_api_warning, + rightButtonText: S.of(context).confirm, + leftButtonText: S.of(context).cancel, + actionRightButton: () => Navigator.of(context).pop(true), + actionLeftButton: () => Navigator.of(context).pop(false)); + }) ?? + false; + if (confirmation) { + _privacySettingsViewModel.setUseMempoolFeeAPI(isEnabled); + } + return; + } + + _privacySettingsViewModel.setUseMempoolFeeAPI(isEnabled); + }, + ), SettingsCellWithArrow( title: S.current.domain_looks_up, handler: (context) => Navigator.of(context).pushNamed(Routes.domainLookupsPage), diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index ea5f43d98..f2738a293 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -101,6 +101,7 @@ abstract class SettingsStoreBase with Store { required this.useEtherscan, required this.usePolygonScan, required this.useTronGrid, + required this.useMempoolFeeAPI, required this.defaultNanoRep, required this.defaultBananoRep, required this.lookupsTwitter, @@ -416,6 +417,9 @@ abstract class SettingsStoreBase with Store { reaction((_) => useTronGrid, (bool useTronGrid) => _sharedPreferences.setBool(PreferencesKey.useTronGrid, useTronGrid)); + reaction((_) => useMempoolFeeAPI, + (bool useMempoolFeeAPI) => _sharedPreferences.setBool(PreferencesKey.useMempoolFeeAPI, useMempoolFeeAPI)); + reaction((_) => defaultNanoRep, (String nanoRep) => _sharedPreferences.setString(PreferencesKey.defaultNanoRep, nanoRep)); @@ -707,6 +711,9 @@ abstract class SettingsStoreBase with Store { @observable bool useTronGrid; + @observable + bool useMempoolFeeAPI; + @observable String defaultNanoRep; @@ -892,6 +899,7 @@ abstract class SettingsStoreBase with Store { final useEtherscan = sharedPreferences.getBool(PreferencesKey.useEtherscan) ?? true; final usePolygonScan = sharedPreferences.getBool(PreferencesKey.usePolygonScan) ?? true; final useTronGrid = sharedPreferences.getBool(PreferencesKey.useTronGrid) ?? true; + final useMempoolFeeAPI = sharedPreferences.getBool(PreferencesKey.useMempoolFeeAPI) ?? true; final defaultNanoRep = sharedPreferences.getString(PreferencesKey.defaultNanoRep) ?? ""; final defaultBananoRep = sharedPreferences.getString(PreferencesKey.defaultBananoRep) ?? ""; final lookupsTwitter = sharedPreferences.getBool(PreferencesKey.lookupsTwitter) ?? true; @@ -1154,6 +1162,7 @@ abstract class SettingsStoreBase with Store { useEtherscan: useEtherscan, usePolygonScan: usePolygonScan, useTronGrid: useTronGrid, + useMempoolFeeAPI: useMempoolFeeAPI, defaultNanoRep: defaultNanoRep, defaultBananoRep: defaultBananoRep, lookupsTwitter: lookupsTwitter, @@ -1307,6 +1316,7 @@ abstract class SettingsStoreBase with Store { useEtherscan = sharedPreferences.getBool(PreferencesKey.useEtherscan) ?? true; usePolygonScan = sharedPreferences.getBool(PreferencesKey.usePolygonScan) ?? true; useTronGrid = sharedPreferences.getBool(PreferencesKey.useTronGrid) ?? true; + useMempoolFeeAPI = sharedPreferences.getBool(PreferencesKey.useMempoolFeeAPI) ?? true; defaultNanoRep = sharedPreferences.getString(PreferencesKey.defaultNanoRep) ?? ""; defaultBananoRep = sharedPreferences.getString(PreferencesKey.defaultBananoRep) ?? ""; lookupsTwitter = sharedPreferences.getBool(PreferencesKey.lookupsTwitter) ?? true; diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 5e0c83f88..8fc8a8c0e 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -174,6 +174,13 @@ class ExceptionHandler { "ClientException: Write failed, uri=http", "Connection terminated during handshake", "Corrupted wallets seeds", + "bad_alloc", + "does not correspond", + "basic_string", + "input_stream", + "input stream error", + "invalid signature", + "invalid password", ]; static Future _addDeviceInfo(File file) async { diff --git a/lib/view_model/settings/privacy_settings_view_model.dart b/lib/view_model/settings/privacy_settings_view_model.dart index 90511af8e..c1e0fb1ce 100644 --- a/lib/view_model/settings/privacy_settings_view_model.dart +++ b/lib/view_model/settings/privacy_settings_view_model.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/ethereum/ethereum.dart'; @@ -75,6 +76,9 @@ abstract class PrivacySettingsViewModelBase with Store { @computed bool get useTronGrid => _settingsStore.useTronGrid; + @computed + bool get useMempoolFeeAPI => _settingsStore.useMempoolFeeAPI; + @computed bool get lookupTwitter => _settingsStore.lookupsTwitter; @@ -99,6 +103,8 @@ abstract class PrivacySettingsViewModelBase with Store { bool get canUseTronGrid => _wallet.type == WalletType.tron; + bool get canUseMempoolFeeAPI => _wallet.type == WalletType.bitcoin; + @action void setShouldSaveRecipientAddress(bool value) => _settingsStore.shouldSaveRecipientAddress = value; @@ -156,4 +162,9 @@ abstract class PrivacySettingsViewModelBase with Store { _settingsStore.useTronGrid = value; tron!.updateTronGridUsageState(_wallet, value); } + + @action + void setUseMempoolFeeAPI(bool value) { + _settingsStore.useMempoolFeeAPI = value; + } } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 89068d2d0..0b238ad23 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -208,6 +208,7 @@ "disable_buy": "تعطيل إجراء الشراء", "disable_cake_2fa": "تعطيل 2 عامل المصادقة", "disable_exchange": "تعطيل التبادل", + "disable_fee_api_warning": "من خلال إيقاف تشغيل هذا ، قد تكون معدلات الرسوم غير دقيقة في بعض الحالات ، لذلك قد ينتهي بك الأمر إلى دفع مبالغ زائدة أو دفع رسوم المعاملات الخاصة بك", "disable_fiat": "تعطيل fiat", "disable_sell": "قم بتعطيل إجراء البيع", "disableBatteryOptimization": "تعطيل تحسين البطارية", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "يرجى التأكد", "ledger_please_enable_bluetooth": "يرجى تمكين البلوتوث للكشف عن دفتر الأستاذ الخاص بك", "light_theme": "فاتح", + "live_fee_rates": "أسعار الرسوم المباشرة عبر API", "load_more": "تحميل المزيد", "loading_your_wallet": "يتم تحميل محفظتك", "login": "تسجيل الدخول", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 1ff8fdf85..c13d6d7d6 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -208,6 +208,7 @@ "disable_buy": "Деактивирайте действието за покупка", "disable_cake_2fa": "Деактивирайте Cake 2FA", "disable_exchange": "Деактивиране на борса", + "disable_fee_api_warning": "Като изключите това, таксите могат да бъдат неточни в някои случаи, така че може да се препланите или да не плащате таксите за вашите транзакции", "disable_fiat": "Деактивиране на fiat", "disable_sell": "Деактивирайте действието за продажба", "disableBatteryOptimization": "Деактивирайте оптимизацията на батерията", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Моля, уверете се, че сте отворили правилното приложение на вашата книга", "ledger_please_enable_bluetooth": "Моля, активирайте Bluetooth да открие вашата книга", "light_theme": "Светло", + "live_fee_rates": "Цени на таксите на живо чрез API", "load_more": "Зареди още", "loading_your_wallet": "Зареждане на портфейл", "login": "Влизане", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 904c6d8e4..49bc856fd 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -208,6 +208,7 @@ "disable_buy": "Zakázat akci nákupu", "disable_cake_2fa": "Zakázat Cake 2FA", "disable_exchange": "Zakázat směnárny", + "disable_fee_api_warning": "Tímto vypnutím by sazby poplatků mohly být v některých případech nepřesné, takže byste mohli skončit přepláváním nebo nedoplatkem poplatků za vaše transakce", "disable_fiat": "Zakázat fiat", "disable_sell": "Zakázat akci prodeje", "disableBatteryOptimization": "Zakázat optimalizaci baterie", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Ujistěte se, že se na své knize otevřete správnou aplikaci", "ledger_please_enable_bluetooth": "Umožněte prosím Bluetooth detekovat vaši knihu", "light_theme": "Světlý", + "live_fee_rates": "Živé sazby poplatků prostřednictvím API", "load_more": "Načíst další", "loading_your_wallet": "Načítám peněženku", "login": "Login", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 860d4114d..19b7fbc90 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -208,6 +208,7 @@ "disable_buy": "Kaufaktion deaktivieren", "disable_cake_2fa": "Cake 2FA deaktivieren", "disable_exchange": "Exchange deaktivieren", + "disable_fee_api_warning": "Wenn dies ausgeschaltet wird, sind die Gebührenquoten in einigen Fällen möglicherweise ungenau, sodass Sie die Gebühren für Ihre Transaktionen möglicherweise überbezahlt oder unterzahlt", "disable_fiat": "Fiat deaktivieren", "disable_sell": "Verkaufsaktion deaktivieren", "disableBatteryOptimization": "Batterieoptimierung deaktivieren", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Bitte stellen Sie sicher, dass Sie die richtige App auf Ihrem Ledger geöffnet haben", "ledger_please_enable_bluetooth": "Bitte aktivieren Sie Bluetooth um sich mit Ihren Ledger zu verbinden.", "light_theme": "Hell", + "live_fee_rates": "Live -Gebührenpreise über API", "load_more": "Mehr laden", "loading_your_wallet": "Wallet wird geladen", "login": "Einloggen", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 9f89eb6ab..75c0fc9c0 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -208,6 +208,7 @@ "disable_buy": "Disable buy action", "disable_cake_2fa": "Disable Cake 2FA", "disable_exchange": "Disable exchange", + "disable_fee_api_warning": "By turning this off, the fee rates might be inaccurate in some cases, so you might end up overpaying or underpaying the fees for your transactions", "disable_fiat": "Disable fiat", "disable_sell": "Disable sell action", "disableBatteryOptimization": "Disable Battery Optimization", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Please make sure you opend the right app on your ledger", "ledger_please_enable_bluetooth": "Please enable Bluetooth to detect your Ledger", "light_theme": "Light", + "live_fee_rates": "Live fee rates via API", "load_more": "Load more", "loading_your_wallet": "Loading your wallet", "login": "Login", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 250decfc4..73a2e77b9 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -208,6 +208,7 @@ "disable_buy": "Desactivar acción de compra", "disable_cake_2fa": "Desactivar pastel 2FA", "disable_exchange": "Deshabilitar intercambio", + "disable_fee_api_warning": "Al apagar esto, las tasas de tarifas pueden ser inexactas en algunos casos, por lo que puede terminar pagando en exceso o pagando menos las tarifas por sus transacciones", "disable_fiat": "Deshabilitar fiat", "disable_sell": "Desactivar acción de venta", "disableBatteryOptimization": "Deshabilitar la optimización de la batería", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Por favor, asegúrese de abrir la aplicación correcta en su libro mayor.", "ledger_please_enable_bluetooth": "Habilite Bluetooth para detectar su libro mayor", "light_theme": "Ligera", + "live_fee_rates": "Tasas de tarifas en vivo a través de API", "load_more": "Carga más", "loading_your_wallet": "Cargando tu billetera", "login": "Iniciar sesión", @@ -895,4 +897,4 @@ "you_will_get": "Convertir a", "you_will_send": "Convertir de", "yy": "YY" -} +} \ No newline at end of file diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 297019aa0..e1f557060 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -208,6 +208,7 @@ "disable_buy": "Désactiver l'action d'achat", "disable_cake_2fa": "Désactiver Cake 2FA", "disable_exchange": "Désactiver l'échange", + "disable_fee_api_warning": "En désactivant cela, les taux de frais peuvent être inexacts dans certains cas, vous pourriez donc finir par payer trop ou sous-paiement les frais pour vos transactions", "disable_fiat": "Désactiver les montants en fiat", "disable_sell": "Désactiver l'action de vente", "disableBatteryOptimization": "Désactiver l'optimisation de la batterie", @@ -355,6 +356,7 @@ "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", "light_theme": "Clair", + "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", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 05cdf27d4..4e0eb83f9 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -208,6 +208,7 @@ "disable_buy": "Kashe alama", "disable_cake_2fa": "Musaki Cake 2FA", "disable_exchange": "Kashe musanya", + "disable_fee_api_warning": "Ta hanyar juya wannan kashe, kudaden da zai iya zama ba daidai ba a wasu halaye, saboda haka zaku iya ƙare da overpaying ko a ƙarƙashin kudaden don ma'amaloli", "disable_fiat": "Dakatar da fiat", "disable_sell": "Kashe karbuwa", "disableBatteryOptimization": "Kashe ingantawa baturi", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Da fatan za a tabbata kun yi amfani da app ɗin dama akan dillalarku", "ledger_please_enable_bluetooth": "Da fatan za a kunna Bluetooth don gano Ledger ɗinku", "light_theme": "Haske", + "live_fee_rates": "Kudin Kiɗa ta API", "load_more": "Like more", "loading_your_wallet": "Ana loda walat ɗin ku", "login": "Shiga", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 30f86d9ae..f77547992 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -208,6 +208,7 @@ "disable_buy": "खरीद कार्रवाई अक्षम करें", "disable_cake_2fa": "केक 2FA अक्षम करें", "disable_exchange": "एक्सचेंज अक्षम करें", + "disable_fee_api_warning": "इसे बंद करने से, कुछ मामलों में शुल्क दरें गलत हो सकती हैं, इसलिए आप अपने लेनदेन के लिए फीस को कम कर सकते हैं या कम कर सकते हैं", "disable_fiat": "िएट को अक्षम करें", "disable_sell": "बेचने की कार्रवाई अक्षम करें", "disableBatteryOptimization": "बैटरी अनुकूलन अक्षम करें", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "कृपया सुनिश्चित करें कि आप अपने लेजर पर सही ऐप को खोलते हैं", "ledger_please_enable_bluetooth": "कृपया अपने बहीखाने का पता लगाने के लिए ब्लूटूथ को सक्षम करें", "light_theme": "रोशनी", + "live_fee_rates": "एपीआई के माध्यम से लाइव शुल्क दरें", "load_more": "और लोड करें", "loading_your_wallet": "अपना बटुआ लोड कर रहा है", "login": "लॉग इन करें", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 0d6e9a0d8..db02c5552 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -208,6 +208,7 @@ "disable_buy": "Onemogući kupnju", "disable_cake_2fa": "Onemogući Cake 2FA", "disable_exchange": "Onemogući exchange", + "disable_fee_api_warning": "Isključivanjem ovoga, stope naknade u nekim bi slučajevima mogle biti netočne, tako da biste mogli preplatiti ili predati naknadu za vaše transakcije", "disable_fiat": "Isključi, fiat", "disable_sell": "Onemogući akciju prodaje", "disableBatteryOptimization": "Onemogući optimizaciju baterije", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Obavezno obavezno otvorite pravu aplikaciju na knjizi", "ledger_please_enable_bluetooth": "Omogućite Bluetooth da otkrije svoju knjigu", "light_theme": "Svijetla", + "live_fee_rates": "Stope naknada uživo putem API -ja", "load_more": "Učitaj više", "loading_your_wallet": "Novčanik se učitava", "login": "Prijava", diff --git a/res/values/strings_hy.arb b/res/values/strings_hy.arb index 826bfa99a..178254bba 100644 --- a/res/values/strings_hy.arb +++ b/res/values/strings_hy.arb @@ -207,6 +207,7 @@ "disable_buy": "Անջատել գնում գործողությունը", "disable_cake_2fa": "Անջատել Cake 2FA", "disable_exchange": "Անջատել փոխանակումը", + "disable_fee_api_warning": "Դրանից անջատելով, վճարների տեմպերը որոշ դեպքերում կարող են անճիշտ լինել, այնպես որ դուք կարող եք վերջ տալ ձեր գործարքների համար վճարների գերավճարների կամ գերավճարների վրա", "disable_fiat": "Անջատել ֆիատ", "disable_sell": "Անջատել վաճառք գործողությունը", "disableBatteryOptimization": "Անջատել մարտկոցի օպտիմիզացիան", @@ -354,6 +355,7 @@ "ledger_error_wrong_app": "Խնդրում ենք համոզվել, որ դուք բացել եք ճիշտ ծրագիրը ձեր Ledger-ում", "ledger_please_enable_bluetooth": "Խնդրում ենք միացնել Bluetooth-ը ձեր Ledger-ը հայտնաբերելու համար", "light_theme": "Լուսավոր", + "live_fee_rates": "Ապակի վարձավճարներ API- ի միջոցով", "load_more": "Բեռնել ավելին", "loading_your_wallet": "Ձեր հաշվեհամարը բեռնում է", "login": "Մուտք", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 65703e0bc..e67402de2 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -208,6 +208,7 @@ "disable_buy": "Nonaktifkan tindakan beli", "disable_cake_2fa": "Nonaktifkan Kue 2FA", "disable_exchange": "Nonaktifkan pertukaran", + "disable_fee_api_warning": "Dengan mematikan ini, tarif biaya mungkin tidak akurat dalam beberapa kasus, jadi Anda mungkin akan membayar lebih atau membayar biaya untuk transaksi Anda", "disable_fiat": "Nonaktifkan fiat", "disable_sell": "Nonaktifkan aksi jual", "disableBatteryOptimization": "Nonaktifkan optimasi baterai", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Pastikan Anda membuka aplikasi yang tepat di buku besar Anda", "ledger_please_enable_bluetooth": "Harap aktifkan Bluetooth untuk mendeteksi buku besar Anda", "light_theme": "Terang", + "live_fee_rates": "Tarif biaya langsung melalui API", "load_more": "Muat lebih banyak", "loading_your_wallet": "Memuat dompet Anda", "login": "Masuk", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index c2ba20ce0..a764520d8 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -209,6 +209,7 @@ "disable_buy": "Disabilita l'azione di acquisto", "disable_cake_2fa": "Disabilita Cake 2FA", "disable_exchange": "Disabilita scambio", + "disable_fee_api_warning": "Disattivando questo, i tassi delle commissioni potrebbero essere inaccurati in alcuni casi, quindi potresti finire in eccesso o sostenere le commissioni per le transazioni", "disable_fiat": "Disabilita fiat", "disable_sell": "Disabilita l'azione di vendita", "disableBatteryOptimization": "Disabilita l'ottimizzazione della batteria", @@ -356,6 +357,7 @@ "ledger_error_wrong_app": "Assicurati di aprire l'app giusta sul libro mastro", "ledger_please_enable_bluetooth": "Si prega di consentire al Bluetooth di rilevare il libro mastro", "light_theme": "Bianco", + "live_fee_rates": "Tariffe delle commissioni dal vivo tramite API", "load_more": "Carica di più", "loading_your_wallet": "Caricamento portafoglio", "login": "Accedi", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index ab6605257..bda62536e 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -208,6 +208,7 @@ "disable_buy": "購入アクションを無効にする", "disable_cake_2fa": "Cake 2FA を無効にする", "disable_exchange": "交換を無効にする", + "disable_fee_api_warning": "これをオフにすることで、料金金利は場合によっては不正確になる可能性があるため、取引の費用が過払いまたは不足している可能性があります", "disable_fiat": "フィアットを無効にする", "disable_sell": "販売アクションを無効にする", "disableBatteryOptimization": "バッテリーの最適化を無効にします", @@ -356,6 +357,7 @@ "ledger_error_wrong_app": "元帳に適切なアプリを開始するようにしてください", "ledger_please_enable_bluetooth": "Bluetoothが元帳を検出できるようにしてください", "light_theme": "光", + "live_fee_rates": "API経由のライブ料金", "load_more": "もっと読み込む", "loading_your_wallet": "ウォレットをロードしています", "login": "ログイン", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index da10162ad..df339df55 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -208,6 +208,7 @@ "disable_buy": "구매 행동 비활성화", "disable_cake_2fa": "케이크 2FA 비활성화", "disable_exchange": "교환 비활성화", + "disable_fee_api_warning": "이것을 끄면 경우에 따라 수수료가 부정확 할 수 있으므로 거래 수수료를 초과 지불하거나 지불 할 수 있습니다.", "disable_fiat": "법정화폐 비활성화", "disable_sell": "판매 조치 비활성화", "disableBatteryOptimization": "배터리 최적화를 비활성화합니다", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "원장에서 올바른 앱을 반대하는지 확인하십시오.", "ledger_please_enable_bluetooth": "Bluetooth가 원장을 감지 할 수 있도록하십시오", "light_theme": "빛", + "live_fee_rates": "API를 통한 라이브 요금 요금", "load_more": "더로드하십시오", "loading_your_wallet": "지갑 넣기", "login": "로그인", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index e04c75d62..e988c6c8d 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -208,6 +208,7 @@ "disable_buy": "ဝယ်ယူမှု လုပ်ဆောင်ချက်ကို ပိတ်ပါ။", "disable_cake_2fa": "ကိတ်မုန့် 2FA ကို ပိတ်ပါ။", "disable_exchange": "လဲလှယ်မှုကို ပိတ်ပါ။", + "disable_fee_api_warning": "ဤအရာကိုဖွင့်ခြင်းအားဖြင့်အချို့သောကိစ္စရပ်များတွင်အခကြေးငွေနှုန်းထားများသည်တိကျမှုရှိနိုင်သည်,", "disable_fiat": "Fiat ကိုပိတ်ပါ။", "disable_sell": "ရောင်းချခြင်းလုပ်ဆောင်ချက်ကို ပိတ်ပါ။", "disableBatteryOptimization": "ဘက်ထရီ optimization ကိုပိတ်ပါ", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "ကျေးဇူးပြု. သင့်လက်ျာအက်ပ်ကိုသင်၏ Ledger တွင်ဖွင့်ရန်သေချာစေပါ", "ledger_please_enable_bluetooth": "သင်၏ Ledger ကိုရှာဖွေရန် Bluetooth ကိုဖွင့်ပါ", "light_theme": "အလင်း", + "live_fee_rates": "API မှတစ်ဆင့် Live အခကြေးငွေနှုန်းထားများ", "load_more": "ပိုပြီး load", "loading_your_wallet": "သင့်ပိုက်ဆံအိတ်ကို ဖွင့်နေသည်။", "login": "လော့ဂ်အင်", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index dfa7c2d8f..d1f6032e5 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -208,6 +208,7 @@ "disable_buy": "Koopactie uitschakelen", "disable_cake_2fa": "Taart 2FA uitschakelen", "disable_exchange": "Uitwisseling uitschakelen", + "disable_fee_api_warning": "Door dit uit te schakelen, kunnen de tarieven in sommige gevallen onnauwkeurig zijn, dus u kunt de vergoedingen voor uw transacties te veel betalen of te weinig betalen", "disable_fiat": "Schakel Fiat uit", "disable_sell": "Verkoopactie uitschakelen", "disableBatteryOptimization": "Schakel de batterijoptimalisatie uit", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Zorg ervoor dat u de juiste app op uw grootboek opent", "ledger_please_enable_bluetooth": "Schakel Bluetooth in staat om uw grootboek te detecteren", "light_theme": "Licht", + "live_fee_rates": "Live -tarieven via API", "load_more": "Meer laden", "loading_your_wallet": "Uw portemonnee laden", "login": "Log in", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 397ea2bcb..3b4e0f81f 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -208,6 +208,7 @@ "disable_buy": "Wyłącz akcję kupna", "disable_cake_2fa": "Wyłącz Cake 2FA", "disable_exchange": "Wyłącz wymianę", + "disable_fee_api_warning": "Wyłączając to, stawki opłaty mogą być w niektórych przypadkach niedokładne, więc możesz skończyć się przepłaceniem lub wynagrodzeniem opłat za transakcje", "disable_fiat": "Wyłącz waluty FIAT", "disable_sell": "Wyłącz akcję sprzedaży", "disableBatteryOptimization": "Wyłącz optymalizację baterii", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Upewnij się, że opisz odpowiednią aplikację na swojej księdze", "ledger_please_enable_bluetooth": "Włącz Bluetooth wykrywanie księgi", "light_theme": "Jasny", + "live_fee_rates": "Stawki opłaty na żywo za pośrednictwem API", "load_more": "Załaduj więcej", "loading_your_wallet": "Ładowanie portfela", "login": "Login", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index cbe66715a..6b9e4bf77 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -208,6 +208,7 @@ "disable_buy": "Desativar ação de compra", "disable_cake_2fa": "Desabilitar o Cake 2FA", "disable_exchange": "Desativar troca", + "disable_fee_api_warning": "Ao desativar isso, as taxas de taxas podem ser imprecisas em alguns casos, para que você possa acabar pagando demais ou pagando as taxas por suas transações", "disable_fiat": "Desativar fiat", "disable_sell": "Desativar ação de venda", "disableBatteryOptimization": "Desative a otimização da bateria", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Por favor, certifique -se de optar pelo aplicativo certo no seu livro", "ledger_please_enable_bluetooth": "Ative o Bluetooth para detectar seu livro", "light_theme": "Luz", + "live_fee_rates": "Taxas de taxas ao vivo via API", "load_more": "Carregue mais", "loading_your_wallet": "Abrindo sua carteira", "login": "Login", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 9976de9f8..a8def9179 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -208,6 +208,7 @@ "disable_buy": "Отключить действие покупки", "disable_cake_2fa": "Отключить торт 2FA", "disable_exchange": "Отключить обмен", + "disable_fee_api_warning": "Выключив это, в некоторых случаях ставки платы могут быть неточными, так что вы можете в конечном итоге переплачивать или недоплачивать сборы за ваши транзакции", "disable_fiat": "Отключить фиат", "disable_sell": "Отключить действие продажи", "disableBatteryOptimization": "Отключить оптимизацию батареи", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Пожалуйста, убедитесь, что вы предлагаете правильное приложение в своей бухгалтерской книге", "ledger_please_enable_bluetooth": "Пожалуйста, включите Bluetooth обнаружить вашу бухгалтерскую книгу", "light_theme": "Светлая", + "live_fee_rates": "Ставки по сбору вживую через API", "load_more": "Загрузи больше", "loading_your_wallet": "Загрузка кошелька", "login": "Логин", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index e873fe5eb..02480d6fd 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -208,6 +208,7 @@ "disable_buy": "ปิดการใช้งานการซื้อ", "disable_cake_2fa": "ปิดการใช้งานเค้ก 2FA", "disable_exchange": "ปิดใช้งานการแลกเปลี่ยน", + "disable_fee_api_warning": "โดยการปิดสิ่งนี้อัตราค่าธรรมเนียมอาจไม่ถูกต้องในบางกรณีดังนั้นคุณอาจจบลงด้วยการจ่ายเงินมากเกินไปหรือจ่ายค่าธรรมเนียมสำหรับการทำธุรกรรมของคุณมากเกินไป", "disable_fiat": "ปิดใช้งานสกุลเงินตรา", "disable_sell": "ปิดการใช้งานการขาย", "disableBatteryOptimization": "ปิดใช้งานการเพิ่มประสิทธิภาพแบตเตอรี่", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "โปรดตรวจสอบให้แน่ใจว่าคุณเปิดแอพที่เหมาะสมในบัญชีแยกประเภทของคุณ", "ledger_please_enable_bluetooth": "โปรดเปิดใช้งานบลูทู ธ ในการตรวจจับบัญชีแยกประเภทของคุณ", "light_theme": "สว่าง", + "live_fee_rates": "อัตราค่าธรรมเนียมสดผ่าน API", "load_more": "โหลดมากขึ้น", "loading_your_wallet": "กำลังโหลดกระเป๋าของคุณ", "login": "เข้าสู่ระบบ", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index c1bd2bae7..2307cc62b 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -208,6 +208,7 @@ "disable_buy": "Huwag paganahin ang pagkilos ng pagbili", "disable_cake_2fa": "Huwag paganahin ang Cake 2FA", "disable_exchange": "Huwag paganahin ang palitan", + "disable_fee_api_warning": "Sa pamamagitan ng pag -off nito, ang mga rate ng bayad ay maaaring hindi tumpak sa ilang mga kaso, kaya maaari mong tapusin ang labis na bayad o pagsuporta sa mga bayarin para sa iyong mga transaksyon", "disable_fiat": "Huwag paganahin ang fiat", "disable_sell": "Huwag paganahin ang pagkilos ng pagbebenta", "disableBatteryOptimization": "Huwag Paganahin ang Pag-optimize ng Baterya", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Mangyaring tiyaking pinipili mo ang tamang app sa iyong Ledger", "ledger_please_enable_bluetooth": "Mangyaring paganahin ang Bluetooth upang makita ang iyong Ledger", "light_theme": "Light", + "live_fee_rates": "Mga rate ng live na bayad sa pamamagitan ng API", "load_more": "Mag-load pa", "loading_your_wallet": "Naglo-load ng iyong wallet", "login": "Mag-login", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index ff7d9a120..8346703bc 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -208,6 +208,7 @@ "disable_buy": "Satın alma işlemini devre dışı bırak", "disable_cake_2fa": "Cake 2FA'yı Devre Dışı Bırak", "disable_exchange": "Borsayı devre dışı bırak", + "disable_fee_api_warning": "Bunu kapatarak, ücret oranları bazı durumlarda yanlış olabilir, bu nedenle işlemleriniz için ücretleri fazla ödeyebilir veya az ödeyebilirsiniz.", "disable_fiat": "İtibari paraları devre dışı bırak", "disable_sell": "Satış işlemini devre dışı bırak", "disableBatteryOptimization": "Pil optimizasyonunu devre dışı bırakın", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Lütfen defterinizde doğru uygulamayı açtığınızdan emin olun", "ledger_please_enable_bluetooth": "Defterinizi algılamak için lütfen Bluetooth'u etkinleştirin", "light_theme": "Aydınlık", + "live_fee_rates": "API üzerinden canlı ücret oranları", "load_more": "Daha fazla yükle", "loading_your_wallet": "Cüzdanın yükleniyor", "login": "Login", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 95a3a38d8..ec2324544 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -208,6 +208,7 @@ "disable_buy": "Вимкнути дію покупки", "disable_cake_2fa": "Вимкнути Cake 2FA", "disable_exchange": "Вимкнути exchange", + "disable_fee_api_warning": "Вимкнувши це, ставки плати в деяких випадках можуть бути неточними, тому ви можете переплатити або недооплатити плату за свої транзакції", "disable_fiat": "Вимкнути фиат", "disable_sell": "Вимкнути дію продажу", "disableBatteryOptimization": "Вимкнути оптимізацію акумулятора", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "Будь ласка, переконайтеся, що ви відкриваєте потрібну програму на своїй книзі", "ledger_please_enable_bluetooth": "Будь ласка, ввімкніть Bluetooth виявити свою книгу", "light_theme": "Світла", + "live_fee_rates": "Ставки плати за живий через API", "load_more": "Завантажити ще", "loading_your_wallet": "Завантаження гаманця", "login": "Логін", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 5be1cb7a0..bc5fc332c 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -208,6 +208,7 @@ "disable_buy": "خرید ایکشن کو غیر فعال کریں۔", "disable_cake_2fa": "کیک 2FA کو غیر فعال کریں۔", "disable_exchange": "تبادلے کو غیر فعال کریں۔", + "disable_fee_api_warning": "اس کو بند کرنے سے ، کچھ معاملات میں فیس کی شرح غلط ہوسکتی ہے ، لہذا آپ اپنے لین دین کے لئے فیسوں کو زیادہ ادائیگی یا ادائیگی ختم کرسکتے ہیں۔", "disable_fiat": "فیاٹ کو غیر فعال کریں۔", "disable_sell": "فروخت کی کارروائی کو غیر فعال کریں۔", "disableBatteryOptimization": "بیٹری کی اصلاح کو غیر فعال کریں", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "براہ کرم یقینی بنائیں کہ آپ اپنے لیجر پر صحیح ایپ کو کھولتے ہیں", "ledger_please_enable_bluetooth": "براہ کرم بلوٹوتھ کو اپنے لیجر کا پتہ لگانے کے لئے اہل بنائیں", "light_theme": "روشنی", + "live_fee_rates": "API کے ذریعے براہ راست فیس کی شرح", "load_more": "مزید لوڈ کریں", "loading_your_wallet": "آپ کا بٹوہ لوڈ ہو رہا ہے۔", "login": "لاگ ان کریں", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 81d784d7f..e13d79b6b 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -208,6 +208,7 @@ "disable_buy": "Ko iṣọrọ ọja", "disable_cake_2fa": "Ko 2FA Cake sii", "disable_exchange": "Pa ilé pàṣípààrọ̀", + "disable_fee_api_warning": "Nipa yiyi eyi kuro, awọn oṣuwọn owo naa le jẹ aiṣe deede ni awọn ọrọ kan, nitorinaa o le pari apọju tabi awọn idiyele ti o ni agbara fun awọn iṣowo rẹ", "disable_fiat": "Pa owó tí ìjọba pàṣẹ wa lò", "disable_sell": "Ko iṣọrọ iṣọrọ", "disableBatteryOptimization": "Mu Ifasi batiri", @@ -356,6 +357,7 @@ "ledger_error_wrong_app": "Jọwọ rii daju pe iwọ yoo sọ app ti o tọ loju omi rẹ", "ledger_please_enable_bluetooth": "Jọwọ jẹ ki Bluetooth lati rii iṣupọ rẹ", "light_theme": "Funfun bí eérú", + "live_fee_rates": "Awọn oṣuwọn Owo laaye laaye nipasẹ API", "load_more": "Ẹru diẹ sii", "loading_your_wallet": "A ń ṣí àpamọ́wọ́ yín", "login": "Orúkọ", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 876c3bbfb..a26edec4e 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -208,6 +208,7 @@ "disable_buy": "禁用购买操作", "disable_cake_2fa": "禁用蛋糕 2FA", "disable_exchange": "禁用交换", + "disable_fee_api_warning": "通过将其关闭,在某些情况下,收费率可能不准确,因此您最终可能会超额付款或支付交易费用", "disable_fiat": "禁用法令", "disable_sell": "禁用卖出操作", "disableBatteryOptimization": "禁用电池优化", @@ -355,6 +356,7 @@ "ledger_error_wrong_app": "请确保您在分类帐中操作正确的应用程序", "ledger_please_enable_bluetooth": "请启用蓝牙来检测您的分类帐", "light_theme": "艳丽", + "live_fee_rates": "通过API的实时费率", "load_more": "装载更多", "loading_your_wallet": "加载您的钱包", "login": "登录", From 4c795ea5c26f2b5ba88317cf6d02fd284bc420fb Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 27 Aug 2024 01:40:20 +0200 Subject: [PATCH 74/77] subaddress fix (#1620) * subaddress fix * fix subaddress generation * rewrite usedAddresses for xmr and wow * [skip ci] remove print statements --- cw_monero/lib/api/transaction_history.dart | 27 ++++++++++++++++---- cw_monero/lib/monero_subaddress_list.dart | 9 ++++--- cw_monero/lib/monero_wallet.dart | 5 ++++ cw_monero/lib/monero_wallet_addresses.dart | 20 +++++++++++++++ cw_wownero/lib/api/transaction_history.dart | 23 +++++++++++++---- cw_wownero/lib/wownero_subaddress_list.dart | 4 +++ cw_wownero/lib/wownero_wallet.dart | 6 +++++ cw_wownero/lib/wownero_wallet_addresses.dart | 18 +++++++++++++ 8 files changed, 99 insertions(+), 13 deletions(-) diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index b416e1b4e..1f00b082f 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -45,6 +45,8 @@ List getAllTransactions() { confirmations: 0, blockheight: 0, accountIndex: i, + addressIndex: 0, + addressIndexList: [0], paymentId: "", amount: fullBalance - availBalance, isSpend: false, @@ -245,19 +247,30 @@ Future createTransactionMultDest( class Transaction { final String displayLabel; - String subaddressLabel = monero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); - late final String address = monero.Wallet_address( + String get subaddressLabel => monero.Wallet_getSubaddressLabel( wptr!, - accountIndex: 0, - addressIndex: 0, + accountIndex: accountIndex, + addressIndex: addressIndex, ); + String get address => monero.Wallet_address( + wptr!, + accountIndex: accountIndex, + addressIndex: addressIndex, + ); + List get addressList => List.generate(addressIndexList.length, (index) => + monero.Wallet_address( + wptr!, + accountIndex: accountIndex, + addressIndex: addressIndexList[index], + )); final String description; final int fee; final int confirmations; late final bool isPending = confirmations < 10; final int blockheight; - final int addressIndex = 0; + final int addressIndex; final int accountIndex; + final List addressIndexList; final String paymentId; final int amount; final bool isSpend; @@ -303,6 +316,8 @@ class Transaction { amount = monero.TransactionInfo_amount(txInfo), paymentId = monero.TransactionInfo_paymentId(txInfo), accountIndex = monero.TransactionInfo_subaddrAccount(txInfo), + addressIndex = int.tryParse(monero.TransactionInfo_subaddrIndex(txInfo).split(", ")[0]) ?? 0, + addressIndexList = monero.TransactionInfo_subaddrIndex(txInfo).split(", ").map((e) => int.tryParse(e) ?? 0).toList(), blockheight = monero.TransactionInfo_blockHeight(txInfo), confirmations = monero.TransactionInfo_confirmations(txInfo), fee = monero.TransactionInfo_fee(txInfo), @@ -316,6 +331,8 @@ class Transaction { required this.confirmations, required this.blockheight, required this.accountIndex, + required this.addressIndexList, + required this.addressIndex, required this.paymentId, required this.amount, required this.isSpend, diff --git a/cw_monero/lib/monero_subaddress_list.dart b/cw_monero/lib/monero_subaddress_list.dart index c35afb282..fe85bef3b 100644 --- a/cw_monero/lib/monero_subaddress_list.dart +++ b/cw_monero/lib/monero_subaddress_list.dart @@ -1,6 +1,7 @@ import 'package:cw_core/subaddress.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'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -103,6 +104,9 @@ abstract class MoneroSubaddressListBase with Store { required List usedAddresses, }) async { _usedAddresses.addAll(usedAddresses); + final _all = _usedAddresses.toSet().toList(); + _usedAddresses.clear(); + _usedAddresses.addAll(_all); if (_isUpdating) { return; } @@ -124,7 +128,7 @@ abstract class MoneroSubaddressListBase with Store { Future> _getAllUnusedAddresses( {required int accountIndex, required String label}) async { final allAddresses = subaddress_list.getAllSubaddresses(); - if (allAddresses.isEmpty || _usedAddresses.contains(allAddresses.last)) { + if (allAddresses.isEmpty || _usedAddresses.contains(allAddresses.first.address)) { final isAddressUnused = await _newSubaddress(accountIndex: accountIndex, label: label); if (!isAddressUnused) { return await _getAllUnusedAddresses(accountIndex: accountIndex, label: label); @@ -143,8 +147,7 @@ abstract class MoneroSubaddressListBase with Store { label.toLowerCase() == 'Primary account'.toLowerCase() ? 'Primary address' : label); - }) - .toList(); + }).toList().reversed.toList(); } Future _newSubaddress({required int accountIndex, required String label}) async { diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index f5fa0ec7e..483ee8868 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -88,6 +88,9 @@ abstract class MoneroWalletBase extends WalletBase isEnabledAutoGenerateSubaddress, (bool enabled) { _updateSubAddress(enabled, account: walletAddresses.account); }); + reaction((_) => transactionHistory, (__) { + _updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account); + }); } static const int _autoSaveInterval = 30; @@ -130,6 +133,7 @@ abstract class MoneroWalletBase extends WalletBase get usedAddresses { + final txs = getAllTransactions(); + final adds = _originalUsedAddresses.toList(); + for (var i = 0; i < txs.length; i++) { + for (var j = 0; j < txs[i].addressList.length; j++) { + adds.add(txs[i].addressList[j]); + } + } + return adds.toSet(); + } + + Set _originalUsedAddresses = Set(); + + @override + set usedAddresses(Set _usedAddresses) { + _originalUsedAddresses = _usedAddresses; + } + @override Future init() async { accountList.update(); diff --git a/cw_wownero/lib/api/transaction_history.dart b/cw_wownero/lib/api/transaction_history.dart index a1e1e3c9b..020c47df6 100644 --- a/cw_wownero/lib/api/transaction_history.dart +++ b/cw_wownero/lib/api/transaction_history.dart @@ -45,6 +45,8 @@ List getAllTransactions() { confirmations: 0, blockheight: 0, accountIndex: i, + addressIndex: 0, + addressIndexList: [0], paymentId: "", amount: fullBalance - availBalance, isSpend: false, @@ -243,19 +245,26 @@ Future createTransactionMultDest( class Transaction { final String displayLabel; - String subaddressLabel = wownero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); - late final String address = wownero.Wallet_address( + String get subaddressLabel => wownero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); + String get address => wownero.Wallet_address( wptr!, - accountIndex: 0, - addressIndex: 0, + accountIndex: accountIndex, + addressIndex: addressIndex, ); + List get addressList => List.generate(addressIndexList.length, (index) => + wownero.Wallet_address( + wptr!, + accountIndex: accountIndex, + addressIndex: addressIndexList[index], + )); final String description; final int fee; final int confirmations; late final bool isPending = confirmations < 3; final int blockheight; - final int addressIndex = 0; + final int addressIndex; final int accountIndex; + final List addressIndexList; final String paymentId; final int amount; final bool isSpend; @@ -301,6 +310,8 @@ class Transaction { amount = wownero.TransactionInfo_amount(txInfo), paymentId = wownero.TransactionInfo_paymentId(txInfo), accountIndex = wownero.TransactionInfo_subaddrAccount(txInfo), + addressIndex = int.tryParse(wownero.TransactionInfo_subaddrIndex(txInfo).split(", ")[0]) ?? 0, + addressIndexList = wownero.TransactionInfo_subaddrIndex(txInfo).split(", ").map((e) => int.tryParse(e) ?? 0).toList(), blockheight = wownero.TransactionInfo_blockHeight(txInfo), confirmations = wownero.TransactionInfo_confirmations(txInfo), fee = wownero.TransactionInfo_fee(txInfo), @@ -314,6 +325,8 @@ class Transaction { required this.confirmations, required this.blockheight, required this.accountIndex, + required this.addressIndex, + required this.addressIndexList, required this.paymentId, required this.amount, required this.isSpend, diff --git a/cw_wownero/lib/wownero_subaddress_list.dart b/cw_wownero/lib/wownero_subaddress_list.dart index 61fd09ef9..5c026cc86 100644 --- a/cw_wownero/lib/wownero_subaddress_list.dart +++ b/cw_wownero/lib/wownero_subaddress_list.dart @@ -1,6 +1,7 @@ import 'package:cw_core/subaddress.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'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -103,6 +104,9 @@ abstract class WowneroSubaddressListBase with Store { required List usedAddresses, }) async { _usedAddresses.addAll(usedAddresses); + final _all = _usedAddresses.toSet().toList(); + _usedAddresses.clear(); + _usedAddresses.addAll(_all); if (_isUpdating) { return; } diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index c3f4bcb69..ab7691dd6 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -82,6 +82,10 @@ abstract class WowneroWalletBase reaction((_) => isEnabledAutoGenerateSubaddress, (bool enabled) { _updateSubAddress(enabled, account: walletAddresses.account); }); + + _onTxHistoryChangeReaction = reaction((_) => transactionHistory, (__) { + _updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account); + }); } static const int _autoSaveInterval = 30; @@ -123,6 +127,7 @@ abstract class WowneroWalletBase wownero_wallet.SyncListener? _listener; ReactionDisposer? _onAccountChangeReaction; + ReactionDisposer? _onTxHistoryChangeReaction; bool _isTransactionUpdating; bool _hasSyncAfterStartup; Timer? _autoSaveTimer; @@ -158,6 +163,7 @@ abstract class WowneroWalletBase void close() async { _listener?.stop(); _onAccountChangeReaction?.reaction.dispose(); + _onTxHistoryChangeReaction?.reaction.dispose(); _autoSaveTimer?.cancel(); } diff --git a/cw_wownero/lib/wownero_wallet_addresses.dart b/cw_wownero/lib/wownero_wallet_addresses.dart index 9eeb182eb..b36c0e9ec 100644 --- a/cw_wownero/lib/wownero_wallet_addresses.dart +++ b/cw_wownero/lib/wownero_wallet_addresses.dart @@ -3,6 +3,7 @@ import 'package:cw_core/address_info.dart'; import 'package:cw_core/subaddress.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; +import 'package:cw_wownero/api/transaction_history.dart'; import 'package:cw_wownero/api/wallet.dart'; import 'package:cw_wownero/wownero_account_list.dart'; import 'package:cw_wownero/wownero_subaddress_list.dart'; @@ -36,7 +37,24 @@ abstract class WowneroWalletAddressesBase extends WalletAddresses with Store { WowneroSubaddressList subaddressList; WowneroAccountList accountList; + @override + Set get usedAddresses { + final txs = getAllTransactions(); + final adds = _originalUsedAddresses.toList(); + for (var i = 0; i < txs.length; i++) { + for (var j = 0; j < txs[i].addressList.length; j++) { + adds.add(txs[i].addressList[j]); + } + } + return adds.toSet(); + } + Set _originalUsedAddresses = Set(); + + @override + set usedAddresses(Set _usedAddresses) { + _originalUsedAddresses = _usedAddresses; + } @override Future init() async { accountList.update(); From f072e79bb6ca3f0c9ef65607509d4839d1c4d832 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 27 Aug 2024 20:49:12 +0300 Subject: [PATCH 75/77] V4.19.5 v1.16.5 (#1654) * some not enough enhancements for sync status * update app versions * minor fix --- assets/text/Monerocom_Release_Notes.txt | 5 ++--- assets/text/Release_Notes.txt | 7 ++++--- cw_bitcoin/lib/electrum.dart | 12 +----------- cw_bitcoin/lib/electrum_wallet.dart | 10 ++++++---- cw_monero/lib/monero_wallet.dart | 4 +--- lib/reactions/check_connection.dart | 4 +++- lib/utils/exception_handler.dart | 1 - scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- scripts/linux/app_env.sh | 4 ++-- scripts/macos/app_env.sh | 8 ++++---- scripts/windows/build_exe_installer.iss | 2 +- tool/configure.dart | 2 +- 13 files changed, 33 insertions(+), 42 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 11a3ad803..fec1485ac 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,3 +1,2 @@ -Scan and verify messages -Synchronization enhancements -Bug fixes \ No newline at end of file +Enhance auto-address generation for Monero +Bug fixes and enhancements \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 11a3ad803..4e8a79fc1 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,3 +1,4 @@ -Scan and verify messages -Synchronization enhancements -Bug fixes \ No newline at end of file +Enable BIP39 by default for wallet creation also on Bitcoin/Litecoin (Electrum seed type is still accessible through advanced settings page) +Improve fee calculation for Bitcoin to protect against overpaying or underpaying +Enhance auto-address generation for Monero +Bug fixes and enhancements \ No newline at end of file diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index 6ac8edd1a..bc630a4e1 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -107,16 +107,9 @@ class ElectrumClient { } }, onError: (Object error) { - socket = null; final errorMsg = error.toString(); print(errorMsg); unterminatedString = ''; - - final currentHost = socket?.address.host; - final isErrorForCurrentHost = errorMsg.contains(" ${currentHost} "); - - if (currentHost != null && isErrorForCurrentHost) - _setConnectionStatus(ConnectionStatus.failed); }, onDone: () { unterminatedString = ''; @@ -436,7 +429,6 @@ class ElectrumClient { {required String id, required String method, List params = const []}) { try { if (socket == null) { - _setConnectionStatus(ConnectionStatus.failed); return null; } final subscription = BehaviorSubject(); @@ -453,7 +445,6 @@ class ElectrumClient { Future call( {required String method, List params = const [], Function(int)? idCallback}) async { if (socket == null) { - _setConnectionStatus(ConnectionStatus.failed); return null; } final completer = Completer(); @@ -467,10 +458,9 @@ class ElectrumClient { } Future callWithTimeout( - {required String method, List params = const [], int timeout = 4000}) async { + {required String method, List params = const [], int timeout = 5000}) async { try { if (socket == null) { - _setConnectionStatus(ConnectionStatus.failed); return null; } final completer = Completer(); diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index be4cee4d8..73ae7c38f 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -276,7 +276,6 @@ abstract class ElectrumWalletBase Future? _isolate; void Function(FlutterErrorDetails)? _onError; - Timer? _reconnectTimer; Timer? _autoSaveTimer; Timer? _updateFeeRateTimer; static const int _autoSaveInterval = 1; @@ -429,6 +428,10 @@ abstract class ElectrumWalletBase @override Future startSync() async { try { + if (syncStatus is SyncronizingSyncStatus) { + return; + } + syncStatus = SyncronizingSyncStatus(); if (hasSilentPaymentsScanning) { @@ -2055,9 +2058,8 @@ abstract class ElectrumWalletBase _isTryingToConnect = true; - _reconnectTimer?.cancel(); - _reconnectTimer = Timer(Duration(seconds: 10), () { - if (this.syncStatus is! SyncedSyncStatus && this.syncStatus is! SyncedTipSyncStatus) { + Timer(Duration(seconds: 10), () { + if (this.syncStatus is NotConnectedSyncStatus || this.syncStatus is LostConnectionSyncStatus) { this.electrumClient.connectToUri( node!.uri, useSSL: node!.useSSL ?? false, diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 483ee8868..8dc3fdf86 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -13,11 +13,9 @@ import 'package:cw_core/monero_transaction_priority.dart'; import 'package:cw_core/monero_wallet_keys.dart'; import 'package:cw_core/monero_wallet_utils.dart'; import 'package:cw_core/node.dart'; -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_direction.dart'; -import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; @@ -88,7 +86,7 @@ abstract class MoneroWalletBase extends WalletBase isEnabledAutoGenerateSubaddress, (bool enabled) { _updateSubAddress(enabled, account: walletAddresses.account); }); - reaction((_) => transactionHistory, (__) { + _onTxHistoryChangeReaction = reaction((_) => transactionHistory, (__) { _updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account); }); } diff --git a/lib/reactions/check_connection.dart b/lib/reactions/check_connection.dart index 3252797dd..812fa9fcd 100644 --- a/lib/reactions/check_connection.dart +++ b/lib/reactions/check_connection.dart @@ -24,7 +24,9 @@ void startCheckConnectionReaction(WalletBase wallet, SettingsStore settingsStore return; } - if (wallet.syncStatus is LostConnectionSyncStatus || wallet.syncStatus is FailedSyncStatus) { + if (wallet.type != WalletType.bitcoin && + (wallet.syncStatus is LostConnectionSyncStatus || + wallet.syncStatus is FailedSyncStatus)) { final alive = await settingsStore.getCurrentNode(wallet.type).requestNode(); if (alive) { diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 8fc8a8c0e..dd58d3e56 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -172,7 +172,6 @@ class ExceptionHandler { "Error while launching http", "OS Error: Network is unreachable", "ClientException: Write failed, uri=http", - "Connection terminated during handshake", "Corrupted wallets seeds", "bad_alloc", "does not correspond", diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 324d2d2ae..59919dcf8 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.16.4" -MONERO_COM_BUILD_NUMBER=98 +MONERO_COM_VERSION="1.16.5" +MONERO_COM_BUILD_NUMBER=99 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.19.4" -CAKEWALLET_BUILD_NUMBER=225 +CAKEWALLET_VERSION="4.19.5" +CAKEWALLET_BUILD_NUMBER=226 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 1405f7939..70530f4e6 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.16.4" -MONERO_COM_BUILD_NUMBER=96 +MONERO_COM_VERSION="1.16.5" +MONERO_COM_BUILD_NUMBER=97 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.4" -CAKEWALLET_BUILD_NUMBER=263 +CAKEWALLET_VERSION="4.19.5" +CAKEWALLET_BUILD_NUMBER=264 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index bc2965193..7f1b11f3f 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.9.4" -CAKEWALLET_BUILD_NUMBER=31 +CAKEWALLET_VERSION="1.9.5" +CAKEWALLET_BUILD_NUMBER=32 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 342831d65..165feafe1 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.6.4" -MONERO_COM_BUILD_NUMBER=28 +MONERO_COM_VERSION="1.6.5" +MONERO_COM_BUILD_NUMBER=30 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.12.4" -CAKEWALLET_BUILD_NUMBER=85 +CAKEWALLET_VERSION="1.12.5" +CAKEWALLET_BUILD_NUMBER=86 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 4d7838723..bb13f49ef 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.0.5" +#define MyAppVersion "0.0.6" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe" diff --git a/tool/configure.dart b/tool/configure.dart index b3194c4c8..1d2166ed6 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -79,7 +79,6 @@ import 'dart:typed_data'; import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart'; import 'package:cake_wallet/view_model/send/output.dart'; -import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; import 'package:cw_core/node.dart'; import 'package:cw_core/output_info.dart'; @@ -102,6 +101,7 @@ import 'package:bip39/bip39.dart' as bip39; import 'package:cw_bitcoin/utils.dart'; import 'package:cw_bitcoin/electrum_derivations.dart'; import 'package:cw_bitcoin/electrum.dart'; +import 'package:cw_bitcoin/electrum_transaction_info.dart'; import 'package:cw_bitcoin/pending_bitcoin_transaction.dart'; import 'package:cw_bitcoin/bitcoin_receive_page_option.dart'; import 'package:cw_bitcoin/bitcoin_wallet.dart'; From 82f64a42642516d1abed58c12be4018129c6e813 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Thu, 29 Aug 2024 00:52:11 +0300 Subject: [PATCH 76/77] revert subaddress fix (#1656) add show/hide passphrase --- cw_monero/lib/api/transaction_history.dart | 27 ++-------- cw_monero/lib/monero_subaddress_list.dart | 9 ++-- cw_monero/lib/monero_wallet.dart | 5 -- cw_monero/lib/monero_wallet_addresses.dart | 20 -------- cw_wownero/lib/api/transaction_history.dart | 23 ++------- cw_wownero/lib/wownero_subaddress_list.dart | 4 -- cw_wownero/lib/wownero_wallet.dart | 6 --- cw_wownero/lib/wownero_wallet_addresses.dart | 18 ------- .../advanced_privacy_settings_page.dart | 51 +++++++++++-------- scripts/android/app_env.sh | 4 +- scripts/ios/app_env.sh | 4 +- scripts/linux/app_env.sh | 2 +- scripts/macos/app_env.sh | 4 +- 13 files changed, 51 insertions(+), 126 deletions(-) diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index 1f00b082f..b416e1b4e 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -45,8 +45,6 @@ List getAllTransactions() { confirmations: 0, blockheight: 0, accountIndex: i, - addressIndex: 0, - addressIndexList: [0], paymentId: "", amount: fullBalance - availBalance, isSpend: false, @@ -247,30 +245,19 @@ Future createTransactionMultDest( class Transaction { final String displayLabel; - String get subaddressLabel => monero.Wallet_getSubaddressLabel( + String subaddressLabel = monero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); + late final String address = monero.Wallet_address( wptr!, - accountIndex: accountIndex, - addressIndex: addressIndex, + accountIndex: 0, + addressIndex: 0, ); - String get address => monero.Wallet_address( - wptr!, - accountIndex: accountIndex, - addressIndex: addressIndex, - ); - List get addressList => List.generate(addressIndexList.length, (index) => - monero.Wallet_address( - wptr!, - accountIndex: accountIndex, - addressIndex: addressIndexList[index], - )); final String description; final int fee; final int confirmations; late final bool isPending = confirmations < 10; final int blockheight; - final int addressIndex; + final int addressIndex = 0; final int accountIndex; - final List addressIndexList; final String paymentId; final int amount; final bool isSpend; @@ -316,8 +303,6 @@ class Transaction { amount = monero.TransactionInfo_amount(txInfo), paymentId = monero.TransactionInfo_paymentId(txInfo), accountIndex = monero.TransactionInfo_subaddrAccount(txInfo), - addressIndex = int.tryParse(monero.TransactionInfo_subaddrIndex(txInfo).split(", ")[0]) ?? 0, - addressIndexList = monero.TransactionInfo_subaddrIndex(txInfo).split(", ").map((e) => int.tryParse(e) ?? 0).toList(), blockheight = monero.TransactionInfo_blockHeight(txInfo), confirmations = monero.TransactionInfo_confirmations(txInfo), fee = monero.TransactionInfo_fee(txInfo), @@ -331,8 +316,6 @@ class Transaction { required this.confirmations, required this.blockheight, required this.accountIndex, - required this.addressIndexList, - required this.addressIndex, required this.paymentId, required this.amount, required this.isSpend, diff --git a/cw_monero/lib/monero_subaddress_list.dart b/cw_monero/lib/monero_subaddress_list.dart index fe85bef3b..c35afb282 100644 --- a/cw_monero/lib/monero_subaddress_list.dart +++ b/cw_monero/lib/monero_subaddress_list.dart @@ -1,7 +1,6 @@ import 'package:cw_core/subaddress.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'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -104,9 +103,6 @@ abstract class MoneroSubaddressListBase with Store { required List usedAddresses, }) async { _usedAddresses.addAll(usedAddresses); - final _all = _usedAddresses.toSet().toList(); - _usedAddresses.clear(); - _usedAddresses.addAll(_all); if (_isUpdating) { return; } @@ -128,7 +124,7 @@ abstract class MoneroSubaddressListBase with Store { Future> _getAllUnusedAddresses( {required int accountIndex, required String label}) async { final allAddresses = subaddress_list.getAllSubaddresses(); - if (allAddresses.isEmpty || _usedAddresses.contains(allAddresses.first.address)) { + if (allAddresses.isEmpty || _usedAddresses.contains(allAddresses.last)) { final isAddressUnused = await _newSubaddress(accountIndex: accountIndex, label: label); if (!isAddressUnused) { return await _getAllUnusedAddresses(accountIndex: accountIndex, label: label); @@ -147,7 +143,8 @@ abstract class MoneroSubaddressListBase with Store { label.toLowerCase() == 'Primary account'.toLowerCase() ? 'Primary address' : label); - }).toList().reversed.toList(); + }) + .toList(); } Future _newSubaddress({required int accountIndex, required String label}) async { diff --git a/cw_monero/lib/monero_wallet.dart b/cw_monero/lib/monero_wallet.dart index 8dc3fdf86..8773d694d 100644 --- a/cw_monero/lib/monero_wallet.dart +++ b/cw_monero/lib/monero_wallet.dart @@ -86,9 +86,6 @@ abstract class MoneroWalletBase extends WalletBase isEnabledAutoGenerateSubaddress, (bool enabled) { _updateSubAddress(enabled, account: walletAddresses.account); }); - _onTxHistoryChangeReaction = reaction((_) => transactionHistory, (__) { - _updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account); - }); } static const int _autoSaveInterval = 30; @@ -131,7 +128,6 @@ abstract class MoneroWalletBase extends WalletBase get usedAddresses { - final txs = getAllTransactions(); - final adds = _originalUsedAddresses.toList(); - for (var i = 0; i < txs.length; i++) { - for (var j = 0; j < txs[i].addressList.length; j++) { - adds.add(txs[i].addressList[j]); - } - } - return adds.toSet(); - } - - Set _originalUsedAddresses = Set(); - - @override - set usedAddresses(Set _usedAddresses) { - _originalUsedAddresses = _usedAddresses; - } - @override Future init() async { accountList.update(); diff --git a/cw_wownero/lib/api/transaction_history.dart b/cw_wownero/lib/api/transaction_history.dart index 020c47df6..a1e1e3c9b 100644 --- a/cw_wownero/lib/api/transaction_history.dart +++ b/cw_wownero/lib/api/transaction_history.dart @@ -45,8 +45,6 @@ List getAllTransactions() { confirmations: 0, blockheight: 0, accountIndex: i, - addressIndex: 0, - addressIndexList: [0], paymentId: "", amount: fullBalance - availBalance, isSpend: false, @@ -245,26 +243,19 @@ Future createTransactionMultDest( class Transaction { final String displayLabel; - String get subaddressLabel => wownero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); - String get address => wownero.Wallet_address( + String subaddressLabel = wownero.Wallet_getSubaddressLabel(wptr!, accountIndex: 0, addressIndex: 0); + late final String address = wownero.Wallet_address( wptr!, - accountIndex: accountIndex, - addressIndex: addressIndex, + accountIndex: 0, + addressIndex: 0, ); - List get addressList => List.generate(addressIndexList.length, (index) => - wownero.Wallet_address( - wptr!, - accountIndex: accountIndex, - addressIndex: addressIndexList[index], - )); final String description; final int fee; final int confirmations; late final bool isPending = confirmations < 3; final int blockheight; - final int addressIndex; + final int addressIndex = 0; final int accountIndex; - final List addressIndexList; final String paymentId; final int amount; final bool isSpend; @@ -310,8 +301,6 @@ class Transaction { amount = wownero.TransactionInfo_amount(txInfo), paymentId = wownero.TransactionInfo_paymentId(txInfo), accountIndex = wownero.TransactionInfo_subaddrAccount(txInfo), - addressIndex = int.tryParse(wownero.TransactionInfo_subaddrIndex(txInfo).split(", ")[0]) ?? 0, - addressIndexList = wownero.TransactionInfo_subaddrIndex(txInfo).split(", ").map((e) => int.tryParse(e) ?? 0).toList(), blockheight = wownero.TransactionInfo_blockHeight(txInfo), confirmations = wownero.TransactionInfo_confirmations(txInfo), fee = wownero.TransactionInfo_fee(txInfo), @@ -325,8 +314,6 @@ class Transaction { required this.confirmations, required this.blockheight, required this.accountIndex, - required this.addressIndex, - required this.addressIndexList, required this.paymentId, required this.amount, required this.isSpend, diff --git a/cw_wownero/lib/wownero_subaddress_list.dart b/cw_wownero/lib/wownero_subaddress_list.dart index 5c026cc86..61fd09ef9 100644 --- a/cw_wownero/lib/wownero_subaddress_list.dart +++ b/cw_wownero/lib/wownero_subaddress_list.dart @@ -1,7 +1,6 @@ import 'package:cw_core/subaddress.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'; import 'package:flutter/services.dart'; import 'package:mobx/mobx.dart'; @@ -104,9 +103,6 @@ abstract class WowneroSubaddressListBase with Store { required List usedAddresses, }) async { _usedAddresses.addAll(usedAddresses); - final _all = _usedAddresses.toSet().toList(); - _usedAddresses.clear(); - _usedAddresses.addAll(_all); if (_isUpdating) { return; } diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index ab7691dd6..c3f4bcb69 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -82,10 +82,6 @@ abstract class WowneroWalletBase reaction((_) => isEnabledAutoGenerateSubaddress, (bool enabled) { _updateSubAddress(enabled, account: walletAddresses.account); }); - - _onTxHistoryChangeReaction = reaction((_) => transactionHistory, (__) { - _updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account); - }); } static const int _autoSaveInterval = 30; @@ -127,7 +123,6 @@ abstract class WowneroWalletBase wownero_wallet.SyncListener? _listener; ReactionDisposer? _onAccountChangeReaction; - ReactionDisposer? _onTxHistoryChangeReaction; bool _isTransactionUpdating; bool _hasSyncAfterStartup; Timer? _autoSaveTimer; @@ -163,7 +158,6 @@ abstract class WowneroWalletBase void close() async { _listener?.stop(); _onAccountChangeReaction?.reaction.dispose(); - _onTxHistoryChangeReaction?.reaction.dispose(); _autoSaveTimer?.cancel(); } diff --git a/cw_wownero/lib/wownero_wallet_addresses.dart b/cw_wownero/lib/wownero_wallet_addresses.dart index b36c0e9ec..9eeb182eb 100644 --- a/cw_wownero/lib/wownero_wallet_addresses.dart +++ b/cw_wownero/lib/wownero_wallet_addresses.dart @@ -3,7 +3,6 @@ import 'package:cw_core/address_info.dart'; import 'package:cw_core/subaddress.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_wownero/api/transaction_history.dart'; import 'package:cw_wownero/api/wallet.dart'; import 'package:cw_wownero/wownero_account_list.dart'; import 'package:cw_wownero/wownero_subaddress_list.dart'; @@ -37,24 +36,7 @@ abstract class WowneroWalletAddressesBase extends WalletAddresses with Store { WowneroSubaddressList subaddressList; WowneroAccountList accountList; - @override - Set get usedAddresses { - final txs = getAllTransactions(); - final adds = _originalUsedAddresses.toList(); - for (var i = 0; i < txs.length; i++) { - for (var j = 0; j < txs[i].addressList.length; j++) { - adds.add(txs[i].addressList[j]); - } - } - return adds.toSet(); - } - Set _originalUsedAddresses = Set(); - - @override - set usedAddresses(Set _usedAddresses) { - _originalUsedAddresses = _usedAddresses; - } @override Future init() async { accountList.update(); diff --git a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart index ff8ec3dd2..7173778cc 100644 --- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart +++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart @@ -70,6 +70,8 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo final _formKey = GlobalKey(); bool? testnetValue; + bool obscurePassphrase = true; + @override void initState() { passphraseController.text = widget.seedTypeViewModel.passphrase ?? ''; @@ -138,27 +140,36 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo ); }), if (!widget.isFromRestore) ...[ - Observer(builder: (_) { - if (widget.privacySettingsViewModel.hasSeedPhraseLengthOption) - return SettingsPickerCell( - title: S.current.seed_phrase_length, - items: SeedPhraseLength.values, - selectedItem: widget.privacySettingsViewModel.seedPhraseLength, - onItemSelected: (SeedPhraseLength length) { - widget.privacySettingsViewModel.setSeedPhraseLength(length); - }, - ); - return Container(); - }), - if (widget.privacySettingsViewModel.hasPassphraseOption) - Padding( - padding: EdgeInsets.all(24), - child: BaseTextFormField( - hintText: S.current.passphrase, - controller: passphraseController, - obscureText: true, + Observer(builder: (_) { + if (widget.privacySettingsViewModel.hasSeedPhraseLengthOption) + return SettingsPickerCell( + title: S.current.seed_phrase_length, + items: SeedPhraseLength.values, + selectedItem: widget.privacySettingsViewModel.seedPhraseLength, + onItemSelected: (SeedPhraseLength length) { + widget.privacySettingsViewModel.setSeedPhraseLength(length); + }, + ); + return Container(); + }), + if (widget.privacySettingsViewModel.hasPassphraseOption) + Padding( + padding: EdgeInsets.all(24), + child: BaseTextFormField( + hintText: S.current.passphrase, + controller: passphraseController, + obscureText: obscurePassphrase, + suffixIcon: GestureDetector( + onTap: () => setState(() { + obscurePassphrase = !obscurePassphrase; + }), + child: Icon( + Icons.remove_red_eye, + color: obscurePassphrase ? Colors.black54 : Colors.black26, + ), + ), + ), ), - ), ], Observer(builder: (_) { return Column( diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 59919dcf8..a60077e82 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -16,14 +16,14 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.16.5" -MONERO_COM_BUILD_NUMBER=99 +MONERO_COM_BUILD_NUMBER=100 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.19.5" -CAKEWALLET_BUILD_NUMBER=226 +CAKEWALLET_BUILD_NUMBER=227 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 70530f4e6..9df4b685e 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.16.5" -MONERO_COM_BUILD_NUMBER=97 +MONERO_COM_BUILD_NUMBER=98 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.19.5" -CAKEWALLET_BUILD_NUMBER=264 +CAKEWALLET_BUILD_NUMBER=266 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 7f1b11f3f..1c89c6e8a 100755 --- a/scripts/linux/app_env.sh +++ b/scripts/linux/app_env.sh @@ -15,7 +15,7 @@ fi CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.9.5" -CAKEWALLET_BUILD_NUMBER=32 +CAKEWALLET_BUILD_NUMBER=33 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 165feafe1..a6afac2cb 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -17,12 +17,12 @@ fi MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.6.5" -MONERO_COM_BUILD_NUMBER=30 +MONERO_COM_BUILD_NUMBER=31 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.12.5" -CAKEWALLET_BUILD_NUMBER=86 +CAKEWALLET_BUILD_NUMBER=88 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then From c17f167266185b57822444752817f9ec38adfffb Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Thu, 29 Aug 2024 14:24:24 +0200 Subject: [PATCH 77/77] Fix windows build (#1658) --- windows/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 7d1c03451..09bc8cfb6 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -87,18 +87,12 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x8 install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/wownero/x86_64-w64-mingw32_libwallet2_api_c.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "wownero_libwallet2_api_c.dll" COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-w64-mingw32_libgcc_s_seh-1.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libgcc_s_seh-1.dll" - COMPONENT Runtime) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-w64-mingw32_libpolyseed.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libpolyseed.dll" COMPONENT Runtime) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-w64-mingw32_libssp-0.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libssp-0.dll" COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-w64-mingw32_libstdc++-6.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libstdc++-6.dll" - COMPONENT Runtime) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/x86_64-w64-mingw32_libwinpthread-1.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libwinpthread-1.dll" COMPONENT Runtime)