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 01/33] 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 02/33] 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 03/33] 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 04/33] 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 05/33] 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 06/33] 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 07/33] 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 08/33] 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 09/33] 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 10/33] 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 11/33] 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 12/33] 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 13/33] 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 14/33] 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 15/33] 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 16/33] 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 17/33] 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 18/33] 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 19/33] 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 20/33] 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 21/33] 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`o4dSVm887zRQ(AgqsnTn@Fj&%3?qM6~K_v^icP`)(65WwU`sh`OuSFLJQZDZ# zx_1gli>DNKu8MZ}8>K3{Cs+*kJZkxK3)m#yl=E@aDY%t-a6yyn&6s4+!+VfEzhO;P5L}2OVIuW&b(gON=!yf zLku>1(@L%@3-rqjEj^AsRy2Vu{^oZYS<u%{V01(ZN#M+@d! zfDcX)zT#`pM_Yi;%f~#)yqQ^GK2rF%)F_o-lB`eLpTTnSX_y%DHB%6=bkNqJ2v`8( z-I4_Ccm7T3q*Ia;z!GfXD4Uj!Q_GT8zQ{^^=;nXl4p!z-f)P)Aca~Ut1M`N>!O(8Q ztrlL2=~0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n?`(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- z3NQfR1|FhR4g51UGXpX>4Qu;CSD*hQ*hjo%l(3jkQC z%_l$m31=Zn-GBeC7oTiMj9D`>of2_->$+`+1(>K*7=WRlo;OsocHho?b8=J9}eeKJ6%yjzhZTlh^Xs z`0nJAk@0v36Cuqp1*VQX;H8@2D_E3giQ9~f;5ef|fzx&BNPg0VfA0LGMK69y)sE3y zhXUT%wUN5Ix_Hg8;5o^`JN@=vGI00=i4;sscp#9oLt#P=>zL()pDCGSB1^oblSR9L zj$|H1`BXj8-T?gXRmO+|TeCK= zxJ+3#9B-pgBaVOBfJByuZ`H8V>pp?`Q=~N`v|$6p_S_xXJL?=jrj87D za#)$x`x=TbIC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5}rLb6AY zF9SoB8UsT^3j@P1pisjL28L1t28LG&3=CE?fMyiT*%fF5l&DCJ@J#ddWzYh$IT%l<#Nv5>Skcg59UmvUF{9L`nl>DSry^7od zkS+$B3M(KpH?<^Dp&~aYuh^=>Rtc=a3djZt>nkaMm6T-LDnNc-DA*LGq*(>IxIwi8dA3R!B_#z``ugSN<$C4Ddih1^`i7R4mih)p`bI{&Koz>h zm3bwJ6}oxF$`C_f=D4I5Cl_TFlw{`TDS*sPOv*1Uu~kw6Sp)|Vca~(PA#BPkhI$L= zL4A;nzM-ChJ~nNs6`44+fn*@s!2W_*X9F_K%D*Tx73g4)v+N9Qz!sp0A)E(MACy|0 zpHm7_9-5a~VrK-^f+mcl3uL!dKxRd1PNYj_ZfagJ$R=Ym8-1)2ST#lgGGVyZpUS#4^KmOT)on|-+^iNgQtsQ zhzIZ0se8Sg9R*t7n_lc_T`-M}MS9~UCy_O}wG11#Y~Q$L(hdb>%CV`(^O|I!11l9{%%(Ngec}WY&JVI zx}u)l=5yTt)c2A1YqgS4w%rFz+wL=1^>IZ^61tbUCA3-PsI9=PGQ}56d*=$Il=Pkt#V$_5brG_s_9#UlhK; z@7=+v6F0x#vUbs|zO`&N_MZ=OS(o4EI^piH>}bil%*h3ZCmlEW=90{6Izz3jM{(!T z59|kK$N6&1w^x4gSN5Z}!?)>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+@ zIR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N0ZDt#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+uPnOQ51Ul=EjqbC&$^+#F>(5F1&TPBT9x^ul>{p`eBn3)uj&HX; zD1S~!`Y(`kWmk39$Btu5C-k)E&xjzDqdyX;J29Hlpjf7qpO!HhtBylx)hThCyyUTc zb1`uUaT?s4(`S+m$cGkxSr|jDQ%1DZlEz|Dm(+#G!2Gm56g*;%er^m}t^G$WjDQoc zw+MQsHTDzlCY zU0@5CJp4Sm_^jP3NF6j-AW}M~z(Z+qZT@v)M}5QMT7=ji26A_P9xc$9uCJ^yJ|!Er z5+T~9v)_lN8^#*09k)veyZ>y*h9MIWQ$pQqDeC9xtySLkjVv5uPg8j))6FL%emPx) z#k_L1(Fi%jCVvyuk#ST|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YzO3IT8 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 22/33] 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 23/33] 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 24/33] 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 25/33] 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 26/33] 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 27/33] 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 28/33] 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 29/33] 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 30/33] 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 31/33] 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 32/33] 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 33/33] 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()) {