From e9b5b184283a880d10878994c692583636a1fceb Mon Sep 17 00:00:00 2001 From: Rafael Date: Thu, 26 Sep 2024 01:49:09 +0000 Subject: [PATCH 1/5] Fix regex pattern (#1695) * fix: regex pattern * fix: extracting regex --- lib/core/address_validator.dart | 117 +++++++++++++++++--------------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index e76cb99d1..06a30a2c3 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -5,6 +5,9 @@ import 'package:cake_wallet/solana/solana.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/erc20_token.dart'; +const BEFORE_REGEX = '(^|\\s)'; +const AFTER_REGEX = '(\$|\\s)'; + class AddressValidator extends TextValidator { AddressValidator({required CryptoCurrency type}) : super( @@ -19,21 +22,23 @@ class AddressValidator extends TextValidator { length: getLength(type)); static String getPattern(CryptoCurrency type) { + var pattern = ""; if (type is Erc20Token) { - return '0x[0-9a-zA-Z]'; + pattern = '0x[0-9a-zA-Z]+'; } switch (type) { case CryptoCurrency.xmr: - return '^4[0-9a-zA-Z]{94}\$|^8[0-9a-zA-Z]{94}\$|^[0-9a-zA-Z]{106}\$'; + pattern = '4[0-9a-zA-Z]{94}|8[0-9a-zA-Z]{94}|[0-9a-zA-Z]{106}'; case CryptoCurrency.ada: - return '^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{104}\$' - '|^[0-9a-zA-Z]{105}\$|^addr1[0-9a-zA-Z]{98}\$'; + pattern = '[0-9a-zA-Z]{59}|[0-9a-zA-Z]{92}|[0-9a-zA-Z]{104}' + '|[0-9a-zA-Z]{105}|addr1[0-9a-zA-Z]{98}'; case CryptoCurrency.btc: - return '^${P2pkhAddress.regex.pattern}\$|^${P2shAddress.regex.pattern}\$|^${P2wpkhAddress.regex.pattern}\$|${P2trAddress.regex.pattern}\$|^${P2wshAddress.regex.pattern}\$|^${SilentPaymentAddress.regex.pattern}\$'; + pattern = + '${P2pkhAddress.regex.pattern}|${P2shAddress.regex.pattern}|${P2wpkhAddress.regex.pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}'; case CryptoCurrency.nano: - return '[0-9a-zA-Z_]'; + pattern = '[0-9a-zA-Z_]+'; case CryptoCurrency.banano: - return '[0-9a-zA-Z_]'; + pattern = '[0-9a-zA-Z_]+'; case CryptoCurrency.usdc: case CryptoCurrency.usdcpoly: case CryptoCurrency.usdtPoly: @@ -69,11 +74,11 @@ class AddressValidator extends TextValidator { case CryptoCurrency.dydx: case CryptoCurrency.steth: case CryptoCurrency.shib: - return '0x[0-9a-zA-Z]'; + pattern = '0x[0-9a-zA-Z]+'; case CryptoCurrency.xrp: - return '^[0-9a-zA-Z]{34}\$|^X[0-9a-zA-Z]{46}\$'; + pattern = '[0-9a-zA-Z]{34}|X[0-9a-zA-Z]{46}'; case CryptoCurrency.xhv: - return '^hvx|hvi|hvs[0-9a-zA-Z]'; + pattern = 'hvx|hvi|hvs[0-9a-zA-Z]+'; case CryptoCurrency.xag: case CryptoCurrency.xau: case CryptoCurrency.xaud: @@ -95,40 +100,43 @@ class AddressValidator extends TextValidator { case CryptoCurrency.dash: case CryptoCurrency.eos: case CryptoCurrency.wow: - return '[0-9a-zA-Z]'; + pattern = '[0-9a-zA-Z]+'; case CryptoCurrency.bch: - return '^(?!bitcoincash:)[0-9a-zA-Z]*\$|^(?!bitcoincash:)q|p[0-9a-zA-Z]{41}\$|^(?!bitcoincash:)q|p[0-9a-zA-Z]{42}\$|^bitcoincash:q|p[0-9a-zA-Z]{41}\$|^bitcoincash:q|p[0-9a-zA-Z]{42}\$'; + pattern = + '(?!bitcoincash:)[0-9a-zA-Z]*|(?!bitcoincash:)q|p[0-9a-zA-Z]{41}|(?!bitcoincash:)q|p[0-9a-zA-Z]{42}|bitcoincash:q|p[0-9a-zA-Z]{41}|bitcoincash:q|p[0-9a-zA-Z]{42}'; case CryptoCurrency.bnb: - return '[0-9a-zA-Z]'; + pattern = '[0-9a-zA-Z]+'; case CryptoCurrency.ltc: - return '^(?!(ltc|LTC)1)[0-9a-zA-Z]*\$|(^LTC1[A-Z0-9]*\$)|(^ltc1[a-z0-9]*\$)'; + pattern = '((?!(ltc|LTC)1)[0-9a-zA-Z]*)|(LTC1[A-Z0-9]*)|(ltc1[a-z0-9]*)'; case CryptoCurrency.hbar: - return '[0-9a-zA-Z.]'; + pattern = '[0-9a-zA-Z.]+'; case CryptoCurrency.zaddr: - return '^zs[0-9a-zA-Z]{75}'; + pattern = 'zs[0-9a-zA-Z]{75}'; case CryptoCurrency.zec: - return '^t1[0-9a-zA-Z]{33}\$|^t3[0-9a-zA-Z]{33}\$'; + pattern = 't1[0-9a-zA-Z]{33}|t3[0-9a-zA-Z]{33}'; case CryptoCurrency.dcr: - return 'D[ksecS]([0-9a-zA-Z])+'; + pattern = 'D[ksecS]([0-9a-zA-Z])+'; case CryptoCurrency.rvn: - return '[Rr]([1-9a-km-zA-HJ-NP-Z]){33}'; + pattern = '[Rr]([1-9a-km-zA-HJ-NP-Z]){33}'; case CryptoCurrency.near: - return '[0-9a-f]{64}'; + pattern = '[0-9a-f]{64}'; case CryptoCurrency.rune: - return 'thor1[0-9a-z]{38}'; + pattern = 'thor1[0-9a-z]{38}'; case CryptoCurrency.scrt: - return 'secret1[0-9a-z]{38}'; + pattern = 'secret1[0-9a-z]{38}'; case CryptoCurrency.stx: - return 'S[MP][0-9a-zA-Z]+'; + pattern = 'S[MP][0-9a-zA-Z]+'; case CryptoCurrency.kmd: - return 'R[0-9a-zA-Z]{33}'; + pattern = 'R[0-9a-zA-Z]{33}'; case CryptoCurrency.pivx: - return 'D([1-9a-km-zA-HJ-NP-Z]){33}'; + pattern = 'D([1-9a-km-zA-HJ-NP-Z]){33}'; case CryptoCurrency.btcln: - return '^(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)'; + pattern = '(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)'; default: - return '[0-9a-zA-Z]'; + pattern = '[0-9a-zA-Z]+'; } + + return '$BEFORE_REGEX($pattern)$AFTER_REGEX'; } static List? getLength(CryptoCurrency type) { @@ -269,56 +277,53 @@ class AddressValidator extends TextValidator { } static String? getAddressFromStringPattern(CryptoCurrency type) { + String? pattern = null; + switch (type) { case CryptoCurrency.xmr: case CryptoCurrency.wow: - return '([^0-9a-zA-Z]|^)4[0-9a-zA-Z]{94}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)8[0-9a-zA-Z]{94}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)[0-9a-zA-Z]{106}([^0-9a-zA-Z]|\$)'; + pattern = '(4[0-9a-zA-Z]{94})' + '|(8[0-9a-zA-Z]{94})' + '|([0-9a-zA-Z]{106})'; case CryptoCurrency.btc: - return '([^0-9a-zA-Z]|^)([1mn][a-km-zA-HJ-NP-Z1-9]{25,34})([^0-9a-zA-Z]|\$)' //P2pkhAddress type - '|([^0-9a-zA-Z]|^)([23][a-km-zA-HJ-NP-Z1-9]{25,34})([^0-9a-zA-Z]|\$)' //P2shAddress type - '|([^0-9a-zA-Z]|^)((bc|tb)1q[ac-hj-np-z02-9]{25,39})([^0-9a-zA-Z]|\$)' //P2wpkhAddress type - '|([^0-9a-zA-Z]|^)((bc|tb)1q[ac-hj-np-z02-9]{40,80})([^0-9a-zA-Z]|\$)' //P2wshAddress type - '|([^0-9a-zA-Z]|^)((bc|tb)1p([ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59}|[ac-hj-np-z02-9]{8,89}))([^0-9a-zA-Z]|\$)' //P2trAddress type - '|${SilentPaymentAddress.regex.pattern}\$'; - + pattern = + '${P2pkhAddress.regex.pattern}|${P2shAddress.regex.pattern}|${P2wpkhAddress.regex.pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}'; case CryptoCurrency.ltc: - return '([^0-9a-zA-Z]|^)^L[a-zA-Z0-9]{26,33}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)[LM][a-km-zA-HJ-NP-Z1-9]{26,33}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)ltc[a-zA-Z0-9]{26,45}([^0-9a-zA-Z]|\$)'; + pattern = '(L[a-zA-Z0-9]{26,33})' + '|([LM][a-km-zA-HJ-NP-Z1-9]{26,33})' + '|(ltc[a-zA-Z0-9]{26,45})'; case CryptoCurrency.eth: - return '0x[0-9a-zA-Z]{42}'; case CryptoCurrency.maticpoly: - return '0x[0-9a-zA-Z]{42}'; + pattern = '0x[0-9a-zA-Z]+'; case CryptoCurrency.nano: - return 'nano_[0-9a-zA-Z]{60}'; + pattern = 'nano_[0-9a-zA-Z]{60}'; case CryptoCurrency.banano: - return 'ban_[0-9a-zA-Z]{60}'; + pattern = 'ban_[0-9a-zA-Z]{60}'; case CryptoCurrency.bch: - return 'bitcoincash:q[0-9a-zA-Z]{41}([^0-9a-zA-Z]|\$)' - '|bitcoincash:q[0-9a-zA-Z]{42}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)q[0-9a-zA-Z]{41}([^0-9a-zA-Z]|\$)' - '|([^0-9a-zA-Z]|^)q[0-9a-zA-Z]{42}([^0-9a-zA-Z]|\$)'; + pattern = '(bitcoincash:)?q[0-9a-zA-Z]{41,42}'; case CryptoCurrency.sol: - return '([^0-9a-zA-Z]|^)[1-9A-HJ-NP-Za-km-z]{43,44}([^0-9a-zA-Z]|\$)'; + pattern = '[1-9A-HJ-NP-Za-km-z]+'; case CryptoCurrency.trx: - return '(T|t)[1-9A-HJ-NP-Za-km-z]{33}'; + pattern = '(T|t)[1-9A-HJ-NP-Za-km-z]{33}'; default: if (type.tag == CryptoCurrency.eth.title) { - return '0x[0-9a-zA-Z]{42}'; + pattern = '0x[0-9a-zA-Z]{42}'; } if (type.tag == CryptoCurrency.maticpoly.tag) { - return '0x[0-9a-zA-Z]{42}'; + pattern = '0x[0-9a-zA-Z]{42}'; } if (type.tag == CryptoCurrency.sol.title) { - return '([^0-9a-zA-Z]|^)[1-9A-HJ-NP-Za-km-z]{43,44}([^0-9a-zA-Z]|\$)'; + pattern = '[1-9A-HJ-NP-Za-km-z]{43,44}'; } if (type.tag == CryptoCurrency.trx.title) { - return '(T|t)[1-9A-HJ-NP-Za-km-z]{33}'; + pattern = '(T|t)[1-9A-HJ-NP-Za-km-z]{33}'; } - - return null; } + + if (pattern != null) { + return "$BEFORE_REGEX($pattern)$AFTER_REGEX"; + } + + return null; } } From 11584844d55892f31cedf303a919c1991a93bd3e Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Thu, 26 Sep 2024 04:51:38 +0300 Subject: [PATCH 2/5] Verify seed phrase (#1700) * add confirm passphrase field and show/hide passphrase feature * change error message allow force appending translation to overwrite * minor fix for showing frozen balance correctly [skip ci] * remove debug prints [skip ci] --- cw_bitcoin/lib/electrum_transaction_info.dart | 2 +- cw_bitcoin/lib/electrum_wallet.dart | 12 +++ cw_bitcoin/pubspec.lock | 20 ++--- .../advanced_privacy_settings_page.dart | 76 +++++++++++++------ .../wallet_restore_from_seed_form.dart | 13 +++- .../dashboard/home_settings_view_model.dart | 14 +--- res/values/strings_ar.arb | 2 + res/values/strings_bg.arb | 2 + res/values/strings_cs.arb | 2 + res/values/strings_de.arb | 4 +- res/values/strings_en.arb | 4 +- res/values/strings_es.arb | 2 + res/values/strings_fr.arb | 2 + res/values/strings_ha.arb | 2 + res/values/strings_hi.arb | 2 + res/values/strings_hr.arb | 2 + res/values/strings_hy.arb | 2 + res/values/strings_id.arb | 2 + res/values/strings_it.arb | 2 + res/values/strings_ja.arb | 2 + res/values/strings_ko.arb | 2 + res/values/strings_my.arb | 2 + res/values/strings_nl.arb | 2 + res/values/strings_pl.arb | 2 + res/values/strings_pt.arb | 2 + res/values/strings_ru.arb | 2 + res/values/strings_th.arb | 2 + res/values/strings_tl.arb | 2 + res/values/strings_tr.arb | 2 + res/values/strings_uk.arb | 2 + res/values/strings_ur.arb | 2 + res/values/strings_vi.arb | 2 + res/values/strings_yo.arb | 2 + res/values/strings_zh.arb | 2 + tool/append_translation.dart | 9 ++- tool/utils/translation/arb_file_utils.dart | 4 +- 36 files changed, 155 insertions(+), 55 deletions(-) diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index f2ef251c7..1ab7799e3 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -35,7 +35,7 @@ class ElectrumTransactionInfo extends TransactionInfo { List? outputAddresses, required TransactionDirection direction, required bool isPending, - required bool isReplaced, + bool isReplaced = false, required DateTime date, required int confirmations, String? to, diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index fee115650..71e537186 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -1902,6 +1902,18 @@ abstract class ElectrumWalletBase var totalConfirmed = 0; var totalUnconfirmed = 0; + unspentCoinsInfo.values.forEach((info) { + unspentCoins.forEach((element) { + if (element.hash == info.hash && + element.vout == info.vout && + info.isFrozen && + element.bitcoinAddressRecord.address == info.address && + element.value == info.value) { + totalFrozen += element.value; + } + }); + }); + if (hasSilentPaymentsScanning) { // Add values from unspent coins that are not fetched by the address list // i.e. scanned silent payments diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index a2478af3c..c46260cee 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: asn1lib - sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda" + sha256: "6b151826fcc95ff246cd219a0bf4c753ea14f4081ad71c61939becf3aba27f70" url: "https://pub.dev" source: hosted - version: "1.5.3" + version: "1.5.5" async: dependency: transitive description: @@ -71,7 +71,7 @@ packages: description: path: "." ref: cake-update-v7 - resolved-ref: bc49e3b1cba601828f8ddc3d016188d8c2499088 + resolved-ref: f577e83fe78766b2655ea0602baa9299b953a31b url: "https://github.com/cake-tech/bitcoin_base" source: git version: "4.7.0" @@ -296,10 +296,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" ffigen: dependency: transitive description: @@ -553,10 +553,10 @@ packages: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mobx: dependency: "direct main" description: @@ -713,10 +713,10 @@ packages: dependency: transitive description: name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" reactive_ble_mobile: dependency: transitive description: @@ -855,7 +855,7 @@ packages: description: path: "." ref: "sp_v4.0.0" - resolved-ref: "9b04f4b0af80dd7dae9274b496a53c23dcc80ea5" + resolved-ref: ca1add293bd1e06920aa049b655832da50d0dab2 url: "https://github.com/cake-tech/sp_scanner" source: git version: "0.0.1" diff --git a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart index 078768a7a..8b7be18a1 100644 --- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart +++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart @@ -85,7 +85,9 @@ class _AdvancedPrivacySettingsBody extends StatefulWidget { class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBody> { final TextEditingController passphraseController = TextEditingController(); + final TextEditingController confirmPassphraseController = TextEditingController(); final _formKey = GlobalKey(); + final _passphraseFormKey = GlobalKey(); bool? testnetValue; bool obscurePassphrase = true; @@ -93,9 +95,7 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo @override void initState() { passphraseController.text = widget.seedTypeViewModel.passphrase ?? ''; - - passphraseController - .addListener(() => widget.seedTypeViewModel.setPassphrase(passphraseController.text)); + confirmPassphraseController.text = widget.seedTypeViewModel.passphrase ?? ''; if (widget.isChildWallet) { if (widget.privacySettingsViewModel.type == WalletType.bitcoin) { @@ -205,18 +205,47 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo if (widget.privacySettingsViewModel.hasPassphraseOption) Padding( padding: EdgeInsets.all(24), - child: BaseTextFormField( - hintText: S.current.passphrase, - controller: passphraseController, - obscureText: obscurePassphrase, - suffixIcon: GestureDetector( - onTap: () => setState(() { - obscurePassphrase = !obscurePassphrase; - }), - child: Icon( - Icons.remove_red_eye, - color: obscurePassphrase ? Colors.black54 : Colors.black26, - ), + child: Form( + key: _passphraseFormKey, + child: Column( + children: [ + BaseTextFormField( + hintText: S.of(context).passphrase, + controller: passphraseController, + obscureText: obscurePassphrase, + suffixIcon: GestureDetector( + onTap: () => setState(() { + obscurePassphrase = !obscurePassphrase; + }), + child: Icon( + Icons.remove_red_eye, + color: obscurePassphrase ? Colors.black54 : Colors.black26, + ), + ), + ), + const SizedBox(height: 10), + BaseTextFormField( + hintText: S.of(context).confirm_passphrase, + controller: confirmPassphraseController, + obscureText: obscurePassphrase, + validator: (text) { + if (text == passphraseController.text) { + return null; + } + + return S.of(context).passphrases_doesnt_match; + }, + suffixIcon: GestureDetector( + onTap: () => setState(() { + obscurePassphrase = !obscurePassphrase; + }), + child: Icon( + Icons.remove_red_eye, + color: obscurePassphrase ? Colors.black54 : Colors.black26, + ), + ), + ), + ], ), ), ), @@ -272,7 +301,8 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo } widget.nodeViewModel.save(); - } else if (testnetValue == true) { + } + if (testnetValue == true) { // TODO: add type (mainnet/testnet) to Node class so when switching wallets the node can be switched to a matching type // Currently this is so you can create a working testnet wallet but you need to keep switching back the node if you use multiple wallets at once widget.nodeViewModel.address = publicBitcoinTestnetElectrumAddress; @@ -280,6 +310,13 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo widget.nodeViewModel.save(); } + if (passphraseController.text.isNotEmpty) { + if (_passphraseFormKey.currentState != null && !_passphraseFormKey.currentState!.validate()) { + return; + } + + widget.seedTypeViewModel.setPassphrase(passphraseController.text); + } Navigator.pop(context); }, @@ -318,11 +355,4 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo ); }); } - - @override - void dispose() { - passphraseController - .removeListener(() => widget.seedTypeViewModel.setPassphrase(passphraseController.text)); - super.dispose(); - } } 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 67576144c..897a6bed0 100644 --- a/lib/src/screens/restore/wallet_restore_from_seed_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_seed_form.dart @@ -78,6 +78,8 @@ class WalletRestoreFromSeedFormState extends State { void Function()? repeatedPasswordListener; void Function()? passphraseListener; + bool obscurePassphrase = true; + @override void initState() { _setSeedType(widget.seedSettingsViewModel.moneroSeedType); @@ -283,7 +285,16 @@ class WalletRestoreFromSeedFormState extends State { BaseTextFormField( hintText: S.current.passphrase, controller: passphraseController, - obscureText: true, + obscureText: obscurePassphrase, + suffixIcon: GestureDetector( + onTap: () => setState(() { + obscurePassphrase = !obscurePassphrase; + }), + child: Icon( + Icons.remove_red_eye, + color: obscurePassphrase ? Colors.black54 : Colors.black26, + ), + ), ), ] ])); diff --git a/lib/view_model/dashboard/home_settings_view_model.dart b/lib/view_model/dashboard/home_settings_view_model.dart index 4269078a5..1aeacd28f 100644 --- a/lib/view_model/dashboard/home_settings_view_model.dart +++ b/lib/view_model/dashboard/home_settings_view_model.dart @@ -151,34 +151,24 @@ abstract class HomeSettingsViewModelBase with Store { bool isEthereum = _balanceViewModel.wallet.type == WalletType.ethereum; - print('An extra log for now'); - bool isPotentialScamViaMoralis = await _isPotentialScamTokenViaMoralis( contractAddress, isEthereum ? 'eth' : 'polygon', ); - print('Is Potential Scam from Moralis: $isPotentialScamViaMoralis'); - bool isPotentialScamViaExplorers = await _isPotentialScamTokenViaExplorers( contractAddress, isEthereum: isEthereum, ); - print('Is Potential Scam from Explorers: $isPotentialScamViaExplorers'); - bool isUnverifiedContract = await _isContractUnverified( contractAddress, isEthereum: isEthereum, ); - print('Is Unverified Contract: $isUnverifiedContract'); - final showWarningForContractAddress = isPotentialScamViaMoralis || isUnverifiedContract || isPotentialScamViaExplorers; - print('Show Warning: $showWarningForContractAddress'); - return showWarningForContractAddress; } finally { isValidatingContractAddress = false; @@ -272,8 +262,8 @@ abstract class HomeSettingsViewModelBase with Store { final decodedResponse = jsonDecode(response.body) as Map; if (decodedResponse['status'] != '1') { - print('${response.body}\n'); - print('${decodedResponse['result']}\n'); + log('${response.body}\n'); + log('${decodedResponse['result']}\n'); return true; } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index c9a0c1a37..48d744f08 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "سيؤدي هذا الإجراء إلى حذف هذه المحفظة. هل ترغب في الاستمرار؟", "confirm_fee_deduction": "تأكيد خصم الرسوم", "confirm_fee_deduction_content": "هل توافق على خصم الرسوم من الإخراج؟", + "confirm_passphrase": "تأكيد عبارة المرور", "confirm_sending": "تأكيد الإرسال", "confirm_silent_payments_switch_node": "العقدة الحالية لا تدعم المدفوعات الصامتة \\ ncake wallet سوف تتحول إلى عقدة متوافقة ، فقط للمسح الضوئي", "confirmations": "التأكيدات", @@ -451,6 +452,7 @@ "overwrite_amount": "تغير المبلغ", "pairingInvalidEvent": "ﺢﻟﺎﺻ ﺮﻴﻏ ﺙﺪﺣ ﻥﺍﺮﻗﺇ", "passphrase": "عبارة الممر (اختياري)", + "passphrases_doesnt_match": "لا تتطابق عبارات المرور ، يرجى المحاولة مرة أخرى", "password": "كلمة المرور", "paste": "لصق", "pause_wallet_creation": ".ﺎﻴًﻟﺎﺣ ﺎﺘًﻗﺆﻣ ﺔﻔﻗﻮﺘﻣ Haven Wallet ءﺎﺸﻧﺇ ﻰﻠﻋ ﺓﺭﺪﻘﻟﺍ", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 2021dd220..14cce0cfb 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Този портфейл ще бъде изтрит. Искате ли да продължите?", "confirm_fee_deduction": "Потвърдете приспадането на таксите", "confirm_fee_deduction_content": "Съгласни ли сте да приспадате таксата от продукцията?", + "confirm_passphrase": "Потвърдете парола", "confirm_sending": "Потвърждаване на изпращането", "confirm_silent_payments_switch_node": "Текущият ви възел не поддържа Silent Payments \\ Ncake Wallet ще премине към съвместим възел, само за сканиране", "confirmations": "потвърждения", @@ -451,6 +452,7 @@ "overwrite_amount": "Промени сума", "pairingInvalidEvent": "Невалидно събитие при сдвояване", "passphrase": "Passphrase (по избор)", + "passphrases_doesnt_match": "Пасифрази не съвпадат, моля, опитайте отново", "password": "Парола", "paste": "Поставяне", "pause_wallet_creation": "Възможността за създаване на Haven Wallet в момента е на пауза.", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index bc8a8903a..344c5bf3b 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Tato akce smaže tuto peněženku. Přejete si pokračovat?", "confirm_fee_deduction": "Potvrďte odpočet poplatků", "confirm_fee_deduction_content": "Souhlasíte s odečtením poplatku z výstupu?", + "confirm_passphrase": "Potvrďte přístupovou frázi", "confirm_sending": "Potvrdit odeslání", "confirm_silent_payments_switch_node": "Váš aktuální uzel nepodporuje tiché platby \\ Ncake peněženka se přepne na kompatibilní uzel, pouze pro skenování", "confirmations": "Potvrzení", @@ -451,6 +452,7 @@ "overwrite_amount": "Přepsat částku", "pairingInvalidEvent": "Neplatná událost párování", "passphrase": "Passphrase (volitelné)", + "passphrases_doesnt_match": "Passfrázy se neshodují, zkuste to znovu", "password": "Heslo", "paste": "Vložit", "pause_wallet_creation": "Možnost vytvářet Haven Wallet je momentálně pozastavena.", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 4a7565d0c..6eb6ea3c3 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Diese Aktion löscht diese Wallet. Möchten Sie fortfahren?", "confirm_fee_deduction": "Gebührenabzug bestätigen", "confirm_fee_deduction_content": "Stimmen Sie zu, die Gebühr von der Ausgabe abzuziehen?", + "confirm_passphrase": "Passphrase bestätigen", "confirm_sending": "Senden bestätigen", "confirm_silent_payments_switch_node": "Ihr aktueller Knoten unterstützt keine stillen Zahlungen \\ NCAKE Wallet wechselt zu einem kompatiblen Knoten, nur zum Scannen", "confirmations": "Bestätigungen", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Paarung ungültiges Ereignis", "passphrase": "Passphrase (optional)", + "passphrases_doesnt_match": "Passphrasen stimmen nicht überein, bitte versuchen Sie es erneut", "password": "Passwort", "paste": "Einfügen", "pause_wallet_creation": "Die Möglichkeit, Haven Wallet zu erstellen, ist derzeit pausiert.", @@ -465,8 +467,8 @@ "placeholder_transactions": "Ihre Transaktionen werden hier angezeigt", "please_fill_totp": "Bitte geben Sie den 8-stelligen Code ein, der auf Ihrem anderen Gerät vorhanden ist", "please_make_selection": "Bitte treffen Sie unten eine Auswahl zum Erstellen oder Wiederherstellen Ihrer Wallet.", - "Please_reference_document": "Weitere Informationen finden Sie in den Dokumenten unten.", "please_reference_document": "Bitte verweisen Sie auf die folgenden Dokumente, um weitere Informationen zu erhalten.", + "Please_reference_document": "Weitere Informationen finden Sie in den Dokumenten unten.", "please_select": "Bitte auswählen:", "please_select_backup_file": "Bitte wählen Sie die Sicherungsdatei und geben Sie das Sicherungskennwort ein.", "please_try_to_connect_to_another_node": "Bitte versuchen Sie, sich mit einem anderen Knoten zu verbinden", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 975667036..c95816b28 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "This action will delete this wallet. Do you wish to continue?", "confirm_fee_deduction": "Confirm Fee Deduction", "confirm_fee_deduction_content": "Do you agree to deduct the fee from the output?", + "confirm_passphrase": "Confirm passphrase", "confirm_sending": "Confirm sending", "confirm_silent_payments_switch_node": "Your current node does not support silent payments\\nCake Wallet will switch to a compatible node, just for scanning", "confirmations": "Confirmations", @@ -297,8 +298,8 @@ "failed_authentication": "Failed authentication. ${state_error}", "faq": "FAQ", "features": "Features", - "fee_rate": "Fee rate", "fee_less_than_min": "Selected Fee is less than the minimum, please increase the fees to be able to send the transaction", + "fee_rate": "Fee rate", "fetching": "Fetching", "fiat_api": "Fiat API", "fiat_balance": "Fiat Balance", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Pairing Invalid Event", "passphrase": "Passphrase (Optional)", + "passphrases_doesnt_match": "Passphrases do not match, please try again", "password": "Password", "paste": "Paste", "pause_wallet_creation": "Ability to create Haven Wallet is currently paused.", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 19356fc20..57cadbd08 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Esta acción eliminará esta billetera. ¿Desea continuar?", "confirm_fee_deduction": "Confirmar la deducción de la tarifa", "confirm_fee_deduction_content": "¿Acepta deducir la tarifa de la producción?", + "confirm_passphrase": "Confirmar la frase de pases", "confirm_sending": "Confirmar envío", "confirm_silent_payments_switch_node": "Su nodo actual no admite pagos silenciosos \\ ncake billet cambiará a un nodo compatible, solo para escanear", "confirmations": "Confirmaciones", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Evento de emparejamiento no válido", "passphrase": "Passfrase (opcional)", + "passphrases_doesnt_match": "Las frases de contrato no coinciden, intente nuevamente", "password": "Contraseña", "paste": "Pegar", "pause_wallet_creation": "La capacidad para crear Haven Wallet está actualmente pausada.", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 4b57d026b..2de3c6d03 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Cette action va supprimer ce portefeuille (wallet). Souhaitez-vous contnuer ?", "confirm_fee_deduction": "Confirmer la déduction des frais", "confirm_fee_deduction_content": "Acceptez-vous de déduire les frais de la production?", + "confirm_passphrase": "Confirmer la phrase passante", "confirm_sending": "Confirmer l'envoi", "confirm_silent_payments_switch_node": "Votre nœud actuel ne prend pas en charge les paiements silencieux \\ ncake qui passera à un nœud compatible, juste pour la numérisation", "confirmations": "Confirmations", @@ -451,6 +452,7 @@ "overwrite_amount": "Remplacer le montant", "pairingInvalidEvent": "Événement de couplage non valide", "passphrase": "Phrase de passe (facultative)", + "passphrases_doesnt_match": "Les phrases de passe ne correspondent pas, veuillez réessayer", "password": "Mot de passe", "paste": "Coller", "pause_wallet_creation": "La possibilité de créer Haven Wallet est actuellement suspendue.", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 34cbf0a69..3adefbea0 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Wannan aikin zai share wannan walat. Kuna so ku ci gaba?", "confirm_fee_deduction": "Tabbatar da cire kudade", "confirm_fee_deduction_content": "Shin kun yarda ku cire kuɗin daga fitarwa?", + "confirm_passphrase": "Tabbatar da kalmar wucewa", "confirm_sending": "Tabbatar da aikawa", "confirm_silent_payments_switch_node": "Kumburinku na yanzu ba ya goyan bayan biyan shiru da shiru \\ NCADA Wallet zai canza zuwa kumburi mai dacewa, don bincika", "confirmations": "Tabbatar", @@ -453,6 +454,7 @@ "overwrite_amount": "Rubuta adadin", "pairingInvalidEvent": "Haɗa Lamarin mara inganci", "passphrase": "Passphrase (Zabi)", + "passphrases_doesnt_match": "Passphrases bai dace ba, don Allah sake gwadawa", "password": "Kalmar wucewa", "paste": "Manna", "pause_wallet_creation": "A halin yanzu an dakatar da ikon ƙirƙirar Haven Wallet.", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index e321358ee..403acec3e 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "यह क्रिया इस वॉलेट को हटा देगी। क्या आप जारी रखना चाहते हैं?", "confirm_fee_deduction": "शुल्क कटौती की पुष्टि करें", "confirm_fee_deduction_content": "क्या आप आउटपुट से शुल्क में कटौती करने के लिए सहमत हैं?", + "confirm_passphrase": "पासफ़्रेज़ की पुष्टि करें", "confirm_sending": "भेजने की पुष्टि करें", "confirm_silent_payments_switch_node": "आपका वर्तमान नोड मूक भुगतान का समर्थन नहीं करता है \\ ncake वॉलेट एक संगत नोड पर स्विच करेगा, बस स्कैनिंग के लिए", "confirmations": "पुष्टिकरण", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "अमान्य ईवेंट युग्मित करना", "passphrase": "पासफ्रेज़ (वैकल्पिक)", + "passphrases_doesnt_match": "PassPhrases मेल नहीं खाता, कृपया पुनः प्रयास करें", "password": "पारण शब्द", "paste": "पेस्ट करें", "pause_wallet_creation": "हेवन वॉलेट बनाने की क्षमता फिलहाल रुकी हुई है।", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index cd91d5291..e225a11b8 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Ovom ćete radnjom izbrisati ovaj novčanik. Želite li nastaviti?", "confirm_fee_deduction": "Potvrdite odbitak naknade", "confirm_fee_deduction_content": "Slažete li se da ćete odbiti naknadu od izlaza?", + "confirm_passphrase": "Potvrdite prolaznu frazu", "confirm_sending": "Potvrdi slanje", "confirm_silent_payments_switch_node": "Vaš trenutni čvor ne podržava tiha plaćanja \\ ncake novčanik prebacit će se na kompatibilni čvor, samo za skeniranje", "confirmations": "Potvrde", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Nevažeći događaj uparivanja", "passphrase": "Prolaznica (neobavezno)", + "passphrases_doesnt_match": "Prolazne fraze se ne podudaraju, pokušajte ponovo", "password": "Lozinka", "paste": "Zalijepi", "pause_wallet_creation": "Mogućnost stvaranja novčanika Haven trenutno je pauzirana.", diff --git a/res/values/strings_hy.arb b/res/values/strings_hy.arb index 8c65817c2..addddb34c 100644 --- a/res/values/strings_hy.arb +++ b/res/values/strings_hy.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Այս գործողությունը կջնջի այս դրամապանակը: Ցանկանու՞մ եք շարունակել։", "confirm_fee_deduction": "Հաստատեք միջնորդավճար հանումը", "confirm_fee_deduction_content": "Դուք համաձայն եք միջնորդավճար հանել արդյունքից?", + "confirm_passphrase": "Հաստատեք գաղտնաբառը", "confirm_sending": "Հաստատեք ուղարկումը", "confirm_silent_payments_switch_node": "Ձեր ընթացիկ հանգույցը չի աջակցում Լուռ վճարումներին\nCake Wallet-ը կանցնի համատեղելի հանգույց, միայն սկանավորման համար", "confirmations": "Հաստատումներ", @@ -451,6 +452,7 @@ "overwrite_amount": "Գրեք գումարը", "pairingInvalidEvent": "Սխալ միացում", "passphrase": "Պարող արտահայտություն (Ոչ պարտադիր)", + "passphrases_doesnt_match": "Անհատները չեն համընկնում, խնդրում ենք կրկին փորձել", "password": "Գաղտնաբառ", "paste": "Տեղադրել", "pause_wallet_creation": "Հնարավորություն ստեղծել Haven Դրամապանակ ընթացիկ դադարեցված է", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index a888a336a..7848ab0ab 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Tindakan ini akan menghapus dompet ini. Apakah Anda ingin melanjutkan?", "confirm_fee_deduction": "Konfirmasi pengurangan biaya", "confirm_fee_deduction_content": "Apakah Anda setuju untuk mengurangi biaya dari output?", + "confirm_passphrase": "Konfirmasi frasa sandi", "confirm_sending": "Konfirmasi pengiriman", "confirm_silent_payments_switch_node": "Node Anda saat ini tidak mendukung pembayaran diam \\ ncake Wallet akan beralih ke simpul yang kompatibel, hanya untuk pemindaian", "confirmations": "Konfirmasi", @@ -453,6 +454,7 @@ "overwrite_amount": "Timpa jumlah", "pairingInvalidEvent": "Menyandingkan Acara Tidak Valid", "passphrase": "Frasa sandi (opsional)", + "passphrases_doesnt_match": "Sandi tidak cocok, coba lagi", "password": "Kata Sandi", "paste": "Tempel", "pause_wallet_creation": "Kemampuan untuk membuat Haven Wallet saat ini dijeda.", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 0e307ac9f..6f40f0633 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Questa azione cancellerà questo portafoglio. Desideri continuare?", "confirm_fee_deduction": "Conferma la detrazione delle commissioni", "confirm_fee_deduction_content": "Accetti di detrarre la commissione dall'output?", + "confirm_passphrase": "Conferma passphrase", "confirm_sending": "Conferma l'invio", "confirm_silent_payments_switch_node": "Il tuo nodo corrente non supporta i pagamenti silenziosi \\ ncake Wallet passerà a un nodo compatibile, solo per la scansione", "confirmations": "Conferme", @@ -453,6 +454,7 @@ "overwrite_amount": "Sovrascrivi quantità", "pairingInvalidEvent": "Associazione evento non valido", "passphrase": "Passphrase (opzionale)", + "passphrases_doesnt_match": "Le passphrasi non corrispondono, riprova", "password": "Password", "paste": "Incolla", "pause_wallet_creation": "La possibilità di creare Haven Wallet è attualmente sospesa.", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index efb7bcc81..a850b78c6 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "このアクションにより、このウォレットが削除されます。 続行しますか?", "confirm_fee_deduction": "料金控除を確認します", "confirm_fee_deduction_content": "出力から料金を差し引くことに同意しますか?", + "confirm_passphrase": "パスフレーズを確認します", "confirm_sending": "送信を確認", "confirm_silent_payments_switch_node": "現在のノードはサイレントペイメントをサポートしていません\\ ncakeウォレットは、スキャン用に互換性のあるノードに切り替えます", "confirmations": "確認", @@ -452,6 +453,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "ペアリング無効イベント", "passphrase": "パスフレーズ(オプション)", + "passphrases_doesnt_match": "パスフレーズは一致しません。もう一度やり直してください", "password": "パスワード", "paste": "ペースト", "pause_wallet_creation": "Haven Wallet を作成する機能は現在一時停止されています。", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 24b6acc8c..86725aa5c 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "이 작업은이 지갑을 삭제합니다. 계속 하시겠습니까?", "confirm_fee_deduction": "수수료 공제를 확인하십시오", "confirm_fee_deduction_content": "출력에서 수수료를 공제하는 데 동의하십니까?", + "confirm_passphrase": "암호를 확인하십시오", "confirm_sending": "전송 확인", "confirm_silent_payments_switch_node": "현재 노드는 무음 지불을 지원하지 않습니다 \\ ncake 지갑은 스캔을 위해 호환 가능한 노드로 전환됩니다.", "confirmations": "확인", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "잘못된 이벤트 페어링", "passphrase": "암호화 (선택 사항)", + "passphrases_doesnt_match": "패스 프레이즈가 일치하지 않습니다. 다시 시도하십시오", "password": "암호", "paste": "풀", "pause_wallet_creation": "Haven Wallet 생성 기능이 현재 일시 중지되었습니다.", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index a2d783e52..588f8bf4e 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "ဤလုပ်ဆောင်ချက်သည် ဤပိုက်ဆံအိတ်ကို ဖျက်လိုက်ပါမည်။ ဆက်လုပ်လိုပါသလား။", "confirm_fee_deduction": "အခကြေးငွေကိုနှုတ်ယူခြင်း", "confirm_fee_deduction_content": "output မှအခကြေးငွေကိုယူရန်သဘောတူပါသလား။", + "confirm_passphrase": "passphrase အတည်ပြုပါ", "confirm_sending": "ပေးပို့အတည်ပြုပါ။", "confirm_silent_payments_switch_node": "သင်၏လက်ရှိ node သည်အသံတိတ်ငွေပေးချေမှုကိုမပံ့ပိုးပါဟု \\ t", "confirmations": "အတည်ပြုချက်များ", @@ -451,6 +452,7 @@ "overwrite_amount": "ပမာဏကို ထပ်ရေးပါ။", "pairingInvalidEvent": "မမှန်ကန်သောဖြစ်ရပ်ကို တွဲချိတ်ခြင်း။", "passphrase": "passphrase (optional)", + "passphrases_doesnt_match": "passphrases မကိုက်ညီဘူး, ကျေးဇူးပြုပြီးထပ်ကြိုးစားပါ", "password": "စကားဝှက်", "paste": "ငါးပိ", "pause_wallet_creation": "Haven Wallet ဖန်တီးနိုင်မှုကို လောလောဆယ် ခေတ္တရပ်ထားသည်။", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index a7d414b1c..38bf2d69f 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Met deze actie wordt deze portemonnee verwijderd. Wilt u doorgaan?", "confirm_fee_deduction": "Bevestig de aftrek van de kosten", "confirm_fee_deduction_content": "Stemt u ermee in om de vergoeding af te trekken van de output?", + "confirm_passphrase": "Bevestig Passaspherase", "confirm_sending": "Bevestig verzending", "confirm_silent_payments_switch_node": "Uw huidige knooppunt ondersteunt geen stille betalingen \\ ncake -portemonnee schakelt over naar een compatibele knoop", "confirmations": "Bevestigingen", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Koppelen Ongeldige gebeurtenis", "passphrase": "PassaspHRASE (optioneel)", + "passphrases_doesnt_match": "Passaspelfiaal komt niet overeen, probeer het opnieuw", "password": "Wachtwoord", "paste": "Plakken", "pause_wallet_creation": "De mogelijkheid om Haven Wallet te maken is momenteel onderbroken.", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 00eebbe98..fc776a1af 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Ta czynność usunie ten portfel. Czy chcesz kontynuować?", "confirm_fee_deduction": "Potwierdź odliczenie opłaty", "confirm_fee_deduction_content": "Czy zgadzasz się odliczyć opłatę od wyników?", + "confirm_passphrase": "Potwierdź hasło", "confirm_sending": "Potwierdź wysłanie", "confirm_silent_payments_switch_node": "Twój obecny węzeł nie obsługuje cichych płatności \\ NCAKE Portfel przełączy się na kompatybilny węzeł, tylko do skanowania", "confirmations": "Potwierdzenia", @@ -451,6 +452,7 @@ "overwrite_amount": "Nadpisz ilość", "pairingInvalidEvent": "Nieprawidłowe zdarzenie parowania", "passphrase": "PassPhraza (opcjonalnie)", + "passphrases_doesnt_match": "Passfrazy nie pasują, spróbuj ponownie", "password": "Hasło", "paste": "Wklej", "pause_wallet_creation": "Możliwość utworzenia Portfela Haven jest obecnie wstrzymana.", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 28bea3e65..6a892cda0 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Esta ação excluirá esta carteira. Você deseja continuar?", "confirm_fee_deduction": "Confirme dedução da taxa", "confirm_fee_deduction_content": "Você concorda em deduzir a taxa da saída?", + "confirm_passphrase": "Confirme a senha", "confirm_sending": "Confirmar o envio", "confirm_silent_payments_switch_node": "Seu nó atual não suporta pagamentos silenciosos \n A Cake Wallet mudará para um nó compatível, apenas para escanear", "confirmations": "Confirmações", @@ -453,6 +454,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Emparelhamento de evento inválido", "passphrase": "Senha (opcional)", + "passphrases_doesnt_match": "Passagases não correspondem, por favor tente novamente", "password": "Senha", "paste": "Colar", "pause_wallet_creation": "A capacidade de criar a Haven Wallet está atualmente pausada.", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 6ffa87b0f..dd3ce9654 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Это действие удалит кошелек. Вы хотите продолжить?", "confirm_fee_deduction": "Подтвердите вычет платы", "confirm_fee_deduction_content": "Согласны ли вы вычесть плату из вывода?", + "confirm_passphrase": "Подтвердите Passfrase", "confirm_sending": "Подтвердить отправку", "confirm_silent_payments_switch_node": "Ваш текущий узел не поддерживает Silent Payments \\ ncake Wallet переключится на совместимый узел, только для сканирования", "confirmations": "Подтверждения", @@ -452,6 +453,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Недействительное событие сопряжения", "passphrase": "Passfrase (необязательно)", + "passphrases_doesnt_match": "Пасфразы не совпадают, попробуйте еще раз", "password": "Пароль", "paste": "Вставить", "pause_wallet_creation": "Возможность создания Haven Wallet в настоящее время приостановлена.", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 4a41989c8..e13e6053e 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "การดำเนินการนี้จะลบกระเป๋านี้ คุณต้องการดำเนินการต่อหรือไม่?", "confirm_fee_deduction": "ยืนยันการหักค่าธรรมเนียม", "confirm_fee_deduction_content": "คุณตกลงที่จะหักค่าธรรมเนียมจากผลลัพธ์หรือไม่?", + "confirm_passphrase": "ยืนยันวลีรหัสผ่าน", "confirm_sending": "ยืนยันการส่ง", "confirm_silent_payments_switch_node": "โหนดปัจจุบันของคุณไม่รองรับการชำระเงินแบบเงียบ \\ ncake กระเป๋าเงินจะเปลี่ยนเป็นโหนดที่เข้ากันได้เพียงเพื่อการสแกน", "confirmations": "การยืนยัน", @@ -451,6 +452,7 @@ "overwrite_amount": "เขียนทับจำนวน", "pairingInvalidEvent": "การจับคู่เหตุการณ์ที่ไม่ถูกต้อง", "passphrase": "ข้อความรหัสผ่าน (ไม่บังคับ)", + "passphrases_doesnt_match": "Passphrases ไม่ตรงกันโปรดลองอีกครั้ง", "password": "รหัสผ่าน", "paste": "วาง", "pause_wallet_creation": "ขณะนี้ความสามารถในการสร้าง Haven Wallet ถูกหยุดชั่วคราว", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index f2caa5fcc..3ec6160ed 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -143,6 +143,7 @@ "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_passphrase": "Kumpirma ang passphrase", "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", "confirmations": "Mga kumpirmasyon", @@ -451,6 +452,7 @@ "overwrite_amount": "I-overwrite ang halaga", "pairingInvalidEvent": "Pairing Invalid Event", "passphrase": "Passphrase (opsyonal)", + "passphrases_doesnt_match": "Ang mga passphrases ay hindi tumutugma, mangyaring subukang muli", "password": "Password", "paste": "I-paste", "pause_wallet_creation": "Kasalukuyang naka-pause ang kakayahang gumawa ng Haven Wallet.", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 83545e261..ab2159c95 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Bu eylem, bu cüzdanı silecek. Devam etmek istiyor musun?", "confirm_fee_deduction": "Ücret kesintisini onaylayın", "confirm_fee_deduction_content": "Ücreti çıktıdan düşürmeyi kabul ediyor musunuz?", + "confirm_passphrase": "Parola onaylayın", "confirm_sending": "Göndermeyi onayla", "confirm_silent_payments_switch_node": "Mevcut düğümünüz sessiz ödemeleri desteklemiyor \\ nCake cüzdanı, sadece tarama için uyumlu bir düğüme geçecektir", "confirmations": "Onay", @@ -451,6 +452,7 @@ "overwrite_amount": "Miktarın üzerine yaz", "pairingInvalidEvent": "Geçersiz Etkinliği Eşleştirme", "passphrase": "Passfrase (isteğe bağlı)", + "passphrases_doesnt_match": "Passfrases eşleşmiyor, lütfen tekrar deneyin", "password": "Parola", "paste": "Yapıştır", "pause_wallet_creation": "Haven Cüzdanı oluşturma yeteneği şu anda duraklatıldı.", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index dc6baad6d..1d6e05dee 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Ця дія видалить гаманець. Ви хочете продовжити?", "confirm_fee_deduction": "Підтвердьте відрахування комісії", "confirm_fee_deduction_content": "Чи погоджуєтесь ви вирахувати комісію з сумми одержувача?", + "confirm_passphrase": "Підтвердьте пасфрази", "confirm_sending": "Підтвердити відправлення", "confirm_silent_payments_switch_node": "Ваш поточний вузол не підтримує мовчазні платежі \\ ncake Wallet перейде на сумісний вузол, лише для сканування", "confirmations": "Підтвердження", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "Недійсна подія сполучення", "passphrase": "Пасофрази (необов’язково)", + "passphrases_doesnt_match": "Пасофрази не відповідають, спробуйте ще раз", "password": "Пароль", "paste": "Вставити", "pause_wallet_creation": "Можливість створення гаманця Haven зараз призупинено.", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 2140accbe..bf128ca2a 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "اس کارروائی سے یہ پرس حذف ہو جائے گا۔ کیا آپ جاری رکھنا چاہتے ہیں؟", "confirm_fee_deduction": "فیس میں کٹوتی کی تصدیق کریں", "confirm_fee_deduction_content": "کیا آپ آؤٹ پٹ سے فیس کم کرنے پر راضی ہیں؟", + "confirm_passphrase": "پاسفریز کی تصدیق کریں", "confirm_sending": "بھیجنے کی تصدیق کریں۔", "confirm_silent_payments_switch_node": "آپ کا موجودہ نوڈ خاموش ادائیگیوں کی حمایت نہیں کرتا ہے۔", "confirmations": "تصدیقات", @@ -453,6 +454,7 @@ "overwrite_amount": "رقم کو اوور رائٹ کریں۔", "pairingInvalidEvent": "ﭧﻧﻮﯾﺍ ﻂﻠﻏ ﺎﻧﺎﻨﺑ ﺍﮌﻮﺟ", "passphrase": "پاسفریز (اختیاری)", + "passphrases_doesnt_match": "پاسفریز مماثل نہیں ہیں ، براہ کرم دوبارہ کوشش کریں", "password": "پاس ورڈ", "paste": "چسپاں کریں۔", "pause_wallet_creation": "Haven Wallet ۔ﮯﮨ ﻑﻮﻗﻮﻣ ﻝﺎﺤﻟﺍ ﯽﻓ ﺖﯿﻠﮨﺍ ﯽﮐ ﮯﻧﺎﻨﺑ", diff --git a/res/values/strings_vi.arb b/res/values/strings_vi.arb index a21da9e68..fc573451e 100644 --- a/res/values/strings_vi.arb +++ b/res/values/strings_vi.arb @@ -144,6 +144,7 @@ "confirm_fee_dedction_content": "Bạn có đồng ý trừ phí từ đầu ra không?", "confirm_fee_deduction": "Xác nhận Khấu trừ Phí", "confirm_fee_deduction_content": "Bạn có đồng ý khấu trừ phí từ đầu ra không?", + "confirm_passphrase": "Xác nhận cụm mật khẩu", "confirm_sending": "Xác nhận gửi", "confirm_silent_payments_switch_node": "Nút hiện tại của bạn không hỗ trợ thanh toán im lặng\\nCake Wallet sẽ chuyển sang một nút tương thích chỉ để quét", "confirmations": "Xác nhận", @@ -452,6 +453,7 @@ "overwrite_amount": "Ghi đè số tiền", "pairingInvalidEvent": "Sự kiện ghép nối không hợp lệ", "passphrase": "Cụm từ bảo mật (Tùy chọn)", + "passphrases_doesnt_match": "Vòng thông không khớp, vui lòng thử lại", "password": "Mật khẩu", "paste": "Dán", "pause_wallet_creation": "Khả năng tạo ví Haven hiện đang bị tạm dừng.", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 8a30c5e08..1b8dfc065 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "Ìṣe yìí máa yọ àpamọ́wọ́ yìí kúrò. Ṣé ẹ fẹ́ tẹ̀síwájú?", "confirm_fee_deduction": "Jẹrisi iyọkuro owo", "confirm_fee_deduction_content": "Ṣe o gba lati yọkuro idiyele naa kuro ni iṣejade?", + "confirm_passphrase": "Jẹrisi kọwe", "confirm_sending": "Jẹ́rìí sí ránṣẹ́", "confirm_silent_payments_switch_node": "Ilode rẹ ti lọwọlọwọ ko ṣe atilẹyin awọn sisanwo ti o dakẹ \\ owet apamọwọ yoo yipada si oju-ọrọ ibaramu, o kan fun Scning", "confirmations": "Àwọn ẹ̀rí", @@ -452,6 +453,7 @@ "overwrite_amount": "Pààrọ̀ iye owó", "pairingInvalidEvent": "Pipọpọ Iṣẹlẹ Ti ko tọ", "passphrase": "Ọrọ kukuru (iyan)", + "passphrases_doesnt_match": "Awọn ọrọ kukuru ko baamu, jọwọ gbiyanju lẹẹkansi", "password": "Ọ̀rọ̀ aṣínà", "paste": "Fikún ẹ̀dà yín", "pause_wallet_creation": "Agbara lati ṣẹda Haven Wallet ti wa ni idaduro lọwọlọwọ.", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 6a3b9d4c8..9564b5982 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -143,6 +143,7 @@ "confirm_delete_wallet": "此操作将刪除此钱包。确定吗?", "confirm_fee_deduction": "确认费用扣除", "confirm_fee_deduction_content": "您是否同意从产出中扣除费用?", + "confirm_passphrase": "确认密码", "confirm_sending": "确认发送", "confirm_silent_payments_switch_node": "您当前的节点不支持无声付款\\ ncake钱包将切换到兼容节点,仅用于扫描", "confirmations": "确认", @@ -451,6 +452,7 @@ "overwrite_amount": "Overwrite amount", "pairingInvalidEvent": "配对无效事件", "passphrase": "密码(可选)", + "passphrases_doesnt_match": "密码不匹配,请重试", "password": "密码", "paste": "粘贴", "pause_wallet_creation": "创建 Haven 钱包的功能当前已暂停。", diff --git a/tool/append_translation.dart b/tool/append_translation.dart index 24778746c..d196421e9 100644 --- a/tool/append_translation.dart +++ b/tool/append_translation.dart @@ -5,13 +5,14 @@ import 'utils/translation/translation_utils.dart'; /// flutter packages pub run tool/append_translation.dart "hello_world" "Hello World!" void main(List args) async { - if (args.length != 2) { + if (args.length < 2) { throw Exception( - 'Insufficient arguments!\n\nTry to run `./append_translation.dart greetings "Hello World!"`'); + 'Insufficient arguments!\n\nTry to run `./append_translation.dart "greetings" "Hello World!"`'); } final name = args.first; - final text = args.last; + final text = args[1]; + final force = args.last == "--force"; print('Appending "$name": "$text"'); @@ -20,7 +21,7 @@ void main(List args) async { final fileName = getArbFileName(lang); final translation = await getTranslation(text, lang); - appendStringToArbFile(fileName, name, translation); + appendStringToArbFile(fileName, name, translation, force: force); } print('Alphabetizing all files...'); diff --git a/tool/utils/translation/arb_file_utils.dart b/tool/utils/translation/arb_file_utils.dart index b54dab423..414d318dd 100644 --- a/tool/utils/translation/arb_file_utils.dart +++ b/tool/utils/translation/arb_file_utils.dart @@ -1,11 +1,11 @@ import 'dart:convert'; import 'dart:io'; -void appendStringToArbFile(String fileName, String name, String text) { +void appendStringToArbFile(String fileName, String name, String text, {bool force = false}) { final file = File(fileName); final arbObj = readArbFile(file); - if (arbObj.containsKey(name)) { + if (arbObj.containsKey(name) && !force) { print("String $name already exists in $fileName!"); return; } From 647551661d3fde011a017974eb56ece869c94e98 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 26 Sep 2024 05:10:46 +0300 Subject: [PATCH 3/5] fix derivation Info (#1689) Co-authored-by: Omar Hatem --- lib/view_model/wallet_creation_vm.dart | 45 ++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/lib/view_model/wallet_creation_vm.dart b/lib/view_model/wallet_creation_vm.dart index 7041fa382..9fce86712 100644 --- a/lib/view_model/wallet_creation_vm.dart +++ b/lib/view_model/wallet_creation_vm.dart @@ -5,8 +5,10 @@ import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/entities/background_tasks.dart'; import 'package:cake_wallet/entities/generate_name.dart'; import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/nano/nano.dart'; import 'package:cake_wallet/store/app_store.dart'; import 'package:cake_wallet/store/settings_store.dart'; +import 'package:cake_wallet/view_model/restore/restore_mode.dart'; import 'package:cake_wallet/view_model/restore/restore_wallet.dart'; import 'package:cake_wallet/view_model/seed_settings_view_model.dart'; import 'package:cw_core/pathForWallet.dart'; @@ -82,9 +84,22 @@ abstract class WalletCreationVMBase with Store { walletCreationService.checkIfExists(name); final dirPath = await pathForWalletDir(name: name, type: type); final path = await pathForWallet(name: name, type: type); - final credentials = restoreWallet != null - ? getCredentialsFromRestoredWallet(options, restoreWallet) - : getCredentials(options); + + WalletCredentials credentials; + if (restoreWallet != null) { + if (restoreWallet.restoreMode == WalletRestoreMode.seed && + options == null && + (type == WalletType.nano || + type == WalletType.bitcoin || + type == WalletType.litecoin)) { + final derivationInfo = await getDerivationInfo(restoreWallet); + options ??= {}; + options["derivationInfo"] = derivationInfo.first; + } + credentials = getCredentialsFromRestoredWallet(options, restoreWallet); + } else { + credentials = getCredentials(options); + } final walletInfo = WalletInfo.external( id: WalletBase.idFor(name, type), @@ -185,6 +200,30 @@ abstract class WalletCreationVMBase with Store { } } + Future> getDerivationInfo(RestoredWallet restoreWallet) async { + var list = []; + final walletType = restoreWallet.type; + var appStore = getIt.get(); + var node = appStore.settingsStore.getCurrentNode(walletType); + + switch (walletType) { + case WalletType.bitcoin: + case WalletType.litecoin: + return bitcoin!.getDerivationsFromMnemonic( + mnemonic: restoreWallet.mnemonicSeed!, + node: node, + ); + case WalletType.nano: + return nanoUtil!.getDerivationsFromMnemonic( + mnemonic: restoreWallet.mnemonicSeed!, + node: node, + ); + default: + break; + } + return list; + } + WalletCredentials getCredentials(dynamic options) => throw UnimplementedError(); Future process(WalletCredentials credentials) => throw UnimplementedError(); From 9edd87b0afa330f2d3aecfcf3dad9a8bfcb0048c Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Wed, 25 Sep 2024 19:15:09 -0700 Subject: [PATCH 4/5] keep sign/verify pages loaded (#1703) --- lib/src/screens/dashboard/widgets/sign_form.dart | 6 +++++- lib/src/screens/dashboard/widgets/verify_form.dart | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/sign_form.dart b/lib/src/screens/dashboard/widgets/sign_form.dart index c0f8ba328..deead87a4 100644 --- a/lib/src/screens/dashboard/widgets/sign_form.dart +++ b/lib/src/screens/dashboard/widgets/sign_form.dart @@ -20,7 +20,7 @@ class SignForm extends StatefulWidget { SignFormState createState() => SignFormState(); } -class SignFormState extends State { +class SignFormState extends State with AutomaticKeepAliveClientMixin { SignFormState() : formKey = GlobalKey(), messageController = TextEditingController(), @@ -42,8 +42,12 @@ class SignFormState extends State { super.dispose(); } + @override + bool get wantKeepAlive => true; + @override Widget build(BuildContext context) { + super.build(context); return Container( padding: EdgeInsets.only(left: 24, right: 24), child: Column( diff --git a/lib/src/screens/dashboard/widgets/verify_form.dart b/lib/src/screens/dashboard/widgets/verify_form.dart index bf6809586..282ffa9da 100644 --- a/lib/src/screens/dashboard/widgets/verify_form.dart +++ b/lib/src/screens/dashboard/widgets/verify_form.dart @@ -15,7 +15,7 @@ class VerifyForm extends StatefulWidget { VerifyFormState createState() => VerifyFormState(); } -class VerifyFormState extends State { +class VerifyFormState extends State with AutomaticKeepAliveClientMixin { VerifyFormState() : formKey = GlobalKey(), messageController = TextEditingController(), @@ -36,9 +36,13 @@ class VerifyFormState extends State { void dispose() { super.dispose(); } + + @override + bool get wantKeepAlive => true; @override Widget build(BuildContext context) { + super.build(context); return Container( padding: EdgeInsets.only(left: 24, right: 24), child: Form( From 331d6ee64836f52486a7fb43aee2adddd7efb873 Mon Sep 17 00:00:00 2001 From: MyEcoria <103332030+MyEcoria@users.noreply.github.com> Date: Thu, 26 Sep 2024 04:16:31 +0200 Subject: [PATCH 5/5] Update transaction_details_view_model.dart (#1690) Replacement proposal for the closed nano and banano explorers --- lib/view_model/transaction_details_view_model.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index d3aa2a841..a96d70a90 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -160,9 +160,9 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.ethereum: return 'https://etherscan.io/tx/${txId}'; case WalletType.nano: - return 'https://nanolooker.com/block/${txId}'; + return 'https://nanexplorer.com/nano/block/${txId}'; case WalletType.banano: - return 'https://bananolooker.com/block/${txId}'; + return 'https://nanexplorer.com/banano/block/${txId}'; case WalletType.polygon: return 'https://polygonscan.com/tx/${txId}'; case WalletType.solana: @@ -190,9 +190,9 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.ethereum: return S.current.view_transaction_on + 'etherscan.io'; case WalletType.nano: - return S.current.view_transaction_on + 'nanolooker.com'; + return S.current.view_transaction_on + 'nanexplorer.com'; case WalletType.banano: - return S.current.view_transaction_on + 'bananolooker.com'; + return S.current.view_transaction_on + 'nanexplorer.com'; case WalletType.polygon: return S.current.view_transaction_on + 'polygonscan.com'; case WalletType.solana: