diff --git a/lib/entities/main_actions.dart b/lib/entities/main_actions.dart index d86d1dd0a..7fbdee038 100644 --- a/lib/entities/main_actions.dart +++ b/lib/entities/main_actions.dart @@ -45,7 +45,7 @@ class MainActions { } if (viewModel.isTorEnabled) { - _showErrorDialog(context, S.of(context).warning, S.of(context).tor_enabled_warning); + await _showErrorDialog(context, S.of(context).warning, S.of(context).tor_enabled_warning); } final defaultBuyProvider = viewModel.defaultBuyProvider; @@ -76,10 +76,6 @@ class MainActions { if (!viewModel.isEnabledExchangeAction) { return; } - - if (viewModel.isTorEnabled) { - _showErrorDialog(context, S.of(context).warning, S.of(context).tor_enabled_warning); - } await Navigator.of(context).pushNamed(Routes.exchange); }, @@ -109,7 +105,7 @@ class MainActions { } if (viewModel.isTorEnabled) { - _showErrorDialog(context, S.of(context).warning, S.of(context).tor_enabled_warning); + await _showErrorDialog(context, S.of(context).warning, S.of(context).tor_enabled_warning); } final defaultSellProvider = viewModel.defaultSellProvider; diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index 5179bfda4..f738135b0 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -61,6 +61,9 @@ class PreferencesKey { static const lookupsUnstoppableDomains = 'looks_up_mastodon'; static const lookupsOpenAlias = 'looks_up_mastodon'; static const lookupsENS = 'looks_up_ens'; + static const shownTorSellWarning = 'shown_tor_sell_warning'; + static const shownTorBuyWarning = 'shown_tor_buy_warning'; + static String moneroWalletUpdateV1Key(String name) => '${PreferencesKey.moneroWalletPasswordUpdateV1Base}_${name}';