@depay/widgets 12.0.3 → 12.0.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/esm/index.bundle.js +1 -1
- package/dist/esm/index.evm.js +29 -28
- package/dist/esm/index.evm.js.map +1 -1
- package/dist/esm/index.js +29 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.solana.js +29 -28
- package/dist/esm/index.solana.js.map +1 -1
- package/dist/umd/index.bundle.js +1 -1
- package/dist/umd/index.evm.js +29 -28
- package/dist/umd/index.evm.js.map +1 -1
- package/dist/umd/index.js +29 -28
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.solana.js +29 -28
- package/dist/umd/index.solana.js.map +1 -1
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -22631,9 +22631,9 @@
|
|
|
22631
22631
|
connectingExtension = _useState6[0],
|
|
22632
22632
|
setConnectingExtension = _useState6[1];
|
|
22633
22633
|
var _useState7 = React.useState(false),
|
|
22634
|
-
_useState8 = _slicedToArray(_useState7, 2)
|
|
22635
|
-
_useState8[0]
|
|
22636
|
-
|
|
22634
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
22635
|
+
connectingApp = _useState8[0],
|
|
22636
|
+
setConnectingApp = _useState8[1];
|
|
22637
22637
|
var _useState9 = React.useState(),
|
|
22638
22638
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
22639
22639
|
redirectUri = _useState10[0],
|
|
@@ -22839,6 +22839,7 @@
|
|
|
22839
22839
|
connectViaRedirect: connectViaRedirect,
|
|
22840
22840
|
connectExtension: connectExtension,
|
|
22841
22841
|
connectingExtension: connectingExtension,
|
|
22842
|
+
connectingApp: connectingApp,
|
|
22842
22843
|
showConnectExtensionWarning: showConnectExtensionWarning,
|
|
22843
22844
|
continueWithSolanaPay: props.continueWithSolanaPay
|
|
22844
22845
|
})
|
|
@@ -23540,8 +23541,10 @@
|
|
|
23540
23541
|
var PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtqsu0wy94cpz90W4pGsJ\nSf0bfvmsq3su+R1J4AoAYz0XoAu2MXJZM8vrQvG3op7OgB3zze8pj4joaoPU2piT\ndH7kcF4Mde6QG4qKEL3VE+J8CL3qK2dUY0Umu20x/O9O792tlv8+Q/qAVv8yPfdM\nn5Je9Wc7VI5XeIBKP2AzsCkrXuzQlR48Ac5LpViNSSLu0mz5NTBoHkW2sz1sNWc6\nUpYISJkiKTvYc8Bo4p5xD6+ZmlL4hj1Ad/+26SjYcisX2Ut4QD7YKRBP2SbItVkI\nqp9mp6c6MCKNmEUkosxAr0KVfOcrk6/fcc4tI8g+KYZ32G11Ri8Xo4fgHH06DLYP\n3QIDAQAB\n-----END PUBLIC KEY-----\n";
|
|
23541
23542
|
var ConfigurationProvider = (function (props) {
|
|
23542
23543
|
var _props$configuration, _props$configuration5;
|
|
23543
|
-
var currencyCode = new localCurrency.Currency({
|
|
23544
|
+
var currencyCode = typeof props.configuration.currency === 'string' ? new localCurrency.Currency({
|
|
23544
23545
|
code: props.configuration.currency
|
|
23546
|
+
}).code : new localCurrency.Currency({
|
|
23547
|
+
amount: 0
|
|
23545
23548
|
}).code;
|
|
23546
23549
|
var _useState = React.useState(!((_props$configuration = props.configuration) !== null && _props$configuration !== void 0 && _props$configuration.integration) ? _objectSpread$6(_objectSpread$6({}, props.configuration), {}, {
|
|
23547
23550
|
currencyCode: currencyCode
|
|
@@ -24228,24 +24231,20 @@
|
|
|
24228
24231
|
var _useContext = React.useContext(ConfigurationContext),
|
|
24229
24232
|
configuredAmount = _useContext.amount;
|
|
24230
24233
|
_useContext.toAmount;
|
|
24231
|
-
var recover = _useContext.recover
|
|
24232
|
-
|
|
24233
|
-
accept = _useContext2.accept;
|
|
24234
|
-
if (!accept) {
|
|
24235
|
-
accept = props.accept;
|
|
24236
|
-
}
|
|
24234
|
+
var recover = _useContext.recover,
|
|
24235
|
+
accept = _useContext.accept;
|
|
24237
24236
|
React.useContext(ConfigurationContext);
|
|
24238
24237
|
var _useState = React.useState(recover == undefined ? configurationsMissAmounts(accept) : false),
|
|
24239
24238
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24240
24239
|
amountsMissing = _useState2[0],
|
|
24241
24240
|
setAmountsMissing = _useState2[1];
|
|
24242
|
-
var
|
|
24243
|
-
account =
|
|
24244
|
-
var
|
|
24245
|
-
conversionRate =
|
|
24246
|
-
fixedCurrencyConversionRate =
|
|
24247
|
-
var
|
|
24248
|
-
setError =
|
|
24241
|
+
var _useContext2 = React.useContext(WalletContext),
|
|
24242
|
+
account = _useContext2.account;
|
|
24243
|
+
var _useContext3 = React.useContext(ConversionRateContext),
|
|
24244
|
+
conversionRate = _useContext3.conversionRate,
|
|
24245
|
+
fixedCurrencyConversionRate = _useContext3.fixedCurrencyConversionRate;
|
|
24246
|
+
var _useContext4 = React.useContext(ErrorContext),
|
|
24247
|
+
setError = _useContext4.setError;
|
|
24249
24248
|
var _useState3 = React.useState(),
|
|
24250
24249
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
24251
24250
|
acceptWithAmount = _useState4[0],
|
|
@@ -24851,9 +24850,12 @@
|
|
|
24851
24850
|
_useContext.navigate;
|
|
24852
24851
|
var set = _useContext.set;
|
|
24853
24852
|
var _useContext2 = React.useContext(ConfigurationContext),
|
|
24854
|
-
accept = _useContext2.accept
|
|
24855
|
-
|
|
24856
|
-
|
|
24853
|
+
accept = _useContext2.accept,
|
|
24854
|
+
sell = _useContext2.sell;
|
|
24855
|
+
var _useContext3 = React.useContext(ChangableAmountContext),
|
|
24856
|
+
acceptWithAmount = _useContext3.acceptWithAmount;
|
|
24857
|
+
var _useContext4 = React.useContext(ClosableContext),
|
|
24858
|
+
close = _useContext4.close;
|
|
24857
24859
|
var setRecommendation = function setRecommendation(_x) {
|
|
24858
24860
|
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(_ref) {
|
|
24859
24861
|
var route, accept, nativeAvailableAsset, token, asset, _ref3, _ref4;
|
|
@@ -25064,7 +25066,7 @@
|
|
|
25064
25066
|
return regenerator.wrap(function _callee6$(_context6) {
|
|
25065
25067
|
while (1) switch (_context6.prev = _context6.next) {
|
|
25066
25068
|
case 0:
|
|
25067
|
-
directTransfer = accept.find(function (accept) {
|
|
25069
|
+
directTransfer = !sell && (acceptWithAmount || accept).find(function (accept) {
|
|
25068
25070
|
return props.assets.find(function (asset) {
|
|
25069
25071
|
return accept.blockchain === asset.blockchain && accept.token.toLowerCase() === asset.address.toLowerCase();
|
|
25070
25072
|
});
|
|
@@ -25116,7 +25118,7 @@
|
|
|
25116
25118
|
})) {
|
|
25117
25119
|
return;
|
|
25118
25120
|
} // consdier only major tokens for this
|
|
25119
|
-
return accept.map(function (_x4) {
|
|
25121
|
+
return (acceptWithAmount || accept).map(function (_x4) {
|
|
25120
25122
|
return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(accept) {
|
|
25121
25123
|
return regenerator.wrap(function _callee4$(_context4) {
|
|
25122
25124
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -25161,15 +25163,15 @@
|
|
|
25161
25163
|
return regenerator.wrap(function _callee5$(_context5) {
|
|
25162
25164
|
while (1) switch (_context5.prev = _context5.next) {
|
|
25163
25165
|
case 0:
|
|
25164
|
-
route = (routes || []).flat().find(function (route) {
|
|
25165
|
-
return accept.find(function (accept) {
|
|
25166
|
+
route = (routes.filter(Boolean) || []).flat().find(function (route) {
|
|
25167
|
+
return (acceptWithAmount || accept).find(function (accept) {
|
|
25166
25168
|
return accept.blockchain === route.blockchain && accept.token.toLowerCase() === route.tokenOut.toLowerCase();
|
|
25167
25169
|
});
|
|
25168
25170
|
}) || routes.flat()[0];
|
|
25169
25171
|
if (!route) {
|
|
25170
25172
|
set(['NoPaymentOptionFound']);
|
|
25171
25173
|
} else {
|
|
25172
|
-
recommendedAccept = accept.find(function (accept) {
|
|
25174
|
+
recommendedAccept = (acceptWithAmount || accept).find(function (accept) {
|
|
25173
25175
|
return accept.blockchain === route.blockchain && accept.token.toLowerCase() === route.tokenOut.toLowerCase();
|
|
25174
25176
|
}) || accept.find(function (accept) {
|
|
25175
25177
|
return accept.blockchain === route.blockchain;
|
|
@@ -29706,6 +29708,7 @@
|
|
|
29706
29708
|
}, /*#__PURE__*/React__default["default"].createElement(ConfigurationProvider, {
|
|
29707
29709
|
configuration: {
|
|
29708
29710
|
type: 'sale',
|
|
29711
|
+
accept: accept,
|
|
29709
29712
|
tokenImage: tokenImage,
|
|
29710
29713
|
amount: amount,
|
|
29711
29714
|
sell: sell,
|
|
@@ -29725,9 +29728,7 @@
|
|
|
29725
29728
|
container: container,
|
|
29726
29729
|
connected: connected,
|
|
29727
29730
|
unmount: unmount
|
|
29728
|
-
}, /*#__PURE__*/React__default["default"].createElement(NavigateProvider, null, /*#__PURE__*/React__default["default"].createElement(ConversionRateProvider, null, /*#__PURE__*/React__default["default"].createElement(ChangableAmountProvider, {
|
|
29729
|
-
accept: accept
|
|
29730
|
-
}, /*#__PURE__*/React__default["default"].createElement(TransactionTrackingProvider, null, /*#__PURE__*/React__default["default"].createElement(PaymentTrackingProvider, {
|
|
29731
|
+
}, /*#__PURE__*/React__default["default"].createElement(NavigateProvider, null, /*#__PURE__*/React__default["default"].createElement(ConversionRateProvider, null, /*#__PURE__*/React__default["default"].createElement(ChangableAmountProvider, null, /*#__PURE__*/React__default["default"].createElement(TransactionTrackingProvider, null, /*#__PURE__*/React__default["default"].createElement(PaymentTrackingProvider, {
|
|
29731
29732
|
document: ensureDocument(document)
|
|
29732
29733
|
}, /*#__PURE__*/React__default["default"].createElement(SaleRoutingProvider, {
|
|
29733
29734
|
container: container,
|