@depay/widgets 7.14.2 → 7.15.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
@@ -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));
@@ -20246,12 +20251,14 @@
20246
20251
 
20247
20252
  var _useContext2 = React.useContext(ConfigurationContext),
20248
20253
  blacklist = _useContext2.blacklist,
20254
+ whitelist = _useContext2.whitelist,
20249
20255
  fee = _useContext2.fee;
20250
20256
 
20251
20257
  return /*#__PURE__*/React__default["default"].createElement(DonationRoutingContext.Provider, {
20252
20258
  value: {}
20253
20259
  }, /*#__PURE__*/React__default["default"].createElement(PaymentRoutingProvider, {
20254
20260
  accept: acceptWithAmount,
20261
+ whitelist: whitelist,
20255
20262
  blacklist: blacklist,
20256
20263
  setMaxRoute: setMaxRoute,
20257
20264
  fee: fee
@@ -21189,7 +21196,7 @@
21189
21196
  set = _useContext4.set;
21190
21197
 
21191
21198
  var openSocket = function openSocket(transaction) {
21192
- var socket = new WebSocket('wss://integrate.depay.fi/cable');
21199
+ var socket = new WebSocket('wss://integrate.depay.com/cable');
21193
21200
 
21194
21201
  socket.onopen = function (event) {
21195
21202
  var msg = {
@@ -21293,7 +21300,7 @@
21293
21300
  to_decimals: paymentRoute.toDecimals,
21294
21301
  fee_amount: paymentRoute === null || paymentRoute === void 0 ? void 0 : (_paymentRoute$feeAmou = paymentRoute.feeAmount) === null || _paymentRoute$feeAmou === void 0 ? void 0 : _paymentRoute$feeAmou.toString()
21295
21302
  }).then(function (response) {
21296
- if (response.status != 200) {
21303
+ if (response.status != 200 && response.status != 201) {
21297
21304
  retryStartTracking(transaction, afterBlock, paymentRoute, attempt);
21298
21305
  }
21299
21306
  })["catch"](function (error) {
@@ -21317,7 +21324,7 @@
21317
21324
  };
21318
21325
 
21319
21326
  var handleResponse = function handleResponse(response) {
21320
- if (response.status == 200) {
21327
+ if (response.status == 200 || response.status == 201) {
21321
21328
  response.json().then(function (data) {
21322
21329
  if (data && data.forward_to) {
21323
21330
  setForwardTo(data.forward_to);
@@ -21370,7 +21377,7 @@
21370
21377
  return;
21371
21378
  }
21372
21379
 
21373
- fetch('https://public.depay.fi/payments', {
21380
+ fetch('https://public.depay.com/payments', {
21374
21381
  headers: {
21375
21382
  'Content-Type': 'application/json'
21376
21383
  },
@@ -21463,7 +21470,7 @@
21463
21470
  React.useEffect(function () {
21464
21471
  if (polling) {
21465
21472
  var poll = function poll() {
21466
- fetch("https://public.depay.fi/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
21473
+ fetch("https://public.depay.com/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
21467
21474
  if (response.status == 200) {
21468
21475
  response.json().then(function (data) {
21469
21476
  if (data.status != 'pending') {
@@ -21492,7 +21499,7 @@
21492
21499
  return;
21493
21500
  }
21494
21501
 
21495
- fetch('https://public.depay.fi/transactions', {
21502
+ fetch('https://public.depay.com/transactions', {
21496
21503
  method: 'POST',
21497
21504
  headers: {
21498
21505
  'Content-Type': 'application/json'
@@ -21522,7 +21529,7 @@
21522
21529
  };
21523
21530
 
21524
21531
  var openSocket = function openSocket(transaction) {
21525
- var socket = new WebSocket('wss://integrate.depay.fi/cable');
21532
+ var socket = new WebSocket('wss://integrate.depay.com/cable');
21526
21533
 
21527
21534
  socket.onopen = function (event) {
21528
21535
  var msg = {
@@ -21686,12 +21693,12 @@
21686
21693
 
21687
21694
  var Donation = /*#__PURE__*/function () {
21688
21695
  var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
21689
- var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, title, document, unmount;
21696
+ var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, title, document, unmount;
21690
21697
  return regenerator.wrap(function _callee2$(_context2) {
21691
21698
  while (1) {
21692
21699
  switch (_context2.prev = _context2.next) {
21693
21700
  case 0:
21694
- amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, title = _ref3.title, document = _ref3.document;
21701
+ amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, 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, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, title = _ref3.title, document = _ref3.document;
21695
21702
  requireReactVersion();
21696
21703
  _context2.prev = 2;
21697
21704
  _context2.next = 5;
@@ -21725,6 +21732,7 @@
21725
21732
  validated: validated,
21726
21733
  failed: failed,
21727
21734
  blacklist: blacklist,
21735
+ whitelist: whitelist,
21728
21736
  providers: providers,
21729
21737
  integration: integration,
21730
21738
  link: link,
@@ -23032,7 +23040,7 @@
23032
23040
  };
23033
23041
 
23034
23042
  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) {
23043
+ fetch("https://public.depay.com/tokens/search?blockchain=".concat(blockchainName, "&term=").concat(term)).then(function (response) {
23036
23044
  if (response.status == 200) {
23037
23045
  response.json().then(function (tokens) {
23038
23046
  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.2",
4
+ "version": "7.15.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",
@@ -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"