diff --git a/lib/pages/exchange_view/exchange_form.dart b/lib/pages/exchange_view/exchange_form.dart index 889374958..6e7deaa5a 100644 --- a/lib/pages/exchange_view/exchange_form.dart +++ b/lib/pages/exchange_view/exchange_form.dart @@ -712,7 +712,6 @@ class _ExchangeFormState extends ConsumerState { ref.read(efSendAmountProvider.notifier).state = null; ref.read(efReceiveAmountProvider.notifier).state = null; ref.read(efReversedProvider.notifier).state = false; - ref.read(efWarningProvider.notifier).state = ""; ref.read(efRefreshingProvider.notifier).state = false; ref.read(efCurrencyPairProvider).setSend(null, notifyListeners: true); ref @@ -839,12 +838,12 @@ class _ExchangeFormState extends ConsumerState { SizedBox( height: isDesktop ? 10 : 4, ), - if (ref.watch(efWarningProvider).isNotEmpty && - !ref.watch(efReversedProvider)) - Text( - ref.watch(efWarningProvider), - style: STextStyles.errorSmall(context), - ), + // if (ref.watch(efWarningProvider).isNotEmpty && + // !ref.watch(efReversedProvider)) + // Text( + // ref.watch(efWarningProvider), + // style: STextStyles.errorSmall(context), + // ), Row( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -924,12 +923,12 @@ class _ExchangeFormState extends ConsumerState { ref.watch(efExchangeProvider).name == ChangeNowExchange.exchangeName, ), - if (ref.watch(efWarningProvider).isNotEmpty && - ref.watch(efReversedProvider)) - Text( - ref.watch(efWarningProvider), - style: STextStyles.errorSmall(context), - ), + // if (ref.watch(efWarningProvider).isNotEmpty && + // ref.watch(efReversedProvider)) + // Text( + // ref.watch(efWarningProvider), + // style: STextStyles.errorSmall(context), + // ), SizedBox( height: isDesktop ? 20 : 12, ), diff --git a/lib/providers/exchange/exchange_form_state_provider.dart b/lib/providers/exchange/exchange_form_state_provider.dart index 0eec46c92..7effb6993 100644 --- a/lib/providers/exchange/exchange_form_state_provider.dart +++ b/lib/providers/exchange/exchange_form_state_provider.dart @@ -79,38 +79,3 @@ final efCanExchangeProvider = StateProvider((ref) { }); final efRefreshingProvider = StateProvider((ref) => false); - -final efWarningProvider = StateProvider((ref) { - // if (ref.watch(efReversedProvider)) { - // final _receiveCurrency = - // ref.watch(efCurrencyPairProvider.select((value) => value.receive)); - // final _receiveAmount = ref.watch(efReceiveAmountProvider); - // if (_receiveCurrency != null && _receiveAmount != null) { - // final range = ref.watch(efRangeProvider); - // if (range?.min != null && - // _receiveAmount < range!.min! && - // _receiveAmount > Decimal.zero) { - // return "Min receive amount ${range.min!.toString()} ${_receiveCurrency.ticker.toUpperCase()}"; - // } else if (range?.max != null && - // _receiveAmount > ref.watch(efRangeProvider)!.max!) { - // return "Max receive amount $range!.max!.toString()} ${_receiveCurrency.ticker.toUpperCase()}"; - // } - // } - // } else { - // final _sendCurrency = - // ref.watch(efCurrencyPairProvider.select((value) => value.send)); - // final _sendAmount = ref.watch(efSendAmountProvider); - // if (_sendCurrency != null && _sendAmount != null) { - // final range = ref.watch(efRangeProvider); - // if (range?.min != null && - // _sendAmount < range!.min! && - // _sendAmount > Decimal.zero) { - // return "Min send amount ${range.min!.toString()} ${_sendCurrency.ticker.toUpperCase()}"; - // } else if (range?.max != null && _sendAmount > range!.max!) { - // return "Max send amount ${range.max!.toString()} ${_sendCurrency.ticker.toUpperCase()}"; - // } - // } - // } - - return ""; -});