add USDT Binance Smart Chain (BSC) support (#2341)

This commit is contained in:
Serhii 2025-06-27 15:47:34 +03:00 committed by GitHub
parent 900304d405
commit d0827dd39e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

View file

@ -111,7 +111,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
CryptoCurrency.zano, CryptoCurrency.zano,
CryptoCurrency.ton, CryptoCurrency.ton,
CryptoCurrency.flip, CryptoCurrency.flip,
CryptoCurrency.deuro CryptoCurrency.deuro,
CryptoCurrency.usdtbsc,
]; ];
static const havenCurrencies = [ static const havenCurrencies = [
@ -233,6 +234,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/zano_icon.png', decimals: 12); static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/zano_icon.png', decimals: 12);
static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18); static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18);
static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18); static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18);
static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/usdtbsc_icon.png', decimals: 18);
static final Map<int, CryptoCurrency> _rawCurrencyMap = static final Map<int, CryptoCurrency> _rawCurrencyMap =
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) { [...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {

View file

@ -23,6 +23,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
// CryptoCurrency.eth, // CryptoCurrency.eth,
CryptoCurrency.ltc, CryptoCurrency.ltc,
CryptoCurrency.bch, CryptoCurrency.bch,
CryptoCurrency.usdtbsc,
// CryptoCurrency.aave, // CryptoCurrency.aave,
// CryptoCurrency.dai, // CryptoCurrency.dai,
// CryptoCurrency.gusd, // CryptoCurrency.gusd,
@ -259,7 +260,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
} }
String _normalizeCurrency(CryptoCurrency currency) { String _normalizeCurrency(CryptoCurrency currency) {
final networkTitle = currency.tag == 'ETH' ? 'ETH' : currency.title; final networkTitle = currency.tag == 'ETH' ? 'ETH' : currency.tag ?? currency.title;
return '$networkTitle.${currency.title}'; return '$networkTitle.${currency.title}';
} }

View file

@ -347,6 +347,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
return 'TRC20'; return 'TRC20';
case 'LN': case 'LN':
return 'Lightning'; return 'Lightning';
case 'BSC':
return 'BEP20';
default: default:
return tag.toLowerCase(); return tag.toLowerCase();
} }