calculate best rate based on deposit/receive amount

This commit is contained in:
OmarHatem 2022-12-02 23:20:06 +02:00
parent 3bcd31ac44
commit 116e468581

View file

@ -296,7 +296,7 @@ abstract class ExchangeViewModelBase with Store {
} }
Future<void> _calculateBestRate() async { Future<void> _calculateBestRate() async {
final amount = limits.min ?? limits.max ?? 1; final amount = double.tryParse(isFixedRateMode ? receiveAmount : depositAmount) ?? 1;
final result = await Future.wait<double>( final result = await Future.wait<double>(
_tradeAvailableProviders _tradeAvailableProviders