mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
quick-fix-for-the-Trocador-swap (#2695)
* update network tag logic in Trocador provider * fix fiat amount * Update trocador_exchange_provider.dart --------- Co-authored-by: Serhii-Borodenko <17529954+Serhii-Borodenko@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii-Borodenko
parent
20022c0393
commit
da478b5421
@@ -423,13 +423,15 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
||||
final fromCurrency = responseJSON['ticker_from'] as String;
|
||||
final fromNetwork = responseJSON['network_from'] as String?;
|
||||
final _normalizedFromNetwork = _normalizeNetworkType(fromNetwork ?? '');
|
||||
final fromTag = _normalizedFromNetwork.isEmpty || _normalizedFromNetwork == 'Mainnet' ? null : _normalizedFromNetwork;
|
||||
final fromTag = _normalizedFromNetwork.isEmpty || _normalizedFromNetwork == fromCurrency.toUpperCase() || _normalizedFromNetwork == 'Mainnet'
|
||||
? null : _normalizedFromNetwork;
|
||||
|
||||
final from = CryptoCurrency.safeParseCurrencyFromString(fromCurrency, tag: fromTag);
|
||||
|
||||
|
||||
final toCurrency = responseJSON['ticker_to'] as String;
|
||||
final networkTo = responseJSON['network_to'] as String?;
|
||||
final _normalizedToNetwork = _normalizeNetworkType(networkTo ?? '');
|
||||
final toTag = _normalizedToNetwork.isEmpty || _normalizedToNetwork == 'Mainnet' ? null : _normalizedToNetwork;
|
||||
final toTag = _normalizedToNetwork.isEmpty || _normalizedToNetwork == toCurrency.toUpperCase() || _normalizedFromNetwork == 'Mainnet' ? null : _normalizedToNetwork;
|
||||
final to = CryptoCurrency.safeParseCurrencyFromString(toCurrency, tag: toTag);
|
||||
|
||||
return Trade(
|
||||
|
||||
Reference in New Issue
Block a user