@traund/orquezta-widget-calculator 1.1.1 → 1.1.2
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/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/dist/module.js +16 -10
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/src/calculator.js +8 -8
- package/src/data/countries.js +2 -1
- package/src/helpers/flagsHelpers.js +1 -1
package/package.json
CHANGED
package/src/calculator.js
CHANGED
|
@@ -239,7 +239,7 @@ class Calculator extends Component {
|
|
|
239
239
|
fromExchangeRate: from.exchangeRate,
|
|
240
240
|
fromCurrencyValue: from.currency,
|
|
241
241
|
toCurrencyValue: to.currency,
|
|
242
|
-
fromCountryValue: from.country === "TR" ? "
|
|
242
|
+
fromCountryValue: from.country === "TR" ? "WLT" : from.country,
|
|
243
243
|
toCountryValue: to.country,
|
|
244
244
|
coupon: data.coupon,
|
|
245
245
|
plus: data.coupon ? data.promo : 0,
|
|
@@ -331,7 +331,7 @@ class Calculator extends Component {
|
|
|
331
331
|
"US",
|
|
332
332
|
"VE",
|
|
333
333
|
"ES",
|
|
334
|
-
"
|
|
334
|
+
"WLT"
|
|
335
335
|
];
|
|
336
336
|
|
|
337
337
|
const rates = {};
|
|
@@ -352,7 +352,7 @@ class Calculator extends Component {
|
|
|
352
352
|
let usdRate = "";
|
|
353
353
|
|
|
354
354
|
if (!rates.hasOwnProperty(c)) {
|
|
355
|
-
let forceUSD = (c == "USDT" || c == "
|
|
355
|
+
let forceUSD = (c == "USDT" || c == "WLT");
|
|
356
356
|
currency = countries.find(
|
|
357
357
|
(country) => country.code == (forceUSD ? "US" : c)
|
|
358
358
|
).currency;
|
|
@@ -511,7 +511,7 @@ class Calculator extends Component {
|
|
|
511
511
|
|
|
512
512
|
updateLimits = (selectedMethod) => {
|
|
513
513
|
|
|
514
|
-
const countryData = this.state.calculator[this.state.fromCountryValue == "TR" ? "
|
|
514
|
+
const countryData = this.state.calculator[this.state.fromCountryValue == "TR" ? "WLT" : this.state.fromCountryValue];
|
|
515
515
|
let { countryMin, countryMax, usdBuy } = countryData;
|
|
516
516
|
let { usdSell } = countryData.countryTo[this.state.toCountryValue || "US"];
|
|
517
517
|
if (
|
|
@@ -711,13 +711,13 @@ class Calculator extends Component {
|
|
|
711
711
|
|
|
712
712
|
let {
|
|
713
713
|
newAmountSender,
|
|
714
|
-
} = applyTaxDiscount(this.state.fromCountryValue === "
|
|
714
|
+
} = applyTaxDiscount(this.state.fromCountryValue === "WLT" ? "TR" : this.state.fromCountryValue, this.state.toCountryValue, this.state.sendValue, this.state.receivedValue);
|
|
715
715
|
|
|
716
716
|
let model = {
|
|
717
717
|
coupon: this.state.couponValue,
|
|
718
718
|
from: {
|
|
719
719
|
amount: newAmountSender,
|
|
720
|
-
country: this.state.fromCountryValue === "
|
|
720
|
+
country: this.state.fromCountryValue === "WLT" ? "TR" : this.state.fromCountryValue,
|
|
721
721
|
currency: this.state.fromCurrencyValue,
|
|
722
722
|
},
|
|
723
723
|
to: {
|
|
@@ -1440,7 +1440,7 @@ class Calculator extends Component {
|
|
|
1440
1440
|
<span style={{ marginRight: "5px" }}>
|
|
1441
1441
|
<FlagsHelpers code={option.code == "PE-USD" ? "PE" : option.code} />
|
|
1442
1442
|
</span>
|
|
1443
|
-
{option.currency}
|
|
1443
|
+
{option.code === "WLT" ? "WLT" : option.code === "USDT"? "USDT" : option.currency}
|
|
1444
1444
|
</Box>
|
|
1445
1445
|
)}
|
|
1446
1446
|
disableClearable
|
|
@@ -1936,7 +1936,7 @@ class Calculator extends Component {
|
|
|
1936
1936
|
)[0]
|
|
1937
1937
|
}
|
|
1938
1938
|
autoHighlight
|
|
1939
|
-
|
|
1939
|
+
getOptionLabel={(option) => `${option.currency}`}
|
|
1940
1940
|
renderOption={(props, option) => (
|
|
1941
1941
|
<Box component="li" {...props}>
|
|
1942
1942
|
<span style={{ marginRight: "5px" }}>
|
package/src/data/countries.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const countries = [
|
|
2
|
-
{ code: "
|
|
2
|
+
{ code: "WLT", label: "WALLET", prefix: "+1", currency: "USDT" },
|
|
3
3
|
{ code: "PAYPAL", label: "PAYPAL", prefix: "+1", currency: "USD" },
|
|
4
|
+
{ code: "USDT",label: "USDT",prefix: "+1", currency: "USDT" },
|
|
4
5
|
{ code: "AD", label: "Andorra", prefix: "+376" },
|
|
5
6
|
{ code: "AE", label: "United Arab Emirates", prefix: "+971" },
|
|
6
7
|
{ code: "AF", label: "Afghanistan", prefix: "+93" },
|
|
@@ -6,7 +6,7 @@ const FlagsHelpers = (props) => {
|
|
|
6
6
|
if (code == "ach") code = "us";
|
|
7
7
|
|
|
8
8
|
let url = {
|
|
9
|
-
'
|
|
9
|
+
'wlt': 'https://images-traund.s3.amazonaws.com/payment-methods/Traund.svg',
|
|
10
10
|
'paypal': 'https://images-traund.s3.amazonaws.com/payment-methods/paypal.svg',
|
|
11
11
|
'usdt': 'https://images-traund.s3.amazonaws.com/payment-methods/Tether.svg',
|
|
12
12
|
'wise': 'https://images-traund.s3.amazonaws.com/payment-methods/Wise.svg',
|