@depay/widgets 6.24.0 → 6.27.1
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 +24 -0
- package/dist/esm/index.bundle.js +79 -25
- package/dist/esm/index.js +43 -13
- package/dist/umd/index.bundle.js +79 -25
- package/dist/umd/index.js +43 -13
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -563,6 +563,18 @@ DePayWidgets.Payment({
|
|
|
563
563
|
})
|
|
564
564
|
```
|
|
565
565
|
|
|
566
|
+
#### container (DePay Payments)
|
|
567
|
+
|
|
568
|
+
`container`
|
|
569
|
+
|
|
570
|
+
Allows you to pass a container element that is supposed to contain the widget:
|
|
571
|
+
|
|
572
|
+
```javascript
|
|
573
|
+
DePayWidgets.Payment({
|
|
574
|
+
container: document.getElementById('my-container')
|
|
575
|
+
})
|
|
576
|
+
```
|
|
577
|
+
|
|
566
578
|
#### style (DePay Payments)
|
|
567
579
|
|
|
568
580
|
`style`
|
|
@@ -1369,6 +1381,18 @@ DePayWidgets.Donation({
|
|
|
1369
1381
|
})
|
|
1370
1382
|
```
|
|
1371
1383
|
|
|
1384
|
+
#### container (DePay Donations)
|
|
1385
|
+
|
|
1386
|
+
`container`
|
|
1387
|
+
|
|
1388
|
+
Allows you to pass a container element that is supposed to contain the widget:
|
|
1389
|
+
|
|
1390
|
+
```javascript
|
|
1391
|
+
DePayWidgets.Dontaion({
|
|
1392
|
+
container: document.getElementById('my-container')
|
|
1393
|
+
})
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1372
1396
|
#### style (DePay Donations)
|
|
1373
1397
|
|
|
1374
1398
|
`style`
|
package/dist/esm/index.bundle.js
CHANGED
|
@@ -49833,7 +49833,7 @@ var CardStyle = (function (style) {
|
|
|
49833
49833
|
});
|
|
49834
49834
|
|
|
49835
49835
|
var DialogStyle = (function (style) {
|
|
49836
|
-
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
49836
|
+
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
49837
49837
|
});
|
|
49838
49838
|
|
|
49839
49839
|
var FontStyle = (function (style) {
|
|
@@ -49939,9 +49939,9 @@ var styleRenderer = (function (style) {
|
|
|
49939
49939
|
|
|
49940
49940
|
const insideContainerClass = 'ReactShadowDOMInsideContainer';
|
|
49941
49941
|
|
|
49942
|
-
function createInsideContainer({ document, shadow, style }) {
|
|
49942
|
+
function createInsideContainer({ document, shadow, style, classes = [] }) {
|
|
49943
49943
|
const container = document.createElement('div');
|
|
49944
|
-
container.setAttribute('class', insideContainerClass);
|
|
49944
|
+
container.setAttribute('class', [insideContainerClass].concat(classes).join(' '));
|
|
49945
49945
|
shadow.appendChild(container);
|
|
49946
49946
|
|
|
49947
49947
|
if (style && style.length) {
|
|
@@ -49995,7 +49995,14 @@ function unmount(outsideContainer) {
|
|
|
49995
49995
|
}
|
|
49996
49996
|
}
|
|
49997
49997
|
|
|
49998
|
-
function ReactShadowDOM({
|
|
49998
|
+
function ReactShadowDOM({
|
|
49999
|
+
document,
|
|
50000
|
+
element,
|
|
50001
|
+
content,
|
|
50002
|
+
outsideStyle = '',
|
|
50003
|
+
insideStyle = '',
|
|
50004
|
+
insideClasses = [],
|
|
50005
|
+
}) {
|
|
49999
50006
|
const outsideContainer = createOutsideContainer({
|
|
50000
50007
|
document,
|
|
50001
50008
|
element,
|
|
@@ -50004,7 +50011,12 @@ function ReactShadowDOM({ document, element, content, outsideStyle = '', insideS
|
|
|
50004
50011
|
|
|
50005
50012
|
const shadow = createShadow(outsideContainer);
|
|
50006
50013
|
|
|
50007
|
-
const insideContainer = createInsideContainer({
|
|
50014
|
+
const insideContainer = createInsideContainer({
|
|
50015
|
+
document,
|
|
50016
|
+
shadow,
|
|
50017
|
+
style: trimStyle(insideStyle),
|
|
50018
|
+
classes: insideClasses,
|
|
50019
|
+
});
|
|
50008
50020
|
|
|
50009
50021
|
if (typeof content === 'function') {
|
|
50010
50022
|
content = content(insideContainer);
|
|
@@ -50017,6 +50029,7 @@ function ReactShadowDOM({ document, element, content, outsideStyle = '', insideS
|
|
|
50017
50029
|
|
|
50018
50030
|
var mount = (function (_ref, content) {
|
|
50019
50031
|
var style = _ref.style,
|
|
50032
|
+
container = _ref.container,
|
|
50020
50033
|
document = _ref.document,
|
|
50021
50034
|
closed = _ref.closed;
|
|
50022
50035
|
var insideStyle = styleRenderer(style);
|
|
@@ -50036,12 +50049,21 @@ var mount = (function (_ref, content) {
|
|
|
50036
50049
|
}, 300);
|
|
50037
50050
|
};
|
|
50038
50051
|
|
|
50052
|
+
var outsideStyle;
|
|
50053
|
+
|
|
50054
|
+
if (container) {
|
|
50055
|
+
outsideStyle = "\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
50056
|
+
} else {
|
|
50057
|
+
outsideStyle = "\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
50058
|
+
}
|
|
50059
|
+
|
|
50039
50060
|
var _ReactShadowDOM = ReactShadowDOM({
|
|
50040
50061
|
document: document,
|
|
50041
|
-
element: document.body,
|
|
50062
|
+
element: container || document.body,
|
|
50042
50063
|
content: content(unmountShadowDOM),
|
|
50064
|
+
outsideStyle: outsideStyle,
|
|
50043
50065
|
insideStyle: insideStyle,
|
|
50044
|
-
|
|
50066
|
+
insideClasses: ['contained']
|
|
50045
50067
|
}),
|
|
50046
50068
|
unmount = _ReactShadowDOM.unmount;
|
|
50047
50069
|
|
|
@@ -63146,16 +63168,28 @@ var getAssets = async (options) => {
|
|
|
63146
63168
|
|
|
63147
63169
|
return new Promise((resolve, reject)=>{
|
|
63148
63170
|
const address = options.accounts[blockchain];
|
|
63149
|
-
|
|
63171
|
+
const controller = new AbortController();
|
|
63172
|
+
setTimeout(()=>controller.abort(), 10000);
|
|
63173
|
+
fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal })
|
|
63150
63174
|
.catch((error) => { console.log(error); resolve([]); })
|
|
63151
|
-
.then((response) =>
|
|
63175
|
+
.then((response) => {
|
|
63176
|
+
if(response && response.ok) {
|
|
63177
|
+
return response.json()
|
|
63178
|
+
} else {
|
|
63179
|
+
resolve([]);
|
|
63180
|
+
}
|
|
63181
|
+
})
|
|
63152
63182
|
.then(async (assets) => {
|
|
63153
|
-
|
|
63154
|
-
|
|
63155
|
-
|
|
63156
|
-
|
|
63157
|
-
|
|
63158
|
-
|
|
63183
|
+
if(assets && assets.length) {
|
|
63184
|
+
return await ensureNativeTokenAsset({
|
|
63185
|
+
address,
|
|
63186
|
+
options,
|
|
63187
|
+
assets: filterAssets({ assets, blockchain, options }).map((asset) => Object.assign(asset, { blockchain })),
|
|
63188
|
+
blockchain
|
|
63189
|
+
})
|
|
63190
|
+
} else {
|
|
63191
|
+
resolve([]);
|
|
63192
|
+
}
|
|
63159
63193
|
})
|
|
63160
63194
|
.then(resolve)
|
|
63161
63195
|
.catch((error) => { console.log(error); resolve([]); });
|
|
@@ -85756,10 +85790,15 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
85756
85790
|
selectedRoute = _useState4[0],
|
|
85757
85791
|
setSelectedRoute = _useState4[1];
|
|
85758
85792
|
|
|
85759
|
-
var _useState5 = react.useState(
|
|
85793
|
+
var _useState5 = react.useState(false),
|
|
85760
85794
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
85761
|
-
|
|
85762
|
-
|
|
85795
|
+
slowRouting = _useState6[0],
|
|
85796
|
+
setSlowRouting = _useState6[1];
|
|
85797
|
+
|
|
85798
|
+
var _useState7 = react.useState(0),
|
|
85799
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
85800
|
+
reloadCount = _useState8[0],
|
|
85801
|
+
setReloadCount = _useState8[1];
|
|
85763
85802
|
|
|
85764
85803
|
var _useContext = react.useContext(WalletContext),
|
|
85765
85804
|
account = _useContext.account;
|
|
@@ -85810,9 +85849,15 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
85810
85849
|
return;
|
|
85811
85850
|
}
|
|
85812
85851
|
|
|
85852
|
+
var slowRoutingTimeout = setTimeout(function () {
|
|
85853
|
+
setSlowRouting(true);
|
|
85854
|
+
}, 4000);
|
|
85813
85855
|
routePayments(Object.assign({}, props, {
|
|
85814
85856
|
account: account
|
|
85815
|
-
})).then(
|
|
85857
|
+
})).then(function (routes) {
|
|
85858
|
+
clearInterval(slowRoutingTimeout);
|
|
85859
|
+
onRoutesUpdate(routes);
|
|
85860
|
+
});
|
|
85816
85861
|
};
|
|
85817
85862
|
|
|
85818
85863
|
var roundAmounts = /*#__PURE__*/function () {
|
|
@@ -85910,7 +85955,8 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
85910
85955
|
setSelectedRoute: setSelectedRoute,
|
|
85911
85956
|
getPaymentRoutes: getPaymentRoutes,
|
|
85912
85957
|
allRoutes: allRoutes,
|
|
85913
|
-
setAllRoutes: setAllRoutes
|
|
85958
|
+
setAllRoutes: setAllRoutes,
|
|
85959
|
+
slowRouting: slowRouting
|
|
85914
85960
|
}
|
|
85915
85961
|
}, props.children);
|
|
85916
85962
|
});
|
|
@@ -89144,12 +89190,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
89144
89190
|
|
|
89145
89191
|
var Donation = /*#__PURE__*/function () {
|
|
89146
89192
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
89147
|
-
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, document, unmount;
|
|
89193
|
+
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, container, document, unmount;
|
|
89148
89194
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
89149
89195
|
while (1) {
|
|
89150
89196
|
switch (_context2.prev = _context2.next) {
|
|
89151
89197
|
case 0:
|
|
89152
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
89198
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
89153
89199
|
requireReactVersion();
|
|
89154
89200
|
_context2.prev = 2;
|
|
89155
89201
|
_context2.next = 5;
|
|
@@ -89160,6 +89206,7 @@ var Donation = /*#__PURE__*/function () {
|
|
|
89160
89206
|
case 5:
|
|
89161
89207
|
unmount = mount({
|
|
89162
89208
|
style: style,
|
|
89209
|
+
container: container,
|
|
89163
89210
|
document: ensureDocument(document),
|
|
89164
89211
|
closed: closed
|
|
89165
89212
|
}, function (unmount) {
|
|
@@ -89441,6 +89488,10 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
89441
89488
|
var _useContext = react.useContext(ChangableAmountContext),
|
|
89442
89489
|
amountsMissing = _useContext.amountsMissing;
|
|
89443
89490
|
|
|
89491
|
+
var _useContext2 = react.useContext(PaymentRoutingContext),
|
|
89492
|
+
slowRouting = _useContext2.slowRouting,
|
|
89493
|
+
selectedRoute = _useContext2.selectedRoute;
|
|
89494
|
+
|
|
89444
89495
|
return /*#__PURE__*/react.createElement(Dialog, {
|
|
89445
89496
|
header: /*#__PURE__*/react.createElement("div", {
|
|
89446
89497
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
@@ -89466,7 +89517,9 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
89466
89517
|
className: "ButtonPrimary Skeleton"
|
|
89467
89518
|
}, /*#__PURE__*/react.createElement("div", {
|
|
89468
89519
|
className: "SkeletonBackground"
|
|
89469
|
-
})))
|
|
89520
|
+
}))), selectedRoute == undefined && slowRouting && /*#__PURE__*/react.createElement("div", {
|
|
89521
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
89522
|
+
}, /*#__PURE__*/react.createElement("strong", null, "Still loading your wallet balances...")))
|
|
89470
89523
|
});
|
|
89471
89524
|
});
|
|
89472
89525
|
|
|
@@ -89644,12 +89697,12 @@ var preflight$1 = /*#__PURE__*/function () {
|
|
|
89644
89697
|
|
|
89645
89698
|
var Payment = /*#__PURE__*/function () {
|
|
89646
89699
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
89647
|
-
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, document, unmount;
|
|
89700
|
+
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, container, document, unmount;
|
|
89648
89701
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
89649
89702
|
while (1) {
|
|
89650
89703
|
switch (_context2.prev = _context2.next) {
|
|
89651
89704
|
case 0:
|
|
89652
|
-
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
89705
|
+
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
89653
89706
|
requireReactVersion();
|
|
89654
89707
|
_context2.prev = 2;
|
|
89655
89708
|
_context2.next = 5;
|
|
@@ -89661,6 +89714,7 @@ var Payment = /*#__PURE__*/function () {
|
|
|
89661
89714
|
case 5:
|
|
89662
89715
|
unmount = mount({
|
|
89663
89716
|
style: style,
|
|
89717
|
+
container: container,
|
|
89664
89718
|
document: ensureDocument(document),
|
|
89665
89719
|
closed: closed
|
|
89666
89720
|
}, function (unmount) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1694,7 +1694,7 @@ var CardStyle = (function (style) {
|
|
|
1694
1694
|
});
|
|
1695
1695
|
|
|
1696
1696
|
var DialogStyle = (function (style) {
|
|
1697
|
-
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1697
|
+
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1698
1698
|
});
|
|
1699
1699
|
|
|
1700
1700
|
var FontStyle = (function (style) {
|
|
@@ -1800,6 +1800,7 @@ var styleRenderer = (function (style) {
|
|
|
1800
1800
|
|
|
1801
1801
|
var mount = (function (_ref, content) {
|
|
1802
1802
|
var style = _ref.style,
|
|
1803
|
+
container = _ref.container,
|
|
1803
1804
|
document = _ref.document,
|
|
1804
1805
|
closed = _ref.closed;
|
|
1805
1806
|
var insideStyle = styleRenderer(style);
|
|
@@ -1819,12 +1820,21 @@ var mount = (function (_ref, content) {
|
|
|
1819
1820
|
}, 300);
|
|
1820
1821
|
};
|
|
1821
1822
|
|
|
1823
|
+
var outsideStyle;
|
|
1824
|
+
|
|
1825
|
+
if (container) {
|
|
1826
|
+
outsideStyle = "\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
1827
|
+
} else {
|
|
1828
|
+
outsideStyle = "\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1822
1831
|
var _ReactShadowDOM = ReactShadowDOM({
|
|
1823
1832
|
document: document,
|
|
1824
|
-
element: document.body,
|
|
1833
|
+
element: container || document.body,
|
|
1825
1834
|
content: content(unmountShadowDOM),
|
|
1835
|
+
outsideStyle: outsideStyle,
|
|
1826
1836
|
insideStyle: insideStyle,
|
|
1827
|
-
|
|
1837
|
+
insideClasses: ['contained']
|
|
1828
1838
|
}),
|
|
1829
1839
|
unmount = _ReactShadowDOM.unmount;
|
|
1830
1840
|
|
|
@@ -2644,10 +2654,15 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2644
2654
|
selectedRoute = _useState4[0],
|
|
2645
2655
|
setSelectedRoute = _useState4[1];
|
|
2646
2656
|
|
|
2647
|
-
var _useState5 = useState(
|
|
2657
|
+
var _useState5 = useState(false),
|
|
2648
2658
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2649
|
-
|
|
2650
|
-
|
|
2659
|
+
slowRouting = _useState6[0],
|
|
2660
|
+
setSlowRouting = _useState6[1];
|
|
2661
|
+
|
|
2662
|
+
var _useState7 = useState(0),
|
|
2663
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
2664
|
+
reloadCount = _useState8[0],
|
|
2665
|
+
setReloadCount = _useState8[1];
|
|
2651
2666
|
|
|
2652
2667
|
var _useContext = useContext(WalletContext),
|
|
2653
2668
|
account = _useContext.account;
|
|
@@ -2698,9 +2713,15 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2698
2713
|
return;
|
|
2699
2714
|
}
|
|
2700
2715
|
|
|
2716
|
+
var slowRoutingTimeout = setTimeout(function () {
|
|
2717
|
+
setSlowRouting(true);
|
|
2718
|
+
}, 4000);
|
|
2701
2719
|
routePayments(Object.assign({}, props, {
|
|
2702
2720
|
account: account
|
|
2703
|
-
})).then(
|
|
2721
|
+
})).then(function (routes) {
|
|
2722
|
+
clearInterval(slowRoutingTimeout);
|
|
2723
|
+
onRoutesUpdate(routes);
|
|
2724
|
+
});
|
|
2704
2725
|
};
|
|
2705
2726
|
|
|
2706
2727
|
var roundAmounts = /*#__PURE__*/function () {
|
|
@@ -2798,7 +2819,8 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2798
2819
|
setSelectedRoute: setSelectedRoute,
|
|
2799
2820
|
getPaymentRoutes: getPaymentRoutes,
|
|
2800
2821
|
allRoutes: allRoutes,
|
|
2801
|
-
setAllRoutes: setAllRoutes
|
|
2822
|
+
setAllRoutes: setAllRoutes,
|
|
2823
|
+
slowRouting: slowRouting
|
|
2802
2824
|
}
|
|
2803
2825
|
}, props.children);
|
|
2804
2826
|
});
|
|
@@ -4317,12 +4339,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
4317
4339
|
|
|
4318
4340
|
var Donation = /*#__PURE__*/function () {
|
|
4319
4341
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
4320
|
-
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, document, unmount;
|
|
4342
|
+
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, container, document, unmount;
|
|
4321
4343
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
4322
4344
|
while (1) {
|
|
4323
4345
|
switch (_context2.prev = _context2.next) {
|
|
4324
4346
|
case 0:
|
|
4325
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
4347
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
4326
4348
|
requireReactVersion();
|
|
4327
4349
|
_context2.prev = 2;
|
|
4328
4350
|
_context2.next = 5;
|
|
@@ -4333,6 +4355,7 @@ var Donation = /*#__PURE__*/function () {
|
|
|
4333
4355
|
case 5:
|
|
4334
4356
|
unmount = mount({
|
|
4335
4357
|
style: style,
|
|
4358
|
+
container: container,
|
|
4336
4359
|
document: ensureDocument(document),
|
|
4337
4360
|
closed: closed
|
|
4338
4361
|
}, function (unmount) {
|
|
@@ -4614,6 +4637,10 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
4614
4637
|
var _useContext = useContext(ChangableAmountContext),
|
|
4615
4638
|
amountsMissing = _useContext.amountsMissing;
|
|
4616
4639
|
|
|
4640
|
+
var _useContext2 = useContext(PaymentRoutingContext),
|
|
4641
|
+
slowRouting = _useContext2.slowRouting,
|
|
4642
|
+
selectedRoute = _useContext2.selectedRoute;
|
|
4643
|
+
|
|
4617
4644
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
4618
4645
|
header: /*#__PURE__*/React.createElement("div", {
|
|
4619
4646
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
@@ -4639,7 +4666,9 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
4639
4666
|
className: "ButtonPrimary Skeleton"
|
|
4640
4667
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4641
4668
|
className: "SkeletonBackground"
|
|
4642
|
-
})))
|
|
4669
|
+
}))), selectedRoute == undefined && slowRouting && /*#__PURE__*/React.createElement("div", {
|
|
4670
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
4671
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Still loading your wallet balances...")))
|
|
4643
4672
|
});
|
|
4644
4673
|
});
|
|
4645
4674
|
|
|
@@ -4817,12 +4846,12 @@ var preflight$1 = /*#__PURE__*/function () {
|
|
|
4817
4846
|
|
|
4818
4847
|
var Payment = /*#__PURE__*/function () {
|
|
4819
4848
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
4820
|
-
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, document, unmount;
|
|
4849
|
+
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, container, document, unmount;
|
|
4821
4850
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
4822
4851
|
while (1) {
|
|
4823
4852
|
switch (_context2.prev = _context2.next) {
|
|
4824
4853
|
case 0:
|
|
4825
|
-
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
4854
|
+
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
4826
4855
|
requireReactVersion();
|
|
4827
4856
|
_context2.prev = 2;
|
|
4828
4857
|
_context2.next = 5;
|
|
@@ -4834,6 +4863,7 @@ var Payment = /*#__PURE__*/function () {
|
|
|
4834
4863
|
case 5:
|
|
4835
4864
|
unmount = mount({
|
|
4836
4865
|
style: style,
|
|
4866
|
+
container: container,
|
|
4837
4867
|
document: ensureDocument(document),
|
|
4838
4868
|
closed: closed
|
|
4839
4869
|
}, function (unmount) {
|
package/dist/umd/index.bundle.js
CHANGED
|
@@ -49839,7 +49839,7 @@
|
|
|
49839
49839
|
});
|
|
49840
49840
|
|
|
49841
49841
|
var DialogStyle = (function (style) {
|
|
49842
|
-
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
49842
|
+
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
49843
49843
|
});
|
|
49844
49844
|
|
|
49845
49845
|
var FontStyle = (function (style) {
|
|
@@ -49945,9 +49945,9 @@
|
|
|
49945
49945
|
|
|
49946
49946
|
const insideContainerClass = 'ReactShadowDOMInsideContainer';
|
|
49947
49947
|
|
|
49948
|
-
function createInsideContainer({ document, shadow, style }) {
|
|
49948
|
+
function createInsideContainer({ document, shadow, style, classes = [] }) {
|
|
49949
49949
|
const container = document.createElement('div');
|
|
49950
|
-
container.setAttribute('class', insideContainerClass);
|
|
49950
|
+
container.setAttribute('class', [insideContainerClass].concat(classes).join(' '));
|
|
49951
49951
|
shadow.appendChild(container);
|
|
49952
49952
|
|
|
49953
49953
|
if (style && style.length) {
|
|
@@ -50001,7 +50001,14 @@
|
|
|
50001
50001
|
}
|
|
50002
50002
|
}
|
|
50003
50003
|
|
|
50004
|
-
function ReactShadowDOM({
|
|
50004
|
+
function ReactShadowDOM({
|
|
50005
|
+
document,
|
|
50006
|
+
element,
|
|
50007
|
+
content,
|
|
50008
|
+
outsideStyle = '',
|
|
50009
|
+
insideStyle = '',
|
|
50010
|
+
insideClasses = [],
|
|
50011
|
+
}) {
|
|
50005
50012
|
const outsideContainer = createOutsideContainer({
|
|
50006
50013
|
document,
|
|
50007
50014
|
element,
|
|
@@ -50010,7 +50017,12 @@
|
|
|
50010
50017
|
|
|
50011
50018
|
const shadow = createShadow(outsideContainer);
|
|
50012
50019
|
|
|
50013
|
-
const insideContainer = createInsideContainer({
|
|
50020
|
+
const insideContainer = createInsideContainer({
|
|
50021
|
+
document,
|
|
50022
|
+
shadow,
|
|
50023
|
+
style: trimStyle(insideStyle),
|
|
50024
|
+
classes: insideClasses,
|
|
50025
|
+
});
|
|
50014
50026
|
|
|
50015
50027
|
if (typeof content === 'function') {
|
|
50016
50028
|
content = content(insideContainer);
|
|
@@ -50023,6 +50035,7 @@
|
|
|
50023
50035
|
|
|
50024
50036
|
var mount = (function (_ref, content) {
|
|
50025
50037
|
var style = _ref.style,
|
|
50038
|
+
container = _ref.container,
|
|
50026
50039
|
document = _ref.document,
|
|
50027
50040
|
closed = _ref.closed;
|
|
50028
50041
|
var insideStyle = styleRenderer(style);
|
|
@@ -50042,12 +50055,21 @@
|
|
|
50042
50055
|
}, 300);
|
|
50043
50056
|
};
|
|
50044
50057
|
|
|
50058
|
+
var outsideStyle;
|
|
50059
|
+
|
|
50060
|
+
if (container) {
|
|
50061
|
+
outsideStyle = "\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
50062
|
+
} else {
|
|
50063
|
+
outsideStyle = "\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
50064
|
+
}
|
|
50065
|
+
|
|
50045
50066
|
var _ReactShadowDOM = ReactShadowDOM({
|
|
50046
50067
|
document: document,
|
|
50047
|
-
element: document.body,
|
|
50068
|
+
element: container || document.body,
|
|
50048
50069
|
content: content(unmountShadowDOM),
|
|
50070
|
+
outsideStyle: outsideStyle,
|
|
50049
50071
|
insideStyle: insideStyle,
|
|
50050
|
-
|
|
50072
|
+
insideClasses: ['contained']
|
|
50051
50073
|
}),
|
|
50052
50074
|
unmount = _ReactShadowDOM.unmount;
|
|
50053
50075
|
|
|
@@ -63152,16 +63174,28 @@
|
|
|
63152
63174
|
|
|
63153
63175
|
return new Promise((resolve, reject)=>{
|
|
63154
63176
|
const address = options.accounts[blockchain];
|
|
63155
|
-
|
|
63177
|
+
const controller = new AbortController();
|
|
63178
|
+
setTimeout(()=>controller.abort(), 10000);
|
|
63179
|
+
fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal })
|
|
63156
63180
|
.catch((error) => { console.log(error); resolve([]); })
|
|
63157
|
-
.then((response) =>
|
|
63181
|
+
.then((response) => {
|
|
63182
|
+
if(response && response.ok) {
|
|
63183
|
+
return response.json()
|
|
63184
|
+
} else {
|
|
63185
|
+
resolve([]);
|
|
63186
|
+
}
|
|
63187
|
+
})
|
|
63158
63188
|
.then(async (assets) => {
|
|
63159
|
-
|
|
63160
|
-
|
|
63161
|
-
|
|
63162
|
-
|
|
63163
|
-
|
|
63164
|
-
|
|
63189
|
+
if(assets && assets.length) {
|
|
63190
|
+
return await ensureNativeTokenAsset({
|
|
63191
|
+
address,
|
|
63192
|
+
options,
|
|
63193
|
+
assets: filterAssets({ assets, blockchain, options }).map((asset) => Object.assign(asset, { blockchain })),
|
|
63194
|
+
blockchain
|
|
63195
|
+
})
|
|
63196
|
+
} else {
|
|
63197
|
+
resolve([]);
|
|
63198
|
+
}
|
|
63165
63199
|
})
|
|
63166
63200
|
.then(resolve)
|
|
63167
63201
|
.catch((error) => { console.log(error); resolve([]); });
|
|
@@ -85762,10 +85796,15 @@
|
|
|
85762
85796
|
selectedRoute = _useState4[0],
|
|
85763
85797
|
setSelectedRoute = _useState4[1];
|
|
85764
85798
|
|
|
85765
|
-
var _useState5 = react.useState(
|
|
85799
|
+
var _useState5 = react.useState(false),
|
|
85766
85800
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
85767
|
-
|
|
85768
|
-
|
|
85801
|
+
slowRouting = _useState6[0],
|
|
85802
|
+
setSlowRouting = _useState6[1];
|
|
85803
|
+
|
|
85804
|
+
var _useState7 = react.useState(0),
|
|
85805
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
85806
|
+
reloadCount = _useState8[0],
|
|
85807
|
+
setReloadCount = _useState8[1];
|
|
85769
85808
|
|
|
85770
85809
|
var _useContext = react.useContext(WalletContext),
|
|
85771
85810
|
account = _useContext.account;
|
|
@@ -85816,9 +85855,15 @@
|
|
|
85816
85855
|
return;
|
|
85817
85856
|
}
|
|
85818
85857
|
|
|
85858
|
+
var slowRoutingTimeout = setTimeout(function () {
|
|
85859
|
+
setSlowRouting(true);
|
|
85860
|
+
}, 4000);
|
|
85819
85861
|
routePayments(Object.assign({}, props, {
|
|
85820
85862
|
account: account
|
|
85821
|
-
})).then(
|
|
85863
|
+
})).then(function (routes) {
|
|
85864
|
+
clearInterval(slowRoutingTimeout);
|
|
85865
|
+
onRoutesUpdate(routes);
|
|
85866
|
+
});
|
|
85822
85867
|
};
|
|
85823
85868
|
|
|
85824
85869
|
var roundAmounts = /*#__PURE__*/function () {
|
|
@@ -85916,7 +85961,8 @@
|
|
|
85916
85961
|
setSelectedRoute: setSelectedRoute,
|
|
85917
85962
|
getPaymentRoutes: getPaymentRoutes,
|
|
85918
85963
|
allRoutes: allRoutes,
|
|
85919
|
-
setAllRoutes: setAllRoutes
|
|
85964
|
+
setAllRoutes: setAllRoutes,
|
|
85965
|
+
slowRouting: slowRouting
|
|
85920
85966
|
}
|
|
85921
85967
|
}, props.children);
|
|
85922
85968
|
});
|
|
@@ -89150,12 +89196,12 @@
|
|
|
89150
89196
|
|
|
89151
89197
|
var Donation = /*#__PURE__*/function () {
|
|
89152
89198
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
89153
|
-
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, document, unmount;
|
|
89199
|
+
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, container, document, unmount;
|
|
89154
89200
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
89155
89201
|
while (1) {
|
|
89156
89202
|
switch (_context2.prev = _context2.next) {
|
|
89157
89203
|
case 0:
|
|
89158
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
89204
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
89159
89205
|
requireReactVersion();
|
|
89160
89206
|
_context2.prev = 2;
|
|
89161
89207
|
_context2.next = 5;
|
|
@@ -89166,6 +89212,7 @@
|
|
|
89166
89212
|
case 5:
|
|
89167
89213
|
unmount = mount({
|
|
89168
89214
|
style: style,
|
|
89215
|
+
container: container,
|
|
89169
89216
|
document: ensureDocument(document),
|
|
89170
89217
|
closed: closed
|
|
89171
89218
|
}, function (unmount) {
|
|
@@ -89447,6 +89494,10 @@
|
|
|
89447
89494
|
var _useContext = react.useContext(ChangableAmountContext),
|
|
89448
89495
|
amountsMissing = _useContext.amountsMissing;
|
|
89449
89496
|
|
|
89497
|
+
var _useContext2 = react.useContext(PaymentRoutingContext),
|
|
89498
|
+
slowRouting = _useContext2.slowRouting,
|
|
89499
|
+
selectedRoute = _useContext2.selectedRoute;
|
|
89500
|
+
|
|
89450
89501
|
return /*#__PURE__*/react.createElement(Dialog, {
|
|
89451
89502
|
header: /*#__PURE__*/react.createElement("div", {
|
|
89452
89503
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
@@ -89472,7 +89523,9 @@
|
|
|
89472
89523
|
className: "ButtonPrimary Skeleton"
|
|
89473
89524
|
}, /*#__PURE__*/react.createElement("div", {
|
|
89474
89525
|
className: "SkeletonBackground"
|
|
89475
|
-
})))
|
|
89526
|
+
}))), selectedRoute == undefined && slowRouting && /*#__PURE__*/react.createElement("div", {
|
|
89527
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
89528
|
+
}, /*#__PURE__*/react.createElement("strong", null, "Still loading your wallet balances...")))
|
|
89476
89529
|
});
|
|
89477
89530
|
});
|
|
89478
89531
|
|
|
@@ -89650,12 +89703,12 @@
|
|
|
89650
89703
|
|
|
89651
89704
|
var Payment = /*#__PURE__*/function () {
|
|
89652
89705
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
89653
|
-
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, document, unmount;
|
|
89706
|
+
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, container, document, unmount;
|
|
89654
89707
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
89655
89708
|
while (1) {
|
|
89656
89709
|
switch (_context2.prev = _context2.next) {
|
|
89657
89710
|
case 0:
|
|
89658
|
-
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
89711
|
+
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
89659
89712
|
requireReactVersion();
|
|
89660
89713
|
_context2.prev = 2;
|
|
89661
89714
|
_context2.next = 5;
|
|
@@ -89667,6 +89720,7 @@
|
|
|
89667
89720
|
case 5:
|
|
89668
89721
|
unmount = mount({
|
|
89669
89722
|
style: style,
|
|
89723
|
+
container: container,
|
|
89670
89724
|
document: ensureDocument(document),
|
|
89671
89725
|
closed: closed
|
|
89672
89726
|
}, function (unmount) {
|
package/dist/umd/index.js
CHANGED
|
@@ -1689,7 +1689,7 @@
|
|
|
1689
1689
|
});
|
|
1690
1690
|
|
|
1691
1691
|
var DialogStyle = (function (style) {
|
|
1692
|
-
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1692
|
+
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 0.8rem;\n border-top-radius: 0.8rem;\n display: flex;\n flex-direction: column;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1693
1693
|
});
|
|
1694
1694
|
|
|
1695
1695
|
var FontStyle = (function (style) {
|
|
@@ -1795,6 +1795,7 @@
|
|
|
1795
1795
|
|
|
1796
1796
|
var mount = (function (_ref, content) {
|
|
1797
1797
|
var style = _ref.style,
|
|
1798
|
+
container = _ref.container,
|
|
1798
1799
|
document = _ref.document,
|
|
1799
1800
|
closed = _ref.closed;
|
|
1800
1801
|
var insideStyle = styleRenderer(style);
|
|
@@ -1814,12 +1815,21 @@
|
|
|
1814
1815
|
}, 300);
|
|
1815
1816
|
};
|
|
1816
1817
|
|
|
1818
|
+
var outsideStyle;
|
|
1819
|
+
|
|
1820
|
+
if (container) {
|
|
1821
|
+
outsideStyle = "\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
1822
|
+
} else {
|
|
1823
|
+
outsideStyle = "\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1817
1826
|
var _ReactShadowDOM = reactShadowDom.ReactShadowDOM({
|
|
1818
1827
|
document: document,
|
|
1819
|
-
element: document.body,
|
|
1828
|
+
element: container || document.body,
|
|
1820
1829
|
content: content(unmountShadowDOM),
|
|
1830
|
+
outsideStyle: outsideStyle,
|
|
1821
1831
|
insideStyle: insideStyle,
|
|
1822
|
-
|
|
1832
|
+
insideClasses: ['contained']
|
|
1823
1833
|
}),
|
|
1824
1834
|
unmount = _ReactShadowDOM.unmount;
|
|
1825
1835
|
|
|
@@ -2639,10 +2649,15 @@
|
|
|
2639
2649
|
selectedRoute = _useState4[0],
|
|
2640
2650
|
setSelectedRoute = _useState4[1];
|
|
2641
2651
|
|
|
2642
|
-
var _useState5 = React.useState(
|
|
2652
|
+
var _useState5 = React.useState(false),
|
|
2643
2653
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2644
|
-
|
|
2645
|
-
|
|
2654
|
+
slowRouting = _useState6[0],
|
|
2655
|
+
setSlowRouting = _useState6[1];
|
|
2656
|
+
|
|
2657
|
+
var _useState7 = React.useState(0),
|
|
2658
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
2659
|
+
reloadCount = _useState8[0],
|
|
2660
|
+
setReloadCount = _useState8[1];
|
|
2646
2661
|
|
|
2647
2662
|
var _useContext = React.useContext(WalletContext),
|
|
2648
2663
|
account = _useContext.account;
|
|
@@ -2693,9 +2708,15 @@
|
|
|
2693
2708
|
return;
|
|
2694
2709
|
}
|
|
2695
2710
|
|
|
2711
|
+
var slowRoutingTimeout = setTimeout(function () {
|
|
2712
|
+
setSlowRouting(true);
|
|
2713
|
+
}, 4000);
|
|
2696
2714
|
routePayments(Object.assign({}, props, {
|
|
2697
2715
|
account: account
|
|
2698
|
-
})).then(
|
|
2716
|
+
})).then(function (routes) {
|
|
2717
|
+
clearInterval(slowRoutingTimeout);
|
|
2718
|
+
onRoutesUpdate(routes);
|
|
2719
|
+
});
|
|
2699
2720
|
};
|
|
2700
2721
|
|
|
2701
2722
|
var roundAmounts = /*#__PURE__*/function () {
|
|
@@ -2793,7 +2814,8 @@
|
|
|
2793
2814
|
setSelectedRoute: setSelectedRoute,
|
|
2794
2815
|
getPaymentRoutes: getPaymentRoutes,
|
|
2795
2816
|
allRoutes: allRoutes,
|
|
2796
|
-
setAllRoutes: setAllRoutes
|
|
2817
|
+
setAllRoutes: setAllRoutes,
|
|
2818
|
+
slowRouting: slowRouting
|
|
2797
2819
|
}
|
|
2798
2820
|
}, props.children);
|
|
2799
2821
|
});
|
|
@@ -4312,12 +4334,12 @@
|
|
|
4312
4334
|
|
|
4313
4335
|
var Donation = /*#__PURE__*/function () {
|
|
4314
4336
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
4315
|
-
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, document, unmount;
|
|
4337
|
+
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, closable, integration, container, document, unmount;
|
|
4316
4338
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
4317
4339
|
while (1) {
|
|
4318
4340
|
switch (_context2.prev = _context2.next) {
|
|
4319
4341
|
case 0:
|
|
4320
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
4342
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
4321
4343
|
requireReactVersion();
|
|
4322
4344
|
_context2.prev = 2;
|
|
4323
4345
|
_context2.next = 5;
|
|
@@ -4328,6 +4350,7 @@
|
|
|
4328
4350
|
case 5:
|
|
4329
4351
|
unmount = mount({
|
|
4330
4352
|
style: style,
|
|
4353
|
+
container: container,
|
|
4331
4354
|
document: ensureDocument(document),
|
|
4332
4355
|
closed: closed
|
|
4333
4356
|
}, function (unmount) {
|
|
@@ -4609,6 +4632,10 @@
|
|
|
4609
4632
|
var _useContext = React.useContext(ChangableAmountContext),
|
|
4610
4633
|
amountsMissing = _useContext.amountsMissing;
|
|
4611
4634
|
|
|
4635
|
+
var _useContext2 = React.useContext(PaymentRoutingContext),
|
|
4636
|
+
slowRouting = _useContext2.slowRouting,
|
|
4637
|
+
selectedRoute = _useContext2.selectedRoute;
|
|
4638
|
+
|
|
4612
4639
|
return /*#__PURE__*/React__default["default"].createElement(Dialog$1, {
|
|
4613
4640
|
header: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4614
4641
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
@@ -4634,7 +4661,9 @@
|
|
|
4634
4661
|
className: "ButtonPrimary Skeleton"
|
|
4635
4662
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4636
4663
|
className: "SkeletonBackground"
|
|
4637
|
-
})))
|
|
4664
|
+
}))), selectedRoute == undefined && slowRouting && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4665
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
4666
|
+
}, /*#__PURE__*/React__default["default"].createElement("strong", null, "Still loading your wallet balances...")))
|
|
4638
4667
|
});
|
|
4639
4668
|
});
|
|
4640
4669
|
|
|
@@ -4812,12 +4841,12 @@
|
|
|
4812
4841
|
|
|
4813
4842
|
var Payment = /*#__PURE__*/function () {
|
|
4814
4843
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
4815
|
-
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, document, unmount;
|
|
4844
|
+
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, closable, integration, container, document, unmount;
|
|
4816
4845
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
4817
4846
|
while (1) {
|
|
4818
4847
|
switch (_context2.prev = _context2.next) {
|
|
4819
4848
|
case 0:
|
|
4820
|
-
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, document = _ref3.document;
|
|
4849
|
+
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, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, container = _ref3.container, document = _ref3.document;
|
|
4821
4850
|
requireReactVersion();
|
|
4822
4851
|
_context2.prev = 2;
|
|
4823
4852
|
_context2.next = 5;
|
|
@@ -4829,6 +4858,7 @@
|
|
|
4829
4858
|
case 5:
|
|
4830
4859
|
unmount = mount({
|
|
4831
4860
|
style: style,
|
|
4861
|
+
container: container,
|
|
4832
4862
|
document: ensureDocument(document),
|
|
4833
4863
|
closed: closed
|
|
4834
4864
|
}, function (unmount) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.27.1",
|
|
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",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@depay/coinbase-wallet-sdk": "^1.0.5",
|
|
37
37
|
"@depay/local-currency": "^3.2.2",
|
|
38
38
|
"@depay/react-dialog-stack": "^5.0.1",
|
|
39
|
-
"@depay/react-shadow-dom": "^4.
|
|
39
|
+
"@depay/react-shadow-dom": "^4.2.0",
|
|
40
40
|
"@depay/react-token-image": "^3.0.0",
|
|
41
41
|
"@depay/walletconnect-v1": "^1.1.0",
|
|
42
|
-
"@depay/web3-assets": "^6.1
|
|
42
|
+
"@depay/web3-assets": "^6.2.1",
|
|
43
43
|
"@depay/web3-blockchains": "^4.3.0",
|
|
44
44
|
"@depay/web3-client": "^8.0.0",
|
|
45
45
|
"@depay/web3-constants": "^5.0.0",
|
|
46
46
|
"@depay/web3-exchanges": "^8.2.1",
|
|
47
|
-
"@depay/web3-payments": "^10.
|
|
47
|
+
"@depay/web3-payments": "^10.1.1",
|
|
48
48
|
"@depay/web3-tokens": "^8.0.1",
|
|
49
49
|
"@depay/web3-wallets": "^10.0.3",
|
|
50
50
|
"decimal.js": "^10.3.1",
|