mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
remove global swap warning message (will be replaced in future with per exchange info)
This commit is contained in:
parent
eeda23417c
commit
3d9a8c3a3c
2 changed files with 12 additions and 48 deletions
|
@ -712,7 +712,6 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
ref.read(efSendAmountProvider.notifier).state = null;
|
ref.read(efSendAmountProvider.notifier).state = null;
|
||||||
ref.read(efReceiveAmountProvider.notifier).state = null;
|
ref.read(efReceiveAmountProvider.notifier).state = null;
|
||||||
ref.read(efReversedProvider.notifier).state = false;
|
ref.read(efReversedProvider.notifier).state = false;
|
||||||
ref.read(efWarningProvider.notifier).state = "";
|
|
||||||
ref.read(efRefreshingProvider.notifier).state = false;
|
ref.read(efRefreshingProvider.notifier).state = false;
|
||||||
ref.read(efCurrencyPairProvider).setSend(null, notifyListeners: true);
|
ref.read(efCurrencyPairProvider).setSend(null, notifyListeners: true);
|
||||||
ref
|
ref
|
||||||
|
@ -839,12 +838,12 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: isDesktop ? 10 : 4,
|
height: isDesktop ? 10 : 4,
|
||||||
),
|
),
|
||||||
if (ref.watch(efWarningProvider).isNotEmpty &&
|
// if (ref.watch(efWarningProvider).isNotEmpty &&
|
||||||
!ref.watch(efReversedProvider))
|
// !ref.watch(efReversedProvider))
|
||||||
Text(
|
// Text(
|
||||||
ref.watch(efWarningProvider),
|
// ref.watch(efWarningProvider),
|
||||||
style: STextStyles.errorSmall(context),
|
// style: STextStyles.errorSmall(context),
|
||||||
),
|
// ),
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
@ -924,12 +923,12 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
ref.watch(efExchangeProvider).name ==
|
ref.watch(efExchangeProvider).name ==
|
||||||
ChangeNowExchange.exchangeName,
|
ChangeNowExchange.exchangeName,
|
||||||
),
|
),
|
||||||
if (ref.watch(efWarningProvider).isNotEmpty &&
|
// if (ref.watch(efWarningProvider).isNotEmpty &&
|
||||||
ref.watch(efReversedProvider))
|
// ref.watch(efReversedProvider))
|
||||||
Text(
|
// Text(
|
||||||
ref.watch(efWarningProvider),
|
// ref.watch(efWarningProvider),
|
||||||
style: STextStyles.errorSmall(context),
|
// style: STextStyles.errorSmall(context),
|
||||||
),
|
// ),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: isDesktop ? 20 : 12,
|
height: isDesktop ? 20 : 12,
|
||||||
),
|
),
|
||||||
|
|
|
@ -79,38 +79,3 @@ final efCanExchangeProvider = StateProvider<bool>((ref) {
|
||||||
});
|
});
|
||||||
|
|
||||||
final efRefreshingProvider = StateProvider<bool>((ref) => false);
|
final efRefreshingProvider = StateProvider<bool>((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 "";
|
|
||||||
});
|
|
||||||
|
|
Loading…
Reference in a new issue