add USDT Binance Smart Chain (BSC) support (#2341)
Serhii committed
Jun 27, 2025 at 15:47 UTC
d0827dd39e660bc30152f67d3bfbf41450ed4ba6
4 files changed
+7
-2
assets/images/usdtbsc_icon.png
Binary files /dev/null and b/assets/images/usdtbsc_icon.png differ
cw_core/lib/crypto_currency.dart
+3
-1
@@ -111,7 +111,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
111
CryptoCurrency.zano,
112
CryptoCurrency.ton,
113
CryptoCurrency.flip,
114
- CryptoCurrency.deuro
114
+ CryptoCurrency.deuro,
115
+ CryptoCurrency.usdtbsc,
116
];
117
118
static const havenCurrencies = [
@@ -233,6 +234,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
234
static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/zano_icon.png', decimals: 12);
235
static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18);
236
static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18);
237
+ static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/usdtbsc_icon.png', decimals: 18);
238
239
static final Map<int, CryptoCurrency> _rawCurrencyMap =
240
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
lib/exchange/provider/thorchain_exchange.provider.dart
+2
-1
@@ -23,6 +23,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
23
// CryptoCurrency.eth,
24
CryptoCurrency.ltc,
25
CryptoCurrency.bch,
26
+ CryptoCurrency.usdtbsc,
27
// CryptoCurrency.aave,
28
// CryptoCurrency.dai,
29
// CryptoCurrency.gusd,
@@ -259,7 +260,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
260
}
261
262
String _normalizeCurrency(CryptoCurrency currency) {
262
- final networkTitle = currency.tag == 'ETH' ? 'ETH' : currency.title;
263
+ final networkTitle = currency.tag == 'ETH' ? 'ETH' : currency.tag ?? currency.title;
264
return '$networkTitle.${currency.title}';
265
}
266
lib/exchange/provider/trocador_exchange_provider.dart
+2
@@ -347,6 +347,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
347
return 'TRC20';
348
case 'LN':
349
return 'Lightning';
350
+ case 'BSC':
351
+ return 'BEP20';
352
default:
353
return tag.toLowerCase();
354
}