mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
disable swapsxyz and stealthex (#3116)
This commit is contained in:
@@ -599,6 +599,18 @@ Future<void> defaultSettingsMigration(
|
||||
// reset force dex option only 1 time and let users pick it from the swap settings preference
|
||||
await sharedPreferences.setBool(PreferencesKey.forceDecentralizedExchanges, false);
|
||||
break;
|
||||
case 62:
|
||||
await _changeExchangeProviderAvailability(
|
||||
sharedPreferences,
|
||||
providerName: "Swaps.XYZ",
|
||||
enabled: false,
|
||||
);
|
||||
_changeExchangeProviderAvailability(
|
||||
sharedPreferences,
|
||||
providerName: "StealthEX",
|
||||
enabled: false,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -721,15 +733,15 @@ String _getDefaultNodeUri(WalletType type) {
|
||||
}
|
||||
}
|
||||
|
||||
void _changeExchangeProviderAvailability(SharedPreferences sharedPreferences,
|
||||
{required String providerName, required bool enabled}) {
|
||||
Future<void> _changeExchangeProviderAvailability(SharedPreferences sharedPreferences,
|
||||
{required String providerName, required bool enabled}) async {
|
||||
final Map<String, dynamic> exchangeProvidersSelection =
|
||||
json.decode(sharedPreferences.getString(PreferencesKey.exchangeProvidersSelection) ?? "{}")
|
||||
as Map<String, dynamic>;
|
||||
|
||||
exchangeProvidersSelection[providerName] = enabled;
|
||||
|
||||
sharedPreferences.setString(
|
||||
await sharedPreferences.setString(
|
||||
PreferencesKey.exchangeProvidersSelection,
|
||||
json.encode(exchangeProvidersSelection),
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@ class ExchangeProviderDescription extends EnumerableItem<int> with Serializable<
|
||||
static const xoSwap =
|
||||
ExchangeProviderDescription(title: 'XOSwap', raw: 13, image: 'assets/new-ui/trade_providers/xoswap.svg', isCentralized: true);
|
||||
static const swapsXyz =
|
||||
ExchangeProviderDescription(title: 'Swaps.XYZ', raw: 14, image: 'assets/new-ui/trade_providers/swaps_xyz.svg', isCentralized: false);
|
||||
ExchangeProviderDescription(title: 'Swaps.XYZ', raw: 14, image: 'assets/new-ui/trade_providers/swaps_xyz.svg', isCentralized: true);
|
||||
static const nearIntents =
|
||||
ExchangeProviderDescription(title: 'Near Intents', raw: 15, image: 'assets/new-ui/trade_providers/near-intents.svg', isCentralized: false);
|
||||
static const jupiter =
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
|
||||
payjoinSessionSource: payjoinSessionSource,
|
||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||
havenSeedStore: havenSeedStore,
|
||||
initialMigrationVersion: 61,
|
||||
initialMigrationVersion: 62,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user