mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-25 12:06:05 +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 12 words, then it could be electrum 1.0,
|
||||||
// if the mnemonic is 24 words, then it could be electrum 2.0
|
// if the mnemonic is 24 words, then it could be electrum 2.0
|
||||||
// bip39 is possible with any number of words
|
// bip39 is possible with any number of words
|
||||||
int wordCount = mnemonic.split(" ").length;
|
// int wordCount = mnemonic.split(" ").length;
|
||||||
if (wordCount == 24) {
|
// if (wordCount == 24) {
|
||||||
return [DerivationType.bip39, DerivationType.electrum1];
|
// return [DerivationType.bip39, DerivationType.electrum1];
|
||||||
} else if (wordCount == 12) {
|
// } else if (wordCount == 12) {
|
||||||
return [DerivationType.bip39, DerivationType.electrum2];
|
// return [DerivationType.bip39, DerivationType.electrum2];
|
||||||
} else {
|
// } else {
|
||||||
return [DerivationType.bip39];
|
// return [DerivationType.bip39];
|
||||||
}
|
// }
|
||||||
|
return [DerivationType.bip39, DerivationType.electrum2];
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<List<DerivationInfo>> getDerivationsFromMnemonic(
|
static Future<List<DerivationInfo>> getDerivationsFromMnemonic(
|
||||||
|
|
|
@ -282,29 +282,6 @@ class _DashboardPageView extends BasePage {
|
||||||
);
|
);
|
||||||
_isEffectsInstalled = true;
|
_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);
|
_showReleaseNotesPopup(context);
|
||||||
|
|
||||||
var needToPresentYat = false;
|
var needToPresentYat = false;
|
||||||
|
|
|
@ -71,23 +71,6 @@ class DesktopDashboardPage extends StatelessWidget {
|
||||||
}
|
}
|
||||||
_isEffectsInstalled = true;
|
_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 needToPresentYat = false;
|
||||||
var isInactive = false;
|
var isInactive = false;
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,7 @@ abstract class DashboardViewModelBase with Store {
|
||||||
required this.yatStore,
|
required this.yatStore,
|
||||||
required this.ordersStore,
|
required this.ordersStore,
|
||||||
required this.anonpayTransactionsStore})
|
required this.anonpayTransactionsStore})
|
||||||
: isOutdatedElectrumWallet = false,
|
: hasSellAction = false,
|
||||||
hasSellAction = false,
|
|
||||||
hasBuyAction = false,
|
hasBuyAction = false,
|
||||||
hasExchangeAction = false,
|
hasExchangeAction = false,
|
||||||
isShowFirstYatIntroduction = false,
|
isShowFirstYatIntroduction = false,
|
||||||
|
@ -107,8 +106,6 @@ abstract class DashboardViewModelBase with Store {
|
||||||
wallet = appStore.wallet! {
|
wallet = appStore.wallet! {
|
||||||
name = wallet.name;
|
name = wallet.name;
|
||||||
type = wallet.type;
|
type = wallet.type;
|
||||||
isOutdatedElectrumWallet =
|
|
||||||
wallet.type == WalletType.bitcoin && wallet.seed!.split(' ').length < 24;
|
|
||||||
isShowFirstYatIntroduction = false;
|
isShowFirstYatIntroduction = false;
|
||||||
isShowSecondYatIntroduction = false;
|
isShowSecondYatIntroduction = false;
|
||||||
isShowThirdYatIntroduction = false;
|
isShowThirdYatIntroduction = false;
|
||||||
|
@ -308,9 +305,6 @@ abstract class DashboardViewModelBase with Store {
|
||||||
|
|
||||||
ReactionDisposer? _onMoneroBalanceChangeReaction;
|
ReactionDisposer? _onMoneroBalanceChangeReaction;
|
||||||
|
|
||||||
@observable
|
|
||||||
bool isOutdatedElectrumWallet;
|
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano;
|
bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano;
|
||||||
|
|
||||||
|
@ -333,8 +327,6 @@ abstract class DashboardViewModelBase with Store {
|
||||||
this.wallet = wallet;
|
this.wallet = wallet;
|
||||||
type = wallet.type;
|
type = wallet.type;
|
||||||
name = wallet.name;
|
name = wallet.name;
|
||||||
isOutdatedElectrumWallet =
|
|
||||||
wallet.type == WalletType.bitcoin && wallet.seed!.split(' ').length < 24;
|
|
||||||
updateActions();
|
updateActions();
|
||||||
|
|
||||||
if (wallet.type == WalletType.monero) {
|
if (wallet.type == WalletType.monero) {
|
||||||
|
|
Loading…
Reference in a new issue