calculate best rate based on min/max amount
OmarHatem committed
Dec 2, 2022 at 20:38 UTC
3bcd31ac44d95235bfb03a46497b71919c3ba28e
1 file changed
+1
-1
lib/view_model/exchange/exchange_view_model.dart
+1
-1
@@ -296,7 +296,7 @@ abstract class ExchangeViewModelBase with Store {
296
}
297
298
Future<void> _calculateBestRate() async {
299
- final amount = double.tryParse(depositAmount) ?? double.tryParse(receiveAmount) ?? 1;
299
+ final amount = limits.min ?? limits.max ?? 1;
300
301
final result = await Future.wait<double>(
302
_tradeAvailableProviders