@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/README.md +111 -14
- package/dist/esm/index.bundle.js +19 -27
- package/dist/esm/index.js +20 -12
- package/dist/umd/index.bundle.js +19 -27
- package/dist/umd/index.js +20 -12
- package/package.json +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -1472,7 +1472,7 @@ var PoweredBy = (function () {
|
|
|
1472
1472
|
return /*#__PURE__*/React.createElement("div", {
|
|
1473
1473
|
className: "PoweredByWrapper"
|
|
1474
1474
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1475
|
-
href: 'https://depay.
|
|
1475
|
+
href: 'https://depay.com',
|
|
1476
1476
|
rel: "noopener noreferrer",
|
|
1477
1477
|
target: "_blank",
|
|
1478
1478
|
className: "PoweredByLink"
|
|
@@ -1660,7 +1660,12 @@ var round = (function (input) {
|
|
|
1660
1660
|
focusToFixed = parseFloat(_float).toFixed(1).replace('.', '');
|
|
1661
1661
|
}
|
|
1662
1662
|
|
|
1663
|
-
if (focusToFixed
|
|
1663
|
+
if (focusToFixed == '099' && parseInt(inputAsFloat.toFixed(0)) == 0) {
|
|
1664
|
+
focusToFixed = direction == 'up' ? '100' : '990';
|
|
1665
|
+
return parseFloat(digitsAfterDecimal.replace(/\d{3}$/, focusToFixed));
|
|
1666
|
+
} else if (focusToFixed == '100' && parseInt(inputAsFloat.toFixed(0)) == 0) {
|
|
1667
|
+
return parseFloat(digitsAfterDecimal.replace(/\d{4}$/, focusToFixed));
|
|
1668
|
+
} else if (focusToFixed.toString()[0] != "0" && focusToFixed.toString().length > 2) {
|
|
1664
1669
|
return parseInt(inputAsFloat.toFixed(0));
|
|
1665
1670
|
} else {
|
|
1666
1671
|
return parseFloat(digitsAfterDecimal.replace(/\d{3}$/, focusToFixed));
|
|
@@ -20251,12 +20256,14 @@ var DonationRoutingProvider = (function (props) {
|
|
|
20251
20256
|
|
|
20252
20257
|
var _useContext2 = useContext(ConfigurationContext),
|
|
20253
20258
|
blacklist = _useContext2.blacklist,
|
|
20259
|
+
whitelist = _useContext2.whitelist,
|
|
20254
20260
|
fee = _useContext2.fee;
|
|
20255
20261
|
|
|
20256
20262
|
return /*#__PURE__*/React.createElement(DonationRoutingContext.Provider, {
|
|
20257
20263
|
value: {}
|
|
20258
20264
|
}, /*#__PURE__*/React.createElement(PaymentRoutingProvider, {
|
|
20259
20265
|
accept: acceptWithAmount,
|
|
20266
|
+
whitelist: whitelist,
|
|
20260
20267
|
blacklist: blacklist,
|
|
20261
20268
|
setMaxRoute: setMaxRoute,
|
|
20262
20269
|
fee: fee
|
|
@@ -21194,7 +21201,7 @@ var PaymentTrackingProvider = (function (props) {
|
|
|
21194
21201
|
set = _useContext4.set;
|
|
21195
21202
|
|
|
21196
21203
|
var openSocket = function openSocket(transaction) {
|
|
21197
|
-
var socket = new WebSocket('wss://integrate.depay.
|
|
21204
|
+
var socket = new WebSocket('wss://integrate.depay.com/cable');
|
|
21198
21205
|
|
|
21199
21206
|
socket.onopen = function (event) {
|
|
21200
21207
|
var msg = {
|
|
@@ -21298,7 +21305,7 @@ var PaymentTrackingProvider = (function (props) {
|
|
|
21298
21305
|
to_decimals: paymentRoute.toDecimals,
|
|
21299
21306
|
fee_amount: paymentRoute === null || paymentRoute === void 0 ? void 0 : (_paymentRoute$feeAmou = paymentRoute.feeAmount) === null || _paymentRoute$feeAmou === void 0 ? void 0 : _paymentRoute$feeAmou.toString()
|
|
21300
21307
|
}).then(function (response) {
|
|
21301
|
-
if (response.status != 200) {
|
|
21308
|
+
if (response.status != 200 && response.status != 201) {
|
|
21302
21309
|
retryStartTracking(transaction, afterBlock, paymentRoute, attempt);
|
|
21303
21310
|
}
|
|
21304
21311
|
})["catch"](function (error) {
|
|
@@ -21322,7 +21329,7 @@ var PaymentTrackingProvider = (function (props) {
|
|
|
21322
21329
|
};
|
|
21323
21330
|
|
|
21324
21331
|
var handleResponse = function handleResponse(response) {
|
|
21325
|
-
if (response.status == 200) {
|
|
21332
|
+
if (response.status == 200 || response.status == 201) {
|
|
21326
21333
|
response.json().then(function (data) {
|
|
21327
21334
|
if (data && data.forward_to) {
|
|
21328
21335
|
setForwardTo(data.forward_to);
|
|
@@ -21375,7 +21382,7 @@ var PaymentTrackingProvider = (function (props) {
|
|
|
21375
21382
|
return;
|
|
21376
21383
|
}
|
|
21377
21384
|
|
|
21378
|
-
fetch('https://public.depay.
|
|
21385
|
+
fetch('https://public.depay.com/payments', {
|
|
21379
21386
|
headers: {
|
|
21380
21387
|
'Content-Type': 'application/json'
|
|
21381
21388
|
},
|
|
@@ -21468,7 +21475,7 @@ var TransactionTrackingProvider = (function (props) {
|
|
|
21468
21475
|
useEffect(function () {
|
|
21469
21476
|
if (polling) {
|
|
21470
21477
|
var poll = function poll() {
|
|
21471
|
-
fetch("https://public.depay.
|
|
21478
|
+
fetch("https://public.depay.com/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
|
|
21472
21479
|
if (response.status == 200) {
|
|
21473
21480
|
response.json().then(function (data) {
|
|
21474
21481
|
if (data.status != 'pending') {
|
|
@@ -21497,7 +21504,7 @@ var TransactionTrackingProvider = (function (props) {
|
|
|
21497
21504
|
return;
|
|
21498
21505
|
}
|
|
21499
21506
|
|
|
21500
|
-
fetch('https://public.depay.
|
|
21507
|
+
fetch('https://public.depay.com/transactions', {
|
|
21501
21508
|
method: 'POST',
|
|
21502
21509
|
headers: {
|
|
21503
21510
|
'Content-Type': 'application/json'
|
|
@@ -21527,7 +21534,7 @@ var TransactionTrackingProvider = (function (props) {
|
|
|
21527
21534
|
};
|
|
21528
21535
|
|
|
21529
21536
|
var openSocket = function openSocket(transaction) {
|
|
21530
|
-
var socket = new WebSocket('wss://integrate.depay.
|
|
21537
|
+
var socket = new WebSocket('wss://integrate.depay.com/cable');
|
|
21531
21538
|
|
|
21532
21539
|
socket.onopen = function (event) {
|
|
21533
21540
|
var msg = {
|
|
@@ -21691,12 +21698,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
21691
21698
|
|
|
21692
21699
|
var Donation = /*#__PURE__*/function () {
|
|
21693
21700
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
21694
|
-
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;
|
|
21701
|
+
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;
|
|
21695
21702
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
21696
21703
|
while (1) {
|
|
21697
21704
|
switch (_context2.prev = _context2.next) {
|
|
21698
21705
|
case 0:
|
|
21699
|
-
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;
|
|
21706
|
+
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;
|
|
21700
21707
|
requireReactVersion();
|
|
21701
21708
|
_context2.prev = 2;
|
|
21702
21709
|
_context2.next = 5;
|
|
@@ -21730,6 +21737,7 @@ var Donation = /*#__PURE__*/function () {
|
|
|
21730
21737
|
validated: validated,
|
|
21731
21738
|
failed: failed,
|
|
21732
21739
|
blacklist: blacklist,
|
|
21740
|
+
whitelist: whitelist,
|
|
21733
21741
|
providers: providers,
|
|
21734
21742
|
integration: integration,
|
|
21735
21743
|
link: link,
|
|
@@ -23037,7 +23045,7 @@ var SelectTokenDialog = (function (props) {
|
|
|
23037
23045
|
};
|
|
23038
23046
|
|
|
23039
23047
|
var searchTokens = useCallback(lodash.debounce(function (term, blockchainName) {
|
|
23040
|
-
fetch("https://public.depay.
|
|
23048
|
+
fetch("https://public.depay.com/tokens/search?blockchain=".concat(blockchainName, "&term=").concat(term)).then(function (response) {
|
|
23041
23049
|
if (response.status == 200) {
|
|
23042
23050
|
response.json().then(function (tokens) {
|
|
23043
23051
|
setTokens(tokens);
|