@rhinestone/deposit-modal 0.3.0-alpha.14 → 0.3.0-alpha.15
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/{DepositModalReown-DIUIB3MU.mjs → DepositModalReown-CAX35NN2.mjs} +4 -4
- package/dist/{DepositModalReown-4I47KSPN.cjs → DepositModalReown-P4QGKQRZ.cjs} +7 -7
- package/dist/{WithdrawModalReown-WRUEALDP.mjs → WithdrawModalReown-V4YYPNBE.mjs} +4 -4
- package/dist/{WithdrawModalReown-Y3NRAKXJ.cjs → WithdrawModalReown-ZSFALZOB.cjs} +7 -7
- package/dist/{chunk-JTULAFMU.cjs → chunk-6O4NGY2N.cjs} +5 -5
- package/dist/{chunk-SZIYS42B.mjs → chunk-7C4SPVM5.mjs} +6 -2
- package/dist/{chunk-2NUXDEEO.cjs → chunk-7LJYEGZZ.cjs} +93 -93
- package/dist/{chunk-N4XRQPVA.cjs → chunk-7NO7WVJV.cjs} +33 -24
- package/dist/{chunk-3CYGTYMY.cjs → chunk-AAQPYKBA.cjs} +354 -318
- package/dist/{chunk-7JIDIX27.cjs → chunk-DZ2RPLBM.cjs} +7 -3
- package/dist/{chunk-JTMGFWXO.mjs → chunk-H2WSFD53.mjs} +2 -2
- package/dist/{chunk-4ZN726P5.mjs → chunk-IZMF2WHM.mjs} +10 -1
- package/dist/{chunk-XG474KUR.mjs → chunk-KDJS56TQ.mjs} +53 -17
- package/dist/{chunk-VD4WTEHP.mjs → chunk-LDMY67HP.mjs} +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{types-C8i2ebY1.d.cts → types-cXr3j4NV.d.cts} +26 -0
- package/dist/{types-C8i2ebY1.d.ts → types-cXr3j4NV.d.ts} +26 -0
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KDJS56TQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-H2WSFD53.mjs";
|
|
8
|
+
import "./chunk-IZMF2WHM.mjs";
|
|
9
|
+
import "./chunk-7C4SPVM5.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
import { useCallback, useMemo } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAAQPYKBAcjs = require('./chunk-AAQPYKBA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunk6O4NGY2Ncjs = require('./chunk-6O4NGY2N.cjs');
|
|
8
|
+
require('./chunk-7NO7WVJV.cjs');
|
|
9
|
+
require('./chunk-DZ2RPLBM.cjs');
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -14,7 +14,7 @@ var _react3 = require('@reown/appkit/react');
|
|
|
14
14
|
var _react5 = require('@reown/appkit-adapter-solana/react');
|
|
15
15
|
var _jsxruntime = require('react/jsx-runtime');
|
|
16
16
|
function DepositModalWithReown(props) {
|
|
17
|
-
const reown =
|
|
17
|
+
const reown = _chunk6O4NGY2Ncjs.useReownWallet.call(void 0, );
|
|
18
18
|
const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
|
|
19
19
|
const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
|
|
20
20
|
enableSolana ? "solana" : "eip155"
|
|
@@ -35,7 +35,7 @@ function DepositModalWithReown(props) {
|
|
|
35
35
|
reown.disconnect();
|
|
36
36
|
}, [reown.disconnect]);
|
|
37
37
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
38
|
-
|
|
38
|
+
_chunkAAQPYKBAcjs.DepositModalInner,
|
|
39
39
|
{
|
|
40
40
|
...props,
|
|
41
41
|
reownWallet: reownWithSolana,
|
|
@@ -46,7 +46,7 @@ function DepositModalWithReown(props) {
|
|
|
46
46
|
}
|
|
47
47
|
function DepositModalReown(props) {
|
|
48
48
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
-
|
|
49
|
+
_chunk6O4NGY2Ncjs.ReownWalletProvider,
|
|
50
50
|
{
|
|
51
51
|
projectId: props.reownAppId,
|
|
52
52
|
theme: props.theme,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LDMY67HP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-H2WSFD53.mjs";
|
|
8
|
+
import "./chunk-IZMF2WHM.mjs";
|
|
9
|
+
import "./chunk-7C4SPVM5.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
import { useCallback } from "react";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7LJYEGZZcjs = require('./chunk-7LJYEGZZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunk6O4NGY2Ncjs = require('./chunk-6O4NGY2N.cjs');
|
|
8
|
+
require('./chunk-7NO7WVJV.cjs');
|
|
9
|
+
require('./chunk-DZ2RPLBM.cjs');
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
13
13
|
var _jsxruntime = require('react/jsx-runtime');
|
|
14
14
|
function WithdrawModalWithReown(props) {
|
|
15
|
-
const reown =
|
|
15
|
+
const reown = _chunk6O4NGY2Ncjs.useReownWallet.call(void 0, );
|
|
16
16
|
const handleConnect = _react.useCallback.call(void 0, () => {
|
|
17
17
|
reown.openConnect();
|
|
18
18
|
}, [reown.openConnect]);
|
|
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunk7LJYEGZZcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -30,7 +30,7 @@ function WithdrawModalWithReown(props) {
|
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
function WithdrawModalReown(props) {
|
|
33
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
33
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6O4NGY2Ncjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props }) });
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7NO7WVJVcjs = require('./chunk-7NO7WVJV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkDZ2RPLBMcjs = require('./chunk-DZ2RPLBM.cjs');
|
|
8
8
|
|
|
9
9
|
// src/core/reown.tsx
|
|
10
10
|
var _react = require('react');
|
|
@@ -45,7 +45,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
45
45
|
[_networks.soneium.id]: _networks.soneium,
|
|
46
46
|
[_networks.plasma.id]: _networks.plasma
|
|
47
47
|
};
|
|
48
|
-
var EVM_NETWORKS =
|
|
48
|
+
var EVM_NETWORKS = _chunkDZ2RPLBMcjs.SUPPORTED_CHAINS.map((chain) => {
|
|
49
49
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
50
50
|
if (!network) {
|
|
51
51
|
throw new Error(
|
|
@@ -145,9 +145,9 @@ function useReownWallet() {
|
|
|
145
145
|
await switchChainAsync({ chainId });
|
|
146
146
|
}
|
|
147
147
|
} catch (err) {
|
|
148
|
-
if (
|
|
148
|
+
if (_chunk7NO7WVJVcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
149
149
|
throw new Error(
|
|
150
|
-
`Switch to ${
|
|
150
|
+
`Switch to ${_chunkDZ2RPLBMcjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
throw err;
|
|
@@ -403,7 +403,7 @@ function getSupportedTargetTokens(chainId) {
|
|
|
403
403
|
}
|
|
404
404
|
return options;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function findTokenDecimals(token, chainId) {
|
|
407
407
|
const normalized = token.toLowerCase();
|
|
408
408
|
if (normalized === NATIVE_TOKEN_ADDRESS) {
|
|
409
409
|
return 18;
|
|
@@ -423,7 +423,10 @@ function getTokenDecimalsByAddress(token, chainId) {
|
|
|
423
423
|
);
|
|
424
424
|
if (found) return found.decimals;
|
|
425
425
|
}
|
|
426
|
-
return
|
|
426
|
+
return void 0;
|
|
427
|
+
}
|
|
428
|
+
function getTokenDecimalsByAddress(token, chainId) {
|
|
429
|
+
return findTokenDecimals(token, chainId) ?? 18;
|
|
427
430
|
}
|
|
428
431
|
function findChainIdForToken(address) {
|
|
429
432
|
const normalized = address.toLowerCase();
|
|
@@ -541,6 +544,7 @@ export {
|
|
|
541
544
|
getSupportedChainIds,
|
|
542
545
|
isSupportedTokenAddressForChain,
|
|
543
546
|
getSupportedTargetTokens,
|
|
547
|
+
findTokenDecimals,
|
|
544
548
|
getTokenDecimalsByAddress,
|
|
545
549
|
findChainIdForToken,
|
|
546
550
|
getTokenSymbol,
|