CWA-199 | fixed receive amount for empty deposit amount; added correction to xmr limits
Oleksandr Sobol committed
Apr 13, 2020 at 20:07 UTC
99c732aab0d2a5ec5fe28dabeba1293a72c23bc8
2 files changed
+5
-3
lib/src/domain/exchange/xmrto/xmrto_exchange_provider.dart
+3
-3
@@ -68,9 +68,9 @@ class XMRTOExchangeProvider extends ExchangeProvider {
68
69
if (price > 0) {
70
try {
71
- min /= price;
72
- min = limitsFormat(min) + correction;
73
- max /= price;
71
+ min = min/price + correction;
72
+ min = limitsFormat(min);
73
+ max = max/price - correction;
74
max = limitsFormat(max);
75
} catch (e) {
76
min = 0;
lib/src/stores/exchange/exchange_store.dart
+2
@@ -107,6 +107,7 @@ abstract class ExchangeStoreBase with Store {
107
108
if (amount == null || amount.isEmpty) {
109
depositAmount = '';
110
+ receiveAmount = '';
111
return;
112
}
113
@@ -125,6 +126,7 @@ abstract class ExchangeStoreBase with Store {
126
127
if (amount == null || amount.isEmpty) {
128
depositAmount = '';
129
+ receiveAmount = '';
130
return;
131
}
132