From 3bcd31ac44d95235bfb03a46497b71919c3ba28e Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 2 Dec 2022 20:38:16 +0200 Subject: [PATCH] calculate best rate based on min/max amount --- lib/view_model/exchange/exchange_view_model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index fd66a4254..f9d832843 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -296,7 +296,7 @@ abstract class ExchangeViewModelBase with Store { } Future _calculateBestRate() async { - final amount = double.tryParse(depositAmount) ?? double.tryParse(receiveAmount) ?? 1; + final amount = limits.min ?? limits.max ?? 1; final result = await Future.wait( _tradeAvailableProviders