diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index 658f83f8a..d096d0e7b 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -31,7 +31,10 @@ abstract class ElectrumTransactionHistoryBase String _password; int _height; - Future init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override void addOne(ElectrumTransactionInfo transaction) => transactions[transaction.id] = transaction; diff --git a/cw_core/lib/hive_type_ids.dart b/cw_core/lib/hive_type_ids.dart index cad730d00..ff0f53169 100644 --- a/cw_core/lib/hive_type_ids.dart +++ b/cw_core/lib/hive_type_ids.dart @@ -19,4 +19,5 @@ const DERIVATION_INFO_TYPE_ID = 17; const TRON_TOKEN_TYPE_ID = 18; const HARDWARE_WALLET_TYPE_TYPE_ID = 19; const MWEB_UTXO_TYPE_ID = 20; -const ZANO_ASSET_TYPE_ID = 21; +const HAVEN_SEED_STORE_TYPE_ID = 21; +const ZANO_ASSET_TYPE_ID = 22; diff --git a/cw_evm/lib/evm_chain_transaction_history.dart b/cw_evm/lib/evm_chain_transaction_history.dart index c4d91783f..7c46ebecc 100644 --- a/cw_evm/lib/evm_chain_transaction_history.dart +++ b/cw_evm/lib/evm_chain_transaction_history.dart @@ -34,7 +34,10 @@ abstract class EVMChainTransactionHistoryBase //! Common methods across all child classes - Future init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_nano/lib/nano_transaction_history.dart b/cw_nano/lib/nano_transaction_history.dart index 7b4c5bc12..2b551ffa6 100644 --- a/cw_nano/lib/nano_transaction_history.dart +++ b/cw_nano/lib/nano_transaction_history.dart @@ -28,7 +28,10 @@ abstract class NanoTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_solana/lib/solana_transaction_history.dart b/cw_solana/lib/solana_transaction_history.dart index 761753f06..62b9db8f7 100644 --- a/cw_solana/lib/solana_transaction_history.dart +++ b/cw_solana/lib/solana_transaction_history.dart @@ -26,7 +26,10 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_tron/lib/tron_transaction_history.dart b/cw_tron/lib/tron_transaction_history.dart index 9d226c09c..c940c7708 100644 --- a/cw_tron/lib/tron_transaction_history.dart +++ b/cw_tron/lib/tron_transaction_history.dart @@ -25,7 +25,10 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_wownero/lib/api/transaction_history.dart b/cw_wownero/lib/api/transaction_history.dart index ce93df7d1..3cebdd811 100644 --- a/cw_wownero/lib/api/transaction_history.dart +++ b/cw_wownero/lib/api/transaction_history.dart @@ -181,13 +181,23 @@ void commitTransaction({required wownero.PendingTransaction transactionPointer}) final txCommit = wownero.PendingTransaction_commit(transactionPointer, filename: '', overwrite: false); - final String? error = (() { + String? error = (() { final status = wownero.PendingTransaction_status(transactionPointer.cast()); if (status == 0) { return null; } - return wownero.Wallet_errorString(wptr!); + return wownero.PendingTransaction_errorString(transactionPointer.cast()); })(); + if (error == null) { + error = (() { + final status = wownero.Wallet_status(wptr!); + if (status == 0) { + return null; + } + return wownero.Wallet_errorString(wptr!); + })(); + + } if (error != null) { throw CreationTransactionException(message: error); diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 446d28162..fbdc0e929 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -82,7 +82,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.shib: pattern = '0x[0-9a-zA-Z]+'; case CryptoCurrency.xrp: - pattern = '[0-9a-zA-Z]{34}|X[0-9a-zA-Z]{46}'; + pattern = '[0-9a-zA-Z]{34}|[0-9a-zA-Z]{33}|X[0-9a-zA-Z]{46}'; case CryptoCurrency.xhv: pattern = 'hvx|hvi|hvs[0-9a-zA-Z]+'; case CryptoCurrency.xag: @@ -108,9 +108,8 @@ class AddressValidator extends TextValidator { case CryptoCurrency.wow: pattern = '[0-9a-zA-Z]+'; case CryptoCurrency.bch: - pattern = '^(bitcoincash:)?(q|p)[0-9a-zA-Z]{41,42}'; - case CryptoCurrency.bnb: - pattern = '[0-9a-zA-Z]+'; + pattern = '(?:bitcoincash:)?(q|p)[0-9a-zA-Z]{41}' + '|[13][a-km-zA-HJ-NP-Z1-9]{25,34}'; case CryptoCurrency.hbar: pattern = '[0-9a-zA-Z.]+'; case CryptoCurrency.zaddr: @@ -207,7 +206,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.avaxc: return [42]; case CryptoCurrency.bch: - return [42, 43, 44, 54, 55]; + return [42, 54, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]; case CryptoCurrency.bnb: return [42]; case CryptoCurrency.nano: @@ -287,10 +286,14 @@ class AddressValidator extends TextValidator { switch (type) { case CryptoCurrency.xmr: - case CryptoCurrency.wow: pattern = '(4[0-9a-zA-Z]{94})' '|(8[0-9a-zA-Z]{94})' '|([0-9a-zA-Z]{106})'; + case CryptoCurrency.wow: + pattern = '(W[0-9a-zA-Z]{94})' + '|(W[0-9a-zA-Z]{94})' + '|(W[0-9a-zA-Z]{96})' + '|([0-9a-zA-Z]{106})'; case CryptoCurrency.btc: pattern = '${P2pkhAddress.regex.pattern}|${P2shAddress.regex.pattern}|${P2wpkhAddress.regex.pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}'; diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 6222fb4bb..f245ac426 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -1,9 +1,13 @@ import 'dart:convert'; import 'dart:io' show Directory, File, Platform; import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/core/key_service.dart'; import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/fiat_api_mode.dart'; +import 'package:cake_wallet/entities/haven_seed_store.dart'; +import 'package:cake_wallet/haven/haven.dart'; +import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cw_core/root_dir.dart'; @@ -53,7 +57,8 @@ Future defaultSettingsMigration( required Box powNodes, required Box walletInfoSource, required Box tradeSource, - required Box contactSource}) async { + required Box contactSource, + required Box havenSeedStore}) async { if (Platform.isIOS) { await ios_migrate_v1(walletInfoSource, tradeSource, contactSource); } @@ -291,21 +296,24 @@ Future defaultSettingsMigration( ); break; case 45: - await updateWalletTypeNodesWithNewNode( + await _backupHavenSeeds(havenSeedStore); + + updateWalletTypeNodesWithNewNode( newNodeUri: 'matic.nownodes.io', sharedPreferences: sharedPreferences, nodes: nodes, type: WalletType.polygon, useSSL: true, ); - await updateWalletTypeNodesWithNewNode( - newNodeUri: 'eth.nownodes.io', - sharedPreferences: sharedPreferences, - nodes: nodes, - type: WalletType.ethereum, - useSSL: true, - ); case 46: + updateWalletTypeNodesWithNewNode( + newNodeUri: 'eth.nownodes.io', + sharedPreferences: sharedPreferences, + nodes: nodes, + type: WalletType.ethereum, + useSSL: true, + ); + case 47: await addZanoNodeList(nodes: nodes); await changeZanoCurrentNodeToDefault(sharedPreferences: sharedPreferences, nodes: nodes); break; @@ -324,6 +332,13 @@ Future defaultSettingsMigration( await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version); } +Future _backupHavenSeeds(Box havenSeedStore) async { + final future = haven?.backupHavenSeeds(havenSeedStore); + if (future != null) { + await future; + } + return; +} /// generic function for changing any wallet default node /// instead of making a new function for each change Future _changeDefaultNode({ diff --git a/lib/entities/haven_seed_store.dart b/lib/entities/haven_seed_store.dart new file mode 100644 index 000000000..f899799d8 --- /dev/null +++ b/lib/entities/haven_seed_store.dart @@ -0,0 +1,19 @@ +import 'package:cw_core/hive_type_ids.dart'; +import 'package:hive/hive.dart'; + +part 'haven_seed_store.g.dart'; + +@HiveType(typeId: HavenSeedStore.typeId) +class HavenSeedStore extends HiveObject { + HavenSeedStore({required this.id, this.seed}); + + static const typeId = HAVEN_SEED_STORE_TYPE_ID; + static const boxName = 'HavenSeedStore'; + static const boxKey = 'havenSeedStoreKey'; + + @HiveField(0, defaultValue: '') + String id; + + @HiveField(2) + String? seed; +} diff --git a/lib/haven/cw_haven.dart b/lib/haven/cw_haven.dart index 57c4e49c3..c54e47eb4 100644 --- a/lib/haven/cw_haven.dart +++ b/lib/haven/cw_haven.dart @@ -307,6 +307,23 @@ class CWHaven extends Haven { return havenTransactionInfo.accountIndex; } + @override + Future backupHavenSeeds(Box havenSeedStore) async { + final walletInfoSource = await CakeHive.openBox(WalletInfo.boxName); + final wallets = walletInfoSource.values + .where((element) => element.type == WalletType.haven); + for (var w in wallets) { + final walletService = HavenWalletService(walletInfoSource); + final flutterSecureStorage = secureStorageShared; + final keyService = KeyService(flutterSecureStorage); + final password = await keyService.getWalletPassword(walletName: w.name); + final wallet = await walletService.openWallet(w.name, password); + await havenSeedStore.add(HavenSeedStore(id: wallet.id, seed: wallet.seed)); + wallet.close(); + } + await havenSeedStore.flush(); + } + @override WalletService createHavenWalletService(Box walletInfoSource) { return HavenWalletService(walletInfoSource); diff --git a/lib/main.dart b/lib/main.dart index 1e6901080..9c3980aa1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/entities/contact.dart'; import 'package:cake_wallet/entities/default_settings_migration.dart'; import 'package:cake_wallet/entities/get_encryption_key.dart'; import 'package:cake_wallet/core/secure_storage.dart'; +import 'package:cake_wallet/entities/haven_seed_store.dart'; import 'package:cake_wallet/entities/language_service.dart'; import 'package:cake_wallet/entities/template.dart'; import 'package:cake_wallet/entities/transaction_description.dart'; @@ -164,6 +165,10 @@ Future initializeAppConfigs() async { CakeHive.registerAdapter(AnonpayInvoiceInfoAdapter()); } + if (!CakeHive.isAdapterRegistered(HavenSeedStore.typeId)) { + CakeHive.registerAdapter(HavenSeedStoreAdapter()); + } + if (!CakeHive.isAdapterRegistered(MwebUtxo.typeId)) { CakeHive.registerAdapter(MwebUtxoAdapter()); } @@ -188,6 +193,12 @@ Future initializeAppConfigs() async { final anonpayInvoiceInfo = await CakeHive.openBox(AnonpayInvoiceInfo.boxName); final unspentCoinsInfoSource = await CakeHive.openBox(UnspentCoinsInfo.boxName); + final havenSeedStoreBoxKey = + await getEncryptionKey(secureStorage: secureStorage, forKey: HavenSeedStore.boxKey); + final havenSeedStore = await CakeHive.openBox( + HavenSeedStore.boxName, + encryptionKey: havenSeedStoreBoxKey); + await initialSetup( sharedPreferences: await SharedPreferences.getInstance(), nodes: nodes, @@ -203,7 +214,8 @@ Future initializeAppConfigs() async { transactionDescriptions: transactionDescriptions, secureStorage: secureStorage, anonpayInvoiceInfo: anonpayInvoiceInfo, - initialMigrationVersion: 46, + havenSeedStore: havenSeedStore, + initialMigrationVersion: 47, ); } @@ -222,7 +234,8 @@ Future initialSetup( required SecureStorage secureStorage, required Box anonpayInvoiceInfo, required Box unspentCoinsInfoSource, - int initialMigrationVersion = 15}) async { + required Box havenSeedStore, + int initialMigrationVersion = 15, }) async { LanguageService.loadLocaleList(); await defaultSettingsMigration( secureStorage: secureStorage, @@ -232,7 +245,8 @@ Future initialSetup( contactSource: contactSource, tradeSource: tradesSource, nodes: nodes, - powNodes: powNodes); + powNodes: powNodes, + havenSeedStore: havenSeedStore); await setup( walletInfoSource: walletInfoSource, nodeSource: nodes, diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart index 10160839c..05a44281a 100644 --- a/lib/src/screens/seed/wallet_seed_page.dart +++ b/lib/src/screens/seed/wallet_seed_page.dart @@ -1,5 +1,5 @@ -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; @@ -15,7 +15,8 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/view_model/wallet_seed_view_model.dart'; -import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; + +import '../../../themes/extensions/menu_theme.dart'; class WalletSeedPage extends BasePage { WalletSeedPage(this.walletSeedViewModel, {required this.isNewWalletCreated}); @@ -92,118 +93,179 @@ class WalletSeedPage extends BasePage { @override Widget body(BuildContext context) { - final image = currentTheme.type == ThemeType.dark ? imageDark : imageLight; - return WillPopScope( - onWillPop: () async => false, - child: Container( - padding: EdgeInsets.all(24), - alignment: Alignment.center, - child: ConstrainedBox( - constraints: - BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ConstrainedBox( - constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3), - child: AspectRatio(aspectRatio: 1, child: image), - ), - Observer(builder: (_) { - return Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - key: ValueKey('wallet_seed_page_wallet_name_text_key'), - walletSeedViewModel.name, - style: TextStyle( + onWillPop: () async => false, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8), + alignment: Alignment.center, + child: ConstrainedBox( + constraints: + BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Observer( + builder: (_) { + return Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8), + decoration: BoxDecoration( + color: currentTheme.type == ThemeType.dark + ? Color.fromRGBO(126, 116, 59, 1) + : Color.fromRGBO(189, 169, 90, 1), + borderRadius: BorderRadius.all(Radius.circular(12)), + border: Border.all( + color: currentTheme.type == ThemeType.dark + ? Color.fromRGBO(171, 171, 41, 1) + : Color.fromRGBO(125, 122, 15, 1), + width: 2.0, + )), + child: Row( + children: [ + Icon( + Icons.warning_amber_rounded, + size: 64, + color: Colors.white.withOpacity(0.75), + ), + SizedBox(width: 8), + Expanded( + child: Text( + S.current.cake_seeds_save_disclaimer, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w800, + color: currentTheme.type == ThemeType.dark + ? Colors.white.withOpacity(0.75) + : Colors.white.withOpacity(0.85), + ), + ), + ), + ], + ), + ), + SizedBox(height: 32), + Text( + key: ValueKey('wallet_seed_page_wallet_name_text_key'), + walletSeedViewModel.name, + style: TextStyle( fontSize: 20, fontWeight: FontWeight.w600, - color: Theme.of(context).extension()!.titleColor), - ), - Padding( - padding: EdgeInsets.only(top: 20, left: 16, right: 16), - child: Text( - key: ValueKey('wallet_seed_page_wallet_seed_text_key'), - walletSeedViewModel.seed, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: - Theme.of(context).extension()!.secondaryTextColor), + color: Theme.of(context).extension()!.titleColor, + ), ), - ) - ], - ); - }), - Column( - children: [ - isNewWalletCreated - ? Padding( - padding: EdgeInsets.only(bottom: 43, left: 43, right: 43), - child: Text( - key: ValueKey( - 'wallet_seed_page_wallet_seed_reminder_text_key', - ), - S.of(context).seed_reminder, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.normal, - color: Theme.of(context) - .extension()! - .detailsTitlesColor, - ), + SizedBox(height: 24), + Expanded( + child: GridView.builder( + padding: const EdgeInsets.symmetric(horizontal: 4), + itemCount: walletSeedViewModel.seedSplit.length, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: walletSeedViewModel.columnCount, + childAspectRatio: 3.6, + mainAxisSpacing: 8.0, + crossAxisSpacing: 8.0, ), - ) - : Offstage(), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Flexible( - child: Container( - padding: EdgeInsets.only(right: 8.0), - child: PrimaryButton( - key: ValueKey('wallet_seed_page_save_seeds_button_key'), + itemBuilder: (context, index) { + final item = walletSeedViewModel.seedSplit[index]; + final numberCount = index + 1; + + return Container( + padding: const EdgeInsets.symmetric(horizontal: 4), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: Theme.of(context).cardColor, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 20, + child: Text( + numberCount.toString(), + textAlign: TextAlign.right, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w700, + color: Theme.of(context).extension()!.buttonTextColor.withOpacity(0.5) + ), + ), + ), + const SizedBox(width: 8), + Text( + '${item[0].toUpperCase()}${item.substring(1)}', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w700, + color: Theme.of(context).extension()!.buttonTextColor + ), + ), + ], + ), + ); + }, + ), + ), + ], + ), + ); + }, + ), + Column( + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Flexible( + child: Container( + padding: EdgeInsets.only(right: 8.0), + child: PrimaryButton( + key: ValueKey('wallet_seed_page_save_seeds_button_key'), + onPressed: () { + ShareUtil.share( + text: walletSeedViewModel.seed, + context: context, + ); + }, + text: S.of(context).save, + color: Theme.of(context).cardColor, + textColor: currentTheme.type == ThemeType.dark + ? Theme.of(context).extension()!.textColor + : Theme.of(context).extension()!.buttonTextColor, + ), + ), + ), + Flexible( + child: Container( + padding: EdgeInsets.only(left: 8.0), + child: Builder( + builder: (context) => PrimaryButton( + key: ValueKey('wallet_seed_page_copy_seeds_button_key'), onPressed: () { - ShareUtil.share( - text: walletSeedViewModel.seed, - context: context, + ClipboardUtil.setSensitiveDataToClipboard( + ClipboardData(text: walletSeedViewModel.seed), ); + showBar(context, S.of(context).copied_to_clipboard); }, - text: S.of(context).save, - color: Colors.green, + text: S.of(context).copy, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ), ), - Flexible( - child: Container( - padding: EdgeInsets.only(left: 8.0), - child: Builder( - builder: (context) => PrimaryButton( - key: ValueKey('wallet_seed_page_copy_seeds_button_key'), - onPressed: () { - ClipboardUtil.setSensitiveDataToClipboard( - ClipboardData(text: walletSeedViewModel.seed), - ); - showBar(context, S.of(context).copied_to_clipboard); - }, - text: S.of(context).copy, - color: Theme.of(context).extension()!.indicatorsColor, - textColor: Colors.white, - ), - ), - ), - ) - ], - ) - ], - ) - ], - ), + ) + ], + ), + SizedBox(height: 24), + ], + ) + ], ), - )); + ), + ), + ); } } diff --git a/lib/view_model/wallet_list/wallet_list_view_model.dart b/lib/view_model/wallet_list/wallet_list_view_model.dart index c903b535f..407dce55a 100644 --- a/lib/view_model/wallet_list/wallet_list_view_model.dart +++ b/lib/view_model/wallet_list/wallet_list_view_model.dart @@ -2,6 +2,7 @@ import 'package:cake_wallet/core/wallet_loading_service.dart'; import 'package:cake_wallet/entities/wallet_group.dart'; import 'package:cake_wallet/entities/wallet_list_order_types.dart'; import 'package:cake_wallet/entities/wallet_manager.dart'; +import 'package:cake_wallet/reactions/bip39_wallet_utils.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/store/app_store.dart'; @@ -90,20 +91,59 @@ abstract class WalletListViewModelBase with Store { multiWalletGroups.clear(); singleWalletsList.clear(); - wallets.addAll( - _walletInfoSource.values - .map((info) => convertWalletInfoToWalletListItem(info)), - ); + for (var info in _walletInfoSource.values) { + wallets.add(convertWalletInfoToWalletListItem(info)); + } //========== Split into shared seed groups and single wallets list _walletManager.updateWalletGroups(); - for (var group in _walletManager.walletGroups) { + final walletGroupsFromManager = _walletManager.walletGroups; + + for (var group in walletGroupsFromManager) { if (group.wallets.length == 1) { - singleWalletsList - .add(convertWalletInfoToWalletListItem(group.wallets.first)); - } else { + singleWalletsList.add(convertWalletInfoToWalletListItem(group.wallets.first)); + continue; + } + + // Identify wallets that should be moved to singleWalletsList using the filters: the type/derivation + final excludedWallets = []; + + for (var wallet in group.wallets) { + // Check for non-BIP39 wallet types + final isNonBIP39 = !isBIP39Wallet(wallet.type); + + // Check for nano derivation type + final isNanoDerivation = wallet.type == WalletType.nano && + wallet.derivationInfo?.derivationType == DerivationType.nano; + + // Check for electrum derivation type + final isElectrumDerivation = + (wallet.type == WalletType.bitcoin || wallet.type == WalletType.litecoin) && + wallet.derivationInfo?.derivationType == DerivationType.electrum; + + if (isNonBIP39 || isNanoDerivation || isElectrumDerivation) { + excludedWallets.add(wallet); + } + } + + // Add excluded wallets to singleWalletsList + for (var excludedWallet in excludedWallets) { + singleWalletsList.add(convertWalletInfoToWalletListItem(excludedWallet)); + } + + // Remove excluded wallets from the group's wallets to avoid duplication + group.wallets.removeWhere((wallet) { + return excludedWallets.any((excluded) => excluded.address == wallet.address); + }); + + // Check if the group has more than one wallet after the excluded wallets are removed. + if (group.wallets.length > 1) { + //Add the entire group to the multi wallet group list since its still a multi wallet multiWalletGroups.add(group); + } else if (group.wallets.length == 1) { + // Add the group to the wallet left to the single wallets list + singleWalletsList.add(convertWalletInfoToWalletListItem(group.wallets.first)); } } } diff --git a/lib/view_model/wallet_seed_view_model.dart b/lib/view_model/wallet_seed_view_model.dart index 8923a99da..c13dba716 100644 --- a/lib/view_model/wallet_seed_view_model.dart +++ b/lib/view_model/wallet_seed_view_model.dart @@ -15,4 +15,8 @@ abstract class WalletSeedViewModelBase with Store { @observable String seed; + + List get seedSplit => seed.split(' '); + + int get columnCount => seedSplit.length <= 16 ? 2 : 3; } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 1b1f37e1e..b8e476e4c 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "شراء بطاقات مسبقة الدفع وبطاقات الهدايا في جميع أنحاء العالم", "cake_pay_web_cards_subtitle": "اشتري بطاقات مدفوعة مسبقا وبطاقات هدايا في جميع أنحاء العالم", "cake_pay_web_cards_title": "بطاقات Cake Pay Web", + "cake_seeds_save_disclaimer": "يرجى حفظ هذه الكلمات في مكان آمن! إذا فقدت الوصول إلى محفظتك ، فإن دعم محفظة الكيك لا يمكن أن يساعدك", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "آسف ، بطاقة الهدايا هذه غير متوفرة على iOS. يمكنك شرائه على Android أو من خلال موقعنا بدلاً من ذلك.", "cakepay_prepaid_card": "بطاقة ائتمان CakePay مسبقة الدفع", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 36ecd4b5d..91a718f91 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Купете предплатени карти и карти за подаръци в световен мащаб", "cake_pay_web_cards_subtitle": "Купете световно признати предплатени и гифт карти", "cake_pay_web_cards_title": "Cake Pay Онлайн Карти", + "cake_seeds_save_disclaimer": "Моля, запазете тези думи на сигурно място! Ако загубите достъп до портфейла си, поддръжката на портфейла за торти не може да ви помогне", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "За съжаление тази карта за подарък не се предлага в iOS. Можете да го закупите на Android или чрез нашия уебсайт вместо това.", "cakepay_prepaid_card": "CakePay предплатена дебитна карта", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index af91ea643..d2ca2def5 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Kupte si celosvětové předplacené karty a dárkové karty", "cake_pay_web_cards_subtitle": "Kupte si celosvětové předplacené a dárkové karty", "cake_pay_web_cards_title": "Cake Pay webové karty", + "cake_seeds_save_disclaimer": "Uložte tato slova na bezpečném místě! Pokud ztratíte přístup k vaší peněžence, podpora peněženky dortu vám nemůže pomoci", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Je nám líto, tato dárková karta není k dispozici na iOS. Místo toho si jej můžete zakoupit na Androidu nebo prostřednictvím našeho webu.", "cakepay_prepaid_card": "CakePay předplacená debetní karta", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index f09b8c714..f5e2a3879 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Kaufen Sie weltweite Prepaid-Karten und Geschenkkarten", "cake_pay_web_cards_subtitle": "Kaufen Sie weltweit Prepaid-Karten und Geschenkkarten", "cake_pay_web_cards_title": "Cake Pay-Webkarten", + "cake_seeds_save_disclaimer": "Bitte speichern Sie diese Wörter an einem sicheren Ort! Wenn Sie den Zugang zu Ihrer Brieftasche verlieren, kann Ihnen die Stütze der Kuchenbrieftasche nicht helfen", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Entschuldigung, diese Geschenkkarte ist auf iOS nicht erhältlich. Sie können es stattdessen auf Android oder über unsere Website kaufen.", "cakepay_prepaid_card": "CakePay-Prepaid-Debitkarte", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 86d807d8f..0168f7951 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Buy worldwide prepaid cards and gift cards", "cake_pay_web_cards_subtitle": "Buy worldwide prepaid cards and gift cards", "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_seeds_save_disclaimer": "Please save these words in a secure place! If you lose access to your wallet, Cake Wallet support CANNOT help you", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Sorry, this gift card is not available on iOS. You can purchase it on Android or through our website instead.", "cakepay_prepaid_card": "CakePay Prepaid Debit Card", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 4c0d16b98..12ea9bbf3 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Compra tarjetas prepagadas y tarjetas de regalo en todo el mundo", "cake_pay_web_cards_subtitle": "Compra tarjetas de prepago y tarjetas de regalo en todo el mundo", "cake_pay_web_cards_title": "Tarjetas Web Cake Pay", + "cake_seeds_save_disclaimer": "¡Guarde estas palabras en un lugar seguro! Si pierde acceso a su billetera, el soporte de la billetera de pastel no puede ayudarlo", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Lo siento, esta tarjeta de regalo no está disponible en iOS. Puede comprarlo en Android o a través de nuestro sitio web.", "cakepay_prepaid_card": "Tarjeta de Débito Prepago CakePay", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index c15366f5a..a8b1fc48b 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Achetez des cartes et des cartes-cadeaux prépayées mondiales", "cake_pay_web_cards_subtitle": "Achetez des cartes prépayées et des cartes-cadeaux dans le monde entier", "cake_pay_web_cards_title": "Cartes Web Cake Pay", + "cake_seeds_save_disclaimer": "Veuillez enregistrer ces mots dans un endroit sécurisé! Si vous perdez accès à votre portefeuille, le support de portefeuille à gâteau ne peut pas vous aider", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Désolé, cette carte-cadeau n'est pas disponible sur iOS. Vous pouvez l'acheter sur Android ou via notre site Web à la place.", "cakepay_prepaid_card": "Carte de débit prépayée Cake Pay", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index d95f87bbf..24330f348 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Sayi katunan shirye-shiryen duniya da katunan kyauta", "cake_pay_web_cards_subtitle": "Sayi katunan da aka riga aka biya na duniya da katunan kyauta", "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_seeds_save_disclaimer": "Da fatan za a ceci waɗannan kalmomin a cikin amintaccen wuri! Idan ka rasa damar zuwa Wallet, Tallafin Wall Wallet ba zai iya taimaka maka ba", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Yi haƙuri, wannan katin kyautar ba a samuwa akan iOS. Kuna iya sayan shi a kan Android ko ta yanar gizo a maimakon.", "cakepay_prepaid_card": "Katin zare kudi na CakePay", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 6f655fe73..5d226dfb6 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "दुनिया भर में प्रीपेड कार्ड और उपहार कार्ड खरीदें", "cake_pay_web_cards_subtitle": "दुनिया भर में प्रीपेड कार्ड और गिफ्ट कार्ड खरीदें", "cake_pay_web_cards_title": "केक भुगतान वेब कार्ड", + "cake_seeds_save_disclaimer": "कृपया इन शब्दों को सुरक्षित स्थान पर सहेजें! यदि आप अपने बटुए तक पहुंच खो देते हैं, तो केक वॉलेट समर्थन आपकी मदद नहीं कर सकता है", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "क्षमा करें, यह उपहार कार्ड iOS पर उपलब्ध नहीं है। आप इसे Android पर या हमारी वेबसाइट के बजाय खरीद सकते हैं।", "cakepay_prepaid_card": "केकपे प्रीपेड डेबिट कार्ड", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 67a41ab2a..ed60e6ee6 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Kupite svjetske unaprijed plaćene kartice i poklon kartice", "cake_pay_web_cards_subtitle": "Kupujte prepaid kartice i poklon kartice diljem svijeta", "cake_pay_web_cards_title": "Cake Pay Web kartice", + "cake_seeds_save_disclaimer": "Molimo spremite ove riječi na sigurno mjesto! Ako izgubite pristup vašem novčaniku, podrška za novčanik za kolače ne može vam pomoći", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Oprostite, ova poklon kartica nije dostupna na iOS -u. Umjesto toga, možete ga kupiti na Androidu ili putem naše web stranice.", "cakepay_prepaid_card": "CakePay unaprijed plaćena debitna kartica", diff --git a/res/values/strings_hy.arb b/res/values/strings_hy.arb index c6e5b2d13..41b18f59e 100644 --- a/res/values/strings_hy.arb +++ b/res/values/strings_hy.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Գնեք համաշխարհային նախավճարային քարտեր և նվեր քարտեր", "cake_pay_web_cards_subtitle": "Գնեք համաշխարհային նախավճարային քարտեր և նվեր քարտեր", "cake_pay_web_cards_title": "Cake Pay Վեբ Քարտեր", + "cake_seeds_save_disclaimer": "Խնդրում ենք պահպանել այս բառերը անվտանգ տեղում: Եթե ​​ձեր դրամապանակը կորցնեք մուտքը, տորթի դրամապանակի աջակցությունը չի կարող օգնել ձեզ", "cake_wallet": "Cake Գաղտնապահոց", "cakepay_ios_not_available": "Ներեցեք, այս նվեր քարտը հասանելի չէ iOS- ում: Փոխարենը կարող եք այն գնել Android- ում կամ մեր կայքում:", "cakepay_prepaid_card": "CakePay Նախավճարային Դեբետային Քարտ", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 2ffe0b955..ef64b7044 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Beli kartu prabayar di seluruh dunia dan kartu hadiah", "cake_pay_web_cards_subtitle": "Beli kartu prabayar dan kartu hadiah secara global", "cake_pay_web_cards_title": "Kartu Web Cake Pay", + "cake_seeds_save_disclaimer": "Harap simpan kata -kata ini di tempat yang aman! Jika Anda kehilangan akses ke dompet Anda, dukungan dompet kue tidak dapat membantu Anda", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Maaf, kartu hadiah ini tidak tersedia di iOS. Anda dapat membelinya di Android atau melalui situs web kami sebagai gantinya.", "cakepay_prepaid_card": "Kartu Debit Prabayar CakePay", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 4dc5662a8..6a508822a 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Acquista carte prepagate in tutto il mondo e carte regalo", "cake_pay_web_cards_subtitle": "Acquista carte prepagate e carte regalo in tutto il mondo", "cake_pay_web_cards_title": "Carte Web Cake Pay", + "cake_seeds_save_disclaimer": "Si prega di salvare queste parole in un posto sicuro! Se perdi l'accesso al tuo portafoglio, il supporto per il portafoglio della torta non può aiutarti", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Mi dispiace, questa carta regalo non è disponibile su iOS. Puoi acquistarlo su Android o tramite il nostro sito Web.", "cakepay_prepaid_card": "Carta di debito prepagata CakePay", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 59fbb7adf..177171a50 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "世界中のプリペイドカードとギフトカードを購入します", "cake_pay_web_cards_subtitle": "世界中のプリペイド カードとギフト カードを購入する", "cake_pay_web_cards_title": "Cake Pay ウェブカード", + "cake_seeds_save_disclaimer": "これらの言葉を安全な場所に保存してください!財布へのアクセスを失った場合、ケーキウォレットのサポートはあなたを助けることができません", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "申し訳ありませんが、このギフトカードはiOSでは利用できません。代わりにAndroidまたは当社のWebサイトから購入できます。", "cakepay_prepaid_card": "CakePayプリペイドデビットカード", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 2e7793edb..fd66d0010 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "전세계 선불 카드와 기프트 카드를 구입하십시오", "cake_pay_web_cards_subtitle": "전 세계 선불 카드 및 기프트 카드 구매", "cake_pay_web_cards_title": "케이크페이 웹카드", + "cake_seeds_save_disclaimer": "이 단어를 안전한 장소에 저장하십시오! 지갑에 대한 접근이 손실되면 케이크 지갑 지지대가 도움이되지 않습니다.", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "죄송합니다.이 기프트 카드는 iOS에서 사용할 수 없습니다. Android 또는 웹 사이트를 통해 구매할 수 있습니다.", "cakepay_prepaid_card": "CakePay 선불 직불 카드", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index f86beb0f7..ae007e487 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Worldwide ကြိုတင်ငွေဖြည့်ကဒ်များနှင့်လက်ဆောင်ကဒ်များကို 0 ယ်ပါ", "cake_pay_web_cards_subtitle": "ကမ္ဘာတစ်ဝှမ်း ကြိုတင်ငွေပေးကတ်များနှင့် လက်ဆောင်ကတ်များကို ဝယ်ယူပါ။", "cake_pay_web_cards_title": "Cake Pay ဝဘ်ကတ်များ", + "cake_seeds_save_disclaimer": "ကျေးဇူးပြုပြီးဒီစကားလုံးတွေကိုလုံခြုံတဲ့နေရာမှာသိမ်းထားပါ။ သင်၏ပိုက်ဆံအိတ်ကိုသင်လက်လှမ်းမမီပါကကိတ်မုန့်ပိုက်ဆံအိတ်အထောက်အပံ့သည်သင့်ကိုမကူညီနိုင်ပါ", "cake_wallet": "Cake ပိုက်ဆံအိတ်", "cakepay_ios_not_available": "တောင်းပန်ပါတယ်, ဒီလက်ဆောင်ကဒ်ကို iOS မှာမရနိုင်ပါ။ ၎င်းကို Android တွင်သို့မဟုတ်ကျွန်ုပ်တို့၏ဝက်ဘ်ဆိုက်တွင် 0 ယ်နိုင်သည်။", "cakepay_prepaid_card": "CakePay ကြိုတင်ငွေဖြည့်ဒက်ဘစ်ကတ်", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 7433972a4..6343f4dd0 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Koop wereldwijde prepaid -kaarten en cadeaubonnen", "cake_pay_web_cards_subtitle": "Koop wereldwijd prepaidkaarten en cadeaubonnen", "cake_pay_web_cards_title": "Cake Pay-webkaarten", + "cake_seeds_save_disclaimer": "Bewaar deze woorden op een veilige plek! Als u de toegang tot uw portemonnee verliest, kan ondersteuning voor cake -portemonnee u niet helpen", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Sorry, deze cadeaubon is niet beschikbaar op iOS. U kunt het in plaats daarvan kopen op Android of via onze website.", "cakepay_prepaid_card": "CakePay Prepaid Debetkaart", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index a2cd61713..6afe3b932 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Kup na całym świecie karty przedpłacone i karty podarunkowe", "cake_pay_web_cards_subtitle": "Kupuj na całym świecie karty przedpłacone i karty podarunkowe", "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_seeds_save_disclaimer": "Zapisz te słowa w bezpiecznym miejscu! Jeśli stracisz dostęp do portfela, wsparcie portfela ciasta nie może ci pomóc", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Przepraszam, ta karta podarunkowa nie jest dostępna na iOS. Zamiast tego możesz go kupić na Android lub za pośrednictwem naszej strony internetowej.", "cakepay_prepaid_card": "Przedpłacona karta debetowa CakePay", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 04d39d57b..85fafc590 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Compre cartões pré -pagos em todo o mundo e cartões -presente", "cake_pay_web_cards_subtitle": "Compre cartões pré-pagos e cartões-presente em todo o mundo", "cake_pay_web_cards_title": "Cartões Cake Pay Web", + "cake_seeds_save_disclaimer": "Por favor, salve estas palavras em um local seguro! Se você perder o acesso à sua carteira, o suporte da carteira de bolo não poderá ajudá -lo", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Desculpe, este cartão -presente não está disponível no iOS. Você pode comprá -lo no Android ou através do nosso site.", "cakepay_prepaid_card": "Cartão de débito pré-pago CakePay", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 1bb0a9ce3..07d8f39ce 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Купить карты с предоплатой и подарочными картами по всему миру", "cake_pay_web_cards_subtitle": "Покупайте карты предоплаты и подарочные карты по всему миру", "cake_pay_web_cards_title": "Веб-карты Cake Pay", + "cake_seeds_save_disclaimer": "Пожалуйста, сохраните эти слова в безопасном месте! Если вы теряете доступ к своему кошельку, поддержка кошелька для торта не может вам помочь", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Извините, эта подарочная карта недоступна на iOS. Вместо этого вы можете приобрести его на Android или через наш веб -сайт.", "cakepay_prepaid_card": "Предоплаченная дебетовая карта CakePay", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index aeeaf6b5f..f938576dd 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "ซื้อบัตรเติมเงินและบัตรของขวัญทั่วโลก", "cake_pay_web_cards_subtitle": "ซื้อบัตรพร้อมเงินระดับโลกและบัตรของขวัญ", "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_seeds_save_disclaimer": "โปรดบันทึกคำเหล่านี้ในสถานที่ที่ปลอดภัย! หากคุณสูญเสียการเข้าถึงกระเป๋าเงินของคุณการสนับสนุนกระเป๋าเงินเค้กไม่สามารถช่วยคุณได้", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "ขออภัยบัตรของขวัญนี้ไม่มีใน iOS คุณสามารถซื้อได้บน Android หรือผ่านเว็บไซต์ของเราแทน", "cakepay_prepaid_card": "บัตรเดบิตเติมเงินของ CakePay", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index e0ae3f471..2234d02b1 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -101,6 +101,7 @@ "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 Cards", + "cake_seeds_save_disclaimer": "Mangyaring i -save ang mga salitang ito sa isang ligtas na lugar! Kung nawalan ka ng pag -access sa iyong pitaka, hindi makakatulong sa iyo ang suporta ng wallet ng cake", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Paumanhin, ang gift card na ito ay hindi magagamit sa iOS. Maaari mo itong bilhin sa Android o sa pamamagitan ng aming website sa halip.", "cakepay_prepaid_card": "CakePay Prepaid Debit Card", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index b38cc21af..83f423b59 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Dünya çapında ön ödemeli kartlar ve hediye kartları satın alın", "cake_pay_web_cards_subtitle": "Dünya çapında ön ödemeli kartlar ve hediye kartları satın alın", "cake_pay_web_cards_title": "Cake Pay Web Kartları", + "cake_seeds_save_disclaimer": "Lütfen bu kelimeleri güvenli bir yerde kaydedin! Cüzdanınıza erişimi kaybederseniz, kek cüzdan desteği size yardımcı olamaz", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Üzgünüm, bu hediye kartı iOS'ta mevcut değil. Bunun yerine Android'de veya web sitemizden satın alabilirsiniz.", "cakepay_prepaid_card": "CakePay Ön Ödemeli Kart", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index b0384b2c4..b70f58c88 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Купіть у всьому світі передплачені картки та подарункові картки", "cake_pay_web_cards_subtitle": "Купуйте передоплачені та подарункові картки по всьому світу", "cake_pay_web_cards_title": "Веб-картки Cake Pay", + "cake_seeds_save_disclaimer": "Збережіть ці слова в безпечному місці! Якщо ви втрачаєте доступ до свого гаманця, підтримка гаманця тортів не може вам допомогти", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Вибачте, ця подарункова карта недоступна на iOS. Ви можете придбати його на Android або через наш веб -сайт.", "cakepay_prepaid_card": "Передплачена дебетова картка CakePay", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index bc9defdfd..78443c803 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "دنیا بھر میں پری پیڈ کارڈز اور گفٹ کارڈ خریدیں", "cake_pay_web_cards_subtitle": "دنیا بھر میں پری پیڈ کارڈز اور گفٹ کارڈز خریدیں۔", "cake_pay_web_cards_title": "Cake پے ویب کارڈز", + "cake_seeds_save_disclaimer": "براہ کرم ان الفاظ کو ایک محفوظ جگہ پر محفوظ کریں! اگر آپ اپنے بٹوے تک رسائی کھو دیتے ہیں تو ، کیک پرس کی مدد آپ کی مدد نہیں کرسکتی ہے", "cake_wallet": "Cake والیٹ", "cakepay_ios_not_available": "معذرت ، یہ گفٹ کارڈ iOS پر دستیاب نہیں ہے۔ اس کے بجائے آپ اسے اینڈروئیڈ پر یا ہماری ویب سائٹ کے ذریعے خرید سکتے ہیں۔", "cakepay_prepaid_card": "Cake پے پری پیڈ ڈیبٹ کارڈ", diff --git a/res/values/strings_vi.arb b/res/values/strings_vi.arb index 85a6547c5..7491263b4 100644 --- a/res/values/strings_vi.arb +++ b/res/values/strings_vi.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Mua thẻ trả trước toàn cầu và thẻ quà tặng", "cake_pay_web_cards_subtitle": "Mua thẻ trả trước toàn cầu và thẻ quà tặng", "cake_pay_web_cards_title": "Thẻ Cake Pay Web", + "cake_seeds_save_disclaimer": "Vui lòng lưu những từ này ở một nơi an toàn! Nếu bạn mất quyền truy cập vào ví của mình, hỗ trợ ví tiền không thể giúp bạn", "cake_wallet": "Ví Cake", "cakepay_ios_not_available": "Xin lỗi, thẻ quà tặng này không có sẵn trên iOS. Thay vào đó, bạn có thể mua nó trên Android hoặc thông qua trang web của chúng tôi.", "cakepay_prepaid_card": "Thẻ Ghi Nợ Trả Trước CakePay", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 1a548438d..f51c83e1c 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "Ra awọn kaadi ti a san ni agbaye ati awọn kaadi ẹbun", "cake_pay_web_cards_subtitle": "Ra àwọn káàdì ìrajà t'á lò nínú ìtajà kan àti àwọn káàdì náà t'á lè lò níbikíbi", "cake_pay_web_cards_title": "Àwọn káàdì wẹ́ẹ̀bù ti Cake Pay", + "cake_seeds_save_disclaimer": "Jọwọ fi awọn ọrọ wọnyi pamọ ni aaye aabo! Ti o ba padanu wiwọle si apamọwọ rẹ, atilẹyin apamọwọ oyinbo ti a ko le ran ọ lọwọ", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "Ma binu, kaadi ẹbun yii ko wa lori iOS. O le ra lori Android tabi nipasẹ oju opo wẹẹbu wa dipo.", "cakepay_prepaid_card": "Káàdì ìrajà ti CakePay", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index df1ab5b1c..7e36289ef 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -101,6 +101,7 @@ "cake_pay_subtitle": "购买全球预付费卡和礼品卡", "cake_pay_web_cards_subtitle": "购买全球预付卡和礼品卡", "cake_pay_web_cards_title": "蛋糕支付网络卡", + "cake_seeds_save_disclaimer": "请在安全的地方保存这些单词!如果您无法使用钱包,蛋糕钱包的支撑就无法帮助您", "cake_wallet": "Cake Wallet", "cakepay_ios_not_available": "抱歉,这张礼品卡在iOS上不可用。您可以在Android或通过我们的网站上购买它。", "cakepay_prepaid_card": "CakePay 预付借记卡", diff --git a/tool/configure.dart b/tool/configure.dart index a1da934b9..94367e61e 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -661,7 +661,14 @@ import 'package:cw_core/output_info.dart'; import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cw_core/wallet_service.dart'; import 'package:hive/hive.dart'; -import 'package:cw_core/crypto_currency.dart';"""; +import 'package:cw_core/crypto_currency.dart'; +import 'package:cake_wallet/core/key_service.dart'; +import 'package:cake_wallet/core/secure_storage.dart'; +import 'package:cake_wallet/entities/haven_seed_store.dart'; +import 'package:cw_core/cake_hive.dart'; +import 'package:cw_core/wallet_info.dart'; +import 'package:cw_core/wallet_type.dart'; +"""; const havenCWHeaders = """ import 'package:cw_core/get_height_by_date.dart'; import 'package:cw_core/monero_amount_format.dart'; @@ -684,6 +691,7 @@ import 'package:cw_haven/mnemonics/french.dart'; import 'package:cw_haven/mnemonics/italian.dart'; import 'package:cw_haven/haven_transaction_creation_credentials.dart'; import 'package:cw_haven/api/balance_list.dart'; +import 'package:cw_haven/haven_wallet_service.dart'; """; const havenCwPart = "part 'cw_haven.dart';"; const havenContent = """ @@ -784,6 +792,7 @@ abstract class Haven { void onStartup(); int getTransactionInfoAccountId(TransactionInfo tx); WalletService createHavenWalletService(Box walletInfoSource); + Future backupHavenSeeds(Box havenSeedStore); CryptoCurrency assetOfTransaction(TransactionInfo tx); List getAssetRate(); }