From 99c732aab0d2a5ec5fe28dabeba1293a72c23bc8 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Mon, 13 Apr 2020 20:07:26 +0300 Subject: [PATCH] CWA-199 | fixed receive amount for empty deposit amount; added correction to xmr limits --- lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart | 6 +++--- lib/src/stores/exchange/exchange_store.dart | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart b/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart index 47f5716d8..ee58771d1 100644 --- a/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart +++ b/lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart @@ -68,9 +68,9 @@ class XMRTOExchangeProvider extends ExchangeProvider { if (price > 0) { try { - min /= price; - min = limitsFormat(min) + correction; - max /= price; + min = min/price + correction; + min = limitsFormat(min); + max = max/price - correction; max = limitsFormat(max); } catch (e) { min = 0; diff --git a/lib/src/stores/exchange/exchange_store.dart b/lib/src/stores/exchange/exchange_store.dart index df8f9b618..a5f41444b 100644 --- a/lib/src/stores/exchange/exchange_store.dart +++ b/lib/src/stores/exchange/exchange_store.dart @@ -107,6 +107,7 @@ abstract class ExchangeStoreBase with Store { if (amount == null || amount.isEmpty) { depositAmount = ''; + receiveAmount = ''; return; } @@ -125,6 +126,7 @@ abstract class ExchangeStoreBase with Store { if (amount == null || amount.isEmpty) { depositAmount = ''; + receiveAmount = ''; return; }