diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index b92896605..0cb77d4e1 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -13,7 +13,6 @@ import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager; import 'package:cw_monero/monero_wallet.dart'; import 'package:hive/hive.dart'; import 'package:polyseed/polyseed.dart'; -// import 'package:polyseed/src/utils/key_utils.dart'; class MoneroNewWalletCredentials extends WalletCredentials { MoneroNewWalletCredentials({required String name, required this.language, required this.isPolyseed, String? password}) @@ -275,8 +274,7 @@ class MoneroWalletService extends WalletService< {PolyseedCoin coin = PolyseedCoin.POLYSEED_MONERO, int? overrideHeight}) async { final height = overrideHeight ?? getMoneroHeigthByDate( date: DateTime.fromMillisecondsSinceEpoch(polyseed.birthday * 1000)); - // final spendKey = keyToHexString(polyseed.generateKey(coin, 32)); - final spendKey = ""; + final spendKey = polyseed.generateKey(coin, 32).toHexString(); final seed = polyseed.encode(lang, coin); walletInfo.isRecovery = true; diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index d022cdc7b..0f8f2c90e 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -501,11 +501,10 @@ packages: polyseed: dependency: "direct main" description: - path: "." - ref: HEAD - resolved-ref: fbb66bb837b63677c6d7f4b92db08776214d990f - url: "https://github.com/cake-tech/polyseed_dart.git" - source: git + name: polyseed + sha256: "9b48ec535b10863f78f6354ec983b4cc0c88ca69ff48fee469d0fd1954b01d4f" + url: "https://pub.dev" + source: hosted version: "0.0.2" pool: dependency: transitive diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 55e9b354c..a6fe7f967 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -19,9 +19,7 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: - git: - url: https://github.com/cake-tech/polyseed_dart.git + polyseed: ^0.0.2 cw_core: path: ../cw_core diff --git a/lib/di.dart b/lib/di.dart index 4dc218423..2d0bbc47c 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -90,6 +90,7 @@ import 'package:cake_wallet/view_model/ionia/ionia_purchase_merch_view_model.dar import 'package:cake_wallet/view_model/nano_account_list/nano_account_edit_or_create_view_model.dart'; import 'package:cake_wallet/view_model/nano_account_list/nano_account_list_view_model.dart'; import 'package:cake_wallet/view_model/node_list/pow_node_list_view_model.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cake_wallet/view_model/set_up_2fa_viewmodel.dart'; import 'package:cake_wallet/view_model/restore/restore_from_qr_vm.dart'; import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart'; @@ -723,6 +724,8 @@ Future setup({ getIt.registerFactory(() => WalletSeedViewModel(getIt.get().wallet!)); + getIt.registerFactory(() => SeedTypeViewModel(getIt.get())); + getIt.registerFactoryParam((bool isWalletCreated, _) => WalletSeedPage(getIt.get(), isNewWalletCreated: isWalletCreated)); @@ -854,7 +857,7 @@ Future setup({ return ethereum!.createEthereumWalletService(_walletInfoSource); case WalletType.bitcoinCash: return bitcoinCash! - .createBitcoinCashWalletService(_walletInfoSource, _unspentCoinsInfoSource!); + .createBitcoinCashWalletService(_walletInfoSource, _unspentCoinsInfoSource); case WalletType.nano: return nano!.createNanoWalletService(_walletInfoSource); case WalletType.polygon: @@ -883,8 +886,8 @@ Future setup({ getIt.get(), getIt.get(param1: type), _walletInfoSource, type: type)); - getIt.registerFactoryParam( - (type, _) => WalletRestorePage(getIt.get(param1: type))); + getIt.registerFactoryParam((type, _) => WalletRestorePage( + getIt.get(param1: type), getIt.get())); getIt.registerFactoryParam, void>( (derivations, _) => WalletRestoreChooseDerivationViewModel(derivationInfos: derivations)); @@ -915,7 +918,7 @@ Future setup({ getIt.registerFactoryParam( (WalletType type, AdvancedPrivacySettingsViewModel advancedPrivacySettingsViewModel) => - PreSeedPage(type, advancedPrivacySettingsViewModel)); + PreSeedPage(type, advancedPrivacySettingsViewModel, getIt.get())); getIt.registerFactoryParam((trade, _) => TradeDetailsViewModel( diff --git a/lib/entities/seed_type.dart b/lib/entities/seed_type.dart index 0a1a191c6..ab9965528 100644 --- a/lib/entities/seed_type.dart +++ b/lib/entities/seed_type.dart @@ -6,7 +6,7 @@ class SeedType extends EnumerableItem with Serializable { static const all = [SeedType.legacy, SeedType.polyseed]; - static const defaultSeedType = legacy; + static const defaultSeedType = polyseed; static const legacy = SeedType(raw: 0, title: 'Legacy (25 words)'); static const polyseed = SeedType(raw: 1, title: 'Polyseed (16 words)'); diff --git a/lib/router.dart b/lib/router.dart index 903842342..cfa2fd43d 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -56,13 +56,13 @@ import 'package:cake_wallet/src/screens/support_other_links/support_other_links_ import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_list_page.dart'; import 'package:cake_wallet/src/screens/wallet_connect/wc_connections_listing_view.dart'; -import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/nft_view_model.dart'; import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart'; import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; import 'package:cw_core/nano_account.dart'; import 'package:cw_core/wallet_info.dart'; @@ -147,9 +147,9 @@ Route createRoute(RouteSettings settings) { case Routes.newWallet: final type = settings.arguments as WalletType; final walletNewVM = getIt.get(param1: type); - final settingsStore = getIt.get(); + final seedTypeViewModel = getIt.get(); - return CupertinoPageRoute(builder: (_) => NewWalletPage(walletNewVM, settingsStore)); + return CupertinoPageRoute(builder: (_) => NewWalletPage(walletNewVM, seedTypeViewModel)); case Routes.setupPin: Function(PinCodeState, String)? callback; @@ -542,6 +542,7 @@ Route createRoute(RouteSettings settings) { toggleTestnet, getIt.get(param1: type), getIt.get(param1: type, param2: false), + getIt.get(), )); case Routes.anonPayInvoicePage: 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 6445dd010..0e3a81d5f 100644 --- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart +++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell. import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -21,10 +22,11 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; class AdvancedPrivacySettingsPage extends BasePage { AdvancedPrivacySettingsPage(this.useTestnet, this.toggleUseTestnet, - this.advancedPrivacySettingsViewModel, this.nodeViewModel); + this.advancedPrivacySettingsViewModel, this.nodeViewModel, this.seedTypeViewModel); final AdvancedPrivacySettingsViewModel advancedPrivacySettingsViewModel; final NodeCreateOrEditViewModel nodeViewModel; + final SeedTypeViewModel seedTypeViewModel; @override String get title => S.current.privacy_settings; @@ -34,17 +36,18 @@ class AdvancedPrivacySettingsPage extends BasePage { @override Widget body(BuildContext context) => AdvancedPrivacySettingsBody( - useTestnet, toggleUseTestnet, advancedPrivacySettingsViewModel, nodeViewModel); + useTestnet, toggleUseTestnet, advancedPrivacySettingsViewModel, nodeViewModel, seedTypeViewModel); } class AdvancedPrivacySettingsBody extends StatefulWidget { - const AdvancedPrivacySettingsBody( - this.useTestnet, this.toggleUseTestnet, this.privacySettingsViewModel, this.nodeViewModel, + const AdvancedPrivacySettingsBody(this.useTestnet, this.toggleUseTestnet, + this.privacySettingsViewModel, this.nodeViewModel, this.seedTypeViewModel, {Key? key}) : super(key: key); final AdvancedPrivacySettingsViewModel privacySettingsViewModel; final NodeCreateOrEditViewModel nodeViewModel; + final SeedTypeViewModel seedTypeViewModel; final bool? useTestnet; final Function(bool? val) toggleUseTestnet; @@ -75,7 +78,7 @@ class _AdvancedPrivacySettingsBodyState extends State( - title: S.current.disable_fiat, + title: S.current.fiat_api, items: FiatApiMode.all, selectedItem: widget.privacySettingsViewModel.fiatApiMode, onItemSelected: (FiatApiMode mode) => @@ -130,8 +133,8 @@ class _AdvancedPrivacySettingsBodyState extends State( title: S.current.seedtype, items: SeedType.all, - selectedItem: widget.privacySettingsViewModel.seedType, - onItemSelected: widget.privacySettingsViewModel.setSeedType, + selectedItem: widget.seedTypeViewModel.moneroSeedType, + onItemSelected: widget.seedTypeViewModel.setMoneroSeedType, ), ); }), diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index fc5de609f..3dcaacb7e 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:mobx/mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter/material.dart'; @@ -24,13 +25,12 @@ import 'package:cake_wallet/view_model/wallet_new_vm.dart'; import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/entities/seed_type.dart'; -import 'package:cake_wallet/store/settings_store.dart'; class NewWalletPage extends BasePage { - NewWalletPage(this._walletNewVM, this._settingsStore); + NewWalletPage(this._walletNewVM, this._seedTypeViewModel); final WalletNewVM _walletNewVM; - final SettingsStore _settingsStore; + final SeedTypeViewModel _seedTypeViewModel; final walletNameImage = Image.asset('assets/images/wallet_name.png'); @@ -40,16 +40,18 @@ class NewWalletPage extends BasePage { String get title => S.current.new_wallet; @override - Widget body(BuildContext context) => WalletNameForm(_walletNewVM, - currentTheme.type == ThemeType.dark ? walletNameImage : walletNameLightImage, _settingsStore); + Widget body(BuildContext context) => WalletNameForm( + _walletNewVM, + currentTheme.type == ThemeType.dark ? walletNameImage : walletNameLightImage, + _seedTypeViewModel); } class WalletNameForm extends StatefulWidget { - WalletNameForm(this._walletNewVM, this.walletImage, this._settingsStore); + WalletNameForm(this._walletNewVM, this.walletImage, this._seedTypeViewModel); final WalletNewVM _walletNewVM; final Image walletImage; - final SettingsStore _settingsStore; + final SeedTypeViewModel _seedTypeViewModel; @override _WalletNameFormState createState() => _WalletNameFormState(_walletNewVM); @@ -194,7 +196,7 @@ class _WalletNameFormState extends State { builder: (BuildContext build) => Padding( padding: EdgeInsets.only(top: 24), child: SelectButton( - text: widget._settingsStore.moneroSeedType.title, + text: widget._seedTypeViewModel.moneroSeedType.title, onTap: () async { await showPopUp( context: context, @@ -217,7 +219,7 @@ class _WalletNameFormState extends State { key: _languageSelectorKey, initialSelected: defaultSeedLanguage, seedType: _walletNewVM.hasSeedType - ? widget._settingsStore.moneroSeedType + ? widget._seedTypeViewModel.moneroSeedType : SeedType.legacy, ), ), @@ -280,10 +282,10 @@ class _WalletNameFormState extends State { } } - bool get isPolyseed => widget._settingsStore.moneroSeedType == SeedType.polyseed; + bool get isPolyseed => widget._seedTypeViewModel.moneroSeedType == SeedType.polyseed; void _setSeedType(SeedType item) { - widget._settingsStore.moneroSeedType = item; + widget._seedTypeViewModel.setMoneroSeedType(item); _languageSelectorKey.currentState?.selected = defaultSeedLanguage; // Reset Seed language } } diff --git a/lib/src/screens/restore/wallet_restore_from_seed_form.dart b/lib/src/screens/restore/wallet_restore_from_seed_form.dart index ab68a3e44..cadded4db 100644 --- a/lib/src/screens/restore/wallet_restore_from_seed_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_seed_form.dart @@ -11,6 +11,13 @@ import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/entities/seed_type.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/seed_language_picker.dart'; +import 'package:cake_wallet/src/widgets/seed_widget.dart'; +import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; +import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:flutter/material.dart'; +import 'package:mobx/mobx.dart'; import 'package:polyseed/polyseed.dart'; class WalletRestoreFromSeedForm extends StatefulWidget { @@ -19,6 +26,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget { required this.displayLanguageSelector, required this.displayBlockHeightSelector, required this.type, + required this.seedTypeViewModel, this.blockHeightFocusNode, this.onHeightOrDateEntered, this.onSeedChange, @@ -28,6 +36,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget { final WalletType type; final bool displayLanguageSelector; final bool displayBlockHeightSelector; + final SeedTypeViewModel seedTypeViewModel; final FocusNode? blockHeightFocusNode; final Function(bool)? onHeightOrDateEntered; final void Function(String)? onSeedChange; @@ -52,16 +61,28 @@ class WalletRestoreFromSeedFormState extends State { final TextEditingController nameTextEditingController; final TextEditingController seedTypeController; final GlobalKey formKey; + late ReactionDisposer moneroSeedTypeReaction; String language; - bool isPolyseed = false; @override void initState() { + _setSeedType(widget.seedTypeViewModel.moneroSeedType); _setLanguageLabel(language); - _setSeedType(SeedType.defaultSeedType); + moneroSeedTypeReaction = + reaction((_) => widget.seedTypeViewModel.moneroSeedType, (SeedType item) { + _setSeedType(item); + _changeLanguage('English'); + }); + super.initState(); } + @override + void dispose() { + super.dispose(); + moneroSeedTypeReaction(); + } + void onSeedChange(String seed) { if (widget.type == WalletType.monero && Polyseed.isValidSeed(seed)) { final lang = PolyseedLang.getByPhrase(seed); @@ -181,6 +202,8 @@ class WalletRestoreFromSeedFormState extends State { ])); } + bool get isPolyseed => widget.seedTypeViewModel.moneroSeedType == SeedType.polyseed; + Widget get expandIcon => Container( padding: EdgeInsets.all(18), width: 24, @@ -208,10 +231,10 @@ class WalletRestoreFromSeedFormState extends State { void _changeSeedType(SeedType item) { _setSeedType(item); _changeLanguage('English'); + widget.seedTypeViewModel.setMoneroSeedType(item); } void _setSeedType(SeedType item) { - setState(() => isPolyseed = item == SeedType.polyseed); seedTypeController.text = item.toString(); } } diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index 3fd5e5783..dd3bbd915 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -15,6 +15,7 @@ import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/restore/restore_mode.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cake_wallet/view_model/wallet_restore_view_model.dart'; import 'package:cw_core/nano_account_info_response.dart'; import 'package:cw_core/wallet_info.dart'; @@ -27,7 +28,7 @@ import 'package:polyseed/polyseed.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; class WalletRestorePage extends BasePage { - WalletRestorePage(this.walletRestoreViewModel) + WalletRestorePage(this.walletRestoreViewModel, this.seedTypeViewModel) : walletRestoreFromSeedFormKey = GlobalKey(), walletRestoreFromKeysFormKey = GlobalKey(), _pages = [], @@ -37,6 +38,7 @@ class WalletRestorePage extends BasePage { switch (mode) { case WalletRestoreMode.seed: _pages.add(WalletRestoreFromSeedForm( + seedTypeViewModel: seedTypeViewModel, displayBlockHeightSelector: walletRestoreViewModel.hasBlockchainHeightLanguageSelector, displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector, @@ -91,6 +93,7 @@ class WalletRestorePage extends BasePage { )); final WalletRestoreViewModel walletRestoreViewModel; + final SeedTypeViewModel seedTypeViewModel; final PageController _controller; final List _pages; final GlobalKey walletRestoreFromSeedFormKey; diff --git a/lib/src/screens/seed/pre_seed_page.dart b/lib/src/screens/seed/pre_seed_page.dart index a45d81fc0..64ef5da97 100644 --- a/lib/src/screens/seed/pre_seed_page.dart +++ b/lib/src/screens/seed/pre_seed_page.dart @@ -1,6 +1,8 @@ +import 'package:cake_wallet/entities/seed_type.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; +import 'package:cake_wallet/view_model/seed_type_view_model.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; @@ -10,19 +12,21 @@ import 'package:cake_wallet/themes/theme_base.dart'; import 'package:flutter/material.dart'; class PreSeedPage extends BasePage { - PreSeedPage(this.type, this.advancedPrivacySettingsViewModel) + PreSeedPage(this.type, this.advancedPrivacySettingsViewModel, this.seedTypeViewModel) : imageLight = Image.asset('assets/images/pre_seed_light.png'), imageDark = Image.asset('assets/images/pre_seed_dark.png'), - seedPhraseLength = - advancedPrivacySettingsViewModel.seedPhraseLength.value { - wordsCount = _wordsCount(type, seedPhraseLength); + seedPhraseLength = advancedPrivacySettingsViewModel.seedPhraseLength.value, + moneroSeedType = seedTypeViewModel.moneroSeedType { + wordsCount = _wordsCount(type, seedPhraseLength, moneroSeedType); } final Image imageDark; final Image imageLight; final WalletType type; final AdvancedPrivacySettingsViewModel advancedPrivacySettingsViewModel; + final SeedTypeViewModel seedTypeViewModel; final int seedPhraseLength; + final SeedType moneroSeedType; late final int wordsCount; @override @@ -76,9 +80,11 @@ class PreSeedPage extends BasePage { )); } - static int _wordsCount(WalletType type, int seedPhraseLength) { + static int _wordsCount(WalletType type, int seedPhraseLength, SeedType moneroSeedType) { switch (type) { case WalletType.monero: + if (moneroSeedType == SeedType.polyseed) + return 16; return 25; case WalletType.ethereum: case WalletType.bitcoinCash: diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 3984bd81a..4078827d0 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -877,7 +877,7 @@ abstract class SettingsStoreBase with Store { } final savedSyncMode = SyncMode.all.firstWhere((element) { - return element.type.index == (sharedPreferences.getInt(PreferencesKey.syncModeKey) ?? 1); + return element.type.index == (sharedPreferences.getInt(PreferencesKey.syncModeKey) ?? 0); }); final savedSyncAll = sharedPreferences.getBool(PreferencesKey.syncAllKey) ?? true; diff --git a/lib/view_model/advanced_privacy_settings_view_model.dart b/lib/view_model/advanced_privacy_settings_view_model.dart index f62815346..483f0837b 100644 --- a/lib/view_model/advanced_privacy_settings_view_model.dart +++ b/lib/view_model/advanced_privacy_settings_view_model.dart @@ -1,7 +1,6 @@ import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/fiat_api_mode.dart'; import 'package:cake_wallet/entities/seed_phrase_length.dart'; -import 'package:cake_wallet/entities/seed_type.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:mobx/mobx.dart'; @@ -20,9 +19,6 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { @computed FiatApiMode get fiatApiMode => _settingsStore.fiatApiMode; - @computed - SeedType get seedType => _settingsStore.moneroSeedType; - @observable bool _addCustomNode = false; @@ -44,9 +40,6 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { @action void setFiatApiMode(FiatApiMode fiatApiMode) => _settingsStore.fiatApiMode = fiatApiMode; - @action - void setSeedType(SeedType seedType) => _settingsStore.moneroSeedType = seedType; - @action void setExchangeApiMode(ExchangeApiMode value) => _settingsStore.exchangeStatus = value; diff --git a/lib/view_model/seed_type_view_model.dart b/lib/view_model/seed_type_view_model.dart new file mode 100644 index 000000000..e3597be1c --- /dev/null +++ b/lib/view_model/seed_type_view_model.dart @@ -0,0 +1,19 @@ +import 'package:cake_wallet/entities/seed_type.dart'; +import 'package:cake_wallet/store/app_store.dart'; +import 'package:mobx/mobx.dart'; + +part 'seed_type_view_model.g.dart'; + +class SeedTypeViewModel = SeedTypeViewModelBase with _$SeedTypeViewModel; + +abstract class SeedTypeViewModelBase with Store { + SeedTypeViewModelBase(this._appStore); + + @computed + SeedType get moneroSeedType => _appStore.settingsStore.moneroSeedType; + + @action + void setMoneroSeedType(SeedType seedType) => _appStore.settingsStore.moneroSeedType = seedType; + + final AppStore _appStore; +} diff --git a/lib/view_model/wallet_keys_view_model.dart b/lib/view_model/wallet_keys_view_model.dart index 56ca190be..f931fec19 100644 --- a/lib/view_model/wallet_keys_view_model.dart +++ b/lib/view_model/wallet_keys_view_model.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.d import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/haven/haven.dart'; import 'package:cw_monero/api/wallet.dart' as monero_wallet; +import 'package:polyseed/polyseed.dart'; part 'wallet_keys_view_model.g.dart'; @@ -74,6 +75,15 @@ abstract class WalletKeysViewModelBase with Store { StandartListItem(title: S.current.view_key_private, value: keys['privateViewKey']!), StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!), ]); + + if (_appStore.wallet?.seed != null && Polyseed.isValidSeed(_appStore.wallet!.seed!)) { + final lang = PolyseedLang.getByPhrase(_appStore.wallet!.seed!); + final legacyLang = _getLegacySeedLang(lang); + final legacySeed = + Polyseed.decode(_appStore.wallet!.seed!, lang, PolyseedCoin.POLYSEED_MONERO) + .toLegacySeed(legacyLang); + items.add(StandartListItem(title: S.current.wallet_seed_legacy, value: legacySeed)); + } } if (_appStore.wallet!.type == WalletType.haven) { @@ -207,4 +217,23 @@ abstract class WalletKeysViewModelBase with Store { } String getRoundedRestoreHeight(int height) => ((height / 1000).floor() * 1000).toString(); + + LegacySeedLang _getLegacySeedLang(PolyseedLang lang) { + switch (lang.nameEnglish) { + case "Spanish": + return LegacySeedLang.getByEnglishName("Spanish"); + case "French": + return LegacySeedLang.getByEnglishName("French"); + case "Italian": + return LegacySeedLang.getByEnglishName("Italian"); + case "Japanese": + return LegacySeedLang.getByEnglishName("Japanese"); + case "Portuguese": + return LegacySeedLang.getByEnglishName("Portuguese"); + case "Chinese (Simplified)": + return LegacySeedLang.getByEnglishName("Chinese (simplified)"); + default: + return LegacySeedLang.getByEnglishName("English"); + } + } } diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 1f33f8532..e0f5210fc 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -104,9 +104,7 @@ dependencies: # ref: main socks5_proxy: ^1.0.4 flutter_svg: ^2.0.9 - polyseed: - git: - url: https://github.com/cake-tech/polyseed_dart.git + polyseed: ^0.0.2 dev_dependencies: flutter_test: diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 56b01da32..37c2cf17c 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -756,5 +756,6 @@ "bitcoin_legacy": "إرث البيتكوين", "primary_silent_address": "العنوان الصامت الأساسي", "dfx_option_description": "ﺎﺑﻭﺭﻭﺃ ﻲﻓ ﺕﺎﻛﺮﺸﻟﺍﻭ ﺔﺋﺰﺠﺘﻟﺍ ءﻼﻤﻌﻟ .ﻲﻓﺎﺿﺇ KYC ﻥﻭﺪﺑ ﻭﺭﻮﻳ 990 ﻰﻟﺇ ﻞﺼﻳ ﺎﻣ .ﻱﺮﺴﻳﻮﺴﻟﺍ", - "polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ" + "polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ", + "wallet_seed_legacy": "بذرة محفظة قديمة" } diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index a8c8d8fde..587c766e0 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -752,5 +752,6 @@ "bitcoin_legacy": "Legacy Bitcoin", "primary_silent_address": "Първичен безшумен адрес", "dfx_option_description": "Купете крипто с EUR и CHF. До 990 € без допълнителен KYC. За клиенти на дребно и корпоративни клиенти в Европа", - "polygonscan_history": "История на PolygonScan" + "polygonscan_history": "История на PolygonScan", + "wallet_seed_legacy": "Наследено портфейл семе" } diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index ef72450b7..cfb694840 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -752,5 +752,6 @@ "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Primární tichá adresa", "dfx_option_description": "Nakupujte kryptoměny za EUR a CHF. Až 990 € bez dalších KYC. Pro maloobchodní a firemní zákazníky v Evropě", - "polygonscan_history": "Historie PolygonScan" + "polygonscan_history": "Historie PolygonScan", + "wallet_seed_legacy": "Starší semeno peněženky" } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 25a321007..8764a009e 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "Bitcoin -Erbe", "primary_silent_address": "Primäre stille Adresse", "dfx_option_description": "Krypto mit EUR und CHF kaufen. Bis zu 990€ ohne zusätzliches KYC. Für Privat- und Firmenkunden in Europa", - "polygonscan_history": "PolygonScan-Verlauf" + "polygonscan_history": "PolygonScan-Verlauf", + "wallet_seed_legacy": "Legacy Wallet Seed" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 6316b7b10..da2516f33 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -761,5 +761,6 @@ "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Primary Silent Address", "dfx_option_description": "Buy crypto with EUR & CHF. Up to 990€ without additional KYC. For retail and corporate customers in Europe", - "polygonscan_history": "PolygonScan history" + "polygonscan_history": "PolygonScan history", + "wallet_seed_legacy": "Legacy wallet seed" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 557298e85..5d1e1fc78 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -752,7 +752,6 @@ "seedtype_polyseed": "Polieta (16 palabras)", "seed_language_czech": "checo", "seed_language_korean": "coreano", - "seed_language_chinese_traditional": "Chino tradicional)", "dfx_option_description": "Compre criptomonedas con EUR y CHF. Hasta 990€ sin KYC adicional. Para clientes minoristas y corporativos en Europa", "seed_language_chinese_traditional": "Chino (tradicional)", "mainnet": "Red", @@ -761,5 +760,6 @@ "bitcoin_silent_payments": "Pagos silenciosos de Bitcoin", "bitcoin_legacy": "Legado de bitcoin", "primary_silent_address": "Dirección silenciosa primaria", - "polygonscan_history": "Historial de PolygonScan" -} + "polygonscan_history": "Historial de PolygonScan", + "wallet_seed_legacy": "Semilla de billetera heredada" +} \ No newline at end of file diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index abf25560b..ce16eb0c0 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Adresse silencieuse primaire", "dfx_option_description": "Achetez des crypto-monnaies avec EUR et CHF. Jusqu'à 990€ sans KYC supplémentaire. Pour les clients particuliers et entreprises en Europe", - "polygonscan_history": "Historique de PolygonScan" + "polygonscan_history": "Historique de PolygonScan", + "wallet_seed_legacy": "Graine de portefeuille hérité" } diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index c24c1ed2d..a907338cc 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -738,5 +738,6 @@ "bitcoin_legacy": "Gado bitcoin", "primary_silent_address": "Adireshin Silent na farko", "dfx_option_description": "Sayi crypto tare da EUR & CHF. Har zuwa € 990 ba tare da ƙarin KYC ba. Don 'yan kasuwa da abokan ciniki na kamfanoni a Turai", - "polygonscan_history": "PolygonScan tarihin kowane zamani" + "polygonscan_history": "PolygonScan tarihin kowane zamani", + "wallet_seed_legacy": "Tallarin walat walat" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index f85ab72d1..b43ca4316 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "बिटकॉइन विरासत", "primary_silent_address": "प्राथमिक मूक पता", "dfx_option_description": "EUR और CHF के साथ क्रिप्टो खरीदें। अतिरिक्त केवाईसी के बिना 990€ तक। यूरोप में खुदरा और कॉर्पोरेट ग्राहकों के लिए", - "polygonscan_history": "पॉलीगॉनस्कैन इतिहास" + "polygonscan_history": "पॉलीगॉनस्कैन इतिहास", + "wallet_seed_legacy": "विरासत बटुए बीज" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 0acc53074..57a37a6ce 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -750,7 +750,6 @@ "seedtype_polyseed": "Poliseed (16 riječi)", "seed_language_czech": "češki", "seed_language_korean": "korejski", - "seed_language_chinese_traditional": "Kinesko tradicionalno)", "dfx_option_description": "Kupujte kripto s EUR i CHF. Do 990 € bez dodatnog KYC-a. Za maloprodajne i poslovne korisnike u Europi", "seed_language_chinese_traditional": "Kinesko (tradicionalno)", "mainnet": "Mainnet", @@ -759,5 +758,6 @@ "bitcoin_silent_payments": "Bitcoin tiha plaćanja", "bitcoin_legacy": "Nasljeđe bitcoina", "primary_silent_address": "Primarna tiha adresa", - "polygonscan_history": "Povijest PolygonScan" -} + "polygonscan_history": "Povijest PolygonScan", + "wallet_seed_legacy": "Sjeme naslijeđenog novčanika" +} \ No newline at end of file diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 411319809..094799f09 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -740,7 +740,6 @@ "seedtype_polyseed": "Polyseed (16 kata)", "seed_language_czech": "Ceko", "seed_language_korean": "Korea", - "seed_language_chinese_traditional": "Cina tradisional)", "dfx_option_description": "Beli kripto dengan EUR & CHF. Hingga 990€ tanpa KYC tambahan. Untuk pelanggan ritel dan korporat di Eropa", "seed_language_chinese_traditional": "Cina (tradisional)", "mainnet": "Mainnet", @@ -749,5 +748,6 @@ "bitcoin_silent_payments": "Bitcoin pembayaran diam", "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Alamat diam primer", - "polygonscan_history": "Sejarah PolygonScan" -} + "polygonscan_history": "Sejarah PolygonScan", + "wallet_seed_legacy": "Biji dompet warisan" +} \ No newline at end of file diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index bc46ef91c..5017177e6 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Indirizzo silenzioso primario", "dfx_option_description": "Acquista criptovalute con EUR e CHF. Fino a 990€ senza KYC aggiuntivi. Per clienti al dettaglio e aziendali in Europa", - "polygonscan_history": "Cronologia PolygonScan" + "polygonscan_history": "Cronologia PolygonScan", + "wallet_seed_legacy": "Seme di portafoglio legacy" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 947870d0c..b2de24c23 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "ビットコインレガシー", "primary_silent_address": "主なサイレントアドレス", "dfx_option_description": "EUR と CHF で暗号通貨を購入します。追加のKYCなしで最大990ユーロ。ヨーロッパの小売および法人顧客向け", - "polygonscan_history": "ポリゴンスキャン履歴" + "polygonscan_history": "ポリゴンスキャン履歴", + "wallet_seed_legacy": "レガシーウォレットシード" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 06a052df8..0830326f5 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -758,5 +758,6 @@ "bitcoin_legacy": "비트 코인 유산", "primary_silent_address": "기본 조용한 주소", "dfx_option_description": "EUR 및 CHF로 암호화폐를 구매하세요. 추가 KYC 없이 최대 990€. 유럽의 소매 및 기업 고객용", - "polygonscan_history": "다각형 스캔 기록" + "polygonscan_history": "다각형 스캔 기록", + "wallet_seed_legacy": "레거시 지갑 시드" } diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 1aeea076f..69679bbff 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -758,5 +758,6 @@ "bitcoin_legacy": "Bitcoin အမွေ", "primary_silent_address": "မူလအသံတိတ်လိပ်စာ", "dfx_option_description": "EUR & CHF ဖြင့် crypto ကိုဝယ်ပါ။ အပို KYC မပါဘဲ 990€ အထိ။ ဥရောပရှိ လက်လီရောင်းချသူများနှင့် ကော်ပိုရိတ်ဖောက်သည်များအတွက်", - "polygonscan_history": "PolygonScan မှတ်တမ်း" + "polygonscan_history": "PolygonScan မှတ်တမ်း", + "wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 4dd59aef0..42b16714c 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -752,7 +752,6 @@ "seedtype_polyseed": "Polyseed (16 woorden)", "seed_language_czech": "Tsjechisch", "seed_language_korean": "Koreaans", - "seed_language_chinese_traditional": "Chinese traditionele)", "dfx_option_description": "Koop crypto met EUR & CHF. Tot 990€ zonder extra KYC. Voor particuliere en zakelijke klanten in Europa", "seed_language_chinese_traditional": "Chinese (traditionele)", "mainnet": "Maimet", @@ -761,5 +760,6 @@ "bitcoin_silent_payments": "Bitcoin stille betalingen", "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Primair stil adres", - "polygonscan_history": "PolygonScan-geschiedenis" -} + "polygonscan_history": "PolygonScan-geschiedenis", + "wallet_seed_legacy": "Legacy portemonnee zaad" +} \ No newline at end of file diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 4969c4bcd..455a90b64 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "Dziedzictwo bitcoinowe", "primary_silent_address": "Podstawowy cichy adres", "dfx_option_description": "Kupuj kryptowaluty za EUR i CHF. Do 990 € bez dodatkowego KYC. Dla klientów detalicznych i korporacyjnych w Europie", - "polygonscan_history": "Historia PolygonScan" + "polygonscan_history": "Historia PolygonScan", + "wallet_seed_legacy": "Dziedziczne ziarno portfela" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index bb27fd823..20ba52273 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -759,5 +759,6 @@ "bitcoin_legacy": "Bitcoin Legado", "primary_silent_address": "Endereço silencioso primário", "dfx_option_description": "Compre criptografia com EUR e CHF. Até 990€ sem KYC adicional. Para clientes de varejo e corporativos na Europa", - "polygonscan_history": "História do PolygonScan" + "polygonscan_history": "História do PolygonScan", + "wallet_seed_legacy": "Semente de carteira herdada" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index cfb57399b..807d27887 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -760,5 +760,6 @@ "bitcoin_legacy": "Биткойн наследие", "primary_silent_address": "Основной тихий адрес", "dfx_option_description": "Покупайте криптовалюту за EUR и CHF. До 990€ без дополнительного KYC. Для розничных и корпоративных клиентов в Европе", - "polygonscan_history": "История PolygonScan" + "polygonscan_history": "История PolygonScan", + "wallet_seed_legacy": "Наследие семя кошелька" } diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 454690411..f01ddd03c 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -758,5 +758,6 @@ "bitcoin_legacy": "มรดก Bitcoin", "primary_silent_address": "ที่อยู่เงียบหลัก", "dfx_option_description": "ซื้อ crypto ด้วย EUR และ CHF สูงถึง 990€ โดยไม่มี KYC เพิ่มเติม สำหรับลูกค้ารายย่อยและลูกค้าองค์กรในยุโรป", - "polygonscan_history": "ประวัติ PolygonScan" + "polygonscan_history": "ประวัติ PolygonScan", + "wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก" } diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 30e9a0a16..37d08c853 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -754,5 +754,6 @@ "bitcoin_legacy": "Pamana ng Bitcoin", "primary_silent_address": "Pangunahing tahimik na address", "dfx_option_description": "Bumili ng crypto gamit ang EUR at CHF. Hanggang 990€ nang walang karagdagang KYC. Para sa retail at corporate na mga customer sa Europe", - "polygonscan_history": "Kasaysayan ng PolygonScan" + "polygonscan_history": "Kasaysayan ng PolygonScan", + "wallet_seed_legacy": "Legacy wallet seed" } diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 30c697de8..97ab6b3c4 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -758,5 +758,6 @@ "bitcoin_legacy": "Bitcoin Mirası", "primary_silent_address": "Birincil sessiz adres", "dfx_option_description": "EUR ve CHF ile kripto satın alın. Ek KYC olmadan 990 €'ya kadar. Avrupa'daki perakende ve kurumsal müşteriler için", - "polygonscan_history": "PolygonScan geçmişi" + "polygonscan_history": "PolygonScan geçmişi", + "wallet_seed_legacy": "Eski cüzdan tohumu" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 43744125a..ec5f49452 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -760,5 +760,6 @@ "bitcoin_silent_payments": "Біткойн мовчазні платежі", "bitcoin_legacy": "Bitcoin Legacy", "primary_silent_address": "Первинна мовчазна адреса", - "polygonscan_history": "Історія PolygonScan" -} + "polygonscan_history": "Історія PolygonScan", + "wallet_seed_legacy": "Спадець насіння гаманця" +} \ No newline at end of file diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 192ca7d23..3818477b2 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -752,5 +752,6 @@ "bitcoin_legacy": "بٹ کوائن میراث", "primary_silent_address": "بنیادی خاموش پتہ", "dfx_option_description": "EUR ﺭﻭﺍ CHF ﯽﻓﺎﺿﺍ ۔ﮟﯾﺪﯾﺮﺧ ﻮﭩﭘﺮﮐ ﮫﺗﺎﺳ ﮯﮐ KYC ﮯﯿﻟ ﮯﮐ ﻦﯿﻓﺭﺎﺻ ﭧﯾﺭﻮﭘﺭﺎﮐ ﺭﻭﺍ ﮦﺩﺭﻮﺧ ﮟ", - "polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ" + "polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ", + "wallet_seed_legacy": "میراثی پرس کا بیج" } diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 390e66b56..e007ad5ae 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -754,5 +754,6 @@ "bitcoin_legacy": "Olokan Bitcoin", "primary_silent_address": "Adirẹsi ipalọlọ akọkọ", "dfx_option_description": "Ra crypto pẹlu EUR & CHF. Titi di 990 € laisi afikun KYC. Fun soobu ati awọn onibara ile-iṣẹ ni Yuroopu", - "polygonscan_history": "PolygonScan itan" + "polygonscan_history": "PolygonScan itan", + "wallet_seed_legacy": "Irugbin akole" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 5f8e432bc..eaa22a484 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -759,5 +759,6 @@ "bitcoin_legacy": "比特币遗产", "primary_silent_address": "主要无声地址", "dfx_option_description": "用欧元和瑞士法郎购买加密货币。高达 990 欧元,无需额外 KYC。对于欧洲的零售和企业客户", - "polygonscan_history": "多边形扫描历史" + "polygonscan_history": "多边形扫描历史", + "wallet_seed_legacy": "旧的钱包种子" }