tg-core-components 6.1.3-crypto.16 → 6.1.3-crypto.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Money/index.js +4 -4
- package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +4 -1
- package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +4 -1
- package/lib/components/Money/index.js +4 -4
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +4 -1
- package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +4 -1
- package/package.json +1 -1
|
@@ -11,9 +11,9 @@ var fractionDigits = {
|
|
|
11
11
|
BTC: { min: 5, max: 5 },
|
|
12
12
|
LTC: { min: 5, max: 5 },
|
|
13
13
|
XBC: { min: 5, max: 5 },
|
|
14
|
-
XRP: { min: 5, max: 5 },
|
|
15
14
|
ETH: { min: 5, max: 5 },
|
|
16
|
-
BCH: { min: 5, max: 5 }
|
|
15
|
+
BCH: { min: 5, max: 5 },
|
|
16
|
+
XRP: { min: 3, max: 3 }
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -21,8 +21,8 @@ var fractionDigits = {
|
|
|
21
21
|
*/
|
|
22
22
|
var Money = function Money(props) {
|
|
23
23
|
return React.createElement(FormattedNumber, _extends({
|
|
24
|
-
minimumFractionDigits: props.decimals
|
|
25
|
-
maximumFractionDigits: props.decimals
|
|
24
|
+
minimumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].min || 2 : 0,
|
|
25
|
+
maximumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].max || 2 : 0
|
|
26
26
|
}, props, {
|
|
27
27
|
style: 'currency'
|
|
28
28
|
}));
|
|
@@ -265,7 +265,10 @@ var DepositWidget = function (_Component) {
|
|
|
265
265
|
if (amount < parseFloat(selectedMethod.limit.min) || amount < parseFloat(_this2.getMinDepositBonusAmount())) {
|
|
266
266
|
errors.amount.push(React.createElement(Translate, {
|
|
267
267
|
id: 'error.cashier.amount-below-method-limit',
|
|
268
|
-
defaultMessage: 'Amount is too low.'
|
|
268
|
+
defaultMessage: 'Amount is too low. Min amount: {min}',
|
|
269
|
+
values: {
|
|
270
|
+
min: Math.min(parseFloat(selectedMethod.limit.min), parseFloat(_this2.getMinDepositBonusAmount()))
|
|
271
|
+
}
|
|
269
272
|
}));
|
|
270
273
|
return errors;
|
|
271
274
|
}
|
|
@@ -145,7 +145,10 @@ var WithdrawWidget = function (_PureComponent) {
|
|
|
145
145
|
if (Number(amount) < parseFloat(selectedMethod.limit.min)) {
|
|
146
146
|
errors.amount.push(React.createElement(Translate, {
|
|
147
147
|
id: 'error.cashier.amount-below-method-limit',
|
|
148
|
-
defaultMessage: 'Amount is too low.'
|
|
148
|
+
defaultMessage: 'Amount is too low. Min amount: {min}',
|
|
149
|
+
values: {
|
|
150
|
+
min: parseFloat(selectedMethod.limit.min)
|
|
151
|
+
}
|
|
149
152
|
}));
|
|
150
153
|
return errors;
|
|
151
154
|
}
|
|
@@ -26,9 +26,9 @@ var fractionDigits = {
|
|
|
26
26
|
BTC: { min: 5, max: 5 },
|
|
27
27
|
LTC: { min: 5, max: 5 },
|
|
28
28
|
XBC: { min: 5, max: 5 },
|
|
29
|
-
XRP: { min: 5, max: 5 },
|
|
30
29
|
ETH: { min: 5, max: 5 },
|
|
31
|
-
BCH: { min: 5, max: 5 }
|
|
30
|
+
BCH: { min: 5, max: 5 },
|
|
31
|
+
XRP: { min: 3, max: 3 }
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -36,8 +36,8 @@ var fractionDigits = {
|
|
|
36
36
|
*/
|
|
37
37
|
var Money = function Money(props) {
|
|
38
38
|
return _react2.default.createElement(_reactIntl.FormattedNumber, _extends({
|
|
39
|
-
minimumFractionDigits: props.decimals
|
|
40
|
-
maximumFractionDigits: props.decimals
|
|
39
|
+
minimumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].min || 2 : 0,
|
|
40
|
+
maximumFractionDigits: props.decimals ? fractionDigits[props.currency] && fractionDigits[props.currency].max || 2 : 0
|
|
41
41
|
}, props, {
|
|
42
42
|
style: 'currency'
|
|
43
43
|
}));
|
|
@@ -330,7 +330,10 @@ var DepositWidget = function (_Component) {
|
|
|
330
330
|
if (amount < parseFloat(selectedMethod.limit.min) || amount < parseFloat(_this2.getMinDepositBonusAmount())) {
|
|
331
331
|
errors.amount.push(_react2.default.createElement(_Translate2.default, {
|
|
332
332
|
id: 'error.cashier.amount-below-method-limit',
|
|
333
|
-
defaultMessage: 'Amount is too low.'
|
|
333
|
+
defaultMessage: 'Amount is too low. Min amount: {min}',
|
|
334
|
+
values: {
|
|
335
|
+
min: Math.min(parseFloat(selectedMethod.limit.min), parseFloat(_this2.getMinDepositBonusAmount()))
|
|
336
|
+
}
|
|
334
337
|
}));
|
|
335
338
|
return errors;
|
|
336
339
|
}
|
|
@@ -202,7 +202,10 @@ var WithdrawWidget = function (_PureComponent) {
|
|
|
202
202
|
if (Number(amount) < parseFloat(selectedMethod.limit.min)) {
|
|
203
203
|
errors.amount.push(_react2.default.createElement(_Translate2.default, {
|
|
204
204
|
id: 'error.cashier.amount-below-method-limit',
|
|
205
|
-
defaultMessage: 'Amount is too low.'
|
|
205
|
+
defaultMessage: 'Amount is too low. Min amount: {min}',
|
|
206
|
+
values: {
|
|
207
|
+
min: parseFloat(selectedMethod.limit.min)
|
|
208
|
+
}
|
|
206
209
|
}));
|
|
207
210
|
return errors;
|
|
208
211
|
}
|