mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 19:26:27 +00:00
CWA-169 | created exchange pairs for crypto currencies
This commit is contained in:
parent
c1a7ee0164
commit
6333b9a6ff
1 changed files with 35 additions and 14 deletions
|
@ -16,22 +16,43 @@ import 'package:cake_wallet/src/domain/exchange/trade_not_created_exeption.dart'
|
||||||
class MorphTokenExchangeProvider extends ExchangeProvider {
|
class MorphTokenExchangeProvider extends ExchangeProvider {
|
||||||
MorphTokenExchangeProvider()
|
MorphTokenExchangeProvider()
|
||||||
: super(
|
: super(
|
||||||
pairList: CryptoCurrency.all
|
pairList: [
|
||||||
.map((i) {
|
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.btc),
|
||||||
return CryptoCurrency.all.map((k) {
|
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.eth),
|
||||||
if (i == CryptoCurrency.btc && k == CryptoCurrency.xmr) {
|
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.bch),
|
||||||
return ExchangePair(from: i, to: k, reverse: false);
|
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.ltc),
|
||||||
}
|
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.dash),
|
||||||
|
|
||||||
if (i == CryptoCurrency.xmr && k == CryptoCurrency.btc) {
|
ExchangePair(from: CryptoCurrency.dash, to: CryptoCurrency.btc),
|
||||||
return null;
|
ExchangePair(from: CryptoCurrency.dash, to: CryptoCurrency.eth),
|
||||||
}
|
ExchangePair(from: CryptoCurrency.dash, to: CryptoCurrency.bch),
|
||||||
|
ExchangePair(from: CryptoCurrency.dash, to: CryptoCurrency.ltc),
|
||||||
|
ExchangePair(from: CryptoCurrency.dash, to: CryptoCurrency.xmr),
|
||||||
|
|
||||||
return ExchangePair(from: i, to: k, reverse: true);
|
ExchangePair(from: CryptoCurrency.ltc, to: CryptoCurrency.btc),
|
||||||
}).where((c) => c != null);
|
ExchangePair(from: CryptoCurrency.ltc, to: CryptoCurrency.eth),
|
||||||
})
|
ExchangePair(from: CryptoCurrency.ltc, to: CryptoCurrency.bch),
|
||||||
.expand((i) => i)
|
ExchangePair(from: CryptoCurrency.ltc, to: CryptoCurrency.dash),
|
||||||
.toList());
|
ExchangePair(from: CryptoCurrency.ltc, to: CryptoCurrency.xmr),
|
||||||
|
|
||||||
|
ExchangePair(from: CryptoCurrency.bch, to: CryptoCurrency.btc),
|
||||||
|
ExchangePair(from: CryptoCurrency.bch, to: CryptoCurrency.eth),
|
||||||
|
ExchangePair(from: CryptoCurrency.bch, to: CryptoCurrency.ltc),
|
||||||
|
ExchangePair(from: CryptoCurrency.bch, to: CryptoCurrency.dash),
|
||||||
|
ExchangePair(from: CryptoCurrency.bch, to: CryptoCurrency.xmr),
|
||||||
|
|
||||||
|
ExchangePair(from: CryptoCurrency.eth, to: CryptoCurrency.btc),
|
||||||
|
ExchangePair(from: CryptoCurrency.eth, to: CryptoCurrency.bch),
|
||||||
|
ExchangePair(from: CryptoCurrency.eth, to: CryptoCurrency.ltc),
|
||||||
|
ExchangePair(from: CryptoCurrency.eth, to: CryptoCurrency.dash),
|
||||||
|
ExchangePair(from: CryptoCurrency.eth, to: CryptoCurrency.xmr),
|
||||||
|
|
||||||
|
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.eth),
|
||||||
|
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.bch),
|
||||||
|
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.ltc),
|
||||||
|
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.dash),
|
||||||
|
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.xmr),
|
||||||
|
]);
|
||||||
|
|
||||||
static const apiUri = 'https://api.morphtoken.com';
|
static const apiUri = 'https://api.morphtoken.com';
|
||||||
static const _morphURISuffix = '/morph';
|
static const _morphURISuffix = '/morph';
|
||||||
|
|
Loading…
Reference in a new issue