From 0389ac40b09a1a622f6c2d403d94ff321d78e23c Mon Sep 17 00:00:00 2001 From: fosse Date: Tue, 29 Aug 2023 09:18:18 -0400 Subject: [PATCH] remove deprecated alert --- cw_bitcoin/lib/bitcoin_wallet_service.dart | 17 +++++++------- lib/src/screens/dashboard/dashboard_page.dart | 23 ------------------- .../dashboard/desktop_dashboard_page.dart | 17 -------------- .../dashboard/dashboard_view_model.dart | 10 +------- 4 files changed, 10 insertions(+), 57 deletions(-) diff --git a/cw_bitcoin/lib/bitcoin_wallet_service.dart b/cw_bitcoin/lib/bitcoin_wallet_service.dart index c24f2d92d..20941294f 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_service.dart @@ -116,14 +116,15 @@ class BitcoinWalletService extends WalletService> getDerivationsFromMnemonic( diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 68f5ca9aa..e918e8c56 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -282,29 +282,6 @@ class _DashboardPageView extends BasePage { ); _isEffectsInstalled = true; - autorun( - (_) async { - if (!dashboardViewModel.isOutdatedElectrumWallet) { - return; - } - - await Future.delayed(Duration(seconds: 1)); - if (context.mounted) { - await showPopUp( - context: context, - builder: (BuildContext context) { - return AlertWithOneAction( - alertTitle: S.of(context).pre_seed_title, - alertContent: S.of(context).outdated_electrum_wallet_description, - buttonText: S.of(context).understand, - buttonAction: () => Navigator.of(context).pop(), - ); - }, - ); - } - }, - ); - _showReleaseNotesPopup(context); var needToPresentYat = false; diff --git a/lib/src/screens/dashboard/desktop_dashboard_page.dart b/lib/src/screens/dashboard/desktop_dashboard_page.dart index 2332f4db6..ed9fa6912 100644 --- a/lib/src/screens/dashboard/desktop_dashboard_page.dart +++ b/lib/src/screens/dashboard/desktop_dashboard_page.dart @@ -71,23 +71,6 @@ class DesktopDashboardPage extends StatelessWidget { } _isEffectsInstalled = true; - autorun((_) async { - if (!dashboardViewModel.isOutdatedElectrumWallet) { - return; - } - - await Future.delayed(Duration(seconds: 1)); - await showPopUp( - context: context, - builder: (BuildContext context) { - return AlertWithOneAction( - alertTitle: S.of(context).pre_seed_title, - alertContent: S.of(context).outdated_electrum_wallet_description, - buttonText: S.of(context).understand, - buttonAction: () => Navigator.of(context).pop()); - }); - }); - var needToPresentYat = false; var isInactive = false; diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 9c0d18d08..8e4c70232 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -46,8 +46,7 @@ abstract class DashboardViewModelBase with Store { required this.yatStore, required this.ordersStore, required this.anonpayTransactionsStore}) - : isOutdatedElectrumWallet = false, - hasSellAction = false, + : hasSellAction = false, hasBuyAction = false, hasExchangeAction = false, isShowFirstYatIntroduction = false, @@ -107,8 +106,6 @@ abstract class DashboardViewModelBase with Store { wallet = appStore.wallet! { name = wallet.name; type = wallet.type; - isOutdatedElectrumWallet = - wallet.type == WalletType.bitcoin && wallet.seed!.split(' ').length < 24; isShowFirstYatIntroduction = false; isShowSecondYatIntroduction = false; isShowThirdYatIntroduction = false; @@ -308,9 +305,6 @@ abstract class DashboardViewModelBase with Store { ReactionDisposer? _onMoneroBalanceChangeReaction; - @observable - bool isOutdatedElectrumWallet; - @computed bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano; @@ -333,8 +327,6 @@ abstract class DashboardViewModelBase with Store { this.wallet = wallet; type = wallet.type; name = wallet.name; - isOutdatedElectrumWallet = - wallet.type == WalletType.bitcoin && wallet.seed!.split(' ').length < 24; updateActions(); if (wallet.type == WalletType.monero) {