calculate best rate based on min/max amount

This commit is contained in:
OmarHatem 2022-12-02 20:38:16 +02:00
parent 091ac41ee2
commit 3bcd31ac44

View file

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