2023-02-05 20:32:39 +00:00
|
|
|
import 'package:stackwallet/models/isar/exchange_cache/currency.dart';
|
|
|
|
import 'package:stackwallet/models/isar/exchange_cache/pair.dart';
|
2022-10-04 17:06:14 +00:00
|
|
|
|
|
|
|
class SPAvailableCurrencies {
|
|
|
|
final List<Currency> floatingRateCurrencies = [];
|
|
|
|
final List<Currency> fixedRateCurrencies = [];
|
|
|
|
|
|
|
|
final List<Pair> floatingRatePairs = [];
|
|
|
|
final List<Pair> fixedRatePairs = [];
|
|
|
|
|
|
|
|
void updateFloatingCurrencies(List<Currency> newCurrencies) {
|
|
|
|
floatingRateCurrencies.clear();
|
|
|
|
floatingRateCurrencies.addAll(newCurrencies);
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateFixedCurrencies(List<Currency> newCurrencies) {
|
|
|
|
fixedRateCurrencies.clear();
|
|
|
|
fixedRateCurrencies.addAll(newCurrencies);
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateFloatingPairs(List<Pair> newPairs) {
|
|
|
|
floatingRatePairs.clear();
|
|
|
|
floatingRatePairs.addAll(newPairs);
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateFixedPairs(List<Pair> newPairs) {
|
|
|
|
fixedRatePairs.clear();
|
|
|
|
fixedRatePairs.addAll(newPairs);
|
|
|
|
}
|
|
|
|
}
|