dev
dart 12 lines 462 Bytes
Raw
1 import 'package:cake_wallet/exchange/exchange_pair.dart';
2 import 'package:cw_core/crypto_currency.dart';
3
4 List<ExchangePair> supportedPairs(List<CryptoCurrency> notSupported) {
5 final supportedCurrencies =
6 CryptoCurrency.all.where((element) => !notSupported.contains(element)).toList();
7
8 return supportedCurrencies
9 .map((i) => supportedCurrencies.map((k) => ExchangePair(from: i, to: k, reverse: true)))
10 .expand((i) => i)
11 .toList();
12 }