mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Normalize remaining tags/networks
Also rename Cake `C-CHAIN` tag to `AVAXC`, which will result in a clearer situation for user if we later add USDT (AVAXC), for example.
This commit is contained in:
parent
5f6b447706
commit
6711d9530f
2 changed files with 13 additions and 4 deletions
|
@ -117,7 +117,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> {
|
|||
static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29, name: 'xusd');
|
||||
|
||||
static const ape = CryptoCurrency(title: 'APE', tag: 'ETH', fullName: 'ApeCoin', raw: 30, name: 'ape', iconPath: 'assets/images/ape_icon.png');
|
||||
static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'C-CHAIN', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png');
|
||||
static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'AVAXC', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png');
|
||||
static const btt = CryptoCurrency(title: 'BTT', tag: 'ETH', fullName: 'BitTorrent', raw: 32, name: 'btt', iconPath: 'assets/images/btt_icon.png');
|
||||
static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/bttbsc_icon.png');
|
||||
static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/doge_icon.png');
|
||||
|
|
|
@ -26,8 +26,6 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
|||
CryptoCurrency.stx,
|
||||
CryptoCurrency.bttc,
|
||||
CryptoCurrency.zaddr,
|
||||
CryptoCurrency.usdcpoly,
|
||||
CryptoCurrency.maticpoly,
|
||||
];
|
||||
|
||||
static List<ExchangePair> _supportedPairs() {
|
||||
|
@ -252,8 +250,19 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
|||
String get title => 'Trocador';
|
||||
|
||||
String _networkFor(CryptoCurrency currency) {
|
||||
switch (currency) {
|
||||
case CryptoCurrency.eth:
|
||||
return 'ERC20';
|
||||
case CryptoCurrency.maticpoly:
|
||||
return 'Mainnet';
|
||||
case CryptoCurrency.usdcpoly:
|
||||
return 'MATIC';
|
||||
case CryptoCurrency.zec:
|
||||
return 'Mainnet';
|
||||
default:
|
||||
return currency.tag != null ? _normalizeTag(currency.tag!) : 'Mainnet';
|
||||
}
|
||||
}
|
||||
|
||||
String _normalizeTag(String tag) {
|
||||
switch (tag) {
|
||||
|
|
Loading…
Reference in a new issue