mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +00:00
remove deprecated alert
This commit is contained in:
parent
3053ea4d10
commit
0389ac40b0
4 changed files with 10 additions and 57 deletions
|
@ -116,14 +116,15 @@ class BitcoinWalletService extends WalletService<BitcoinNewWalletCredentials,
|
|||
// if the mnemonic is 12 words, then it could be electrum 1.0,
|
||||
// if the mnemonic is 24 words, then it could be electrum 2.0
|
||||
// bip39 is possible with any number of words
|
||||
int wordCount = mnemonic.split(" ").length;
|
||||
if (wordCount == 24) {
|
||||
return [DerivationType.bip39, DerivationType.electrum1];
|
||||
} else if (wordCount == 12) {
|
||||
return [DerivationType.bip39, DerivationType.electrum2];
|
||||
} else {
|
||||
return [DerivationType.bip39];
|
||||
}
|
||||
// int wordCount = mnemonic.split(" ").length;
|
||||
// if (wordCount == 24) {
|
||||
// return [DerivationType.bip39, DerivationType.electrum1];
|
||||
// } else if (wordCount == 12) {
|
||||
// return [DerivationType.bip39, DerivationType.electrum2];
|
||||
// } else {
|
||||
// return [DerivationType.bip39];
|
||||
// }
|
||||
return [DerivationType.bip39, DerivationType.electrum2];
|
||||
}
|
||||
|
||||
static Future<List<DerivationInfo>> getDerivationsFromMnemonic(
|
||||
|
|
|
@ -282,29 +282,6 @@ class _DashboardPageView extends BasePage {
|
|||
);
|
||||
_isEffectsInstalled = true;
|
||||
|
||||
autorun(
|
||||
(_) async {
|
||||
if (!dashboardViewModel.isOutdatedElectrumWallet) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Future<void>.delayed(Duration(seconds: 1));
|
||||
if (context.mounted) {
|
||||
await showPopUp<void>(
|
||||
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;
|
||||
|
|
|
@ -71,23 +71,6 @@ class DesktopDashboardPage extends StatelessWidget {
|
|||
}
|
||||
_isEffectsInstalled = true;
|
||||
|
||||
autorun((_) async {
|
||||
if (!dashboardViewModel.isOutdatedElectrumWallet) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Future<void>.delayed(Duration(seconds: 1));
|
||||
await showPopUp<void>(
|
||||
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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue