@depay/widgets 6.9.0 → 6.11.0

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/umd/index.js CHANGED
@@ -1673,7 +1673,7 @@
1673
1673
  });
1674
1674
 
1675
1675
  var CardStyle = (function (style) {
1676
- return "\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 0.8rem;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 0.5rem;\n min-height: 4.78rem;\n padding: 1rem 0.6rem;\n width: 100%;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 4.3rem;\n padding: 0.4rem 1.3rem;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 1.2rem;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 1rem;\n }\n\n .Card.Row .CardImage {\n width: 2.5rem;\n }\n\n .Card.Row .CardImage img {\n height: 1.9rem;\n width: 1.9rem;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 0.5rem 0.5rem;\n margin: 0;\n }\n\n .CardImage.small {\n width: 1.7rem;\n }\n\n .CardImage.small img {\n height: 1.4rem;\n width: 1.4rem;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 0.4rem;\n }\n\n .CardImage {\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 3.6rem;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 1.4rem;\n padding-left: 0.6rem;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 99rem;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 2.8rem;\n position: relative;\n vertical-align: middle;\n width: 2.8rem;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 0.9rem;\n color: rgb(150,150,150);\n }\n \n .CardText, a .CardText {\n color: ".concat(style.colors.text, ";\n flex: 1;\n font-size: 1.3rem;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText small {\n font-size: 1.26rem;\n color: rgb(150,150,150);\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ");
1676
+ return "\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 0.8rem;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 0.5rem;\n min-height: 4.78rem;\n padding: 1rem 0.6rem;\n width: 100%;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 4.3rem;\n padding: 0.4rem 1.3rem;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 1.2rem;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 1rem;\n }\n\n .Card.Row .CardImage {\n width: 2.5rem;\n }\n\n .Card.Row .CardImage img {\n height: 1.9rem;\n width: 1.9rem;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 0.5rem 0.5rem;\n margin: 0;\n }\n\n .CardImage.small {\n width: 1.7rem;\n }\n\n .CardImage.small img {\n height: 1.4rem;\n width: 1.4rem;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 0.4rem;\n }\n\n .CardImage {\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 3.6rem;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 1.4rem;\n padding-left: 0.6rem;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 99rem;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 2.8rem;\n position: relative;\n vertical-align: middle;\n width: 2.8rem;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 0.9rem;\n color: rgb(150,150,150);\n }\n \n .CardText, a .CardText {\n color: ".concat(style.colors.text, ";\n flex: 1;\n font-size: 1.3rem;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText small {\n font-size: 1.1rem;\n color: rgb(150,150,150);\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ");
1677
1677
  });
1678
1678
 
1679
1679
  var DialogStyle = (function (style) {
@@ -2027,7 +2027,7 @@
2027
2027
  account = _useContext.account;
2028
2028
 
2029
2029
  var _useContext2 = React.useContext(ConfigurationContext),
2030
- configuredAmount = _useContext2.amount;
2030
+ amountConfiguration = _useContext2.amount;
2031
2031
 
2032
2032
  var _useContext3 = React.useContext(ConversionRateContext),
2033
2033
  conversionRate = _useContext3.conversionRate;
@@ -2040,7 +2040,7 @@
2040
2040
  acceptWithAmount = _useState4[0],
2041
2041
  setAcceptWithAmount = _useState4[1];
2042
2042
 
2043
- var _useState5 = React.useState(amountsMissing ? _typeof(configuredAmount) == "object" && configuredAmount.start ? configuredAmount.start : 1 : null),
2043
+ var _useState5 = React.useState(amountsMissing ? _typeof(amountConfiguration) == "object" && amountConfiguration.start ? amountConfiguration.start : 1 : null),
2044
2044
  _useState6 = _slicedToArray(_useState5, 2),
2045
2045
  amount = _useState6[0],
2046
2046
  setAmount = _useState6[1];
@@ -2058,51 +2058,83 @@
2058
2058
  React.useEffect(function () {
2059
2059
  setAmountsMissing(configurationsMissAmounts(props.accept));
2060
2060
  }, [props.accept]);
2061
- React.useEffect(function () {
2062
- if (amountsMissing && account && conversionRate) {
2063
- Promise.all(props.accept.map(function (configuration) {
2064
- return web3Exchanges.route({
2065
- blockchain: configuration.blockchain,
2066
- tokenIn: web3Constants.CONSTANTS[configuration.blockchain].USD,
2067
- amountIn: 1.00 / conversionRate * amount,
2068
- tokenOut: configuration.token,
2069
- fromAddress: account,
2070
- toAddress: account
2071
- });
2072
- })).then(function (routes) {
2073
- Promise.all(routes.map(function (routes, index) {
2074
- if (routes[0] == undefined) {
2075
- return;
2076
- }
2077
2061
 
2078
- return web3Tokens.Token.readable({
2079
- blockchain: props.accept[index].blockchain,
2080
- amount: routes[0].amountOut,
2081
- address: routes[0].tokenOut
2062
+ var getAmounts = function getAmounts() {
2063
+ return new Promise(function (resolve, reject) {
2064
+ if (amountConfiguration && amountConfiguration.token) {
2065
+ resolve(props.accept.map(function () {
2066
+ return amount;
2067
+ }));
2068
+ } else {
2069
+ Promise.all(props.accept.map(function (configuration) {
2070
+ return web3Exchanges.route({
2071
+ blockchain: configuration.blockchain,
2072
+ tokenIn: web3Constants.CONSTANTS[configuration.blockchain].USD,
2073
+ amountIn: 1.00 / conversionRate * amount,
2074
+ tokenOut: configuration.token,
2075
+ fromAddress: account,
2076
+ toAddress: account
2082
2077
  });
2083
- })).then(function (amounts) {
2084
- setAcceptWithAmount(props.accept.map(function (configuration, index) {
2085
- if (amounts[index] == undefined) {
2078
+ })).then(function (routes) {
2079
+ Promise.all(routes.map(function (routes, index) {
2080
+ if (routes[0] == undefined) {
2086
2081
  return;
2087
2082
  }
2088
2083
 
2089
- return {
2090
- blockchain: configuration.blockchain,
2091
- amount: round(amounts[index]),
2092
- token: configuration.token,
2093
- receiver: configuration.receiver || account
2094
- };
2095
- }).filter(function (configuration) {
2096
- return !!configuration;
2097
- }));
2084
+ return web3Tokens.Token.readable({
2085
+ blockchain: props.accept[index].blockchain,
2086
+ amount: routes[0].amountOut,
2087
+ address: routes[0].tokenOut
2088
+ });
2089
+ })).then(resolve)["catch"](setError);
2098
2090
  })["catch"](setError);
2091
+ }
2092
+ });
2093
+ };
2094
+
2095
+ React.useEffect(function () {
2096
+ if (amountsMissing && account && conversionRate) {
2097
+ getAmounts().then(function (amounts) {
2098
+ setAcceptWithAmount(props.accept.map(function (configuration, index) {
2099
+ if (amounts[index] == undefined) {
2100
+ return;
2101
+ }
2102
+
2103
+ return {
2104
+ blockchain: configuration.blockchain,
2105
+ amount: round(amounts[index]),
2106
+ token: configuration.token,
2107
+ receiver: configuration.receiver || account
2108
+ };
2109
+ }).filter(function (configuration) {
2110
+ return !!configuration;
2111
+ }));
2099
2112
  })["catch"](setError);
2100
2113
  }
2101
- }, [account, conversionRate, amount]);
2114
+ }, [amountsMissing, account, conversionRate, amount]);
2102
2115
  React.useEffect(function () {
2103
2116
  if (amountsMissing && maxRoute) {
2104
2117
  maxRoute.fromToken.readable(maxRoute.fromBalance).then(function (readableMaxAmount) {
2105
- if (maxRoute.fromToken.address == web3Constants.CONSTANTS[maxRoute.blockchain].USD) {
2118
+ if (amountConfiguration && amountConfiguration.token) {
2119
+ web3Exchanges.route({
2120
+ blockchain: maxRoute.blockchain,
2121
+ tokenIn: maxRoute.fromToken.address,
2122
+ tokenOut: maxRoute.toToken.address,
2123
+ amountIn: parseFloat(readableMaxAmount),
2124
+ fromAddress: account,
2125
+ toAddress: account
2126
+ }).then(function (routes) {
2127
+ web3Tokens.Token.readable({
2128
+ amount: routes[0].amountOut,
2129
+ blockchain: maxRoute.blockchain,
2130
+ address: maxRoute.toToken.address
2131
+ }).then(function (readableMaxAmount) {
2132
+ var slippage = 1.01;
2133
+ var maxAmount = parseFloat(new decimal_js.Decimal(readableMaxAmount).div(slippage).mul(conversionRate).toString());
2134
+ setMaxAmount(maxAmount > 10 ? Math.round(maxAmount) : round(maxAmount));
2135
+ })["catch"](setError);
2136
+ })["catch"](setError);
2137
+ } else if (maxRoute.fromToken.address == web3Constants.CONSTANTS[maxRoute.blockchain].USD) {
2106
2138
  var _maxAmount = parseFloat(new decimal_js.Decimal(readableMaxAmount).mul(conversionRate).toString());
2107
2139
 
2108
2140
  setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount) : _maxAmount);
@@ -2500,6 +2532,7 @@
2500
2532
  whitelist: props.whitelist,
2501
2533
  blacklist: props.blacklist,
2502
2534
  event: props.event,
2535
+ fee: props.fee,
2503
2536
  apiKey: apiKey
2504
2537
  }).then(function (routes) {
2505
2538
  if (routes.length == 0) {
@@ -2774,13 +2807,14 @@
2774
2807
 
2775
2808
  var _useContext5 = React.useContext(ConfigurationContext),
2776
2809
  currencyCode = _useContext5.currencyCode,
2777
- configuredAmount = _useContext5.amount;
2810
+ amountConfiguration = _useContext5.amount;
2778
2811
 
2779
2812
  var _useContext6 = React.useContext(PaymentRoutingContext);
2780
2813
  _useContext6.allRoutes;
2781
2814
 
2782
- var min = _typeof(configuredAmount) == "object" && configuredAmount.min ? configuredAmount.min : 1;
2783
- var step = _typeof(configuredAmount) == "object" && configuredAmount.step ? configuredAmount.step : 1;
2815
+ var min = _typeof(amountConfiguration) == "object" && amountConfiguration.min ? amountConfiguration.min : 1;
2816
+ var step = _typeof(amountConfiguration) == "object" && amountConfiguration.step ? amountConfiguration.step : 1;
2817
+ var displayedCurrencyCode = amountConfiguration != undefined && amountConfiguration.token ? null : currencyCode;
2784
2818
 
2785
2819
  var changeAmountAndGoBack = function changeAmountAndGoBack() {
2786
2820
  setAmount(toValidValue(parseFloat(inputAmount)));
@@ -2822,7 +2856,7 @@
2822
2856
  className: "LineHeightL FontSizeL TextCenter"
2823
2857
  }, "Change Amount"), /*#__PURE__*/React__default["default"].createElement("div", {
2824
2858
  className: "FontSizeL TextCenter FontWeightBold"
2825
- }, /*#__PURE__*/React__default["default"].createElement("strong", null, currencyCode))),
2859
+ }, /*#__PURE__*/React__default["default"].createElement("strong", null, displayedCurrencyCode))),
2826
2860
  body: /*#__PURE__*/React__default["default"].createElement("div", {
2827
2861
  className: "MaxHeight PaddingTopXS"
2828
2862
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -3125,7 +3159,8 @@
3125
3159
 
3126
3160
  var Footer = (function () {
3127
3161
  var _useContext = React.useContext(ConfigurationContext),
3128
- currencyCode = _useContext.currencyCode;
3162
+ currencyCode = _useContext.currencyCode,
3163
+ configuredAmount = _useContext.amount;
3129
3164
 
3130
3165
  var _useContext2 = React.useContext(ChangableAmountContext),
3131
3166
  amount = _useContext2.amount;
@@ -3279,6 +3314,19 @@
3279
3314
  };
3280
3315
 
3281
3316
  var mainAction = function mainAction() {
3317
+ var displayedAmount;
3318
+
3319
+ if (amount && (configuredAmount == undefined || configuredAmount.token != true)) {
3320
+ displayedAmount = new localCurrency.Currency({
3321
+ amount: amount.toFixed(2),
3322
+ code: currencyCode
3323
+ }).toString();
3324
+ } else if (paymentValue && paymentValue.toString().length) {
3325
+ displayedAmount = paymentValue.toString();
3326
+ } else {
3327
+ displayedAmount = "".concat(payment.symbol, " ").concat(payment.amount);
3328
+ }
3329
+
3282
3330
  if (paymentState == 'initialized' || paymentState == 'approving') {
3283
3331
  return /*#__PURE__*/React__default["default"].createElement("button", {
3284
3332
  className: ["ButtonPrimary", payment.route.approvalRequired && !payment.route.directTransfer ? 'disabled' : ''].join(' '),
@@ -3291,10 +3339,7 @@
3291
3339
  navigate: navigate
3292
3340
  });
3293
3341
  }
3294
- }, "Pay ", amount ? new localCurrency.Currency({
3295
- amount: amount.toFixed(2),
3296
- code: currencyCode
3297
- }).toString() : paymentValue.toString().length ? paymentValue.toString() : "".concat(payment.amount));
3342
+ }, "Pay ", displayedAmount);
3298
3343
  } else if (paymentState == 'paying') {
3299
3344
  return /*#__PURE__*/React__default["default"].createElement("a", {
3300
3345
  className: "ButtonPrimary",
@@ -3614,7 +3659,7 @@
3614
3659
  if (!!item.message.forward_to) {
3615
3660
  setTimeout(function () {
3616
3661
  props.document.location.href = item.message.forward_to;
3617
- }, 500);
3662
+ }, 200);
3618
3663
  }
3619
3664
  }
3620
3665
  };
@@ -3696,6 +3741,9 @@
3696
3741
  response.json().then(function (data) {
3697
3742
  if (data && data.forward_to) {
3698
3743
  setForwardTo(data.forward_to);
3744
+ setTimeout(function () {
3745
+ props.document.location.href = data.forward_to;
3746
+ }, 100);
3699
3747
  }
3700
3748
  });
3701
3749
  clearInterval(pollingInterval);
@@ -4121,7 +4169,8 @@
4121
4169
  whitelist: props.whitelist,
4122
4170
  blacklist: props.blacklist,
4123
4171
  event: props.event,
4124
- setMaxRoute: setMaxRoute
4172
+ setMaxRoute: setMaxRoute,
4173
+ fee: props.fee
4125
4174
  }, props.children));
4126
4175
  });
4127
4176
 
@@ -4314,12 +4363,12 @@
4314
4363
 
4315
4364
  var Payment = /*#__PURE__*/function () {
4316
4365
  var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
4317
- var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, document, unmount;
4366
+ var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, document, unmount;
4318
4367
  return regenerator.wrap(function _callee2$(_context2) {
4319
4368
  while (1) {
4320
4369
  switch (_context2.prev = _context2.next) {
4321
4370
  case 0:
4322
- accept = _ref3.accept, amount = _ref3.amount, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, whitelist = _ref3.whitelist, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, document = _ref3.document;
4371
+ accept = _ref3.accept, amount = _ref3.amount, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, whitelist = _ref3.whitelist, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, document = _ref3.document;
4323
4372
  _context2.prev = 1;
4324
4373
  _context2.next = 4;
4325
4374
  return preflight$1({
@@ -4349,7 +4398,8 @@
4349
4398
  whitelist: whitelist,
4350
4399
  blacklist: blacklist,
4351
4400
  providers: providers,
4352
- track: track
4401
+ track: track,
4402
+ fee: fee
4353
4403
  }
4354
4404
  }, /*#__PURE__*/React__default["default"].createElement(UpdatableProvider, null, /*#__PURE__*/React__default["default"].createElement(ClosableProvider, {
4355
4405
  unmount: unmount
@@ -4364,7 +4414,8 @@
4364
4414
  accept: accept,
4365
4415
  whitelist: whitelist,
4366
4416
  blacklist: blacklist,
4367
- event: event
4417
+ event: event,
4418
+ fee: fee
4368
4419
  }, /*#__PURE__*/React__default["default"].createElement(TrackingProvider, {
4369
4420
  document: ensureDocument(document)
4370
4421
  }, /*#__PURE__*/React__default["default"].createElement(PaymentProvider, {
@@ -4518,7 +4569,8 @@
4518
4569
  _useContext.amount;
4519
4570
 
4520
4571
  var _useContext2 = React.useContext(ConfigurationContext),
4521
- tokenImage = _useContext2.tokenImage;
4572
+ tokenImage = _useContext2.tokenImage,
4573
+ amountConfiguration = _useContext2.amount;
4522
4574
 
4523
4575
  var _useContext3 = React.useContext(PaymentValueContext),
4524
4576
  paymentValue = _useContext3.paymentValue;
@@ -4540,7 +4592,7 @@
4540
4592
  setSalePerTokenValue = _useState2[1];
4541
4593
 
4542
4594
  React.useEffect(function () {
4543
- if (paymentValue) {
4595
+ if (paymentValue && (amountConfiguration == undefined || amountConfiguration.token != true)) {
4544
4596
  setSalePerTokenValue(new localCurrency.Currency({
4545
4597
  amount: (paymentValue.amount / parseFloat(toTokenReadableAmount)).toFixed(2),
4546
4598
  code: paymentValue.code
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/widgets",
3
3
  "moduleName": "DePayWidgets",
4
- "version": "6.9.0",
4
+ "version": "6.11.0",
5
5
  "description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
6
6
  "main": "./dist/umd/index.js",
7
7
  "module": "./dist/esm/index.js",
@@ -43,7 +43,7 @@
43
43
  "@depay/web3-client": "^8.0.0",
44
44
  "@depay/web3-constants": "^5.0.0",
45
45
  "@depay/web3-exchanges": "^8.1.0",
46
- "@depay/web3-payments": "^9.1.0",
46
+ "@depay/web3-payments": "^9.2.0",
47
47
  "@depay/web3-tokens": "^8.0.0",
48
48
  "@depay/web3-wallets": "^8.1.0",
49
49
  "decimal.js": "^10.3.1",