cake_wallet/lib/exchange/utils/currency_pairs_utils.dart

13 lines
462 B
Dart
Raw Permalink Normal View History

import 'package:cake_wallet/exchange/exchange_pair.dart';
import 'package:cw_core/crypto_currency.dart';
List<ExchangePair> supportedPairs(List<CryptoCurrency> notSupported) {
final supportedCurrencies =
CryptoCurrency.all.where((element) => !notSupported.contains(element)).toList();
return supportedCurrencies
.map((i) => supportedCurrencies.map((k) => ExchangePair(from: i, to: k, reverse: true)))
.expand((i) => i)
.toList();
}