@depay/widgets 7.14.1 → 7.14.4

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
@@ -1362,7 +1362,7 @@
1362
1362
  });
1363
1363
 
1364
1364
  var PoweredByStyle = (function (style) {
1365
- return "\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n color: ".concat(style.colors.primary, ";\n }\n ");
1365
+ return "\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ";
1366
1366
  });
1367
1367
 
1368
1368
  var RangeSliderStyle = (function (style) {
@@ -1417,7 +1417,7 @@
1417
1417
  }, ((_style = style) === null || _style === void 0 ? void 0 : _style.colors) || {}),
1418
1418
  fontFamily: ((_style2 = style) === null || _style2 === void 0 ? void 0 : _style2.fontFamily) || '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
1419
1419
  };
1420
- return [ResetStyle(), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(style), GraphicStyle(), SkeletonStyle(), TokenAmountStyle(), TextStyle(style), FontStyle(style), IconStyle(style), OpacityStyle(), PaddingStyle(), HeightStyle(), LoadingTextStyle(style), RangeSliderStyle(style), InputStyle(), TextButtonStyle(style), ImageStyle(), BlockchainLogoStyle(), SearchStyle(style), TokenImageStyle(), AlertStyle(), TableStyle(), LinkStyle(style), TooltipStyle(style)].join('');
1420
+ return [ResetStyle(), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(), GraphicStyle(), SkeletonStyle(), TokenAmountStyle(), TextStyle(style), FontStyle(style), IconStyle(style), OpacityStyle(), PaddingStyle(), HeightStyle(), LoadingTextStyle(style), RangeSliderStyle(style), InputStyle(), TextButtonStyle(style), ImageStyle(), BlockchainLogoStyle(), SearchStyle(style), TokenImageStyle(), AlertStyle(), TableStyle(), LinkStyle(style), TooltipStyle(style)].join('');
1421
1421
  });
1422
1422
 
1423
1423
  var mount = (function (_ref, content) {
@@ -1467,7 +1467,7 @@
1467
1467
  return /*#__PURE__*/React__default["default"].createElement("div", {
1468
1468
  className: "PoweredByWrapper"
1469
1469
  }, /*#__PURE__*/React__default["default"].createElement("a", {
1470
- href: 'https://depay.fi?utm_source=' + window.location.hostname + '&utm_medium=widget&utm_campaign=WidgetV2',
1470
+ href: 'https://depay.com',
1471
1471
  rel: "noopener noreferrer",
1472
1472
  target: "_blank",
1473
1473
  className: "PoweredByLink"
@@ -1655,7 +1655,12 @@
1655
1655
  focusToFixed = parseFloat(_float).toFixed(1).replace('.', '');
1656
1656
  }
1657
1657
 
1658
- if (focusToFixed.toString()[0] != "0" && focusToFixed.toString().length > 2) {
1658
+ if (focusToFixed == '099' && parseInt(inputAsFloat.toFixed(0)) == 0) {
1659
+ focusToFixed = direction == 'up' ? '100' : '990';
1660
+ return parseFloat(digitsAfterDecimal.replace(/\d{3}$/, focusToFixed));
1661
+ } else if (focusToFixed == '100' && parseInt(inputAsFloat.toFixed(0)) == 0) {
1662
+ return parseFloat(digitsAfterDecimal.replace(/\d{4}$/, focusToFixed));
1663
+ } else if (focusToFixed.toString()[0] != "0" && focusToFixed.toString().length > 2) {
1659
1664
  return parseInt(inputAsFloat.toFixed(0));
1660
1665
  } else {
1661
1666
  return parseFloat(digitsAfterDecimal.replace(/\d{3}$/, focusToFixed));
@@ -21189,7 +21194,7 @@
21189
21194
  set = _useContext4.set;
21190
21195
 
21191
21196
  var openSocket = function openSocket(transaction) {
21192
- var socket = new WebSocket('wss://integrate.depay.fi/cable');
21197
+ var socket = new WebSocket('wss://integrate.depay.com/cable');
21193
21198
 
21194
21199
  socket.onopen = function (event) {
21195
21200
  var msg = {
@@ -21293,7 +21298,7 @@
21293
21298
  to_decimals: paymentRoute.toDecimals,
21294
21299
  fee_amount: paymentRoute === null || paymentRoute === void 0 ? void 0 : (_paymentRoute$feeAmou = paymentRoute.feeAmount) === null || _paymentRoute$feeAmou === void 0 ? void 0 : _paymentRoute$feeAmou.toString()
21295
21300
  }).then(function (response) {
21296
- if (response.status != 200) {
21301
+ if (response.status != 200 && response.status != 201) {
21297
21302
  retryStartTracking(transaction, afterBlock, paymentRoute, attempt);
21298
21303
  }
21299
21304
  })["catch"](function (error) {
@@ -21317,7 +21322,7 @@
21317
21322
  };
21318
21323
 
21319
21324
  var handleResponse = function handleResponse(response) {
21320
- if (response.status == 200) {
21325
+ if (response.status == 200 || response.status == 201) {
21321
21326
  response.json().then(function (data) {
21322
21327
  if (data && data.forward_to) {
21323
21328
  setForwardTo(data.forward_to);
@@ -21370,7 +21375,7 @@
21370
21375
  return;
21371
21376
  }
21372
21377
 
21373
- fetch('https://public.depay.fi/payments', {
21378
+ fetch('https://public.depay.com/payments', {
21374
21379
  headers: {
21375
21380
  'Content-Type': 'application/json'
21376
21381
  },
@@ -21463,7 +21468,7 @@
21463
21468
  React.useEffect(function () {
21464
21469
  if (polling) {
21465
21470
  var poll = function poll() {
21466
- fetch("https://public.depay.fi/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
21471
+ fetch("https://public.depay.com/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
21467
21472
  if (response.status == 200) {
21468
21473
  response.json().then(function (data) {
21469
21474
  if (data.status != 'pending') {
@@ -21492,7 +21497,7 @@
21492
21497
  return;
21493
21498
  }
21494
21499
 
21495
- fetch('https://public.depay.fi/transactions', {
21500
+ fetch('https://public.depay.com/transactions', {
21496
21501
  method: 'POST',
21497
21502
  headers: {
21498
21503
  'Content-Type': 'application/json'
@@ -21522,7 +21527,7 @@
21522
21527
  };
21523
21528
 
21524
21529
  var openSocket = function openSocket(transaction) {
21525
- var socket = new WebSocket('wss://integrate.depay.fi/cable');
21530
+ var socket = new WebSocket('wss://integrate.depay.com/cable');
21526
21531
 
21527
21532
  socket.onopen = function (event) {
21528
21533
  var msg = {
@@ -23032,7 +23037,7 @@
23032
23037
  };
23033
23038
 
23034
23039
  var searchTokens = React.useCallback(lodash.debounce(function (term, blockchainName) {
23035
- fetch("https://public.depay.fi/tokens/search?blockchain=".concat(blockchainName, "&term=").concat(term)).then(function (response) {
23040
+ fetch("https://public.depay.com/tokens/search?blockchain=".concat(blockchainName, "&term=").concat(term)).then(function (response) {
23036
23041
  if (response.status == 200) {
23037
23042
  response.json().then(function (tokens) {
23038
23043
  setTokens(tokens);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/widgets",
3
3
  "moduleName": "DePayWidgets",
4
- "version": "7.14.1",
4
+ "version": "7.14.4",
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",
@@ -18,7 +18,7 @@
18
18
  "crypto",
19
19
  "cryptocurrencies"
20
20
  ],
21
- "author": "DePay",
21
+ "author": "depay.com",
22
22
  "license": "MIT",
23
23
  "scripts": {
24
24
  "build": "rm -rf dist && npx rollup --config rollup.module.config.js && npx rollup --config rollup.bundle.config.js",
@@ -34,17 +34,17 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@depay/coinbase-wallet-sdk": "^1.0.5",
37
- "@depay/local-currency": "^3.5.2",
37
+ "@depay/local-currency": "^3.5.3",
38
38
  "@depay/react-dialog-stack": "^7.0.0",
39
39
  "@depay/react-shadow-dom": "^5.0.2",
40
- "@depay/react-token-image": "^4.1.0",
40
+ "@depay/react-token-image": "^4.2.2",
41
41
  "@depay/walletconnect-v1": "^1.7.8",
42
- "@depay/web3-assets": "^6.5.0",
42
+ "@depay/web3-assets": "^6.5.1",
43
43
  "@depay/web3-blockchains": "^5.0.1",
44
44
  "@depay/web3-client": "^8.5.0",
45
45
  "@depay/web3-constants": "^6.0.0",
46
46
  "@depay/web3-exchanges": "^9.2.0",
47
- "@depay/web3-payments": "^10.6.0",
47
+ "@depay/web3-payments": "^10.6.1",
48
48
  "@depay/web3-tokens": "^8.2.0",
49
49
  "@depay/web3-wallets": "^11.1.1",
50
50
  "decimal.js": "^10.3.1"