From 3aa1386ecfbca14271bf01a73b424de19c4fd484 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 20 Mar 2024 18:00:49 +0200 Subject: [PATCH] fix fetching rate for thorchain --- lib/exchange/provider/thorchain_exchange.provider.dart | 2 +- lib/view_model/send/send_view_model.dart | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/exchange/provider/thorchain_exchange.provider.dart b/lib/exchange/provider/thorchain_exchange.provider.dart index 3f31a420a..f928f1ecf 100644 --- a/lib/exchange/provider/thorchain_exchange.provider.dart +++ b/lib/exchange/provider/thorchain_exchange.provider.dart @@ -68,7 +68,7 @@ class ThorChainExchangeProvider extends ExchangeProvider { required bool isFixedRateMode, required bool isReceiveAmount}) async { try { - if (amount == 0) return 0.0; + amount = 1; final params = { 'from_asset': _normalizeCurrency(from), diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 329ee4375..cfee912aa 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -302,8 +302,6 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor state = IsExecutingState(); pendingTransaction = await wallet.createTransaction(_credentials()); if (provider is ThorChainExchangeProvider) { - print('Output count: ${pendingTransaction?.outputCount}'); - print('provider is ThorChainExchangeProvider and pendingTransaction is ${provider.runtimeType}'); final outputCount = pendingTransaction?.outputCount ?? 0; if (outputCount > 10) throw Exception("ThorChain does not support more than 10 outputs"); }