@depay/widgets 6.2.3 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.bundle.js +122 -133
- package/dist/esm/index.js +16 -22
- package/dist/umd/index.bundle.js +122 -133
- package/dist/umd/index.js +453 -459
- package/package.json +14 -14
package/dist/esm/index.bundle.js
CHANGED
|
@@ -1528,11 +1528,6 @@ function checkDCE() {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
});
|
|
1530
1530
|
|
|
1531
|
-
function _interopDefaultLegacy$3 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
1532
|
-
|
|
1533
|
-
var React__default$2 = /*#__PURE__*/_interopDefaultLegacy$3(react);
|
|
1534
|
-
var ReactDOM__default$1 = /*#__PURE__*/_interopDefaultLegacy$3(reactDom);
|
|
1535
|
-
|
|
1536
1531
|
function ReactDialogStyle (styles) {
|
|
1537
1532
|
let background =
|
|
1538
1533
|
typeof styles === 'object' && styles.background ? styles.background : 'rgba(0,0,0,0.4)';
|
|
@@ -1599,7 +1594,7 @@ function ReactDialogStyle (styles) {
|
|
|
1599
1594
|
}
|
|
1600
1595
|
|
|
1601
1596
|
const _jsxFileName$2 = "/home/runner/work/react-dialog/react-dialog/src/components/Dialog.jsx";
|
|
1602
|
-
class Dialog$1 extends
|
|
1597
|
+
class Dialog$1 extends react.Component {
|
|
1603
1598
|
constructor(props) {
|
|
1604
1599
|
super(props);
|
|
1605
1600
|
|
|
@@ -1647,11 +1642,11 @@ class Dialog$1 extends React__default$2['default'].Component {
|
|
|
1647
1642
|
const classNames = ['ReactDialog', this.state.open ? 'ReactDialogOpen' : ''];
|
|
1648
1643
|
const style = ReactDialogStyle({ background: this.props.background });
|
|
1649
1644
|
return (
|
|
1650
|
-
|
|
1651
|
-
,
|
|
1652
|
-
,
|
|
1653
|
-
,
|
|
1654
|
-
,
|
|
1645
|
+
react.createElement('div', { className: classNames.join(' '), __self: this, __source: {fileName: _jsxFileName$2, lineNumber: 54}}
|
|
1646
|
+
, react.createElement('style', {__self: this, __source: {fileName: _jsxFileName$2, lineNumber: 55}}, style)
|
|
1647
|
+
, react.createElement('div', { className: "ReactDialogRow", __self: this, __source: {fileName: _jsxFileName$2, lineNumber: 56}}
|
|
1648
|
+
, react.createElement('div', { className: "ReactDialogCell", __self: this, __source: {fileName: _jsxFileName$2, lineNumber: 57}}
|
|
1649
|
+
, react.createElement('div', { className: "ReactDialogBackground", onClick: this.onClickBackground.bind(this), __self: this, __source: {fileName: _jsxFileName$2, lineNumber: 58}} )
|
|
1655
1650
|
, this.props.children
|
|
1656
1651
|
)
|
|
1657
1652
|
)
|
|
@@ -1661,7 +1656,7 @@ class Dialog$1 extends React__default$2['default'].Component {
|
|
|
1661
1656
|
}
|
|
1662
1657
|
|
|
1663
1658
|
const _jsxFileName$1$1 = "/home/runner/work/react-dialog/react-dialog/src/index.jsx";
|
|
1664
|
-
class ReactDialog extends
|
|
1659
|
+
class ReactDialog extends react.Component {
|
|
1665
1660
|
constructor(props) {
|
|
1666
1661
|
super(props);
|
|
1667
1662
|
|
|
@@ -1684,8 +1679,8 @@ class ReactDialog extends React__default$2['default'].Component {
|
|
|
1684
1679
|
let _document = this.props.document || document;
|
|
1685
1680
|
let container = this.props.container || _document.body;
|
|
1686
1681
|
if (this.state.open) {
|
|
1687
|
-
return
|
|
1688
|
-
|
|
1682
|
+
return reactDom.createPortal(
|
|
1683
|
+
react.createElement(Dialog$1, {
|
|
1689
1684
|
background: this.props.background,
|
|
1690
1685
|
close: this.props.close,
|
|
1691
1686
|
document: _document,
|
|
@@ -1702,19 +1697,9 @@ class ReactDialog extends React__default$2['default'].Component {
|
|
|
1702
1697
|
}
|
|
1703
1698
|
}
|
|
1704
1699
|
|
|
1705
|
-
var
|
|
1706
|
-
|
|
1707
|
-
var cjs = /*#__PURE__*/Object.defineProperty({
|
|
1708
|
-
ReactDialog: ReactDialog_1
|
|
1709
|
-
}, '__esModule', {value: true});
|
|
1710
|
-
|
|
1711
|
-
function _interopDefaultLegacy$2 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
1700
|
+
var CloseStackContext = react.createContext();
|
|
1712
1701
|
|
|
1713
|
-
var
|
|
1714
|
-
|
|
1715
|
-
var CloseStackContext = React__default$1['default'].createContext();
|
|
1716
|
-
|
|
1717
|
-
var NavigateStackContext = React__default$1['default'].createContext();
|
|
1702
|
+
var NavigateStackContext = react.createContext();
|
|
1718
1703
|
|
|
1719
1704
|
function ReactDialogStackStyle () {
|
|
1720
1705
|
return `
|
|
@@ -1774,10 +1759,10 @@ function ReactDialogStackStyle () {
|
|
|
1774
1759
|
`
|
|
1775
1760
|
}
|
|
1776
1761
|
|
|
1777
|
-
var StackContext =
|
|
1762
|
+
var StackContext = react.createContext();
|
|
1778
1763
|
|
|
1779
1764
|
const _jsxFileName$1 = "/home/runner/work/react-dialog-stack/react-dialog-stack/src/index.jsx";
|
|
1780
|
-
class ReactDialogStack extends
|
|
1765
|
+
class ReactDialogStack extends react.Component {
|
|
1781
1766
|
constructor(props) {
|
|
1782
1767
|
super(props);
|
|
1783
1768
|
|
|
@@ -1895,15 +1880,15 @@ class ReactDialogStack extends React__default$1['default'].Component {
|
|
|
1895
1880
|
this.classForDirection(),
|
|
1896
1881
|
];
|
|
1897
1882
|
return (
|
|
1898
|
-
|
|
1899
|
-
,
|
|
1900
|
-
,
|
|
1901
|
-
,
|
|
1883
|
+
react.createElement('div', { key: index, className: ['ReactDialogStack'].concat(stackState).join(' '), __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 127}}
|
|
1884
|
+
, react.createElement('div', { className: "ReactDialogStackRow", __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 128}}
|
|
1885
|
+
, react.createElement('div', { className: "ReactDialogStackCell", onClick: this.onClick.bind(this), __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 129}}
|
|
1886
|
+
, react.createElement(NavigateStackContext.Provider, {
|
|
1902
1887
|
value: { navigate: this.navigate.bind(this), set: this.set.bind(this) }, __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 130}}
|
|
1903
1888
|
|
|
1904
|
-
,
|
|
1905
|
-
,
|
|
1906
|
-
,
|
|
1889
|
+
, react.createElement(CloseStackContext.Provider, { value: this.close.bind(this), __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 133}}
|
|
1890
|
+
, react.createElement(StackContext.Provider, { value: this.state.stack, __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 134}}
|
|
1891
|
+
, react.createElement('div', { className: "ReactDialogAnimation", __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 135}}, this.props.dialogs[route])
|
|
1907
1892
|
)
|
|
1908
1893
|
)
|
|
1909
1894
|
)
|
|
@@ -1941,24 +1926,22 @@ class ReactDialogStack extends React__default$1['default'].Component {
|
|
|
1941
1926
|
|
|
1942
1927
|
render() {
|
|
1943
1928
|
return (
|
|
1944
|
-
|
|
1929
|
+
react.createElement(ReactDialog, {
|
|
1945
1930
|
close: this.close.bind(this),
|
|
1946
1931
|
open: this.props.open,
|
|
1947
1932
|
document: this.props.document,
|
|
1948
1933
|
container: this.props.container,
|
|
1949
1934
|
background: this.props.background, __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 173}}
|
|
1950
1935
|
|
|
1951
|
-
,
|
|
1936
|
+
, react.createElement('style', {__self: this, __source: {fileName: _jsxFileName$1, lineNumber: 180}}, ReactDialogStackStyle())
|
|
1952
1937
|
, this.renderStack()
|
|
1953
1938
|
)
|
|
1954
1939
|
)
|
|
1955
1940
|
}
|
|
1956
1941
|
}
|
|
1957
|
-
var NavigateStackContext_1 = NavigateStackContext;
|
|
1958
|
-
var ReactDialogStack_1 = ReactDialogStack;
|
|
1959
1942
|
|
|
1960
1943
|
var Dialog = (function (props) {
|
|
1961
|
-
var _useContext = react.useContext(
|
|
1944
|
+
var _useContext = react.useContext(NavigateStackContext),
|
|
1962
1945
|
navigate = _useContext.navigate;
|
|
1963
1946
|
|
|
1964
1947
|
var _useContext2 = react.useContext(ClosableContext),
|
|
@@ -1998,7 +1981,7 @@ var ConnectingWalletDialog = (function (props) {
|
|
|
1998
1981
|
showConnectButton = _useState2[0],
|
|
1999
1982
|
setShowConnectButton = _useState2[1];
|
|
2000
1983
|
|
|
2001
|
-
var _useContext = react.useContext(
|
|
1984
|
+
var _useContext = react.useContext(NavigateStackContext),
|
|
2002
1985
|
navigate = _useContext.navigate;
|
|
2003
1986
|
|
|
2004
1987
|
var wallet = props.wallet;
|
|
@@ -2409,11 +2392,6 @@ let Blockchain = {
|
|
|
2409
2392
|
},
|
|
2410
2393
|
};
|
|
2411
2394
|
|
|
2412
|
-
var es$1 = /*#__PURE__*/Object.freeze({
|
|
2413
|
-
__proto__: null,
|
|
2414
|
-
Blockchain: Blockchain
|
|
2415
|
-
});
|
|
2416
|
-
|
|
2417
2395
|
let CONSTANTS = {
|
|
2418
2396
|
ZERO: '0x0000000000000000000000000000000000000000',
|
|
2419
2397
|
MAXINT: '115792089237316195423570985008687907853269984665640564039457584007913129639935',
|
|
@@ -2443,11 +2421,6 @@ let CONSTANTS$2 = {};
|
|
|
2443
2421
|
CONSTANTS$2['ethereum'] = CONSTANTS;
|
|
2444
2422
|
CONSTANTS$2['bsc'] = CONSTANTS$1;
|
|
2445
2423
|
|
|
2446
|
-
var es = /*#__PURE__*/Object.freeze({
|
|
2447
|
-
__proto__: null,
|
|
2448
|
-
CONSTANTS: CONSTANTS$2
|
|
2449
|
-
});
|
|
2450
|
-
|
|
2451
2424
|
var byteLength_1 = byteLength$1;
|
|
2452
2425
|
var toByteArray_1 = toByteArray$1;
|
|
2453
2426
|
var fromByteArray_1 = fromByteArray$1;
|
|
@@ -48573,12 +48546,18 @@ const submitSimpleTransfer$1 = ({ transaction, signer })=>{
|
|
|
48573
48546
|
|
|
48574
48547
|
function _optionalChain$3$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
48575
48548
|
class Web3Wallet {
|
|
48576
|
-
__init() {this.name = 'Web3 Wallet';}
|
|
48577
|
-
__init2() {this.logo =
|
|
48578
|
-
"data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 446.42 376.77'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23828487;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M408.69,171.4H473.4V107.77a46.55,46.55,0,0,0-46.55-46.55H73.53A46.55,46.55,0,0,0,27,107.77v65.09H62.7L89.56,146a9.46,9.46,0,0,1,5.73-2.73h0l.41,0h78.59a47.2,47.2,0,1,1,82.63,39.56q-1.41,1.71-3,3.31t-3.31,3a47.21,47.21,0,0,1-76.31-26.9H100.21L73.34,189.07a9.43,9.43,0,0,1-5.73,2.73h0l-.41,0h-.07l-.48,0H27v74H55.83l18.25-18.24a9.39,9.39,0,0,1,5.73-2.74h0l.41,0h29.9a47.16,47.16,0,1,1,0,19H84.72L66.48,282.11a9.42,9.42,0,0,1-5.72,2.74h0l-.39,0H27V319H83.29a4,4,0,0,1,.49,0h.06l.41,0h0A9.41,9.41,0,0,1,90,321.78l28,28h57.66a47.2,47.2,0,1,1,81.48,40.9c-.6.67-1.22,1.32-1.86,2s-1.3,1.26-2,1.86a47.22,47.22,0,0,1-77.65-25.73H114.09a9.5,9.5,0,0,1-3.09-.52l-.08,0-.29-.11-.17-.07-.19-.08-.27-.12-.08,0a9.38,9.38,0,0,1-2.55-1.81l-28-28H27v53.46A46.55,46.55,0,0,0,73.53,438H426.86a46.55,46.55,0,0,0,46.54-46.55V327.82H408.69a78.22,78.22,0,0,1-78.21-78.21h0A78.22,78.22,0,0,1,408.69,171.4Z' transform='translate(-26.98 -61.22)'/%3E%3Cpath class='cls-1' d='M247.91,359.29a26,26,0,1,0-26,26A26,26,0,0,0,247.91,359.29Z' transform='translate(-26.98 -61.22)'/%3E%3Cpath class='cls-1' d='M246.55,152.71a26,26,0,1,0-26,26A26,26,0,0,0,246.55,152.71Z' transform='translate(-26.98 -61.22)'/%3E%3Ccircle class='cls-1' cx='129.39' cy='193.15' r='25.99'/%3E%3Cpath class='cls-1' d='M409.17,190h-.48a59.57,59.57,0,0,0-59.57,59.57h0a59.57,59.57,0,0,0,59.57,59.57h.48a59.58,59.58,0,0,0,59.58-59.57h0A59.58,59.58,0,0,0,409.17,190Zm14.45,90.61h-31l8.88-32.53a15.5,15.5,0,1,1,13.29,0Z' transform='translate(-26.98 -61.22)'/%3E%3C/svg%3E";}
|
|
48579
|
-
__init3() {this.blockchains = ['ethereum', 'bsc'];}
|
|
48580
48549
|
|
|
48581
|
-
|
|
48550
|
+
static __initStatic() {this.info = {
|
|
48551
|
+
name: 'Web3 Wallet',
|
|
48552
|
+
logo: "data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 446.42 376.77'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23828487;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M408.69,171.4H473.4V107.77a46.55,46.55,0,0,0-46.55-46.55H73.53A46.55,46.55,0,0,0,27,107.77v65.09H62.7L89.56,146a9.46,9.46,0,0,1,5.73-2.73h0l.41,0h78.59a47.2,47.2,0,1,1,82.63,39.56q-1.41,1.71-3,3.31t-3.31,3a47.21,47.21,0,0,1-76.31-26.9H100.21L73.34,189.07a9.43,9.43,0,0,1-5.73,2.73h0l-.41,0h-.07l-.48,0H27v74H55.83l18.25-18.24a9.39,9.39,0,0,1,5.73-2.74h0l.41,0h29.9a47.16,47.16,0,1,1,0,19H84.72L66.48,282.11a9.42,9.42,0,0,1-5.72,2.74h0l-.39,0H27V319H83.29a4,4,0,0,1,.49,0h.06l.41,0h0A9.41,9.41,0,0,1,90,321.78l28,28h57.66a47.2,47.2,0,1,1,81.48,40.9c-.6.67-1.22,1.32-1.86,2s-1.3,1.26-2,1.86a47.22,47.22,0,0,1-77.65-25.73H114.09a9.5,9.5,0,0,1-3.09-.52l-.08,0-.29-.11-.17-.07-.19-.08-.27-.12-.08,0a9.38,9.38,0,0,1-2.55-1.81l-28-28H27v53.46A46.55,46.55,0,0,0,73.53,438H426.86a46.55,46.55,0,0,0,46.54-46.55V327.82H408.69a78.22,78.22,0,0,1-78.21-78.21h0A78.22,78.22,0,0,1,408.69,171.4Z' transform='translate(-26.98 -61.22)'/%3E%3Cpath class='cls-1' d='M247.91,359.29a26,26,0,1,0-26,26A26,26,0,0,0,247.91,359.29Z' transform='translate(-26.98 -61.22)'/%3E%3Cpath class='cls-1' d='M246.55,152.71a26,26,0,1,0-26,26A26,26,0,0,0,246.55,152.71Z' transform='translate(-26.98 -61.22)'/%3E%3Ccircle class='cls-1' cx='129.39' cy='193.15' r='25.99'/%3E%3Cpath class='cls-1' d='M409.17,190h-.48a59.57,59.57,0,0,0-59.57,59.57h0a59.57,59.57,0,0,0,59.57,59.57h.48a59.58,59.58,0,0,0,59.58-59.57h0A59.58,59.58,0,0,0,409.17,190Zm14.45,90.61h-31l8.88-32.53a15.5,15.5,0,1,1,13.29,0Z' transform='translate(-26.98 -61.22)'/%3E%3C/svg%3E",
|
|
48553
|
+
blockchains: ['ethereum', 'bsc']
|
|
48554
|
+
};}
|
|
48555
|
+
|
|
48556
|
+
constructor () {
|
|
48557
|
+
this.name = this.constructor.info.name;
|
|
48558
|
+
this.logo = this.constructor.info.logo;
|
|
48559
|
+
this.blockchains = this.constructor.info.blockchains;
|
|
48560
|
+
this.install = this.constructor.info.install;
|
|
48582
48561
|
this.sendTransaction = (transaction)=>{
|
|
48583
48562
|
return sendTransaction$1({
|
|
48584
48563
|
wallet: this,
|
|
@@ -48705,23 +48684,27 @@ class Web3Wallet {
|
|
|
48705
48684
|
let signature = await signer.signMessage(message);
|
|
48706
48685
|
return signature
|
|
48707
48686
|
}
|
|
48708
|
-
}
|
|
48687
|
+
} Web3Wallet.__initStatic();
|
|
48709
48688
|
|
|
48710
|
-
class Coinbase extends Web3Wallet {
|
|
48711
|
-
__init() {this.name = 'Coinbase Wallet';}
|
|
48712
|
-
__init2() {this.logo =
|
|
48713
|
-
"data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 488.96 488.96'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:url(%23linear-gradient);%7D.cls-2%7Bfill:%234361ad;%7D%3C/style%3E%3ClinearGradient id='linear-gradient' x1='250' y1='7.35' x2='250' y2='496.32' gradientTransform='matrix(1, 0, 0, -1, 0, 502)' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%233d5ba9'/%3E%3Cstop offset='1' stop-color='%234868b1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath class='cls-1' d='M250,5.68C114.87,5.68,5.52,115,5.52,250.17S114.87,494.65,250,494.65,494.48,385.29,494.48,250.17,385.13,5.68,250,5.68Zm0,387.54A143.06,143.06,0,1,1,393.05,250.17,143.11,143.11,0,0,1,250,393.22Z' transform='translate(-5.52 -5.68)'/%3E%3Cpath class='cls-2' d='M284.69,296.09H215.31a11,11,0,0,1-10.9-10.9V215.48a11,11,0,0,1,10.9-10.91H285a11,11,0,0,1,10.9,10.91v69.71A11.07,11.07,0,0,1,284.69,296.09Z' transform='translate(-5.52 -5.68)'/%3E%3C/svg%3E";}
|
|
48714
|
-
__init3() {this.blockchains = ['ethereum', 'bsc'];}
|
|
48715
|
-
__init4() {this.install = 'https://wallet.coinbase.com';}
|
|
48716
|
-
}
|
|
48689
|
+
class Coinbase extends Web3Wallet {
|
|
48717
48690
|
|
|
48718
|
-
|
|
48719
|
-
|
|
48720
|
-
|
|
48721
|
-
|
|
48722
|
-
|
|
48723
|
-
|
|
48724
|
-
}
|
|
48691
|
+
static __initStatic() {this.info = {
|
|
48692
|
+
name: 'Coinbase Wallet',
|
|
48693
|
+
logo: "data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 488.96 488.96'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:url(%23linear-gradient);%7D.cls-2%7Bfill:%234361ad;%7D%3C/style%3E%3ClinearGradient id='linear-gradient' x1='250' y1='7.35' x2='250' y2='496.32' gradientTransform='matrix(1, 0, 0, -1, 0, 502)' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%233d5ba9'/%3E%3Cstop offset='1' stop-color='%234868b1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath class='cls-1' d='M250,5.68C114.87,5.68,5.52,115,5.52,250.17S114.87,494.65,250,494.65,494.48,385.29,494.48,250.17,385.13,5.68,250,5.68Zm0,387.54A143.06,143.06,0,1,1,393.05,250.17,143.11,143.11,0,0,1,250,393.22Z' transform='translate(-5.52 -5.68)'/%3E%3Cpath class='cls-2' d='M284.69,296.09H215.31a11,11,0,0,1-10.9-10.9V215.48a11,11,0,0,1,10.9-10.91H285a11,11,0,0,1,10.9,10.91v69.71A11.07,11.07,0,0,1,284.69,296.09Z' transform='translate(-5.52 -5.68)'/%3E%3C/svg%3E",
|
|
48694
|
+
blockchains: ['ethereum', 'bsc'],
|
|
48695
|
+
install: 'https://wallet.coinbase.com'
|
|
48696
|
+
};}
|
|
48697
|
+
} Coinbase.__initStatic();
|
|
48698
|
+
|
|
48699
|
+
class MetaMask extends Web3Wallet {
|
|
48700
|
+
|
|
48701
|
+
static __initStatic() {this.info = {
|
|
48702
|
+
name: 'MetaMask',
|
|
48703
|
+
logo: "data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 485.93 450.56'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23828487;%7D.cls-2%7Bfill:%23e27726;stroke:%23e27726;%7D.cls-10,.cls-11,.cls-2,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7,.cls-8,.cls-9%7Bstroke-linecap:round;stroke-linejoin:round;%7D.cls-3%7Bfill:%23e37725;stroke:%23e37725;%7D.cls-4%7Bfill:%23d6c0b3;stroke:%23d6c0b3;%7D.cls-5%7Bfill:%23243447;stroke:%23243447;%7D.cls-6%7Bfill:%23cd6328;stroke:%23cd6328;%7D.cls-7%7Bfill:%23e37525;stroke:%23e37525;%7D.cls-8%7Bfill:%23f6851f;stroke:%23f6851f;%7D.cls-9%7Bfill:%23c1ae9e;stroke:%23c1ae9e;%7D.cls-10%7Bfill:%23171717;stroke:%23171717;%7D.cls-11%7Bfill:%23763e1a;stroke:%23763e1a;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M247.91,356.29a26,26,0,1,0-26,26A26,26,0,0,0,247.91,356.29Z' transform='translate(-7.97 -21.33)'/%3E%3Cpath class='cls-1' d='M246.55,149.71a26,26,0,1,0-26,26A26,26,0,0,0,246.55,149.71Z' transform='translate(-7.97 -21.33)'/%3E%3Ccircle class='cls-1' cx='148.4' cy='230.05' r='25.99'/%3E%3Cpolygon class='cls-2' points='461.28 0.5 272.06 141.03 307.05 58.12 461.28 0.5'/%3E%3Cpolygon class='cls-3' points='24.46 0.5 212.16 142.37 178.88 58.12 24.46 0.5'/%3E%3Cpolygon class='cls-3' points='393.2 326.26 342.81 403.47 450.63 433.14 481.63 327.97 393.2 326.26'/%3E%3Cpolygon class='cls-3' points='4.49 327.97 35.3 433.14 143.13 403.47 92.73 326.26 4.49 327.97'/%3E%3Cpolygon class='cls-3' points='137.04 195.8 107 241.25 214.06 246.01 210.26 130.96 137.04 195.8'/%3E%3Cpolygon class='cls-3' points='348.7 195.8 274.53 129.63 272.06 246.01 378.94 241.25 348.7 195.8'/%3E%3Cpolygon class='cls-3' points='143.13 403.47 207.41 372.09 151.88 328.73 143.13 403.47'/%3E%3Cpolygon class='cls-3' points='278.34 372.09 342.81 403.47 333.87 328.73 278.34 372.09'/%3E%3Cpolygon class='cls-4' points='342.81 403.47 278.34 372.09 283.47 414.12 282.9 431.81 342.81 403.47'/%3E%3Cpolygon class='cls-4' points='143.13 403.47 203.03 431.81 202.65 414.12 207.41 372.09 143.13 403.47'/%3E%3Cpolygon class='cls-5' points='203.98 300.97 150.35 285.18 188.2 267.88 203.98 300.97'/%3E%3Cpolygon class='cls-5' points='281.76 300.97 297.55 267.88 335.58 285.18 281.76 300.97'/%3E%3Cpolygon class='cls-6' points='143.13 403.47 152.25 326.26 92.73 327.97 143.13 403.47'/%3E%3Cpolygon class='cls-6' points='333.68 326.26 342.81 403.47 393.2 327.97 333.68 326.26'/%3E%3Cpolygon class='cls-6' points='378.94 241.25 272.06 246.01 281.95 300.97 297.74 267.88 335.77 285.18 378.94 241.25'/%3E%3Cpolygon class='cls-6' points='150.35 285.18 188.39 267.88 203.98 300.97 214.06 246.01 107 241.25 150.35 285.18'/%3E%3Cpolygon class='cls-7' points='107 241.25 151.88 328.73 150.35 285.18 107 241.25'/%3E%3Cpolygon class='cls-7' points='335.77 285.18 333.87 328.73 378.94 241.25 335.77 285.18'/%3E%3Cpolygon class='cls-7' points='214.06 246.01 203.98 300.97 216.53 365.82 219.38 280.43 214.06 246.01'/%3E%3Cpolygon class='cls-7' points='272.06 246.01 266.93 280.24 269.21 365.82 281.95 300.97 272.06 246.01'/%3E%3Cpolygon class='cls-8' points='281.95 300.97 269.21 365.82 278.34 372.09 333.87 328.73 335.77 285.18 281.95 300.97'/%3E%3Cpolygon class='cls-8' points='150.35 285.18 151.88 328.73 207.41 372.09 216.53 365.82 203.98 300.97 150.35 285.18'/%3E%3Cpolygon class='cls-9' points='282.9 431.81 283.47 414.12 278.72 409.94 207.02 409.94 202.65 414.12 203.03 431.81 143.13 403.47 164.05 420.58 206.45 450.06 279.29 450.06 321.89 420.58 342.81 403.47 282.9 431.81'/%3E%3Cpolygon class='cls-10' points='278.34 372.09 269.21 365.82 216.53 365.82 207.41 372.09 202.65 414.12 207.02 409.94 278.72 409.94 283.47 414.12 278.34 372.09'/%3E%3Cpolygon class='cls-11' points='469.27 150.16 485.43 72.57 461.28 0.5 278.34 136.28 348.7 195.8 448.16 224.9 470.22 199.23 460.71 192.38 475.92 178.5 464.13 169.37 479.35 157.77 469.27 150.16'/%3E%3Cpolygon class='cls-11' points='0.5 72.57 16.66 150.16 6.39 157.77 21.61 169.37 10.01 178.5 25.22 192.38 15.71 199.23 37.58 224.9 137.04 195.8 207.41 136.28 24.46 0.5 0.5 72.57'/%3E%3Cpolygon class='cls-8' points='448.16 224.9 348.7 195.8 378.94 241.25 333.87 328.73 393.2 327.97 481.63 327.97 448.16 224.9'/%3E%3Cpolygon class='cls-8' points='137.04 195.8 37.58 224.9 4.49 327.97 92.73 327.97 151.88 328.73 107 241.25 137.04 195.8'/%3E%3Cpolygon class='cls-8' points='272.06 246.01 278.34 136.28 307.24 58.12 178.88 58.12 207.41 136.28 214.06 246.01 216.34 280.62 216.53 365.82 269.21 365.82 269.59 280.62 272.06 246.01'/%3E%3C/svg%3E",
|
|
48704
|
+
blockchains: ['ethereum', 'bsc'],
|
|
48705
|
+
install: 'https://metamask.io/download.html'
|
|
48706
|
+
};}
|
|
48707
|
+
} MetaMask.__initStatic();
|
|
48725
48708
|
|
|
48726
48709
|
function _optionalChain$2$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
48727
48710
|
const estimate = async ({ transaction, wallet })=> {
|
|
@@ -48835,13 +48818,18 @@ function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[
|
|
|
48835
48818
|
let connectedInstance;
|
|
48836
48819
|
|
|
48837
48820
|
class WalletConnectWallet {
|
|
48838
|
-
__init() {this.name = 'WalletConnect';}
|
|
48839
|
-
__init2() {this.logo =
|
|
48840
|
-
"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 500 500' style='enable-background:new 0 0 500 500;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%235991CD;%7D%0A%3C/style%3E%3Cg id='Page-1'%3E%3Cg id='walletconnect-logo-alt'%3E%3Cpath id='WalletConnect' class='st0' d='M102.7,162c81.5-79.8,213.6-79.8,295.1,0l9.8,9.6c4.1,4,4.1,10.5,0,14.4L374,218.9 c-2,2-5.3,2-7.4,0l-13.5-13.2c-56.8-55.7-149-55.7-205.8,0l-14.5,14.1c-2,2-5.3,2-7.4,0L91.9,187c-4.1-4-4.1-10.5,0-14.4 L102.7,162z M467.1,229.9l29.9,29.2c4.1,4,4.1,10.5,0,14.4L362.3,405.4c-4.1,4-10.7,4-14.8,0c0,0,0,0,0,0L252,311.9 c-1-1-2.7-1-3.7,0h0l-95.5,93.5c-4.1,4-10.7,4-14.8,0c0,0,0,0,0,0L3.4,273.6c-4.1-4-4.1-10.5,0-14.4l29.9-29.2 c4.1-4,10.7-4,14.8,0l95.5,93.5c1,1,2.7,1,3.7,0c0,0,0,0,0,0l95.5-93.5c4.1-4,10.7-4,14.8,0c0,0,0,0,0,0l95.5,93.5 c1,1,2.7,1,3.7,0l95.5-93.5C456.4,225.9,463,225.9,467.1,229.9z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A";}
|
|
48841
|
-
__init3() {this.blockchains = ['ethereum', 'bsc'];}
|
|
48842
48821
|
|
|
48843
|
-
|
|
48844
|
-
|
|
48822
|
+
static __initStatic() {this.info = {
|
|
48823
|
+
name: 'WalletConnect',
|
|
48824
|
+
logo: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 500 500' style='enable-background:new 0 0 500 500;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%235991CD;%7D%0A%3C/style%3E%3Cg id='Page-1'%3E%3Cg id='walletconnect-logo-alt'%3E%3Cpath id='WalletConnect' class='st0' d='M102.7,162c81.5-79.8,213.6-79.8,295.1,0l9.8,9.6c4.1,4,4.1,10.5,0,14.4L374,218.9 c-2,2-5.3,2-7.4,0l-13.5-13.2c-56.8-55.7-149-55.7-205.8,0l-14.5,14.1c-2,2-5.3,2-7.4,0L91.9,187c-4.1-4-4.1-10.5,0-14.4 L102.7,162z M467.1,229.9l29.9,29.2c4.1,4,4.1,10.5,0,14.4L362.3,405.4c-4.1,4-10.7,4-14.8,0c0,0,0,0,0,0L252,311.9 c-1-1-2.7-1-3.7,0h0l-95.5,93.5c-4.1,4-10.7,4-14.8,0c0,0,0,0,0,0L3.4,273.6c-4.1-4-4.1-10.5,0-14.4l29.9-29.2 c4.1-4,10.7-4,14.8,0l95.5,93.5c1,1,2.7,1,3.7,0c0,0,0,0,0,0l95.5-93.5c4.1-4,10.7-4,14.8,0c0,0,0,0,0,0l95.5,93.5 c1,1,2.7,1,3.7,0l95.5-93.5C456.4,225.9,463,225.9,467.1,229.9z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A",
|
|
48825
|
+
blockchains: ['ethereum', 'bsc']
|
|
48826
|
+
};}
|
|
48827
|
+
|
|
48828
|
+
constructor() {
|
|
48829
|
+
this.name = this.constructor.info.name;
|
|
48830
|
+
this.logo = this.constructor.info.logo;
|
|
48831
|
+
this.blockchains = this.constructor.info.blockchains;
|
|
48832
|
+
this.connector = WalletConnectWallet.instance || this.newWalletConnectInstance();
|
|
48845
48833
|
this.sendTransaction = (transaction)=>{
|
|
48846
48834
|
return sendTransaction({
|
|
48847
48835
|
wallet: this,
|
|
@@ -48883,7 +48871,7 @@ class WalletConnectWallet {
|
|
|
48883
48871
|
|
|
48884
48872
|
instance.on("modal_closed", ()=>{
|
|
48885
48873
|
connectedInstance = undefined;
|
|
48886
|
-
this.connector =
|
|
48874
|
+
this.connector = undefined;
|
|
48887
48875
|
});
|
|
48888
48876
|
|
|
48889
48877
|
return instance
|
|
@@ -48999,18 +48987,20 @@ class WalletConnectWallet {
|
|
|
48999
48987
|
let signature = await this.connector.signPersonalMessage(params);
|
|
49000
48988
|
return signature
|
|
49001
48989
|
}
|
|
49002
|
-
}
|
|
48990
|
+
} WalletConnectWallet.__initStatic();
|
|
49003
48991
|
|
|
49004
48992
|
const wallets = {
|
|
49005
|
-
MetaMask
|
|
49006
|
-
Coinbase
|
|
49007
|
-
Web3Wallet
|
|
49008
|
-
WalletConnect:
|
|
48993
|
+
MetaMask,
|
|
48994
|
+
Coinbase,
|
|
48995
|
+
Web3Wallet,
|
|
48996
|
+
WalletConnect: WalletConnectWallet
|
|
49009
48997
|
};
|
|
49010
48998
|
|
|
49011
|
-
|
|
48999
|
+
const instances = {};
|
|
49000
|
+
|
|
49001
|
+
const getWalletClass = function(){
|
|
49012
49002
|
if(connectedInstance) {
|
|
49013
|
-
return
|
|
49003
|
+
return wallets.WalletConnect
|
|
49014
49004
|
} else if (typeof window.ethereum === 'object' && window.ethereum.isMetaMask) {
|
|
49015
49005
|
return wallets.MetaMask
|
|
49016
49006
|
} else if (typeof window.ethereum === 'object' && (window.ethereum.isCoinbaseWallet || window.ethereum.isWalletLink)) {
|
|
@@ -49020,13 +49010,27 @@ let getWallet = function () {
|
|
|
49020
49010
|
}
|
|
49021
49011
|
};
|
|
49022
49012
|
|
|
49013
|
+
const getWallet = function () {
|
|
49014
|
+
const walletClass = getWalletClass();
|
|
49015
|
+
const existingInstance = instances[walletClass];
|
|
49016
|
+
|
|
49017
|
+
if(connectedInstance) {
|
|
49018
|
+
return connectedInstance
|
|
49019
|
+
} else if(existingInstance) {
|
|
49020
|
+
return existingInstance
|
|
49021
|
+
} else if(walletClass) {
|
|
49022
|
+
instances[walletClass] = new walletClass();
|
|
49023
|
+
return instances[walletClass]
|
|
49024
|
+
}
|
|
49025
|
+
};
|
|
49026
|
+
|
|
49023
49027
|
var SelectWalletDialog = (function (props) {
|
|
49024
49028
|
var _useState = react.useState(false),
|
|
49025
49029
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49026
49030
|
showExplanation = _useState2[0],
|
|
49027
49031
|
setShowExplanation = _useState2[1];
|
|
49028
49032
|
|
|
49029
|
-
var _useContext = react.useContext(
|
|
49033
|
+
var _useContext = react.useContext(NavigateStackContext),
|
|
49030
49034
|
navigate = _useContext.navigate;
|
|
49031
49035
|
|
|
49032
49036
|
var wallet = getWallet();
|
|
@@ -49059,7 +49063,8 @@ var SelectWalletDialog = (function (props) {
|
|
|
49059
49063
|
}, _callee);
|
|
49060
49064
|
})), [wallet]);
|
|
49061
49065
|
|
|
49062
|
-
var connect = function connect(
|
|
49066
|
+
var connect = function connect(walletClass) {
|
|
49067
|
+
var wallet = new walletClass();
|
|
49063
49068
|
props.setWallet(wallet);
|
|
49064
49069
|
navigate('ConnectingWallet');
|
|
49065
49070
|
props.connect(wallet);
|
|
@@ -49068,7 +49073,7 @@ var SelectWalletDialog = (function (props) {
|
|
|
49068
49073
|
var availableWallets = [wallets.WalletConnect];
|
|
49069
49074
|
|
|
49070
49075
|
if (wallet) {
|
|
49071
|
-
availableWallets.unshift(wallet);
|
|
49076
|
+
availableWallets.unshift(wallet.constructor);
|
|
49072
49077
|
}
|
|
49073
49078
|
|
|
49074
49079
|
var walletCards = availableWallets.map(function (wallet, index) {
|
|
@@ -49077,21 +49082,21 @@ var SelectWalletDialog = (function (props) {
|
|
|
49077
49082
|
className: "PaddingBottomXS"
|
|
49078
49083
|
}, /*#__PURE__*/react.createElement("button", {
|
|
49079
49084
|
className: "Card small",
|
|
49080
|
-
title: "Connect ".concat(wallet.name),
|
|
49085
|
+
title: "Connect ".concat(wallet.info.name),
|
|
49081
49086
|
onClick: function onClick() {
|
|
49082
49087
|
return connect(wallet);
|
|
49083
49088
|
}
|
|
49084
49089
|
}, /*#__PURE__*/react.createElement("div", {
|
|
49085
49090
|
className: "CardImage"
|
|
49086
49091
|
}, /*#__PURE__*/react.createElement("img", {
|
|
49087
|
-
src: wallet.logo
|
|
49092
|
+
src: wallet.info.logo
|
|
49088
49093
|
})), /*#__PURE__*/react.createElement("div", {
|
|
49089
49094
|
className: "CardBody"
|
|
49090
49095
|
}, /*#__PURE__*/react.createElement("div", {
|
|
49091
49096
|
className: "CardBodyWrapper PaddingLeftXS"
|
|
49092
49097
|
}, /*#__PURE__*/react.createElement("h2", {
|
|
49093
49098
|
className: "CardText FontWeightBold"
|
|
49094
|
-
}, wallet.name)))));
|
|
49099
|
+
}, wallet.info.name)))));
|
|
49095
49100
|
});
|
|
49096
49101
|
return /*#__PURE__*/react.createElement(Dialog, {
|
|
49097
49102
|
header: /*#__PURE__*/react.createElement("div", {
|
|
@@ -49217,7 +49222,7 @@ var ConnectStack = (function (props) {
|
|
|
49217
49222
|
}
|
|
49218
49223
|
}, _callee2);
|
|
49219
49224
|
})), [wallet]);
|
|
49220
|
-
return /*#__PURE__*/react.createElement(
|
|
49225
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
49221
49226
|
open: open,
|
|
49222
49227
|
close: close,
|
|
49223
49228
|
start: "SelectWallet",
|
|
@@ -49382,7 +49387,7 @@ var ErrorProvider = (function (props) {
|
|
|
49382
49387
|
|
|
49383
49388
|
if (error) {
|
|
49384
49389
|
console.log(error);
|
|
49385
|
-
return /*#__PURE__*/react.createElement(
|
|
49390
|
+
return /*#__PURE__*/react.createElement(ReactDialog, {
|
|
49386
49391
|
container: props.container,
|
|
49387
49392
|
close: close,
|
|
49388
49393
|
open: open
|
|
@@ -49531,10 +49536,6 @@ var styleRenderer = (function (style) {
|
|
|
49531
49536
|
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('');
|
|
49532
49537
|
});
|
|
49533
49538
|
|
|
49534
|
-
function _interopDefaultLegacy$1 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
49535
|
-
|
|
49536
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy$1(reactDom);
|
|
49537
|
-
|
|
49538
49539
|
const insideContainerClass = 'ReactShadowDOMInsideContainer';
|
|
49539
49540
|
|
|
49540
49541
|
function createInsideContainer({ document, shadow, style }) {
|
|
@@ -49585,7 +49586,7 @@ function unmount(outsideContainer) {
|
|
|
49585
49586
|
if (shadowRoot) {
|
|
49586
49587
|
const insideContainer = shadowRoot.childNodes[0];
|
|
49587
49588
|
if (insideContainer) {
|
|
49588
|
-
|
|
49589
|
+
reactDom.unmountComponentAtNode(insideContainer);
|
|
49589
49590
|
}
|
|
49590
49591
|
}
|
|
49591
49592
|
|
|
@@ -49608,13 +49609,11 @@ function ReactShadowDOM({ document, element, content, outsideStyle = '', insideS
|
|
|
49608
49609
|
content = content(insideContainer);
|
|
49609
49610
|
}
|
|
49610
49611
|
|
|
49611
|
-
|
|
49612
|
+
reactDom.render(content, insideContainer);
|
|
49612
49613
|
|
|
49613
49614
|
return { content, unmount: () => unmount(outsideContainer) }
|
|
49614
49615
|
}
|
|
49615
49616
|
|
|
49616
|
-
var ReactShadowDOM_1 = ReactShadowDOM;
|
|
49617
|
-
|
|
49618
49617
|
var mount = (function (_ref, content) {
|
|
49619
49618
|
var style = _ref.style,
|
|
49620
49619
|
document = _ref.document,
|
|
@@ -49636,7 +49635,7 @@ var mount = (function (_ref, content) {
|
|
|
49636
49635
|
}, 300);
|
|
49637
49636
|
};
|
|
49638
49637
|
|
|
49639
|
-
var _ReactShadowDOM =
|
|
49638
|
+
var _ReactShadowDOM = ReactShadowDOM({
|
|
49640
49639
|
document: document,
|
|
49641
49640
|
element: document.body,
|
|
49642
49641
|
content: content(unmountShadowDOM),
|
|
@@ -62522,7 +62521,7 @@ var PaymentProvider = (function (props) {
|
|
|
62522
62521
|
}, [allRoutes]);
|
|
62523
62522
|
|
|
62524
62523
|
if (allRoutes instanceof Array && allRoutes.length == 0) {
|
|
62525
|
-
return /*#__PURE__*/react.createElement(
|
|
62524
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
62526
62525
|
open: open,
|
|
62527
62526
|
close: close,
|
|
62528
62527
|
start: "NoPaymentMethodFound",
|
|
@@ -69280,14 +69279,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
69280
69279
|
|
|
69281
69280
|
var _default = _Rangeslider2.default;
|
|
69282
69281
|
|
|
69283
|
-
var web3Blockchains = /*@__PURE__*/getAugmentedNamespace(es$1);
|
|
69284
|
-
|
|
69285
|
-
var web3Constants = /*@__PURE__*/getAugmentedNamespace(es);
|
|
69286
|
-
|
|
69287
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
69288
|
-
|
|
69289
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(react);
|
|
69290
|
-
|
|
69291
69282
|
const _jsxFileName = "/home/runner/work/react-token-image/react-token-image/src/index.jsx";
|
|
69292
69283
|
let TokenImage = function(props){
|
|
69293
69284
|
|
|
@@ -69298,8 +69289,8 @@ let TokenImage = function(props){
|
|
|
69298
69289
|
const address = props.address;
|
|
69299
69290
|
|
|
69300
69291
|
react.useEffect(()=>{
|
|
69301
|
-
if(
|
|
69302
|
-
setSrc(
|
|
69292
|
+
if(CONSTANTS$2[blockchain].NATIVE.toLowerCase() == address.toLowerCase()) {
|
|
69293
|
+
setSrc(Blockchain.findByName(blockchain).logo);
|
|
69303
69294
|
} else {
|
|
69304
69295
|
setSrc(trustWalletAddress({ blockchain, address }));
|
|
69305
69296
|
}
|
|
@@ -69333,17 +69324,15 @@ let TokenImage = function(props){
|
|
|
69333
69324
|
if(src == undefined) { return null }
|
|
69334
69325
|
|
|
69335
69326
|
return(
|
|
69336
|
-
|
|
69327
|
+
react.createElement('img', {
|
|
69337
69328
|
src: src ,
|
|
69338
69329
|
onError: handleLoadError , __self: this, __source: {fileName: _jsxFileName, lineNumber: 51}}
|
|
69339
69330
|
)
|
|
69340
69331
|
)
|
|
69341
69332
|
};
|
|
69342
69333
|
|
|
69343
|
-
var TokenImage_1 = TokenImage;
|
|
69344
|
-
|
|
69345
69334
|
var ChangeAmountDialog = (function (props) {
|
|
69346
|
-
var _useContext = react.useContext(
|
|
69335
|
+
var _useContext = react.useContext(NavigateStackContext),
|
|
69347
69336
|
navigate = _useContext.navigate;
|
|
69348
69337
|
|
|
69349
69338
|
var _useContext2 = react.useContext(ErrorContext);
|
|
@@ -69509,7 +69498,7 @@ var ChangePaymentDialog = (function (props) {
|
|
|
69509
69498
|
var _useContext3 = react.useContext(PaymentValueContext),
|
|
69510
69499
|
paymentValue = _useContext3.paymentValue;
|
|
69511
69500
|
|
|
69512
|
-
var _useContext4 = react.useContext(
|
|
69501
|
+
var _useContext4 = react.useContext(NavigateStackContext),
|
|
69513
69502
|
navigate = _useContext4.navigate;
|
|
69514
69503
|
|
|
69515
69504
|
var _useState = react.useState([]),
|
|
@@ -69556,7 +69545,7 @@ var ChangePaymentDialog = (function (props) {
|
|
|
69556
69545
|
}
|
|
69557
69546
|
}, /*#__PURE__*/react.createElement("div", {
|
|
69558
69547
|
className: "CardImage"
|
|
69559
|
-
}, /*#__PURE__*/react.createElement(
|
|
69548
|
+
}, /*#__PURE__*/react.createElement(TokenImage, {
|
|
69560
69549
|
blockchain: payment.route.blockchain,
|
|
69561
69550
|
address: payment.route.fromToken.address
|
|
69562
69551
|
}), /*#__PURE__*/react.createElement("img", {
|
|
@@ -69724,7 +69713,7 @@ var Footer = (function () {
|
|
|
69724
69713
|
var _useContext5 = react.useContext(PaymentValueContext),
|
|
69725
69714
|
paymentValue = _useContext5.paymentValue;
|
|
69726
69715
|
|
|
69727
|
-
var _useContext6 = react.useContext(
|
|
69716
|
+
var _useContext6 = react.useContext(NavigateStackContext),
|
|
69728
69717
|
navigate = _useContext6.navigate;
|
|
69729
69718
|
|
|
69730
69719
|
var _useContext7 = react.useContext(ClosableContext),
|
|
@@ -69907,7 +69896,7 @@ var DonationOverviewDialog = (function (props) {
|
|
|
69907
69896
|
payment = _useContext3.payment,
|
|
69908
69897
|
paymentState = _useContext3.paymentState;
|
|
69909
69898
|
|
|
69910
|
-
var _useContext4 = react.useContext(
|
|
69899
|
+
var _useContext4 = react.useContext(NavigateStackContext),
|
|
69911
69900
|
navigate = _useContext4.navigate;
|
|
69912
69901
|
|
|
69913
69902
|
if (payment == undefined) {
|
|
@@ -69960,7 +69949,7 @@ var DonationOverviewDialog = (function (props) {
|
|
|
69960
69949
|
}, /*#__PURE__*/react.createElement("div", {
|
|
69961
69950
|
className: "CardImage",
|
|
69962
69951
|
title: payment.name
|
|
69963
|
-
}, /*#__PURE__*/react.createElement(
|
|
69952
|
+
}, /*#__PURE__*/react.createElement(TokenImage, {
|
|
69964
69953
|
blockchain: payment.route.blockchain,
|
|
69965
69954
|
address: payment.token
|
|
69966
69955
|
})), /*#__PURE__*/react.createElement("div", {
|
|
@@ -69987,7 +69976,7 @@ var DonationOverviewDialog = (function (props) {
|
|
|
69987
69976
|
});
|
|
69988
69977
|
|
|
69989
69978
|
var PaymentErrorDialog = (function () {
|
|
69990
|
-
var _useContext = react.useContext(
|
|
69979
|
+
var _useContext = react.useContext(NavigateStackContext),
|
|
69991
69980
|
navigate = _useContext.navigate;
|
|
69992
69981
|
|
|
69993
69982
|
var _useContext2 = react.useContext(PaymentContext),
|
|
@@ -70035,7 +70024,7 @@ var WrongNetworkDialog = (function (props) {
|
|
|
70035
70024
|
var _useContext = react.useContext(PaymentContext),
|
|
70036
70025
|
payment = _useContext.payment;
|
|
70037
70026
|
|
|
70038
|
-
var _useContext2 = react.useContext(
|
|
70027
|
+
var _useContext2 = react.useContext(NavigateStackContext),
|
|
70039
70028
|
navigate = _useContext2.navigate;
|
|
70040
70029
|
|
|
70041
70030
|
var blockchain = Blockchain.findByName(payment.route.blockchain);
|
|
@@ -70076,7 +70065,7 @@ var DonationStack = (function (props) {
|
|
|
70076
70065
|
open = _useContext.open,
|
|
70077
70066
|
close = _useContext.close;
|
|
70078
70067
|
|
|
70079
|
-
return /*#__PURE__*/react.createElement(
|
|
70068
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
70080
70069
|
open: open,
|
|
70081
70070
|
close: close,
|
|
70082
70071
|
start: "DonationOverview",
|
|
@@ -70476,7 +70465,7 @@ var LoginStack = (function (props) {
|
|
|
70476
70465
|
_useState2[0];
|
|
70477
70466
|
_useState2[1];
|
|
70478
70467
|
|
|
70479
|
-
return /*#__PURE__*/react.createElement(
|
|
70468
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
70480
70469
|
open: open,
|
|
70481
70470
|
close: close,
|
|
70482
70471
|
start: "SignLogin",
|
|
@@ -70640,7 +70629,7 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
70640
70629
|
var _useContext4 = react.useContext(PaymentValueContext),
|
|
70641
70630
|
paymentValue = _useContext4.paymentValue;
|
|
70642
70631
|
|
|
70643
|
-
var _useContext5 = react.useContext(
|
|
70632
|
+
var _useContext5 = react.useContext(NavigateStackContext),
|
|
70644
70633
|
navigate = _useContext5.navigate;
|
|
70645
70634
|
|
|
70646
70635
|
if (payment == undefined || paymentValue == undefined) {
|
|
@@ -70693,7 +70682,7 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
70693
70682
|
}, /*#__PURE__*/react.createElement("div", {
|
|
70694
70683
|
className: "CardImage",
|
|
70695
70684
|
title: payment.name
|
|
70696
|
-
}, /*#__PURE__*/react.createElement(
|
|
70685
|
+
}, /*#__PURE__*/react.createElement(TokenImage, {
|
|
70697
70686
|
blockchain: payment.route.blockchain,
|
|
70698
70687
|
address: payment.token
|
|
70699
70688
|
})), /*#__PURE__*/react.createElement("div", {
|
|
@@ -70724,7 +70713,7 @@ var PaymentStack = (function (props) {
|
|
|
70724
70713
|
open = _useContext.open,
|
|
70725
70714
|
close = _useContext.close;
|
|
70726
70715
|
|
|
70727
|
-
return /*#__PURE__*/react.createElement(
|
|
70716
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
70728
70717
|
open: open,
|
|
70729
70718
|
close: close,
|
|
70730
70719
|
start: "PaymentOverview",
|
|
@@ -70994,7 +70983,7 @@ var SaleOverviewDialog = (function (props) {
|
|
|
70994
70983
|
payment = _useContext4.payment,
|
|
70995
70984
|
paymentState = _useContext4.paymentState;
|
|
70996
70985
|
|
|
70997
|
-
var _useContext5 = react.useContext(
|
|
70986
|
+
var _useContext5 = react.useContext(NavigateStackContext),
|
|
70998
70987
|
navigate = _useContext5.navigate;
|
|
70999
70988
|
|
|
71000
70989
|
var _useContext6 = react.useContext(ToTokenContext),
|
|
@@ -71026,7 +71015,7 @@ var SaleOverviewDialog = (function (props) {
|
|
|
71026
71015
|
src: tokenImage
|
|
71027
71016
|
});
|
|
71028
71017
|
} else {
|
|
71029
|
-
tokenImageElement = /*#__PURE__*/react.createElement(
|
|
71018
|
+
tokenImageElement = /*#__PURE__*/react.createElement(TokenImage, {
|
|
71030
71019
|
blockchain: payment.route.blockchain,
|
|
71031
71020
|
address: toToken.address
|
|
71032
71021
|
});
|
|
@@ -71084,7 +71073,7 @@ var SaleOverviewDialog = (function (props) {
|
|
|
71084
71073
|
}, /*#__PURE__*/react.createElement("div", {
|
|
71085
71074
|
className: "CardImage",
|
|
71086
71075
|
title: payment.name
|
|
71087
|
-
}, /*#__PURE__*/react.createElement(
|
|
71076
|
+
}, /*#__PURE__*/react.createElement(TokenImage, {
|
|
71088
71077
|
blockchain: payment.route.blockchain,
|
|
71089
71078
|
address: payment.token
|
|
71090
71079
|
})), /*#__PURE__*/react.createElement("div", {
|
|
@@ -71115,7 +71104,7 @@ var SaleStack = (function (props) {
|
|
|
71115
71104
|
open = _useContext.open,
|
|
71116
71105
|
close = _useContext.close;
|
|
71117
71106
|
|
|
71118
|
-
return /*#__PURE__*/react.createElement(
|
|
71107
|
+
return /*#__PURE__*/react.createElement(ReactDialogStack, {
|
|
71119
71108
|
open: open,
|
|
71120
71109
|
close: close,
|
|
71121
71110
|
start: "SaleOverview",
|