minor fix

This commit is contained in:
Serhii 2024-01-30 15:09:46 +02:00
parent 085fa71c7a
commit 53441e7c2a

View file

@ -25,7 +25,6 @@ class ThorChainExchangeProvider extends ExchangeProvider {
CryptoCurrency.btc, CryptoCurrency.btc,
CryptoCurrency.eth, CryptoCurrency.eth,
CryptoCurrency.ltc, CryptoCurrency.ltc,
CryptoCurrency.bch,
].contains(element)) ].contains(element))
.toList()) .toList())
]; ];
@ -79,6 +78,8 @@ class ThorChainExchangeProvider extends ExchangeProvider {
'from_asset': _normalizeCurrency(from), 'from_asset': _normalizeCurrency(from),
'to_asset': _normalizeCurrency(to), 'to_asset': _normalizeCurrency(to),
'amount': AmountConverter.amountToSmallestUnit(cryptoCurrency: from, amount: 1).toString(), 'amount': AmountConverter.amountToSmallestUnit(cryptoCurrency: from, amount: 1).toString(),
'affiliate': _affiliateName,
'affiliate_bps': _affiliateBps
}; };
final responseJSON = await _getSwapQuote(params); final responseJSON = await _getSwapQuote(params);
@ -141,7 +142,6 @@ class ThorChainExchangeProvider extends ExchangeProvider {
}; };
final responseJSON = await _getSwapQuote(params); final responseJSON = await _getSwapQuote(params);
print(responseJSON);
final expectedAmountOutString = responseJSON['expected_amount_out'] as String? ?? '0'; final expectedAmountOutString = responseJSON['expected_amount_out'] as String? ?? '0';
final expectedAmountOut = double.parse(expectedAmountOutString); final expectedAmountOut = double.parse(expectedAmountOutString);