Validate bitcoin's saved transaction priority [skip ci]

This commit is contained in:
OmarHatem 2022-12-15 02:05:00 +02:00
parent 710de57847
commit eb0ebbac41

View file

@ -161,7 +161,8 @@ Future defaultSettingsMigration(
} }
Future<void> validateBitcoinSavedTransactionPriority(SharedPreferences sharedPreferences) async { Future<void> validateBitcoinSavedTransactionPriority(SharedPreferences sharedPreferences) async {
int? savedBitcoinPriority = sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority); final int? savedBitcoinPriority =
sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority);
if (!BitcoinTransactionPriority.all.any((element) => element.raw == savedBitcoinPriority)) { if (!BitcoinTransactionPriority.all.any((element) => element.raw == savedBitcoinPriority)) {
await sharedPreferences.setInt( await sharedPreferences.setInt(
PreferencesKey.bitcoinTransactionPriority, BitcoinTransactionPriority.defaultPriority.raw); PreferencesKey.bitcoinTransactionPriority, BitcoinTransactionPriority.defaultPriority.raw);