diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 047ea8397..6cafde9bd 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -669,12 +669,20 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with if (limitsState is LimitsLoadedSuccessfully) { if (double.tryParse(amount) == null) continue; - if (limits.min != null && double.parse(amount) < limits.min!) + if (limits.min != null && double.parse(amount) < limits.min!) { continue; - else if (limits.max != null && double.parse(amount) > limits.max!) + } else if (limits.max != null && double.parse(amount) > limits.max!) { continue; - else { + } else { try { + if (provider is SwapTradeExchangeProvider) { + final destinationAmount = (fiatConversionStore.prices[request.toCurrency] ?? 0.00) * (double.tryParse(request.toAmount) ?? 0.00); + final sendingAmount = (fiatConversionStore.prices[request.fromCurrency] ?? 0.00) * (double.tryParse(request.fromAmount) ?? 0.00); + + if (destinationAmount > 2000 || sendingAmount > 2000) { + continue; + } + } tradeState = TradeIsCreating(); final trade = await provider.createTrade( request: request,