mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Cw 473 exchange refactoring (#1126)
* CW-473 Remove deprecated Exchanges * CW-473 Clean up Exchange Code * CW-473 Add Decimals to Crypto Enums * CW-473 Fix minor merge error * CW-473 Fix minor merge error * CW-473 Fix FAQ Locals * CW-473 Apply requested changes * CW-473 Show Error if Exchange Provider is not supported anymore * CW-473 Implement Requested Changes
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user