@depay/widgets 4.4.1 → 5.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/README.md +42 -57
- package/dist/cjs/index.bundle.js +647 -406
- package/dist/cjs/index.js +605 -381
- package/dist/es/index.bundle.js +647 -406
- package/dist/es/index.js +606 -382
- package/dist/umd/index.bundle.js +647 -406
- package/dist/umd/index.js +605 -381
- package/package.json +8 -7
package/dist/es/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Decimal } from 'decimal.js';
|
|
|
9
9
|
import { route } from '@depay/web3-exchanges';
|
|
10
10
|
import { Token } from '@depay/web3-tokens';
|
|
11
11
|
import { Currency } from '@depay/local-currency';
|
|
12
|
-
import { setProviderEndpoints, provider } from '@depay/web3-client';
|
|
12
|
+
import { setProviderEndpoints, request, provider } from '@depay/web3-client';
|
|
13
13
|
import { route as route$1 } from '@depay/web3-payments';
|
|
14
14
|
import Slider from 'react-rangeslider';
|
|
15
15
|
import { TokenImage } from '@depay/react-token-image';
|
|
@@ -54,17 +54,11 @@ function _asyncToGenerator(fn) {
|
|
|
54
54
|
function _typeof(obj) {
|
|
55
55
|
"@babel/helpers - typeof";
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
_typeof = function _typeof(obj) {
|
|
63
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return _typeof(obj);
|
|
57
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
58
|
+
return typeof obj;
|
|
59
|
+
} : function (obj) {
|
|
60
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
61
|
+
}, _typeof(obj);
|
|
68
62
|
}
|
|
69
63
|
|
|
70
64
|
function createCommonjsModule(fn) {
|
|
@@ -893,6 +887,8 @@ function _slicedToArray(arr, i) {
|
|
|
893
887
|
|
|
894
888
|
var ClosableContext = /*#__PURE__*/React.createContext();
|
|
895
889
|
|
|
890
|
+
var UpdatableContext = /*#__PURE__*/React.createContext();
|
|
891
|
+
|
|
896
892
|
var ClosableProvider = (function (props) {
|
|
897
893
|
var _useState = useState(true),
|
|
898
894
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -904,11 +900,15 @@ var ClosableProvider = (function (props) {
|
|
|
904
900
|
open = _useState4[0],
|
|
905
901
|
setOpen = _useState4[1];
|
|
906
902
|
|
|
903
|
+
var _useContext = useContext(UpdatableContext),
|
|
904
|
+
setUpdatable = _useContext.setUpdatable;
|
|
905
|
+
|
|
907
906
|
var close = function close() {
|
|
908
907
|
if (!closable) {
|
|
909
908
|
return;
|
|
910
909
|
}
|
|
911
910
|
|
|
911
|
+
setUpdatable(false);
|
|
912
912
|
setOpen(false);
|
|
913
913
|
setTimeout(props.unmount, 300);
|
|
914
914
|
};
|
|
@@ -992,12 +992,7 @@ var Dialog$1 = (function (props) {
|
|
|
992
992
|
className: "DialogBody"
|
|
993
993
|
}, props.body), /*#__PURE__*/React.createElement("div", {
|
|
994
994
|
className: "DialogFooter"
|
|
995
|
-
}, props.footer
|
|
996
|
-
href: 'https://depay.fi?utm_source=' + window.location.hostname + '&utm_medium=widget&utm_campaign=WidgetV2',
|
|
997
|
-
rel: "noopener noreferrer",
|
|
998
|
-
target: "_blank",
|
|
999
|
-
className: "FooterLink"
|
|
1000
|
-
}, "by DePay")));
|
|
995
|
+
}, props.footer));
|
|
1001
996
|
});
|
|
1002
997
|
|
|
1003
998
|
var ConnectingWalletDialog = (function (props) {
|
|
@@ -1047,9 +1042,9 @@ var ConnectingWalletDialog = (function (props) {
|
|
|
1047
1042
|
className: "TextButton"
|
|
1048
1043
|
}, "Connect with another wallet")))),
|
|
1049
1044
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
1050
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
1045
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
1051
1046
|
}, /*#__PURE__*/React.createElement("button", {
|
|
1052
|
-
className: "ButtonPrimary
|
|
1047
|
+
className: "ButtonPrimary",
|
|
1053
1048
|
onClick: function onClick() {
|
|
1054
1049
|
return props.connect(wallet);
|
|
1055
1050
|
}
|
|
@@ -1132,7 +1127,7 @@ var SelectWalletDialog = (function (props) {
|
|
|
1132
1127
|
return connect(wallet);
|
|
1133
1128
|
}
|
|
1134
1129
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1135
|
-
className: "CardImage
|
|
1130
|
+
className: "CardImage"
|
|
1136
1131
|
}, /*#__PURE__*/React.createElement("img", {
|
|
1137
1132
|
src: wallet.logo
|
|
1138
1133
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1145,9 +1140,9 @@ var SelectWalletDialog = (function (props) {
|
|
|
1145
1140
|
});
|
|
1146
1141
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
1147
1142
|
header: /*#__PURE__*/React.createElement("div", {
|
|
1148
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
1143
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
1149
1144
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
1150
|
-
className: "LineHeightL FontSizeL
|
|
1145
|
+
className: "LineHeightL FontSizeL"
|
|
1151
1146
|
}, "Select a wallet")),
|
|
1152
1147
|
body: /*#__PURE__*/React.createElement("div", {
|
|
1153
1148
|
className: "PaddingTopS PaddingBottomXS PaddingLeftS PaddingRightS"
|
|
@@ -1155,11 +1150,13 @@ var SelectWalletDialog = (function (props) {
|
|
|
1155
1150
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
1156
1151
|
className: "PaddingBottomS"
|
|
1157
1152
|
}, /*#__PURE__*/React.createElement("button", {
|
|
1158
|
-
className: "FontSizeS FontWeightBold
|
|
1153
|
+
className: "FontSizeS FontWeightBold TextButton",
|
|
1159
1154
|
onClick: function onClick() {
|
|
1160
1155
|
return setShowExplanation(!showExplanation);
|
|
1161
1156
|
}
|
|
1162
|
-
}, /*#__PURE__*/React.createElement("strong",
|
|
1157
|
+
}, /*#__PURE__*/React.createElement("strong", {
|
|
1158
|
+
className: "Opacity05"
|
|
1159
|
+
}, "What is a wallet?")), showExplanation && /*#__PURE__*/React.createElement("p", {
|
|
1163
1160
|
className: "PaddingLeftM PaddingRightM"
|
|
1164
1161
|
}, "Wallets are used to send, receive, and store digital assets. Wallets come in many forms. They are either built into your browser, an extension added to your browser, a piece of hardware plugged into your computer or even an app on your phone."))
|
|
1165
1162
|
});
|
|
@@ -1312,6 +1309,9 @@ function _defineProperties(target, props) {
|
|
|
1312
1309
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
1313
1310
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1314
1311
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1312
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
1313
|
+
writable: false
|
|
1314
|
+
});
|
|
1315
1315
|
return Constructor;
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
@@ -1329,12 +1329,15 @@ function _inherits(subClass, superClass) {
|
|
|
1329
1329
|
throw new TypeError("Super expression must either be null or a function");
|
|
1330
1330
|
}
|
|
1331
1331
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1332
|
+
Object.defineProperty(subClass, "prototype", {
|
|
1333
|
+
value: Object.create(superClass && superClass.prototype, {
|
|
1334
|
+
constructor: {
|
|
1335
|
+
value: subClass,
|
|
1336
|
+
writable: true,
|
|
1337
|
+
configurable: true
|
|
1338
|
+
}
|
|
1339
|
+
}),
|
|
1340
|
+
writable: false
|
|
1338
1341
|
});
|
|
1339
1342
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
1340
1343
|
}
|
|
@@ -1613,7 +1616,7 @@ var ErrorProvider = (function (props) {
|
|
|
1613
1616
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1614
1617
|
className: "DialogBody"
|
|
1615
1618
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1616
|
-
className: "GraphicWrapper"
|
|
1619
|
+
className: "GraphicWrapper PaddingTopS"
|
|
1617
1620
|
}, /*#__PURE__*/React.createElement("img", {
|
|
1618
1621
|
className: "Graphic",
|
|
1619
1622
|
src: ErrorGraphic
|
|
@@ -1631,15 +1634,12 @@ var ErrorProvider = (function (props) {
|
|
|
1631
1634
|
className: "FontSizeM PaddingTopS"
|
|
1632
1635
|
}, "If this keeps happening, please report it.")))), /*#__PURE__*/React.createElement("div", {
|
|
1633
1636
|
className: "DialogFooter"
|
|
1634
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
1637
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1638
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
1639
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1635
1640
|
className: "ButtonPrimary",
|
|
1636
1641
|
onClick: close
|
|
1637
|
-
}, "Try again"))
|
|
1638
|
-
href: 'https://depay.fi?utm_source=' + window.location.hostname + '&utm_medium=widget&utm_campaign=WidgetV2',
|
|
1639
|
-
rel: "noopener noreferrer",
|
|
1640
|
-
target: "_blank",
|
|
1641
|
-
className: "FooterLink"
|
|
1642
|
-
}, "by DePay"))));
|
|
1642
|
+
}, "Try again")))));
|
|
1643
1643
|
} else {
|
|
1644
1644
|
return /*#__PURE__*/React.createElement(ErrorContext.Provider, {
|
|
1645
1645
|
value: {
|
|
@@ -1651,28 +1651,28 @@ var ErrorProvider = (function (props) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
});
|
|
1653
1653
|
|
|
1654
|
+
var BlockchainLogoStyle = (function (style) {
|
|
1655
|
+
return "\n\n .BlockchainLogo {\n border-radius: 999px;\n }\n\n .BlockchainLogo.small {\n height: 18px;\n width: 18px;\n }\n ";
|
|
1656
|
+
});
|
|
1657
|
+
|
|
1654
1658
|
var ButtonCircularStyle = (function () {
|
|
1655
1659
|
return "\n\n .ButtonCircular {\n border-radius: 99rem;\n cursor: pointer;\n height: 34px;\n opacity: 0.5;\n padding: 5px 4px 4px 4px;\n width: 34px;\n }\n\n .ButtonCircular:hover {\n background: rgba(0,0,0,0.1);\n opacity: 1;\n }\n\n .ButtonCircular:active {\n background: rgba(0,0,0,0.25);\n opacity: 1;\n }\n ";
|
|
1656
1660
|
});
|
|
1657
1661
|
|
|
1658
1662
|
var ButtonPrimaryStyle = (function (style) {
|
|
1659
|
-
return "\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(style.colors.primary, ";\n border-radius:
|
|
1663
|
+
return "\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(style.colors.primary, ";\n border-radius: 0.8rem;\n border: 1px solid transparent;\n box-shadow: 0 0 16px rgba(0,0,0,0.1);\n font-size: 1.3rem;\n font-weight: 400;\n line-height: 2.8rem;\n height: 3.6rem;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n padding: 0.4rem 0;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-overflow: ellipsis;\n transition: background 0.1s;\n vertical-align: middle;\n display: inline-block;\n }\n\n .ButtonPrimary, .ButtonPrimary * {\n color: ").concat(style.colors.buttonText, ";\n }\n\n .ButtonPrimary.disabled {\n background: rgb(210,210,210);\n color: rgb(140,140,140);\n }\n\n .ButtonPrimary:not(.disabled){\n cursor: pointer;\n }\n .ButtonPrimary:not(.disabled):hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.1);\n }\n .ButtonPrimary:not(.disabled):active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n ");
|
|
1660
1664
|
});
|
|
1661
1665
|
|
|
1662
1666
|
var CardStyle = (function (style) {
|
|
1663
|
-
return "\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 0.8rem;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 0.5rem;\n min-height: 4.78rem;\n padding: 1rem 0.6rem;\n width: 100%;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 0.
|
|
1667
|
+
return "\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 0.8rem;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 0.5rem;\n min-height: 4.78rem;\n padding: 1rem 0.6rem;\n width: 100%;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 0.5rem 0.5rem;\n margin: 0;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 0.4rem;\n }\n\n .CardImage {\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 3.6rem;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 1.4rem;\n padding-left: 0.6rem;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 99rem;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 2.8rem;\n position: relative;\n vertical-align: middle;\n width: 2.8rem;\n }\n\n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 0.9rem;\n color: rgb(150,150,150);\n }\n \n .CardText, a .CardText {\n color: ".concat(style.colors.text, ";\n flex: 1;\n font-size: 1.3rem;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText small {\n font-size: 1.1rem;\n color: rgb(150,150,150);\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ");
|
|
1664
1668
|
});
|
|
1665
1669
|
|
|
1666
1670
|
var DialogStyle = (function (style) {
|
|
1667
|
-
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 }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .
|
|
1671
|
+
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 }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .DialogFooter {\n padding-bottom: 50px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n max-height: 66vh !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.HeightAuto {\n height: auto;\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 display: flex;\n flex-direction: row;\n position: relative;\n }\n\n .DialogHeaderTitle {\n flex-basis: auto;\n flex-grow: 1;\n }\n \n .DialogHeaderAction {\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 .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
|
|
1668
1672
|
});
|
|
1669
1673
|
|
|
1670
1674
|
var FontStyle = (function (style) {
|
|
1671
|
-
return "\n\n
|
|
1672
|
-
});
|
|
1673
|
-
|
|
1674
|
-
var FooterStyle = (function (style) {
|
|
1675
|
-
return "\n\n .FooterLink {\n color: rgba(0,0,0,0.2);\n display: inline-block;\n font-size: 0.9rem;\n text-decoration: none;\n }\n\n .FooterLink:hover, .FooterLink:active {\n color: ".concat(style.colors.primary, ";\n }\n ");
|
|
1675
|
+
return "\n\n *, div, div * {\n font-family: ".concat(style.fontFamily, ";\n }\n\n .FontSizeS {\n font-size: 1rem;\n }\n\n .FontSizeM {\n font-size: 1.2rem;\n }\n\n .FontSizeL {\n font-size: 1.4rem;\n }\n\n .FontSizeXL {\n font-size: 2.0rem;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ");
|
|
1676
1676
|
});
|
|
1677
1677
|
|
|
1678
1678
|
var GraphicStyle = (function () {
|
|
@@ -1684,7 +1684,7 @@ var HeightStyle = (function () {
|
|
|
1684
1684
|
});
|
|
1685
1685
|
|
|
1686
1686
|
var IconStyle = (function (style) {
|
|
1687
|
-
return "\n\n .Icon {\n fill : ".concat(style.colors.icons, ";\n stroke : ").concat(style.colors.icons, ";\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height:
|
|
1687
|
+
return "\n\n .Icon {\n fill : ".concat(style.colors.icons, ";\n stroke : ").concat(style.colors.icons, ";\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .CheckMark.small {\n height: 16px;\n width: 16px;\n }\n\n .DigitalWalletIcon {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .ButtonPrimary .Icon {\n fill : ").concat(style.colors.buttonText, ";\n stroke : ").concat(style.colors.buttonText, ";\n }\n\n .Loading {\n border: 3px solid ").concat(style.colors.primary, ";\n border-top: 3px solid rgba(0,0,0,0.1);\n border-radius: 100%;\n position: relative;\n left: -1px;\n width: 18px;\n height: 18px;\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ");
|
|
1688
1688
|
});
|
|
1689
1689
|
|
|
1690
1690
|
var ImageStyle = (function (style) {
|
|
@@ -1703,10 +1703,18 @@ var LoadingTextStyle = (function (style) {
|
|
|
1703
1703
|
return "\n\n .LoadingText {\n color: ".concat(style.colors.buttonText, ";\n display: inline-block;\n text-decoration: none;\n }\n\n @keyframes blink {\n 0% { opacity: .2; }\n 20% { opacity: 1; }\n 100% { opacity: .2; }\n }\n \n .LoadingText .dot {\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n \n .LoadingText .dot:nth-child(2) {\n animation-delay: .2s;\n }\n \n .LoadingText .dot:nth-child(3) {\n animation-delay: .4s;\n }\n ");
|
|
1704
1704
|
});
|
|
1705
1705
|
|
|
1706
|
+
var OpacityStyle = (function (style) {
|
|
1707
|
+
return "\n\n .Opacity05 {\n opacity: 0.5;\n }\n ";
|
|
1708
|
+
});
|
|
1709
|
+
|
|
1706
1710
|
var PaddingStyle = (function () {
|
|
1707
1711
|
return "\n\n .PaddingTopXS {\n padding-top: 0.2rem;\n }\n\n .PaddingRightXS {\n padding-right: 0.2rem;\n }\n\n .PaddingBottomXS {\n padding-bottom: 0.2rem;\n }\n\n .PaddingLeftXS {\n padding-left: 0.2rem; \n }\n\n .PaddingTopS {\n padding-top: 0.8rem;\n }\n\n .PaddingRightS {\n padding-right: 0.8rem;\n }\n\n .PaddingBottomS {\n padding-bottom: 0.8rem;\n }\n\n .PaddingLeftS {\n padding-left: 0.8rem; \n }\n\n .PaddingTopM {\n padding-top: 1.2rem;\n }\n\n .PaddingRightM {\n padding-right: 1.2rem;\n }\n\n .PaddingBottomM {\n padding-bottom: 1.2rem;\n }\n\n .PaddingLeftM {\n padding-left: 1.2rem; \n }\n\n .PaddingTopL {\n padding-top: 1.8rem;\n }\n\n .PaddingRightL {\n padding-right: 1.8rem;\n }\n\n .PaddingBottomL {\n padding-bottom: 1.8rem;\n }\n\n .PaddingLeftL {\n padding-left: 1.28em; \n }\n ";
|
|
1708
1712
|
});
|
|
1709
1713
|
|
|
1714
|
+
var PoweredByStyle = (function (style) {
|
|
1715
|
+
return "\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 0.2rem;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .PoweredByLink {\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 color: white;\n opacity: 0.4;\n display: inline-block;\n font-size: 0.78rem;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 0.5rem;\n text-decoration: none;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n color: ".concat(style.colors.primary, ";\n }\n ");
|
|
1716
|
+
});
|
|
1717
|
+
|
|
1710
1718
|
var RangeSliderStyle = (function (style) {
|
|
1711
1719
|
return "\n\n .rangeslider {\n margin: 20px 0;\n position: relative;\n background: #e6e6e6;\n -ms-touch-action: none;\n touch-action: none;\n }\n\n .rangeslider,\n .rangeslider__fill {\n display: block;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);\n }\n\n .rangeslider__handle {\n outline: none;\n cursor: pointer;\n display: inline-block;\n position: absolute;\n border-radius: 50%;\n background-color: " + style.colors.primary + ";\n border: 1px solid white;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n }\n\n .rangeslider__handle:hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n\n .rangeslider__handle:active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.3);\n }\n\n .rangeslider__active {\n opacity: 1;\n }\n\n .rangeslider__handle-tooltip {\n display: none;\n }\n\n .rangeslider-horizontal {\n height: 12px;\n border-radius: 10px;\n }\n\n .rangeslider-horizontal .rangeslider__fill {\n height: 100%;\n background-color: " + style.colors.primary + ";\n border-radius: 10px;\n top: 0;\n }\n .rangeslider-horizontal .rangeslider__handle {\n width: 18px;\n height: 18px;\n border-radius: 30px;\n top: 50%;\n transform: translate3d(-50%, -50%, 0);\n }\n\n\n .rangeslider-horizontal .rangeslider__handle-tooltip {\n top: -55px;\n }\n\n ";
|
|
1712
1720
|
});
|
|
@@ -1716,15 +1724,15 @@ var ResetStyle = (function () {
|
|
|
1716
1724
|
});
|
|
1717
1725
|
|
|
1718
1726
|
var SkeletonStyle = (function () {
|
|
1719
|
-
return "\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ";
|
|
1727
|
+
return "\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n border: 0px solid transparent !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ";
|
|
1720
1728
|
});
|
|
1721
1729
|
|
|
1722
1730
|
var TextButtonStyle = (function (style) {
|
|
1723
|
-
return "\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(style.colors.primary, "\n }\n\n .TextButton
|
|
1731
|
+
return "\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(style.colors.primary, "\n }\n\n .TextButton:hover * {\n opacity: 1.0;\n }\n ");
|
|
1724
1732
|
});
|
|
1725
1733
|
|
|
1726
1734
|
var TextStyle = (function (style) {
|
|
1727
|
-
return "\n\n * {\n color: ".concat(style.colors.text, ";\n }\n\n
|
|
1735
|
+
return "\n\n * {\n color: ".concat(style.colors.text, ";\n }\n\n h1, h2, h3, h4, h5, h6 {\n display: block;\n }\n\n .TextLeft, .TextLeft * {\n text-align: left;\n }\n\n .TextCenter, .TextCenter * {\n text-align: center;\n }\n\n .LineHeightL {\n line-height: 2.0rem;\n }\n\n .ErrorSnippetText {\n background: rgb(30, 30, 20);\n border-radius: 1.2rem;\n border: 0.5rem solid rgb(30, 30, 20);\n color: #00FF41;\n font-size: 0.9rem;\n font-style: italic;\n max-height: 100px;\n padding: 6px;\n overflow-wrap: break-word;\n overflow-y: auto;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n ");
|
|
1728
1736
|
});
|
|
1729
1737
|
|
|
1730
1738
|
var TokenAmountStyle = (function () {
|
|
@@ -1741,7 +1749,7 @@ var styleRenderer = (function (style) {
|
|
|
1741
1749
|
},
|
|
1742
1750
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
1743
1751
|
}, style);
|
|
1744
|
-
return [ResetStyle(), FontStyle(style), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style),
|
|
1752
|
+
return [ResetStyle(), FontStyle(style), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(style), GraphicStyle(), SkeletonStyle(), TokenAmountStyle(), TextStyle(style), IconStyle(style), OpacityStyle(), PaddingStyle(), HeightStyle(), LabelStyle(style), LoadingTextStyle(style), RangeSliderStyle(style), InputStyle(), TextButtonStyle(style), ImageStyle(), BlockchainLogoStyle()].join('');
|
|
1745
1753
|
});
|
|
1746
1754
|
|
|
1747
1755
|
var mount = (function (_ref, content) {
|
|
@@ -1777,6 +1785,31 @@ var mount = (function (_ref, content) {
|
|
|
1777
1785
|
return unmount;
|
|
1778
1786
|
});
|
|
1779
1787
|
|
|
1788
|
+
var PoweredBy = (function () {
|
|
1789
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1790
|
+
className: "PoweredByWrapper"
|
|
1791
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
1792
|
+
href: 'https://depay.fi?utm_source=' + window.location.hostname + '&utm_medium=widget&utm_campaign=WidgetV2',
|
|
1793
|
+
rel: "noopener noreferrer",
|
|
1794
|
+
target: "_blank",
|
|
1795
|
+
className: "PoweredByLink"
|
|
1796
|
+
}, "by DePay"));
|
|
1797
|
+
});
|
|
1798
|
+
|
|
1799
|
+
var UpdatableProvider = (function (props) {
|
|
1800
|
+
var _useState = useState(true),
|
|
1801
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1802
|
+
updatable = _useState2[0],
|
|
1803
|
+
setUpdatable = _useState2[1];
|
|
1804
|
+
|
|
1805
|
+
return /*#__PURE__*/React.createElement(UpdatableContext.Provider, {
|
|
1806
|
+
value: {
|
|
1807
|
+
updatable: updatable,
|
|
1808
|
+
setUpdatable: setUpdatable
|
|
1809
|
+
}
|
|
1810
|
+
}, props.children);
|
|
1811
|
+
});
|
|
1812
|
+
|
|
1780
1813
|
var Connect = function Connect(options) {
|
|
1781
1814
|
var style, error, document;
|
|
1782
1815
|
|
|
@@ -1832,7 +1865,7 @@ var Connect = function Connect(options) {
|
|
|
1832
1865
|
error: error,
|
|
1833
1866
|
container: container,
|
|
1834
1867
|
unmount: unmount
|
|
1835
|
-
}, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
1868
|
+
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
1836
1869
|
unmount: rejectBeforeUnmount
|
|
1837
1870
|
}, /*#__PURE__*/React.createElement(ConnectStack, {
|
|
1838
1871
|
document: document,
|
|
@@ -1840,7 +1873,7 @@ var Connect = function Connect(options) {
|
|
|
1840
1873
|
resolve: resolve,
|
|
1841
1874
|
reject: reject,
|
|
1842
1875
|
autoClose: true
|
|
1843
|
-
})));
|
|
1876
|
+
}), /*#__PURE__*/React.createElement(PoweredBy, null))));
|
|
1844
1877
|
};
|
|
1845
1878
|
});
|
|
1846
1879
|
|
|
@@ -2153,7 +2186,9 @@ var NoPaymentMethodFoundDialog = (function () {
|
|
|
2153
2186
|
}, /*#__PURE__*/React.createElement("strong", {
|
|
2154
2187
|
className: "FontSizeM"
|
|
2155
2188
|
}, "We were not able to find any asset of value in your wallet. Please top up your account in order to proceed with this payment."))),
|
|
2156
|
-
footer: /*#__PURE__*/React.createElement("div",
|
|
2189
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
2190
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
2191
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2157
2192
|
className: "ButtonPrimary",
|
|
2158
2193
|
onClick: close
|
|
2159
2194
|
}, "Ok"))
|
|
@@ -2164,7 +2199,7 @@ var PaymentContext = /*#__PURE__*/React.createContext();
|
|
|
2164
2199
|
|
|
2165
2200
|
var PaymentRoutingContext = /*#__PURE__*/React.createContext();
|
|
2166
2201
|
|
|
2167
|
-
var
|
|
2202
|
+
var TrackingContext = /*#__PURE__*/React.createContext();
|
|
2168
2203
|
|
|
2169
2204
|
var PaymentProvider = (function (props) {
|
|
2170
2205
|
var _useContext = useContext(ErrorContext),
|
|
@@ -2173,7 +2208,6 @@ var PaymentProvider = (function (props) {
|
|
|
2173
2208
|
var _useContext2 = useContext(ConfigurationContext),
|
|
2174
2209
|
_sent = _useContext2.sent,
|
|
2175
2210
|
_confirmed = _useContext2.confirmed,
|
|
2176
|
-
_ensured = _useContext2.ensured,
|
|
2177
2211
|
_failed = _useContext2.failed;
|
|
2178
2212
|
|
|
2179
2213
|
var _useContext3 = useContext(PaymentRoutingContext),
|
|
@@ -2187,13 +2221,17 @@ var PaymentProvider = (function (props) {
|
|
|
2187
2221
|
var _useContext5 = useContext(PaymentRoutingContext),
|
|
2188
2222
|
allRoutes = _useContext5.allRoutes;
|
|
2189
2223
|
|
|
2190
|
-
var _useContext6 = useContext(
|
|
2191
|
-
_useContext6.
|
|
2192
|
-
var setUpdate = _useContext6.setUpdate;
|
|
2224
|
+
var _useContext6 = useContext(UpdatableContext),
|
|
2225
|
+
setUpdatable = _useContext6.setUpdatable;
|
|
2193
2226
|
|
|
2194
2227
|
var _useContext7 = useContext(WalletContext),
|
|
2195
2228
|
wallet = _useContext7.wallet;
|
|
2196
2229
|
|
|
2230
|
+
var _useContext8 = useContext(TrackingContext),
|
|
2231
|
+
forward = _useContext8.forward,
|
|
2232
|
+
tracking = _useContext8.tracking,
|
|
2233
|
+
initializeTracking = _useContext8.initializeTracking;
|
|
2234
|
+
|
|
2197
2235
|
var _useState = useState(),
|
|
2198
2236
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2199
2237
|
payment = _useState2[0],
|
|
@@ -2214,53 +2252,81 @@ var PaymentProvider = (function (props) {
|
|
|
2214
2252
|
paymentState = _useState8[0],
|
|
2215
2253
|
setPaymentState = _useState8[1];
|
|
2216
2254
|
|
|
2217
|
-
var pay = function
|
|
2218
|
-
var
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2255
|
+
var pay = /*#__PURE__*/function () {
|
|
2256
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(_ref) {
|
|
2257
|
+
var navigate, currentBlock;
|
|
2258
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
2259
|
+
while (1) {
|
|
2260
|
+
switch (_context.prev = _context.next) {
|
|
2261
|
+
case 0:
|
|
2262
|
+
navigate = _ref.navigate;
|
|
2263
|
+
setClosable(false);
|
|
2264
|
+
setPaymentState('paying');
|
|
2265
|
+
setUpdatable(false);
|
|
2266
|
+
_context.next = 6;
|
|
2267
|
+
return request({
|
|
2268
|
+
blockchain: payment.route.transaction.blockchain,
|
|
2269
|
+
method: 'latestBlockNumber'
|
|
2270
|
+
});
|
|
2231
2271
|
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}
|
|
2272
|
+
case 6:
|
|
2273
|
+
currentBlock = _context.sent;
|
|
2274
|
+
wallet.sendTransaction(Object.assign({}, payment.route.transaction, {
|
|
2275
|
+
sent: function sent(transaction) {
|
|
2276
|
+
if (_sent) {
|
|
2277
|
+
_sent(transaction);
|
|
2278
|
+
}
|
|
2279
|
+
},
|
|
2280
|
+
confirmed: function confirmed(transaction) {
|
|
2281
|
+
if (tracking != true) {
|
|
2282
|
+
setClosable(true);
|
|
2283
|
+
}
|
|
2245
2284
|
|
|
2246
|
-
|
|
2247
|
-
setClosable(true);
|
|
2248
|
-
setUpdate(true);
|
|
2249
|
-
navigate('PaymentError');
|
|
2250
|
-
}
|
|
2251
|
-
})).then(function (sentTransaction) {
|
|
2252
|
-
setTransaction(sentTransaction);
|
|
2253
|
-
})["catch"](function (error) {
|
|
2254
|
-
console.log('error', error);
|
|
2255
|
-
setPaymentState('initialized');
|
|
2256
|
-
setClosable(true);
|
|
2257
|
-
setUpdate(true);
|
|
2285
|
+
setPaymentState('confirmed');
|
|
2258
2286
|
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2287
|
+
if (_confirmed) {
|
|
2288
|
+
_confirmed(transaction);
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
failed: function failed(transaction, error) {
|
|
2292
|
+
if (_failed) {
|
|
2293
|
+
_failed(transaction, error);
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
setPaymentState('initialized');
|
|
2297
|
+
setClosable(true);
|
|
2298
|
+
setUpdatable(true);
|
|
2299
|
+
navigate('PaymentError');
|
|
2300
|
+
}
|
|
2301
|
+
})).then(function (sentTransaction) {
|
|
2302
|
+
if (tracking) {
|
|
2303
|
+
initializeTracking(sentTransaction, currentBlock);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
setTransaction(sentTransaction);
|
|
2307
|
+
})["catch"](function (error) {
|
|
2308
|
+
console.log('error', error);
|
|
2309
|
+
setPaymentState('initialized');
|
|
2310
|
+
setClosable(true);
|
|
2311
|
+
setUpdatable(true);
|
|
2312
|
+
|
|
2313
|
+
if ((error === null || error === void 0 ? void 0 : error.code) == 'WRONG_NETWORK') {
|
|
2314
|
+
navigate('WrongNetwork');
|
|
2315
|
+
}
|
|
2316
|
+
});
|
|
2317
|
+
|
|
2318
|
+
case 8:
|
|
2319
|
+
case "end":
|
|
2320
|
+
return _context.stop();
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
}, _callee);
|
|
2324
|
+
}));
|
|
2325
|
+
|
|
2326
|
+
return function pay(_x) {
|
|
2327
|
+
return _ref2.apply(this, arguments);
|
|
2328
|
+
};
|
|
2329
|
+
}();
|
|
2264
2330
|
|
|
2265
2331
|
var approve = function approve() {
|
|
2266
2332
|
setClosable(false);
|
|
@@ -2281,15 +2347,20 @@ var PaymentProvider = (function (props) {
|
|
|
2281
2347
|
});
|
|
2282
2348
|
};
|
|
2283
2349
|
|
|
2350
|
+
useEffect(function () {
|
|
2351
|
+
if (forward) {
|
|
2352
|
+
setPaymentState('confirmed');
|
|
2353
|
+
}
|
|
2354
|
+
}, [forward]);
|
|
2284
2355
|
useEffect(function () {
|
|
2285
2356
|
if (selectedRoute) {
|
|
2286
2357
|
var fromToken = selectedRoute.fromToken;
|
|
2287
2358
|
selectedRoute.transaction.params;
|
|
2288
|
-
Promise.all([fromToken.name(), fromToken.symbol(), fromToken.readable(selectedRoute.fromAmount)]).then(function (
|
|
2289
|
-
var
|
|
2290
|
-
name =
|
|
2291
|
-
symbol =
|
|
2292
|
-
amount =
|
|
2359
|
+
Promise.all([fromToken.name(), fromToken.symbol(), fromToken.readable(selectedRoute.fromAmount)]).then(function (_ref3) {
|
|
2360
|
+
var _ref4 = _slicedToArray(_ref3, 3),
|
|
2361
|
+
name = _ref4[0],
|
|
2362
|
+
symbol = _ref4[1],
|
|
2363
|
+
amount = _ref4[2];
|
|
2293
2364
|
|
|
2294
2365
|
setPayment({
|
|
2295
2366
|
route: selectedRoute,
|
|
@@ -2305,9 +2376,9 @@ var PaymentProvider = (function (props) {
|
|
|
2305
2376
|
}, [selectedRoute]);
|
|
2306
2377
|
useEffect(function () {
|
|
2307
2378
|
if (allRoutes && allRoutes.length == 0) {
|
|
2308
|
-
|
|
2379
|
+
setUpdatable(false);
|
|
2309
2380
|
} else if (allRoutes && allRoutes.length > 0) {
|
|
2310
|
-
|
|
2381
|
+
setUpdatable(true);
|
|
2311
2382
|
}
|
|
2312
2383
|
}, [allRoutes]);
|
|
2313
2384
|
|
|
@@ -2351,9 +2422,9 @@ function _defineProperty(obj, key, value) {
|
|
|
2351
2422
|
return obj;
|
|
2352
2423
|
}
|
|
2353
2424
|
|
|
2354
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
2425
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2355
2426
|
|
|
2356
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
2427
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2357
2428
|
var PaymentRoutingProvider = (function (props) {
|
|
2358
2429
|
var _useState = useState(),
|
|
2359
2430
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2373,8 +2444,8 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2373
2444
|
var _useContext = useContext(WalletContext),
|
|
2374
2445
|
account = _useContext.account;
|
|
2375
2446
|
|
|
2376
|
-
var _useContext2 = useContext(
|
|
2377
|
-
|
|
2447
|
+
var _useContext2 = useContext(UpdatableContext),
|
|
2448
|
+
updatable = _useContext2.updatable;
|
|
2378
2449
|
|
|
2379
2450
|
var prepareAcceptedPayments = function prepareAcceptedPayments(accept) {
|
|
2380
2451
|
var toAddress = _typeof(accept.receiver) == 'object' ? accept.receiver.address : accept.receiver;
|
|
@@ -2389,9 +2460,9 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2389
2460
|
var getPaymentRoutes = function getPaymentRoutes(_ref) {
|
|
2390
2461
|
var allRoutes = _ref.allRoutes,
|
|
2391
2462
|
selectedRoute = _ref.selectedRoute,
|
|
2392
|
-
|
|
2463
|
+
updatable = _ref.updatable;
|
|
2393
2464
|
|
|
2394
|
-
if (
|
|
2465
|
+
if (updatable == false || !props.accept || !account) {
|
|
2395
2466
|
return;
|
|
2396
2467
|
}
|
|
2397
2468
|
|
|
@@ -2494,13 +2565,13 @@ var PaymentRoutingProvider = (function (props) {
|
|
|
2494
2565
|
getPaymentRoutes({
|
|
2495
2566
|
allRoutes: allRoutes,
|
|
2496
2567
|
selectedRoute: selectedRoute,
|
|
2497
|
-
|
|
2568
|
+
updatable: updatable
|
|
2498
2569
|
});
|
|
2499
2570
|
}, 15000);
|
|
2500
2571
|
return function () {
|
|
2501
2572
|
return clearTimeout(timeout);
|
|
2502
2573
|
};
|
|
2503
|
-
}, [reloadCount, allRoutes, selectedRoute,
|
|
2574
|
+
}, [reloadCount, allRoutes, selectedRoute, updatable]);
|
|
2504
2575
|
useEffect(function () {
|
|
2505
2576
|
if (account && props.accept) {
|
|
2506
2577
|
setAllRoutes(undefined);
|
|
@@ -2530,8 +2601,8 @@ var PaymentValueProvider = (function (props) {
|
|
|
2530
2601
|
var _useContext2 = useContext(WalletContext),
|
|
2531
2602
|
account = _useContext2.account;
|
|
2532
2603
|
|
|
2533
|
-
var _useContext3 = useContext(
|
|
2534
|
-
|
|
2604
|
+
var _useContext3 = useContext(UpdatableContext),
|
|
2605
|
+
updatable = _useContext3.updatable;
|
|
2535
2606
|
|
|
2536
2607
|
var _useContext4 = useContext(PaymentContext),
|
|
2537
2608
|
payment = _useContext4.payment;
|
|
@@ -2550,10 +2621,10 @@ var PaymentValueProvider = (function (props) {
|
|
|
2550
2621
|
setReloadCount = _useState4[1];
|
|
2551
2622
|
|
|
2552
2623
|
var getToTokenLocalValue = function getToTokenLocalValue(_ref) {
|
|
2553
|
-
var
|
|
2624
|
+
var updatable = _ref.updatable,
|
|
2554
2625
|
payment = _ref.payment;
|
|
2555
2626
|
|
|
2556
|
-
if (
|
|
2627
|
+
if (updatable == false || (payment === null || payment === void 0 ? void 0 : payment.route) == undefined) {
|
|
2557
2628
|
return;
|
|
2558
2629
|
}
|
|
2559
2630
|
|
|
@@ -2596,7 +2667,7 @@ var PaymentValueProvider = (function (props) {
|
|
|
2596
2667
|
useEffect(function () {
|
|
2597
2668
|
if (account && payment) {
|
|
2598
2669
|
getToTokenLocalValue({
|
|
2599
|
-
|
|
2670
|
+
updatable: updatable,
|
|
2600
2671
|
payment: payment
|
|
2601
2672
|
});
|
|
2602
2673
|
}
|
|
@@ -2605,13 +2676,13 @@ var PaymentValueProvider = (function (props) {
|
|
|
2605
2676
|
var timeout = setTimeout(function () {
|
|
2606
2677
|
setReloadCount(reloadCount + 1);
|
|
2607
2678
|
getToTokenLocalValue({
|
|
2608
|
-
|
|
2679
|
+
updatable: updatable
|
|
2609
2680
|
});
|
|
2610
2681
|
}, 15000);
|
|
2611
2682
|
return function () {
|
|
2612
2683
|
return clearTimeout(timeout);
|
|
2613
2684
|
};
|
|
2614
|
-
}, [reloadCount,
|
|
2685
|
+
}, [reloadCount, updatable]);
|
|
2615
2686
|
return /*#__PURE__*/React.createElement(PaymentValueContext.Provider, {
|
|
2616
2687
|
value: {
|
|
2617
2688
|
paymentValue: paymentValue
|
|
@@ -2766,7 +2837,9 @@ var ChangeAmountDialog = (function (props) {
|
|
|
2766
2837
|
changeAmount(toValidValue(maxAmount));
|
|
2767
2838
|
}
|
|
2768
2839
|
}, "(Max)")))))),
|
|
2769
|
-
footer: /*#__PURE__*/React.createElement("div",
|
|
2840
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
2841
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
2842
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2770
2843
|
className: "ButtonPrimary",
|
|
2771
2844
|
onClick: changeAmountAndGoBack
|
|
2772
2845
|
}, "Done"))
|
|
@@ -2853,6 +2926,7 @@ var ChangePaymentDialog = (function (props) {
|
|
|
2853
2926
|
}, [allRoutes]);
|
|
2854
2927
|
useEffect(function () {
|
|
2855
2928
|
setCards(allPaymentRoutesWithData.map(function (payment, index) {
|
|
2929
|
+
var blockchain = Blockchain.findByName(payment.route.blockchain);
|
|
2856
2930
|
return /*#__PURE__*/React.createElement("div", {
|
|
2857
2931
|
key: index,
|
|
2858
2932
|
className: "Card",
|
|
@@ -2866,6 +2940,11 @@ var ChangePaymentDialog = (function (props) {
|
|
|
2866
2940
|
}, /*#__PURE__*/React.createElement(TokenImage, {
|
|
2867
2941
|
blockchain: payment.route.blockchain,
|
|
2868
2942
|
address: payment.route.fromToken.address
|
|
2943
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
2944
|
+
className: "BlockchainLogo small",
|
|
2945
|
+
src: blockchain.logo,
|
|
2946
|
+
alt: blockchain.label,
|
|
2947
|
+
title: blockchain.label
|
|
2869
2948
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2870
2949
|
className: "CardBody"
|
|
2871
2950
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2906,25 +2985,12 @@ var ChangePaymentDialog = (function (props) {
|
|
|
2906
2985
|
});
|
|
2907
2986
|
});
|
|
2908
2987
|
|
|
2909
|
-
var Checkmark = (function () {
|
|
2910
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
2911
|
-
className: "Checkmark Icon",
|
|
2912
|
-
version: "1.1",
|
|
2913
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2914
|
-
x: "0px",
|
|
2915
|
-
y: "0px",
|
|
2916
|
-
viewBox: "0 0 24 24"
|
|
2917
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2918
|
-
d: "M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"
|
|
2919
|
-
}));
|
|
2920
|
-
});
|
|
2921
|
-
|
|
2922
2988
|
var DonationOverviewSkeleton = (function (props) {
|
|
2923
2989
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
2924
2990
|
header: /*#__PURE__*/React.createElement("div", {
|
|
2925
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
2991
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
2926
2992
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
2927
|
-
className: "LineHeightL FontSizeL
|
|
2993
|
+
className: "LineHeightL FontSizeL"
|
|
2928
2994
|
}, "Donation")),
|
|
2929
2995
|
body: /*#__PURE__*/React.createElement("div", {
|
|
2930
2996
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -2938,7 +3004,7 @@ var DonationOverviewSkeleton = (function (props) {
|
|
|
2938
3004
|
className: "SkeletonBackground"
|
|
2939
3005
|
}))),
|
|
2940
3006
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
2941
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3007
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
2942
3008
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2943
3009
|
className: "SkeletonWrapper"
|
|
2944
3010
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2949,6 +3015,60 @@ var DonationOverviewSkeleton = (function (props) {
|
|
|
2949
3015
|
});
|
|
2950
3016
|
});
|
|
2951
3017
|
|
|
3018
|
+
var Checkmark = (function (props) {
|
|
3019
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
3020
|
+
className: "Checkmark Icon " + props.className,
|
|
3021
|
+
version: "1.1",
|
|
3022
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3023
|
+
x: "0px",
|
|
3024
|
+
y: "0px",
|
|
3025
|
+
viewBox: "0 0 24 24"
|
|
3026
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
3027
|
+
d: "M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"
|
|
3028
|
+
}));
|
|
3029
|
+
});
|
|
3030
|
+
|
|
3031
|
+
var DigitalWalletIcon = (function (props) {
|
|
3032
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
3033
|
+
className: "DigitalWalletIcon Icon " + props.className,
|
|
3034
|
+
version: "1.1",
|
|
3035
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3036
|
+
height: "24",
|
|
3037
|
+
width: "24",
|
|
3038
|
+
viewBox: "0 0 24 24"
|
|
3039
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
3040
|
+
d: "M8.51,4.84l-.39-.53,4-2.89a2.2,2.2,0,0,1,3.06.48l.4.56-.53.39-.4-.56A1.54,1.54,0,0,0,12.5,2Z",
|
|
3041
|
+
transform: "translate(-0.81 -1)"
|
|
3042
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3043
|
+
d: "M9.77,4.89l-.21-.62,6.31-2.13h0a2.18,2.18,0,0,1,.67-.1h0a2.21,2.21,0,0,1,2.08,1.49l.32.95-.63.21L18,3.73a1.53,1.53,0,0,0-1.45-1h0a1.61,1.61,0,0,0-.48.08h0Z",
|
|
3044
|
+
transform: "translate(-0.81 -1)"
|
|
3045
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3046
|
+
d: "M19.72,16.2H18.27a3.28,3.28,0,1,1,0-6.56h1.45a3.21,3.21,0,0,1,1.33.28h0a3.28,3.28,0,0,1,0,6A3.21,3.21,0,0,1,19.72,16.2Zm-1.45-5.9a2.63,2.63,0,0,0,0,5.25h1.45a2.56,2.56,0,0,0,1.06-.23,2.62,2.62,0,0,0,0-4.8,2.55,2.55,0,0,0-1.06-.22ZM19,14.53a1.61,1.61,0,1,1,1.61-1.61A1.62,1.62,0,0,1,19,14.53ZM19,12a1,1,0,1,0,.95.95A1,1,0,0,0,19,12Z",
|
|
3047
|
+
transform: "translate(-0.81 -1)"
|
|
3048
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3049
|
+
d: "M10.49,19.69a1.58,1.58,0,1,1,1.58-1.57A1.57,1.57,0,0,1,10.49,19.69Zm0-2.49a.92.92,0,1,0,.92.92A.92.92,0,0,0,10.49,17.2Z",
|
|
3050
|
+
transform: "translate(-0.81 -1)"
|
|
3051
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3052
|
+
d: "M19.09,22.14H2.79a2,2,0,0,1-2-2V6.25a2.1,2.1,0,0,1,0-.43,2,2,0,0,1,.48-.92,2,2,0,0,1,1.48-.65H19.09a2,2,0,0,1,.64.1,2,2,0,0,1,1.36,1.79v0a.28.28,0,0,1,0,.09v3.91h-.66v-4a1.49,1.49,0,0,0-.23-.69A1.35,1.35,0,0,0,19.52,5a1.26,1.26,0,0,0-.43-.08H2.82a1.34,1.34,0,0,0-1,.44A1.49,1.49,0,0,0,1.5,6a1.5,1.5,0,0,0,0,.29V20.13a1.36,1.36,0,0,0,1.34,1.35H19.09a1.35,1.35,0,0,0,1.35-1.35V15.68h.66v4.45A2,2,0,0,1,19.09,22.14Z",
|
|
3053
|
+
transform: "translate(-0.81 -1)"
|
|
3054
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3055
|
+
d: "M9.27,9.31a1.58,1.58,0,1,1,0-3.15,1.58,1.58,0,0,1,0,3.15Zm0-2.5a.92.92,0,1,0,.92.92A.92.92,0,0,0,9.27,6.81Z",
|
|
3056
|
+
transform: "translate(-0.81 -1)"
|
|
3057
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3058
|
+
d: "M7.11,14.67A1.58,1.58,0,1,1,8.69,13.1,1.57,1.57,0,0,1,7.11,14.67Zm0-2.49A.92.92,0,1,0,8,13.1.92.92,0,0,0,7.11,12.18Z",
|
|
3059
|
+
transform: "translate(-0.81 -1)"
|
|
3060
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
3061
|
+
x: "0.33",
|
|
3062
|
+
y: "11.77",
|
|
3063
|
+
width: "4.72",
|
|
3064
|
+
height: "0.66"
|
|
3065
|
+
}), /*#__PURE__*/React.createElement("polygon", {
|
|
3066
|
+
points: "2.08 9.53 0.33 9.53 0.33 8.87 1.8 8.87 4.28 6.39 7.21 6.39 7.21 7.05 4.55 7.05 2.08 9.53"
|
|
3067
|
+
}), /*#__PURE__*/React.createElement("polygon", {
|
|
3068
|
+
points: "8.43 17.45 4.53 17.45 2.63 15.55 0.33 15.55 0.33 14.89 2.9 14.89 4.8 16.79 8.43 16.79 8.43 17.45"
|
|
3069
|
+
}));
|
|
3070
|
+
});
|
|
3071
|
+
|
|
2952
3072
|
var LoadingText = (function (props) {
|
|
2953
3073
|
return /*#__PURE__*/React.createElement("div", {
|
|
2954
3074
|
className: "LoadingText"
|
|
@@ -2961,26 +3081,143 @@ var LoadingText = (function (props) {
|
|
|
2961
3081
|
}, "."));
|
|
2962
3082
|
});
|
|
2963
3083
|
|
|
2964
|
-
var
|
|
3084
|
+
var Footer = (function () {
|
|
2965
3085
|
var _useContext = useContext(ConfigurationContext),
|
|
2966
3086
|
currencyCode = _useContext.currencyCode;
|
|
2967
3087
|
|
|
2968
3088
|
var _useContext2 = useContext(ChangableAmountContext),
|
|
2969
3089
|
amount = _useContext2.amount;
|
|
3090
|
+
_useContext2.amountsMissing;
|
|
2970
3091
|
|
|
2971
|
-
var _useContext3 = useContext(
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
transaction = _useContext3.transaction,
|
|
2976
|
-
approve = _useContext3.approve,
|
|
2977
|
-
approvalTransaction = _useContext3.approvalTransaction;
|
|
3092
|
+
var _useContext3 = useContext(TrackingContext),
|
|
3093
|
+
tracking = _useContext3.tracking,
|
|
3094
|
+
forward = _useContext3.forward,
|
|
3095
|
+
forwardTo = _useContext3.forwardTo;
|
|
2978
3096
|
|
|
2979
|
-
var _useContext4 = useContext(
|
|
2980
|
-
|
|
3097
|
+
var _useContext4 = useContext(PaymentContext),
|
|
3098
|
+
payment = _useContext4.payment,
|
|
3099
|
+
paymentState = _useContext4.paymentState,
|
|
3100
|
+
pay = _useContext4.pay,
|
|
3101
|
+
transaction = _useContext4.transaction,
|
|
3102
|
+
approve = _useContext4.approve,
|
|
3103
|
+
approvalTransaction = _useContext4.approvalTransaction;
|
|
3104
|
+
|
|
3105
|
+
var _useContext5 = useContext(PaymentValueContext),
|
|
3106
|
+
paymentValue = _useContext5.paymentValue;
|
|
3107
|
+
|
|
3108
|
+
var _useContext6 = useContext(NavigateStackContext),
|
|
3109
|
+
navigate = _useContext6.navigate;
|
|
3110
|
+
|
|
3111
|
+
var _useContext7 = useContext(ClosableContext),
|
|
3112
|
+
close = _useContext7.close;
|
|
3113
|
+
|
|
3114
|
+
var trackingInfo = function trackingInfo() {
|
|
3115
|
+
if (tracking != true) {
|
|
3116
|
+
return null;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
if (forward) {
|
|
3120
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
3121
|
+
className: "Card transparent small disabled"
|
|
3122
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3123
|
+
className: "CardImage"
|
|
3124
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3125
|
+
className: "TextCenter Opacity05"
|
|
3126
|
+
}, /*#__PURE__*/React.createElement(Checkmark, {
|
|
3127
|
+
className: "small"
|
|
3128
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3129
|
+
className: "CardBody"
|
|
3130
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3131
|
+
className: "CardBodyWrapper"
|
|
3132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3133
|
+
className: "Opacity05"
|
|
3134
|
+
}, "Payment confirmation has been stored")))));
|
|
3135
|
+
} else {
|
|
3136
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
3137
|
+
className: "Card transparent small disabled"
|
|
3138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3139
|
+
className: "CardImage"
|
|
3140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3141
|
+
className: "TextCenter"
|
|
3142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3143
|
+
className: "Loading Icon"
|
|
3144
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3145
|
+
className: "CardBody"
|
|
3146
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3147
|
+
className: "CardBodyWrapper"
|
|
3148
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3149
|
+
className: "Opacity05"
|
|
3150
|
+
}, "Storing payment confirmation")))));
|
|
3151
|
+
}
|
|
3152
|
+
};
|
|
2981
3153
|
|
|
2982
|
-
var
|
|
2983
|
-
|
|
3154
|
+
var additionalPaymentInformation = function additionalPaymentInformation() {
|
|
3155
|
+
if (paymentState == 'paying' && transaction == undefined) {
|
|
3156
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3157
|
+
className: "PaddingBottomS"
|
|
3158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3159
|
+
className: "Card transparent disabled small"
|
|
3160
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3161
|
+
className: "CardImage"
|
|
3162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3163
|
+
className: "TextCenter Opacity05"
|
|
3164
|
+
}, /*#__PURE__*/React.createElement(DigitalWalletIcon, {
|
|
3165
|
+
className: "small"
|
|
3166
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3167
|
+
className: "CardBody"
|
|
3168
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3169
|
+
className: "CardBodyWrapper"
|
|
3170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3171
|
+
className: "Opacity05"
|
|
3172
|
+
}, "Confirm transaction in your wallet")))));
|
|
3173
|
+
} else if (paymentState == 'confirmed') {
|
|
3174
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3175
|
+
className: "PaddingBottomS"
|
|
3176
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
3177
|
+
className: "Card transparent small",
|
|
3178
|
+
title: "Payment has been confirmed by the network",
|
|
3179
|
+
href: transaction === null || transaction === void 0 ? void 0 : transaction.url,
|
|
3180
|
+
target: "_blank",
|
|
3181
|
+
rel: "noopener noreferrer"
|
|
3182
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3183
|
+
className: "CardImage"
|
|
3184
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3185
|
+
className: "TextCenter Opacity05"
|
|
3186
|
+
}, /*#__PURE__*/React.createElement(Checkmark, {
|
|
3187
|
+
className: "small"
|
|
3188
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3189
|
+
className: "CardBody"
|
|
3190
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3191
|
+
className: "CardBodyWrapper"
|
|
3192
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3193
|
+
className: "Opacity05"
|
|
3194
|
+
}, "Payment has been confirmed"))))), trackingInfo());
|
|
3195
|
+
}
|
|
3196
|
+
};
|
|
3197
|
+
|
|
3198
|
+
var approvalButton = function approvalButton() {
|
|
3199
|
+
if (!payment.route.approvalRequired || payment.route.directTransfer) {
|
|
3200
|
+
return null;
|
|
3201
|
+
} else if (paymentState == 'initialized') {
|
|
3202
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3203
|
+
className: "PaddingBottomS"
|
|
3204
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
3205
|
+
className: "ButtonPrimary",
|
|
3206
|
+
onClick: approve,
|
|
3207
|
+
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
3208
|
+
}, "Allow ", payment.symbol, " to be used as payment"));
|
|
3209
|
+
} else if (paymentState == 'approving') {
|
|
3210
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3211
|
+
className: "PaddingBottomS"
|
|
3212
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
3213
|
+
className: "ButtonPrimary",
|
|
3214
|
+
title: "Approving payment token - please wait",
|
|
3215
|
+
href: approvalTransaction === null || approvalTransaction === void 0 ? void 0 : approvalTransaction.url,
|
|
3216
|
+
target: "_blank",
|
|
3217
|
+
rel: "noopener noreferrer"
|
|
3218
|
+
}, /*#__PURE__*/React.createElement(LoadingText, null, "Approving")));
|
|
3219
|
+
}
|
|
3220
|
+
};
|
|
2984
3221
|
|
|
2985
3222
|
var mainAction = function mainAction() {
|
|
2986
3223
|
if (paymentState == 'initialized' || paymentState == 'approving') {
|
|
@@ -2995,10 +3232,10 @@ var DonationOverviewDialog = (function (props) {
|
|
|
2995
3232
|
navigate: navigate
|
|
2996
3233
|
});
|
|
2997
3234
|
}
|
|
2998
|
-
}, "Pay ", new Currency({
|
|
3235
|
+
}, "Pay ", amount ? new Currency({
|
|
2999
3236
|
amount: amount.toFixed(2),
|
|
3000
3237
|
code: currencyCode
|
|
3001
|
-
}).toString());
|
|
3238
|
+
}).toString() : paymentValue.toString().length ? paymentValue.toString() : "".concat(payment.amount));
|
|
3002
3239
|
} else if (paymentState == 'paying') {
|
|
3003
3240
|
return /*#__PURE__*/React.createElement("a", {
|
|
3004
3241
|
className: "ButtonPrimary",
|
|
@@ -3008,39 +3245,51 @@ var DonationOverviewDialog = (function (props) {
|
|
|
3008
3245
|
rel: "noopener noreferrer"
|
|
3009
3246
|
}, /*#__PURE__*/React.createElement(LoadingText, null, "Paying"));
|
|
3010
3247
|
} else if (paymentState == 'confirmed') {
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3248
|
+
if (tracking == true) {
|
|
3249
|
+
if (forward) {
|
|
3250
|
+
if (forwardTo) {
|
|
3251
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
3252
|
+
className: "ButtonPrimary",
|
|
3253
|
+
href: forwardTo,
|
|
3254
|
+
rel: "noopener noreferrer"
|
|
3255
|
+
}, "Continue");
|
|
3256
|
+
} else {
|
|
3257
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
3258
|
+
className: "ButtonPrimary",
|
|
3259
|
+
onClick: close
|
|
3260
|
+
}, "Continue");
|
|
3261
|
+
}
|
|
3262
|
+
} else {
|
|
3263
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
3264
|
+
className: "ButtonPrimary disabled",
|
|
3265
|
+
onClick: function onClick() {}
|
|
3266
|
+
}, "Continue");
|
|
3267
|
+
}
|
|
3268
|
+
} else {
|
|
3269
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
3270
|
+
className: "ButtonPrimary",
|
|
3271
|
+
onClick: close
|
|
3272
|
+
}, "Close");
|
|
3273
|
+
}
|
|
3016
3274
|
}
|
|
3017
3275
|
};
|
|
3018
3276
|
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3022
|
-
className: "PaddingBottomS"
|
|
3023
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
3024
|
-
className: "ButtonPrimary wide",
|
|
3025
|
-
onClick: approve,
|
|
3026
|
-
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
3027
|
-
}, "Allow ", payment.symbol, " to be used as payment"));
|
|
3028
|
-
} else if (paymentState == 'approving') {
|
|
3029
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3030
|
-
className: "PaddingBottomS"
|
|
3031
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
3032
|
-
className: "ButtonPrimary wide",
|
|
3033
|
-
title: "Approving payment token - please wait",
|
|
3034
|
-
href: approvalTransaction === null || approvalTransaction === void 0 ? void 0 : approvalTransaction.url,
|
|
3035
|
-
target: "_blank",
|
|
3036
|
-
rel: "noopener noreferrer"
|
|
3037
|
-
}, /*#__PURE__*/React.createElement(LoadingText, null, "Approving")));
|
|
3038
|
-
}
|
|
3039
|
-
};
|
|
3277
|
+
return /*#__PURE__*/React.createElement("div", null, approvalButton(), additionalPaymentInformation(), mainAction());
|
|
3278
|
+
});
|
|
3040
3279
|
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3280
|
+
var DonationOverviewDialog = (function (props) {
|
|
3281
|
+
var _useContext = useContext(ConfigurationContext),
|
|
3282
|
+
currencyCode = _useContext.currencyCode;
|
|
3283
|
+
|
|
3284
|
+
var _useContext2 = useContext(ChangableAmountContext),
|
|
3285
|
+
amount = _useContext2.amount;
|
|
3286
|
+
|
|
3287
|
+
var _useContext3 = useContext(PaymentContext),
|
|
3288
|
+
payment = _useContext3.payment,
|
|
3289
|
+
paymentState = _useContext3.paymentState;
|
|
3290
|
+
|
|
3291
|
+
var _useContext4 = useContext(NavigateStackContext),
|
|
3292
|
+
navigate = _useContext4.navigate;
|
|
3044
3293
|
|
|
3045
3294
|
if (payment == undefined) {
|
|
3046
3295
|
return /*#__PURE__*/React.createElement(DonationOverviewSkeleton, null);
|
|
@@ -3048,9 +3297,9 @@ var DonationOverviewDialog = (function (props) {
|
|
|
3048
3297
|
|
|
3049
3298
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
3050
3299
|
header: /*#__PURE__*/React.createElement("div", {
|
|
3051
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
3300
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
3052
3301
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
3053
|
-
className: "LineHeightL FontSizeL
|
|
3302
|
+
className: "LineHeightL FontSizeL"
|
|
3054
3303
|
}, "Donation")),
|
|
3055
3304
|
body: /*#__PURE__*/React.createElement("div", {
|
|
3056
3305
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -3113,8 +3362,8 @@ var DonationOverviewDialog = (function (props) {
|
|
|
3113
3362
|
className: "CardAction"
|
|
3114
3363
|
}, /*#__PURE__*/React.createElement(ChevronRight, null)))),
|
|
3115
3364
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3116
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3117
|
-
},
|
|
3365
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3366
|
+
}, /*#__PURE__*/React.createElement(Footer, null))
|
|
3118
3367
|
});
|
|
3119
3368
|
});
|
|
3120
3369
|
|
|
@@ -3151,9 +3400,9 @@ var PaymentErrorDialog = (function () {
|
|
|
3151
3400
|
rel: "noopener noreferrer"
|
|
3152
3401
|
}, "View on explorer")))),
|
|
3153
3402
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3154
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3403
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3155
3404
|
}, /*#__PURE__*/React.createElement("button", {
|
|
3156
|
-
className: "ButtonPrimary
|
|
3405
|
+
className: "ButtonPrimary",
|
|
3157
3406
|
onClick: function onClick() {
|
|
3158
3407
|
return navigate('back');
|
|
3159
3408
|
}
|
|
@@ -3174,9 +3423,9 @@ var WrongNetworkDialog = (function (props) {
|
|
|
3174
3423
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
3175
3424
|
stacked: true,
|
|
3176
3425
|
header: /*#__PURE__*/React.createElement("div", {
|
|
3177
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
3426
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
3178
3427
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
3179
|
-
className: "LineHeightL FontSizeL
|
|
3428
|
+
className: "LineHeightL FontSizeL"
|
|
3180
3429
|
}, "Wrong Network")),
|
|
3181
3430
|
body: /*#__PURE__*/React.createElement("div", {
|
|
3182
3431
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -3193,7 +3442,7 @@ var WrongNetworkDialog = (function (props) {
|
|
|
3193
3442
|
className: "FontSizeM"
|
|
3194
3443
|
}, "Please make sure you connect your wallet to the correct network before you try again!"))),
|
|
3195
3444
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3196
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3445
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3197
3446
|
}, /*#__PURE__*/React.createElement("button", {
|
|
3198
3447
|
className: "ButtonPrimary",
|
|
3199
3448
|
onClick: function onClick() {
|
|
@@ -3224,16 +3473,122 @@ var DonationStack = (function (props) {
|
|
|
3224
3473
|
});
|
|
3225
3474
|
});
|
|
3226
3475
|
|
|
3227
|
-
var
|
|
3228
|
-
var
|
|
3476
|
+
var TrackingProvider = (function (props) {
|
|
3477
|
+
var _useContext = useContext(ConfigurationContext),
|
|
3478
|
+
track = _useContext.track;
|
|
3479
|
+
|
|
3480
|
+
var _useState = useState(track && !!track.endpoint),
|
|
3229
3481
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3230
|
-
|
|
3231
|
-
|
|
3482
|
+
tracking = _useState2[0],
|
|
3483
|
+
setTracking = _useState2[1];
|
|
3484
|
+
|
|
3485
|
+
var _useState3 = useState(false),
|
|
3486
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3487
|
+
forward = _useState4[0],
|
|
3488
|
+
setForward = _useState4[1];
|
|
3489
|
+
|
|
3490
|
+
var _useState5 = useState(),
|
|
3491
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3492
|
+
forwardTo = _useState6[0],
|
|
3493
|
+
setForwardTo = _useState6[1];
|
|
3494
|
+
|
|
3495
|
+
var _useContext2 = useContext(ClosableContext),
|
|
3496
|
+
setClosable = _useContext2.setClosable;
|
|
3497
|
+
|
|
3498
|
+
useEffect(function () {
|
|
3499
|
+
setTracking(track && !!track.endpoint);
|
|
3500
|
+
}, [track]);
|
|
3501
|
+
|
|
3502
|
+
var openSocket = function openSocket(transaction) {
|
|
3503
|
+
var socket = new WebSocket('wss://integrate.depay.fi/cable');
|
|
3504
|
+
|
|
3505
|
+
socket.onopen = function (event) {
|
|
3506
|
+
var msg = {
|
|
3507
|
+
command: 'subscribe',
|
|
3508
|
+
identifier: JSON.stringify({
|
|
3509
|
+
blockchain: transaction.blockchain,
|
|
3510
|
+
sender: transaction.from.toLowerCase(),
|
|
3511
|
+
nonce: transaction.nonce,
|
|
3512
|
+
channel: 'PaymentChannel'
|
|
3513
|
+
})
|
|
3514
|
+
};
|
|
3515
|
+
socket.send(JSON.stringify(msg));
|
|
3516
|
+
};
|
|
3517
|
+
|
|
3518
|
+
socket.onclose = function (event) {};
|
|
3519
|
+
|
|
3520
|
+
socket.onmessage = function (event) {
|
|
3521
|
+
var item = JSON.parse(event.data);
|
|
3522
|
+
|
|
3523
|
+
if (item.type === "ping") {
|
|
3524
|
+
return;
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
if (item.message && item.message.forward) {
|
|
3528
|
+
setClosable(!item.message.forward_to);
|
|
3529
|
+
setForwardTo(item.message.forward_to);
|
|
3530
|
+
setForward(item.message.forward);
|
|
3531
|
+
socket.close();
|
|
3532
|
+
|
|
3533
|
+
if (!!item.message.forward_to) {
|
|
3534
|
+
setTimeout(function () {
|
|
3535
|
+
props.document.location.href = item.message.forward_to;
|
|
3536
|
+
}, 500);
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
};
|
|
3232
3540
|
|
|
3233
|
-
|
|
3541
|
+
socket.onerror = function (error) {
|
|
3542
|
+
console.log('WebSocket Error: ' + error);
|
|
3543
|
+
};
|
|
3544
|
+
};
|
|
3545
|
+
|
|
3546
|
+
var retryStartTracking = function retryStartTracking(transaction, afterBlock, attempt) {
|
|
3547
|
+
attempt = parseInt(attempt || 1, 10);
|
|
3548
|
+
console.log('RETRY TRACKING ATTEMPT ', attempt);
|
|
3549
|
+
|
|
3550
|
+
if (attempt < 3) {
|
|
3551
|
+
setTimeout(function () {
|
|
3552
|
+
startTracking(transaction, afterBlock, attempt + 1);
|
|
3553
|
+
}, 3000);
|
|
3554
|
+
} else {
|
|
3555
|
+
console.log('TRACKING FAILED AFTER 3 ATTEMPTS!');
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3558
|
+
|
|
3559
|
+
var startTracking = function startTracking(transaction, afterBlock, attempt) {
|
|
3560
|
+
fetch(track.endpoint, {
|
|
3561
|
+
method: 'POST',
|
|
3562
|
+
body: JSON.stringify({
|
|
3563
|
+
blockchain: transaction.blockchain,
|
|
3564
|
+
transaction: transaction.id.toLowerCase(),
|
|
3565
|
+
sender: transaction.from.toLowerCase(),
|
|
3566
|
+
nonce: transaction.nonce,
|
|
3567
|
+
after_block: afterBlock
|
|
3568
|
+
})
|
|
3569
|
+
}).then(function (response) {
|
|
3570
|
+
if (response.status == 200) {
|
|
3571
|
+
console.log('TRACKING INITIALIZED');
|
|
3572
|
+
} else {
|
|
3573
|
+
retryStartTracking(transaction, afterBlock, attempt);
|
|
3574
|
+
}
|
|
3575
|
+
})["catch"](function (error) {
|
|
3576
|
+
console.log('TRACKING FAILED', error);
|
|
3577
|
+
retryStartTracking(transaction, afterBlock, attempt);
|
|
3578
|
+
});
|
|
3579
|
+
};
|
|
3580
|
+
|
|
3581
|
+
var initializeTracking = function initializeTracking(transaction, afterBlock) {
|
|
3582
|
+
openSocket(transaction);
|
|
3583
|
+
startTracking(transaction, afterBlock);
|
|
3584
|
+
};
|
|
3585
|
+
|
|
3586
|
+
return /*#__PURE__*/React.createElement(TrackingContext.Provider, {
|
|
3234
3587
|
value: {
|
|
3235
|
-
|
|
3236
|
-
|
|
3588
|
+
tracking: tracking,
|
|
3589
|
+
initializeTracking: initializeTracking,
|
|
3590
|
+
forward: forward,
|
|
3591
|
+
forwardTo: forwardTo
|
|
3237
3592
|
}
|
|
3238
3593
|
}, props.children);
|
|
3239
3594
|
});
|
|
@@ -3336,12 +3691,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
3336
3691
|
|
|
3337
3692
|
var Donation = /*#__PURE__*/function () {
|
|
3338
3693
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
3339
|
-
var amount, accept, event, sent, confirmed,
|
|
3694
|
+
var amount, accept, event, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, document, unmount;
|
|
3340
3695
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
3341
3696
|
while (1) {
|
|
3342
3697
|
switch (_context2.prev = _context2.next) {
|
|
3343
3698
|
case 0:
|
|
3344
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed,
|
|
3699
|
+
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, document = _ref3.document;
|
|
3345
3700
|
_context2.prev = 1;
|
|
3346
3701
|
_context2.next = 4;
|
|
3347
3702
|
return preflight$2({
|
|
@@ -3367,26 +3722,27 @@ var Donation = /*#__PURE__*/function () {
|
|
|
3367
3722
|
event: event,
|
|
3368
3723
|
sent: sent,
|
|
3369
3724
|
confirmed: confirmed,
|
|
3370
|
-
ensured: ensured,
|
|
3371
3725
|
failed: failed,
|
|
3372
3726
|
blacklist: blacklist,
|
|
3373
3727
|
providers: providers
|
|
3374
3728
|
}
|
|
3375
|
-
}, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
3729
|
+
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
3376
3730
|
unmount: unmount
|
|
3377
|
-
}, /*#__PURE__*/React.createElement(
|
|
3731
|
+
}, /*#__PURE__*/React.createElement(WalletProvider, {
|
|
3378
3732
|
container: container,
|
|
3379
3733
|
connected: connected,
|
|
3380
3734
|
unmount: unmount
|
|
3381
3735
|
}, /*#__PURE__*/React.createElement(ConversionRateProvider, null, /*#__PURE__*/React.createElement(ChangableAmountProvider, {
|
|
3382
3736
|
accept: accept
|
|
3737
|
+
}, /*#__PURE__*/React.createElement(TrackingProvider, {
|
|
3738
|
+
document: ensureDocument(document)
|
|
3383
3739
|
}, /*#__PURE__*/React.createElement(DonationRoutingProvider, {
|
|
3384
3740
|
container: container,
|
|
3385
3741
|
document: document
|
|
3386
3742
|
}, /*#__PURE__*/React.createElement(DonationStack, {
|
|
3387
3743
|
document: document,
|
|
3388
3744
|
container: container
|
|
3389
|
-
})))))))));
|
|
3745
|
+
}), /*#__PURE__*/React.createElement(PoweredBy, null))))))))));
|
|
3390
3746
|
};
|
|
3391
3747
|
});
|
|
3392
3748
|
return _context2.abrupt("return", {
|
|
@@ -3454,9 +3810,9 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
3454
3810
|
|
|
3455
3811
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
3456
3812
|
header: /*#__PURE__*/React.createElement("div", {
|
|
3457
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
3813
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
3458
3814
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
3459
|
-
className: "LineHeightL FontSizeL
|
|
3815
|
+
className: "LineHeightL FontSizeL"
|
|
3460
3816
|
}, "Payment")),
|
|
3461
3817
|
body: /*#__PURE__*/React.createElement("div", {
|
|
3462
3818
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -3470,7 +3826,7 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
3470
3826
|
className: "SkeletonBackground"
|
|
3471
3827
|
}))),
|
|
3472
3828
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3473
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3829
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3474
3830
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3475
3831
|
className: "SkeletonWrapper"
|
|
3476
3832
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3485,17 +3841,13 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
3485
3841
|
var _useContext = useContext(ConfigurationContext),
|
|
3486
3842
|
currencyCode = _useContext.currencyCode;
|
|
3487
3843
|
|
|
3488
|
-
var _useContext2 = useContext(
|
|
3489
|
-
|
|
3490
|
-
|
|
3844
|
+
var _useContext2 = useContext(PaymentContext),
|
|
3845
|
+
payment = _useContext2.payment,
|
|
3846
|
+
paymentState = _useContext2.paymentState;
|
|
3491
3847
|
|
|
3492
|
-
var _useContext3 = useContext(
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
pay = _useContext3.pay,
|
|
3496
|
-
transaction = _useContext3.transaction,
|
|
3497
|
-
approve = _useContext3.approve,
|
|
3498
|
-
approvalTransaction = _useContext3.approvalTransaction;
|
|
3848
|
+
var _useContext3 = useContext(ChangableAmountContext),
|
|
3849
|
+
amount = _useContext3.amount,
|
|
3850
|
+
amountsMissing = _useContext3.amountsMissing;
|
|
3499
3851
|
|
|
3500
3852
|
var _useContext4 = useContext(PaymentValueContext),
|
|
3501
3853
|
paymentValue = _useContext4.paymentValue;
|
|
@@ -3503,78 +3855,15 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
3503
3855
|
var _useContext5 = useContext(NavigateStackContext),
|
|
3504
3856
|
navigate = _useContext5.navigate;
|
|
3505
3857
|
|
|
3506
|
-
var _useContext6 = useContext(ClosableContext),
|
|
3507
|
-
close = _useContext6.close;
|
|
3508
|
-
|
|
3509
|
-
var mainAction = function mainAction() {
|
|
3510
|
-
if (paymentState == 'initialized' || paymentState == 'approving') {
|
|
3511
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
3512
|
-
className: ["ButtonPrimary", payment.route.approvalRequired && !payment.route.directTransfer ? 'disabled' : ''].join(' '),
|
|
3513
|
-
onClick: function onClick() {
|
|
3514
|
-
if (payment.route.approvalRequired && !payment.route.directTransfer) {
|
|
3515
|
-
return;
|
|
3516
|
-
}
|
|
3517
|
-
|
|
3518
|
-
pay({
|
|
3519
|
-
navigate: navigate
|
|
3520
|
-
});
|
|
3521
|
-
}
|
|
3522
|
-
}, "Pay ", amount ? new Currency({
|
|
3523
|
-
amount: amount.toFixed(2),
|
|
3524
|
-
code: currencyCode
|
|
3525
|
-
}).toString() : paymentValue.toString().length ? paymentValue.toString() : "".concat(payment.amount));
|
|
3526
|
-
} else if (paymentState == 'paying') {
|
|
3527
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
3528
|
-
className: "ButtonPrimary",
|
|
3529
|
-
title: "Performing the payment - please wait",
|
|
3530
|
-
href: transaction === null || transaction === void 0 ? void 0 : transaction.url,
|
|
3531
|
-
target: "_blank",
|
|
3532
|
-
rel: "noopener noreferrer"
|
|
3533
|
-
}, /*#__PURE__*/React.createElement(LoadingText, null, "Paying"));
|
|
3534
|
-
} else if (paymentState == 'confirmed') {
|
|
3535
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
3536
|
-
className: "ButtonPrimary round",
|
|
3537
|
-
title: "Done",
|
|
3538
|
-
onClick: close
|
|
3539
|
-
}, /*#__PURE__*/React.createElement(Checkmark, null));
|
|
3540
|
-
}
|
|
3541
|
-
};
|
|
3542
|
-
|
|
3543
|
-
var approvalAction = function approvalAction() {
|
|
3544
|
-
if (paymentState == 'initialized') {
|
|
3545
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3546
|
-
className: "PaddingBottomS"
|
|
3547
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
3548
|
-
className: "ButtonPrimary wide",
|
|
3549
|
-
onClick: approve,
|
|
3550
|
-
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
3551
|
-
}, "Allow ", payment.symbol, " to be used as payment"));
|
|
3552
|
-
} else if (paymentState == 'approving') {
|
|
3553
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3554
|
-
className: "PaddingBottomS"
|
|
3555
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
3556
|
-
className: "ButtonPrimary wide",
|
|
3557
|
-
title: "Approving payment token - please wait",
|
|
3558
|
-
href: approvalTransaction === null || approvalTransaction === void 0 ? void 0 : approvalTransaction.url,
|
|
3559
|
-
target: "_blank",
|
|
3560
|
-
rel: "noopener noreferrer"
|
|
3561
|
-
}, /*#__PURE__*/React.createElement(LoadingText, null, "Approving")));
|
|
3562
|
-
}
|
|
3563
|
-
};
|
|
3564
|
-
|
|
3565
|
-
var actions = function actions() {
|
|
3566
|
-
return /*#__PURE__*/React.createElement("div", null, payment.route.approvalRequired && !payment.route.directTransfer && approvalAction(), mainAction());
|
|
3567
|
-
};
|
|
3568
|
-
|
|
3569
3858
|
if (payment == undefined || paymentValue == undefined) {
|
|
3570
3859
|
return /*#__PURE__*/React.createElement(PaymentOverviewSkeleton, null);
|
|
3571
3860
|
}
|
|
3572
3861
|
|
|
3573
3862
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
3574
3863
|
header: /*#__PURE__*/React.createElement("div", {
|
|
3575
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
3864
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
3576
3865
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
3577
|
-
className: "LineHeightL FontSizeL
|
|
3866
|
+
className: "LineHeightL FontSizeL"
|
|
3578
3867
|
}, "Payment")),
|
|
3579
3868
|
body: /*#__PURE__*/React.createElement("div", {
|
|
3580
3869
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -3637,8 +3926,8 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
3637
3926
|
className: "CardAction"
|
|
3638
3927
|
}, /*#__PURE__*/React.createElement(ChevronRight, null)))),
|
|
3639
3928
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3640
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
3641
|
-
},
|
|
3929
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3930
|
+
}, /*#__PURE__*/React.createElement(Footer, null))
|
|
3642
3931
|
});
|
|
3643
3932
|
});
|
|
3644
3933
|
|
|
@@ -3704,12 +3993,12 @@ var preflight$1 = /*#__PURE__*/function () {
|
|
|
3704
3993
|
|
|
3705
3994
|
var Payment = /*#__PURE__*/function () {
|
|
3706
3995
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
3707
|
-
var accept, amount, event, sent, confirmed,
|
|
3996
|
+
var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, document, unmount;
|
|
3708
3997
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
3709
3998
|
while (1) {
|
|
3710
3999
|
switch (_context2.prev = _context2.next) {
|
|
3711
4000
|
case 0:
|
|
3712
|
-
accept = _ref3.accept, amount = _ref3.amount, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed,
|
|
4001
|
+
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, document = _ref3.document;
|
|
3713
4002
|
_context2.prev = 1;
|
|
3714
4003
|
_context2.next = 4;
|
|
3715
4004
|
return preflight$1({
|
|
@@ -3735,15 +4024,15 @@ var Payment = /*#__PURE__*/function () {
|
|
|
3735
4024
|
event: event,
|
|
3736
4025
|
sent: sent,
|
|
3737
4026
|
confirmed: confirmed,
|
|
3738
|
-
ensured: ensured,
|
|
3739
4027
|
failed: failed,
|
|
3740
4028
|
whitelist: whitelist,
|
|
3741
4029
|
blacklist: blacklist,
|
|
3742
|
-
providers: providers
|
|
4030
|
+
providers: providers,
|
|
4031
|
+
track: track
|
|
3743
4032
|
}
|
|
3744
|
-
}, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
4033
|
+
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
3745
4034
|
unmount: unmount
|
|
3746
|
-
}, /*#__PURE__*/React.createElement(
|
|
4035
|
+
}, /*#__PURE__*/React.createElement(WalletProvider, {
|
|
3747
4036
|
document: document,
|
|
3748
4037
|
container: container,
|
|
3749
4038
|
connected: connected,
|
|
@@ -3755,13 +4044,15 @@ var Payment = /*#__PURE__*/function () {
|
|
|
3755
4044
|
whitelist: whitelist,
|
|
3756
4045
|
blacklist: blacklist,
|
|
3757
4046
|
event: event
|
|
4047
|
+
}, /*#__PURE__*/React.createElement(TrackingProvider, {
|
|
4048
|
+
document: ensureDocument(document)
|
|
3758
4049
|
}, /*#__PURE__*/React.createElement(PaymentProvider, {
|
|
3759
4050
|
container: container,
|
|
3760
4051
|
document: document
|
|
3761
4052
|
}, /*#__PURE__*/React.createElement(PaymentValueProvider, null, /*#__PURE__*/React.createElement(PaymentStack, {
|
|
3762
4053
|
document: document,
|
|
3763
4054
|
container: container
|
|
3764
|
-
})))))))))));
|
|
4055
|
+
}), /*#__PURE__*/React.createElement(PoweredBy, null))))))))))));
|
|
3765
4056
|
};
|
|
3766
4057
|
});
|
|
3767
4058
|
return _context2.abrupt("return", {
|
|
@@ -3871,9 +4162,9 @@ var SaleRoutingProvider = (function (props) {
|
|
|
3871
4162
|
var SaleOverviewSkeleton = (function (props) {
|
|
3872
4163
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
3873
4164
|
header: /*#__PURE__*/React.createElement("div", {
|
|
3874
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
4165
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
3875
4166
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
3876
|
-
className: "LineHeightL FontSizeL
|
|
4167
|
+
className: "LineHeightL FontSizeL"
|
|
3877
4168
|
}, "Purchase")),
|
|
3878
4169
|
body: /*#__PURE__*/React.createElement("div", {
|
|
3879
4170
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -3890,7 +4181,7 @@ var SaleOverviewSkeleton = (function (props) {
|
|
|
3890
4181
|
className: "SkeletonBackground"
|
|
3891
4182
|
}))),
|
|
3892
4183
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
3893
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
4184
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
3894
4185
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3895
4186
|
className: "SkeletonWrapper"
|
|
3896
4187
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3902,11 +4193,10 @@ var SaleOverviewSkeleton = (function (props) {
|
|
|
3902
4193
|
});
|
|
3903
4194
|
|
|
3904
4195
|
var SaleOverviewDialog = (function (props) {
|
|
3905
|
-
var _useContext = useContext(ChangableAmountContext)
|
|
3906
|
-
|
|
4196
|
+
var _useContext = useContext(ChangableAmountContext);
|
|
4197
|
+
_useContext.amount;
|
|
3907
4198
|
|
|
3908
4199
|
var _useContext2 = useContext(ConfigurationContext),
|
|
3909
|
-
currencyCode = _useContext2.currencyCode,
|
|
3910
4200
|
tokenImage = _useContext2.tokenImage;
|
|
3911
4201
|
|
|
3912
4202
|
var _useContext3 = useContext(PaymentValueContext),
|
|
@@ -3914,87 +4204,20 @@ var SaleOverviewDialog = (function (props) {
|
|
|
3914
4204
|
|
|
3915
4205
|
var _useContext4 = useContext(PaymentContext),
|
|
3916
4206
|
payment = _useContext4.payment,
|
|
3917
|
-
paymentState = _useContext4.paymentState
|
|
3918
|
-
pay = _useContext4.pay,
|
|
3919
|
-
transaction = _useContext4.transaction,
|
|
3920
|
-
approve = _useContext4.approve,
|
|
3921
|
-
approvalTransaction = _useContext4.approvalTransaction;
|
|
4207
|
+
paymentState = _useContext4.paymentState;
|
|
3922
4208
|
|
|
3923
4209
|
var _useContext5 = useContext(NavigateStackContext),
|
|
3924
4210
|
navigate = _useContext5.navigate;
|
|
3925
4211
|
|
|
3926
|
-
var _useContext6 = useContext(
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
var _useContext7 = useContext(ToTokenContext),
|
|
3930
|
-
toToken = _useContext7.toToken,
|
|
3931
|
-
toTokenReadableAmount = _useContext7.toTokenReadableAmount;
|
|
4212
|
+
var _useContext6 = useContext(ToTokenContext),
|
|
4213
|
+
toToken = _useContext6.toToken,
|
|
4214
|
+
toTokenReadableAmount = _useContext6.toTokenReadableAmount;
|
|
3932
4215
|
|
|
3933
4216
|
var _useState = useState(),
|
|
3934
4217
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3935
4218
|
salePerTokenValue = _useState2[0],
|
|
3936
4219
|
setSalePerTokenValue = _useState2[1];
|
|
3937
4220
|
|
|
3938
|
-
var mainAction = function mainAction() {
|
|
3939
|
-
if (paymentState == 'initialized' || paymentState == 'approving') {
|
|
3940
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
3941
|
-
className: ["ButtonPrimary", payment.route.approvalRequired && !payment.route.directTransfer ? 'disabled' : ''].join(' '),
|
|
3942
|
-
onClick: function onClick() {
|
|
3943
|
-
if (payment.route.approvalRequired && !payment.route.directTransfer) {
|
|
3944
|
-
return;
|
|
3945
|
-
}
|
|
3946
|
-
|
|
3947
|
-
pay({
|
|
3948
|
-
navigate: navigate
|
|
3949
|
-
});
|
|
3950
|
-
}
|
|
3951
|
-
}, "Pay ", new Currency({
|
|
3952
|
-
amount: amount.toFixed(2),
|
|
3953
|
-
code: currencyCode
|
|
3954
|
-
}).toString());
|
|
3955
|
-
} else if (paymentState == 'paying') {
|
|
3956
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
3957
|
-
className: "ButtonPrimary",
|
|
3958
|
-
title: "Performing the payment - please wait",
|
|
3959
|
-
href: transaction === null || transaction === void 0 ? void 0 : transaction.url,
|
|
3960
|
-
target: "_blank",
|
|
3961
|
-
rel: "noopener noreferrer"
|
|
3962
|
-
}, /*#__PURE__*/React.createElement(LoadingText, null, "Paying"));
|
|
3963
|
-
} else if (paymentState == 'confirmed') {
|
|
3964
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
3965
|
-
className: "ButtonPrimary round",
|
|
3966
|
-
title: "Done",
|
|
3967
|
-
onClick: close
|
|
3968
|
-
}, /*#__PURE__*/React.createElement(Checkmark, null));
|
|
3969
|
-
}
|
|
3970
|
-
};
|
|
3971
|
-
|
|
3972
|
-
var approvalAction = function approvalAction() {
|
|
3973
|
-
if (paymentState == 'initialized') {
|
|
3974
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3975
|
-
className: "PaddingBottomS"
|
|
3976
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
3977
|
-
className: "ButtonPrimary wide",
|
|
3978
|
-
onClick: approve,
|
|
3979
|
-
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
3980
|
-
}, "Allow ", payment.symbol, " to be used as payment"));
|
|
3981
|
-
} else if (paymentState == 'approving') {
|
|
3982
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3983
|
-
className: "PaddingBottomS"
|
|
3984
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
3985
|
-
className: "ButtonPrimary wide",
|
|
3986
|
-
title: "Approving payment token - please wait",
|
|
3987
|
-
href: approvalTransaction === null || approvalTransaction === void 0 ? void 0 : approvalTransaction.url,
|
|
3988
|
-
target: "_blank",
|
|
3989
|
-
rel: "noopener noreferrer"
|
|
3990
|
-
}, /*#__PURE__*/React.createElement(LoadingText, null, "Approving")));
|
|
3991
|
-
}
|
|
3992
|
-
};
|
|
3993
|
-
|
|
3994
|
-
var actions = function actions() {
|
|
3995
|
-
return /*#__PURE__*/React.createElement("div", null, payment.route.approvalRequired && !payment.route.directTransfer && approvalAction(), mainAction());
|
|
3996
|
-
};
|
|
3997
|
-
|
|
3998
4221
|
useEffect(function () {
|
|
3999
4222
|
if (paymentValue) {
|
|
4000
4223
|
setSalePerTokenValue(new Currency({
|
|
@@ -4023,9 +4246,9 @@ var SaleOverviewDialog = (function (props) {
|
|
|
4023
4246
|
|
|
4024
4247
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
4025
4248
|
header: /*#__PURE__*/React.createElement("div", {
|
|
4026
|
-
className: "PaddingTopS PaddingLeftM PaddingRightM"
|
|
4249
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
4027
4250
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
4028
|
-
className: "LineHeightL FontSizeL
|
|
4251
|
+
className: "LineHeightL FontSizeL"
|
|
4029
4252
|
}, "Purchase")),
|
|
4030
4253
|
body: /*#__PURE__*/React.createElement("div", {
|
|
4031
4254
|
className: "PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
@@ -4094,8 +4317,8 @@ var SaleOverviewDialog = (function (props) {
|
|
|
4094
4317
|
className: "CardAction"
|
|
4095
4318
|
}, /*#__PURE__*/React.createElement(ChevronRight, null)))),
|
|
4096
4319
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
4097
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM"
|
|
4098
|
-
},
|
|
4320
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
4321
|
+
}, /*#__PURE__*/React.createElement(Footer, null))
|
|
4099
4322
|
});
|
|
4100
4323
|
});
|
|
4101
4324
|
|
|
@@ -4168,12 +4391,12 @@ var preflight = /*#__PURE__*/function () {
|
|
|
4168
4391
|
|
|
4169
4392
|
var Sale = /*#__PURE__*/function () {
|
|
4170
4393
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
4171
|
-
var amount, sell, sent, confirmed,
|
|
4394
|
+
var amount, sell, sent, confirmed, failed, error, critical, style, blacklist, providers, currency, connected, closed, tokenImage, document, accept, unmount;
|
|
4172
4395
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
4173
4396
|
while (1) {
|
|
4174
4397
|
switch (_context2.prev = _context2.next) {
|
|
4175
4398
|
case 0:
|
|
4176
|
-
amount = _ref3.amount, sell = _ref3.sell, sent = _ref3.sent, confirmed = _ref3.confirmed,
|
|
4399
|
+
amount = _ref3.amount, sell = _ref3.sell, 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, tokenImage = _ref3.tokenImage, document = _ref3.document;
|
|
4177
4400
|
_context2.prev = 1;
|
|
4178
4401
|
_context2.next = 4;
|
|
4179
4402
|
return preflight({
|
|
@@ -4205,26 +4428,27 @@ var Sale = /*#__PURE__*/function () {
|
|
|
4205
4428
|
currency: currency,
|
|
4206
4429
|
sent: sent,
|
|
4207
4430
|
confirmed: confirmed,
|
|
4208
|
-
ensured: ensured,
|
|
4209
4431
|
failed: failed,
|
|
4210
4432
|
blacklist: blacklist,
|
|
4211
4433
|
providers: providers
|
|
4212
4434
|
}
|
|
4213
|
-
}, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
4435
|
+
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
4214
4436
|
unmount: unmount
|
|
4215
|
-
}, /*#__PURE__*/React.createElement(
|
|
4437
|
+
}, /*#__PURE__*/React.createElement(WalletProvider, {
|
|
4216
4438
|
container: container,
|
|
4217
4439
|
connected: connected,
|
|
4218
4440
|
unmount: unmount
|
|
4219
4441
|
}, /*#__PURE__*/React.createElement(ConversionRateProvider, null, /*#__PURE__*/React.createElement(ChangableAmountProvider, {
|
|
4220
4442
|
accept: accept
|
|
4443
|
+
}, /*#__PURE__*/React.createElement(TrackingProvider, {
|
|
4444
|
+
document: ensureDocument(document)
|
|
4221
4445
|
}, /*#__PURE__*/React.createElement(SaleRoutingProvider, {
|
|
4222
4446
|
container: container,
|
|
4223
4447
|
document: document
|
|
4224
4448
|
}, /*#__PURE__*/React.createElement(SaleStack, {
|
|
4225
4449
|
document: document,
|
|
4226
4450
|
container: container
|
|
4227
|
-
})))))))));
|
|
4451
|
+
}), /*#__PURE__*/React.createElement(PoweredBy, null))))))))));
|
|
4228
4452
|
};
|
|
4229
4453
|
});
|
|
4230
4454
|
return _context2.abrupt("return", {
|