@rhinestone/deposit-modal 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -12
- package/bridge-transcript.json +653 -0
- package/dist/ClaimModal-GDFENSLV.mjs +13 -0
- package/dist/ClaimModal-L3FUBI5U.cjs +13 -0
- package/dist/{DepositModalReown-3H75G3XQ.mjs → DepositModalReown-2EVV64OA.mjs} +30 -27
- package/dist/{DepositModalReown-YNNHLAV2.cjs → DepositModalReown-GAD45GIC.cjs} +77 -74
- package/dist/WithdrawModal-FAQH35NG.cjs +12 -0
- package/dist/WithdrawModal-IKUHF5CF.mjs +12 -0
- package/dist/{chunk-RAADLTSW.cjs → chunk-4J5ADVIN.cjs} +184 -139
- package/dist/{chunk-DSIZNRWA.mjs → chunk-5Q5CSVKF.mjs} +1049 -388
- package/dist/{chunk-HOGZKHHY.cjs → chunk-62UCV2LG.cjs} +3 -3
- package/dist/{chunk-CVGNCUVU.cjs → chunk-7AZFT2MV.cjs} +22 -13
- package/dist/{chunk-7N77GIP4.cjs → chunk-A6JPBMYY.cjs} +465 -171
- package/dist/{chunk-GACIGCSN.cjs → chunk-AQVJUXSG.cjs} +1 -1
- package/dist/{chunk-LTMMETAB.mjs → chunk-GZ4GQ5MC.mjs} +404 -110
- package/dist/{chunk-ZMT4ATHR.cjs → chunk-HAQOFI3D.cjs} +594 -41
- package/dist/{chunk-FZ5FZFIG.mjs → chunk-LMG46EP2.mjs} +1 -1
- package/dist/{chunk-2G2EIN4A.cjs → chunk-NQMC5VKQ.cjs} +1343 -682
- package/dist/{chunk-OLCD75JK.mjs → chunk-QACOOLOE.mjs} +451 -131
- package/dist/{chunk-XYJFEN5D.mjs → chunk-R5UQ3TN4.mjs} +1 -1
- package/dist/{chunk-EOMT5LKX.mjs → chunk-UX35GYLM.mjs} +556 -3
- package/dist/{chunk-YREVFB64.mjs → chunk-VALXN5IO.mjs} +16 -7
- package/dist/{chunk-COCBCQQC.mjs → chunk-XCTRKCNM.mjs} +51 -6
- package/dist/{chunk-5NUIKYSF.cjs → chunk-YP7QVKQ6.cjs} +458 -138
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +3 -3
- package/dist/claim.d.ts +3 -3
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/embed.cjs +310 -102
- package/dist/embed.d.cts +7 -1
- package/dist/embed.d.ts +7 -1
- package/dist/embed.mjs +285 -77
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -8
- package/dist/types-Bho4OA03.d.ts +982 -0
- package/dist/types-DP_3KwlD.d.cts +982 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +3 -3
- package/dist/withdraw.d.ts +3 -3
- package/dist/withdraw.mjs +4 -4
- package/package.json +29 -7
- package/dist/ClaimModal-CREZO27I.mjs +0 -11
- package/dist/ClaimModal-JRIA32U2.cjs +0 -11
- package/dist/WithdrawModal-NVRX44IZ.mjs +0 -10
- package/dist/WithdrawModal-YYSBPCJJ.cjs +0 -10
- package/dist/types-B89I8_8H.d.ts +0 -638
- package/dist/types-nnDR4tqA.d.cts +0 -638
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DepositModalInner
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "./chunk-
|
|
2
|
+
DepositModalInner,
|
|
3
|
+
getReownDependencies
|
|
4
|
+
} from "./chunk-5Q5CSVKF.mjs";
|
|
5
|
+
import "./chunk-XCTRKCNM.mjs";
|
|
6
|
+
import "./chunk-R5UQ3TN4.mjs";
|
|
6
7
|
import {
|
|
7
8
|
followSystemAppearance,
|
|
8
9
|
isUnsupportedChainSwitchError,
|
|
@@ -11,8 +12,8 @@ import {
|
|
|
11
12
|
resolveThemeMode,
|
|
12
13
|
rpcUrlFor,
|
|
13
14
|
useStableRpcUrls
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-UX35GYLM.mjs";
|
|
16
|
+
import "./chunk-LMG46EP2.mjs";
|
|
16
17
|
import "./chunk-RN5VKWI6.mjs";
|
|
17
18
|
import {
|
|
18
19
|
SUPPORTED_CHAIN_IDS,
|
|
@@ -25,24 +26,12 @@ import { useCallback, useMemo as useMemo2 } from "react";
|
|
|
25
26
|
// src/core/reown.tsx
|
|
26
27
|
import { useEffect, useMemo, useState } from "react";
|
|
27
28
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
28
|
-
import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
|
|
29
|
-
import { SolanaAdapter } from "@reown/appkit-adapter-solana";
|
|
30
29
|
import { WagmiProvider } from "wagmi";
|
|
31
|
-
import {
|
|
32
|
-
createAppKit,
|
|
33
|
-
useAppKit,
|
|
34
|
-
useAppKitAccount,
|
|
35
|
-
useAppKitNetwork,
|
|
36
|
-
useAppKitState,
|
|
37
|
-
useWalletInfo,
|
|
38
|
-
modal
|
|
39
|
-
} from "@reown/appkit/react";
|
|
40
|
-
import { solana } from "@reown/appkit/networks";
|
|
41
30
|
import { useWalletClient, usePublicClient, useSwitchChain } from "wagmi";
|
|
42
31
|
import { http } from "viem";
|
|
43
32
|
|
|
44
33
|
// src/core/reown-networks.ts
|
|
45
|
-
|
|
34
|
+
var {
|
|
46
35
|
mainnet,
|
|
47
36
|
optimism,
|
|
48
37
|
polygon,
|
|
@@ -57,7 +46,7 @@ import {
|
|
|
57
46
|
unichain,
|
|
58
47
|
katana,
|
|
59
48
|
hyperEvm
|
|
60
|
-
}
|
|
49
|
+
} = getReownDependencies()[1];
|
|
61
50
|
var APPKIT_NETWORK_BY_ID = {
|
|
62
51
|
[mainnet.id]: mainnet,
|
|
63
52
|
[optimism.id]: optimism,
|
|
@@ -106,6 +95,18 @@ function setAppKitTheme(appKit, theme) {
|
|
|
106
95
|
|
|
107
96
|
// src/core/reown.tsx
|
|
108
97
|
import { jsx } from "react/jsx-runtime";
|
|
98
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = getReownDependencies();
|
|
99
|
+
var {
|
|
100
|
+
createAppKit,
|
|
101
|
+
useAppKit,
|
|
102
|
+
useAppKitAccount,
|
|
103
|
+
useAppKitNetwork,
|
|
104
|
+
useAppKitState,
|
|
105
|
+
useWalletInfo
|
|
106
|
+
} = appKitReact;
|
|
107
|
+
var { solana } = appKitNetworks;
|
|
108
|
+
var { WagmiAdapter } = wagmiAdapter;
|
|
109
|
+
var { SolanaAdapter } = solanaAdapter;
|
|
109
110
|
function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
110
111
|
const transports = {};
|
|
111
112
|
for (const network of networks) {
|
|
@@ -148,10 +149,10 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
|
|
|
148
149
|
cachedAdapterKey = adapterKey;
|
|
149
150
|
const { themeMode, themeVariables } = mapTheme(theme);
|
|
150
151
|
const adapters = enableSolana ? [cachedAdapter, new SolanaAdapter()] : [cachedAdapter];
|
|
151
|
-
const
|
|
152
|
+
const appKitNetworks2 = enableSolana ? [...networks, solana] : networks;
|
|
152
153
|
const appKit = createAppKit({
|
|
153
154
|
adapters,
|
|
154
|
-
networks:
|
|
155
|
+
networks: appKitNetworks2,
|
|
155
156
|
projectId,
|
|
156
157
|
themeMode,
|
|
157
158
|
themeVariables,
|
|
@@ -215,10 +216,10 @@ function ReownWalletProvider({
|
|
|
215
216
|
};
|
|
216
217
|
}, [backendUrl, overrides]);
|
|
217
218
|
useEffect(() => {
|
|
218
|
-
setAppKitTheme(modal, theme);
|
|
219
|
+
setAppKitTheme(appKitReact.modal, theme);
|
|
219
220
|
return followSystemAppearance(
|
|
220
221
|
theme?.mode,
|
|
221
|
-
() => setAppKitTheme(modal, theme)
|
|
222
|
+
() => setAppKitTheme(appKitReact.modal, theme)
|
|
222
223
|
);
|
|
223
224
|
}, [theme, state.ready]);
|
|
224
225
|
if (!state.ready) return null;
|
|
@@ -264,7 +265,7 @@ function useReownWalletSession() {
|
|
|
264
265
|
void open({ view: "Connect" });
|
|
265
266
|
},
|
|
266
267
|
disconnect: () => {
|
|
267
|
-
void modal?.disconnect();
|
|
268
|
+
void appKitReact.modal?.disconnect();
|
|
268
269
|
},
|
|
269
270
|
switchChain: async (chainId) => {
|
|
270
271
|
if (!wagmiConfiguredEvmIds.has(chainId)) {
|
|
@@ -292,9 +293,10 @@ function useReownWalletSession() {
|
|
|
292
293
|
}
|
|
293
294
|
|
|
294
295
|
// src/DepositModalReown.tsx
|
|
295
|
-
import { useAppKitProvider } from "@reown/appkit/react";
|
|
296
|
-
import { useAppKitConnection } from "@reown/appkit-adapter-solana/react";
|
|
297
296
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
297
|
+
var [appKitReact2, , , , solanaAdapterReact] = getReownDependencies();
|
|
298
|
+
var { useAppKitProvider } = appKitReact2;
|
|
299
|
+
var { useAppKitConnection } = solanaAdapterReact;
|
|
298
300
|
function DepositModalWithReown(props) {
|
|
299
301
|
const reown = useReownWalletSession();
|
|
300
302
|
const { walletProvider: solanaWalletProvider } = useAppKitProvider("solana");
|
|
@@ -318,6 +320,7 @@ function DepositModalWithReown(props) {
|
|
|
318
320
|
{
|
|
319
321
|
...props,
|
|
320
322
|
walletSession: reownWithSolana,
|
|
323
|
+
walletIntegration: "modal_connected",
|
|
321
324
|
onConnect: handleConnect,
|
|
322
325
|
onDisconnect: handleDisconnect
|
|
323
326
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunk2G2EIN4Acjs = require('./chunk-2G2EIN4A.cjs');
|
|
4
|
-
require('./chunk-RAADLTSW.cjs');
|
|
5
|
-
require('./chunk-HOGZKHHY.cjs');
|
|
6
3
|
|
|
4
|
+
var _chunkNQMC5VKQcjs = require('./chunk-NQMC5VKQ.cjs');
|
|
5
|
+
require('./chunk-4J5ADVIN.cjs');
|
|
6
|
+
require('./chunk-62UCV2LG.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -11,8 +11,9 @@ require('./chunk-HOGZKHHY.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
|
|
15
|
+
var _chunkHAQOFI3Dcjs = require('./chunk-HAQOFI3D.cjs');
|
|
16
|
+
require('./chunk-AQVJUXSG.cjs');
|
|
16
17
|
require('./chunk-DW2EQA2U.cjs');
|
|
17
18
|
|
|
18
19
|
|
|
@@ -25,54 +26,42 @@ var _react = require('react');
|
|
|
25
26
|
// src/core/reown.tsx
|
|
26
27
|
|
|
27
28
|
var _reactquery = require('@tanstack/react-query');
|
|
28
|
-
var _appkitadapterwagmi = require('@reown/appkit-adapter-wagmi');
|
|
29
|
-
var _appkitadaptersolana = require('@reown/appkit-adapter-solana');
|
|
30
29
|
var _wagmi = require('wagmi');
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _react3 = require('@reown/appkit/react');
|
|
40
|
-
var _networks = require('@reown/appkit/networks');
|
|
41
|
-
|
|
42
31
|
var _viem = require('viem');
|
|
43
32
|
|
|
44
33
|
// src/core/reown-networks.ts
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
34
|
+
var {
|
|
35
|
+
mainnet,
|
|
36
|
+
optimism,
|
|
37
|
+
polygon,
|
|
38
|
+
arbitrum,
|
|
39
|
+
base,
|
|
40
|
+
bsc,
|
|
41
|
+
soneium,
|
|
42
|
+
plasma,
|
|
43
|
+
gnosis,
|
|
44
|
+
sonic,
|
|
45
|
+
monad,
|
|
46
|
+
unichain,
|
|
47
|
+
katana,
|
|
48
|
+
hyperEvm
|
|
49
|
+
} = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, )[1];
|
|
61
50
|
var APPKIT_NETWORK_BY_ID = {
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
51
|
+
[mainnet.id]: mainnet,
|
|
52
|
+
[optimism.id]: optimism,
|
|
53
|
+
[polygon.id]: polygon,
|
|
54
|
+
[arbitrum.id]: arbitrum,
|
|
55
|
+
[base.id]: base,
|
|
56
|
+
[bsc.id]: bsc,
|
|
57
|
+
[soneium.id]: soneium,
|
|
58
|
+
[plasma.id]: plasma,
|
|
59
|
+
[gnosis.id]: gnosis,
|
|
60
|
+
[sonic.id]: sonic,
|
|
61
|
+
[monad.id]: monad,
|
|
62
|
+
[unichain.id]: unichain,
|
|
63
|
+
[katana.id]: katana,
|
|
64
|
+
[hyperEvm.id]: hyperEvm
|
|
76
65
|
};
|
|
77
66
|
var EVM_NETWORKS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
|
|
78
67
|
const network = APPKIT_NETWORK_BY_ID[chainId];
|
|
@@ -89,7 +78,7 @@ function getAppKitNetwork(chainId) {
|
|
|
89
78
|
|
|
90
79
|
// src/core/reown-theme.ts
|
|
91
80
|
function mapTheme(theme) {
|
|
92
|
-
const themeMode =
|
|
81
|
+
const themeMode = _chunkHAQOFI3Dcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
93
82
|
const themeVariables = {
|
|
94
83
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
95
84
|
};
|
|
@@ -106,18 +95,30 @@ function setAppKitTheme(appKit, theme) {
|
|
|
106
95
|
|
|
107
96
|
// src/core/reown.tsx
|
|
108
97
|
var _jsxruntime = require('react/jsx-runtime');
|
|
98
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, );
|
|
99
|
+
var {
|
|
100
|
+
createAppKit,
|
|
101
|
+
useAppKit,
|
|
102
|
+
useAppKitAccount,
|
|
103
|
+
useAppKitNetwork,
|
|
104
|
+
useAppKitState,
|
|
105
|
+
useWalletInfo
|
|
106
|
+
} = appKitReact;
|
|
107
|
+
var { solana } = appKitNetworks;
|
|
108
|
+
var { WagmiAdapter } = wagmiAdapter;
|
|
109
|
+
var { SolanaAdapter } = solanaAdapter;
|
|
109
110
|
function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
110
111
|
const transports = {};
|
|
111
112
|
for (const network of networks) {
|
|
112
113
|
const id = Number(network.id);
|
|
113
|
-
transports[id] = _viem.http.call(void 0,
|
|
114
|
+
transports[id] = _viem.http.call(void 0, _chunkHAQOFI3Dcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
114
115
|
}
|
|
115
116
|
return transports;
|
|
116
117
|
}
|
|
117
118
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
118
119
|
return networks.map((network) => {
|
|
119
120
|
const id = Number(network.id);
|
|
120
|
-
return `${id}=${_nullishCoalesce(
|
|
121
|
+
return `${id}=${_nullishCoalesce(_chunkHAQOFI3Dcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
121
122
|
}).join("|");
|
|
122
123
|
}
|
|
123
124
|
var cachedAdapter = null;
|
|
@@ -140,18 +141,18 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
|
|
|
140
141
|
getEvmRpcFingerprint(rpcUrls, networks)
|
|
141
142
|
].join(":");
|
|
142
143
|
if (cachedAdapter && cachedAdapterKey === adapterKey) return cachedAdapter;
|
|
143
|
-
cachedAdapter = new
|
|
144
|
+
cachedAdapter = new WagmiAdapter({
|
|
144
145
|
networks,
|
|
145
146
|
projectId,
|
|
146
147
|
transports: buildTransports(rpcUrls, networks)
|
|
147
148
|
});
|
|
148
149
|
cachedAdapterKey = adapterKey;
|
|
149
150
|
const { themeMode, themeVariables } = mapTheme(theme);
|
|
150
|
-
const adapters = enableSolana ? [cachedAdapter, new
|
|
151
|
-
const
|
|
152
|
-
const appKit =
|
|
151
|
+
const adapters = enableSolana ? [cachedAdapter, new SolanaAdapter()] : [cachedAdapter];
|
|
152
|
+
const appKitNetworks2 = enableSolana ? [...networks, solana] : networks;
|
|
153
|
+
const appKit = createAppKit({
|
|
153
154
|
adapters,
|
|
154
|
-
networks:
|
|
155
|
+
networks: appKitNetworks2,
|
|
155
156
|
projectId,
|
|
156
157
|
themeMode,
|
|
157
158
|
themeVariables,
|
|
@@ -188,7 +189,7 @@ function ReownWalletProvider({
|
|
|
188
189
|
backendUrl,
|
|
189
190
|
children
|
|
190
191
|
}) {
|
|
191
|
-
const rpcUrls =
|
|
192
|
+
const rpcUrls = _chunkHAQOFI3Dcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
192
193
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
193
194
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
194
195
|
if (!rpcUrls) return void 0;
|
|
@@ -200,14 +201,14 @@ function ReownWalletProvider({
|
|
|
200
201
|
return out;
|
|
201
202
|
}, [rpcUrls]);
|
|
202
203
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
203
|
-
const primed =
|
|
204
|
+
const primed = _chunkHAQOFI3Dcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
204
205
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
205
206
|
});
|
|
206
207
|
_react.useEffect.call(void 0, () => {
|
|
207
208
|
let active = true;
|
|
208
|
-
const primed =
|
|
209
|
+
const primed = _chunkHAQOFI3Dcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
209
210
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
210
|
-
|
|
211
|
+
_chunkHAQOFI3Dcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
211
212
|
if (active) setState({ ready: true, chains });
|
|
212
213
|
});
|
|
213
214
|
return () => {
|
|
@@ -215,10 +216,10 @@ function ReownWalletProvider({
|
|
|
215
216
|
};
|
|
216
217
|
}, [backendUrl, overrides]);
|
|
217
218
|
_react.useEffect.call(void 0, () => {
|
|
218
|
-
setAppKitTheme(
|
|
219
|
-
return
|
|
219
|
+
setAppKitTheme(appKitReact.modal, theme);
|
|
220
|
+
return _chunkHAQOFI3Dcjs.followSystemAppearance.call(void 0,
|
|
220
221
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
221
|
-
() => setAppKitTheme(
|
|
222
|
+
() => setAppKitTheme(appKitReact.modal, theme)
|
|
222
223
|
);
|
|
223
224
|
}, [theme, state.ready]);
|
|
224
225
|
if (!state.ready) return null;
|
|
@@ -234,13 +235,13 @@ function ReownWalletProvider({
|
|
|
234
235
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _wagmi.WagmiProvider, { config, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children }) });
|
|
235
236
|
}
|
|
236
237
|
function useReownWalletSession() {
|
|
237
|
-
const { open } =
|
|
238
|
-
const { address, isConnected, caipAddress } =
|
|
239
|
-
const { initialized, loading } =
|
|
240
|
-
const { walletInfo } =
|
|
238
|
+
const { open } = useAppKit();
|
|
239
|
+
const { address, isConnected, caipAddress } = useAppKitAccount();
|
|
240
|
+
const { initialized, loading } = useAppKitState();
|
|
241
|
+
const { walletInfo } = useWalletInfo();
|
|
241
242
|
const { data: walletClient } = _wagmi.useWalletClient.call(void 0, );
|
|
242
243
|
const publicClient = _wagmi.usePublicClient.call(void 0, );
|
|
243
|
-
const { switchNetwork } =
|
|
244
|
+
const { switchNetwork } = useAppKitNetwork();
|
|
244
245
|
const { switchChainAsync } = _wagmi.useSwitchChain.call(void 0, );
|
|
245
246
|
const isSolana = _nullishCoalesce(_optionalChain([caipAddress, 'optionalAccess', _8 => _8.startsWith, 'call', _9 => _9("solana:")]), () => ( false));
|
|
246
247
|
const solanaAddress = isSolana ? _optionalChain([caipAddress, 'optionalAccess', _10 => _10.split, 'call', _11 => _11(":"), 'access', _12 => _12.slice, 'call', _13 => _13(2), 'access', _14 => _14.join, 'call', _15 => _15(":")]) : void 0;
|
|
@@ -264,7 +265,7 @@ function useReownWalletSession() {
|
|
|
264
265
|
void open({ view: "Connect" });
|
|
265
266
|
},
|
|
266
267
|
disconnect: () => {
|
|
267
|
-
void _optionalChain([
|
|
268
|
+
void _optionalChain([appKitReact, 'access', _17 => _17.modal, 'optionalAccess', _18 => _18.disconnect, 'call', _19 => _19()]);
|
|
268
269
|
},
|
|
269
270
|
switchChain: async (chainId) => {
|
|
270
271
|
if (!wagmiConfiguredEvmIds.has(chainId)) {
|
|
@@ -280,7 +281,7 @@ function useReownWalletSession() {
|
|
|
280
281
|
await switchChainAsync({ chainId });
|
|
281
282
|
}
|
|
282
283
|
} catch (err) {
|
|
283
|
-
if (
|
|
284
|
+
if (_chunkHAQOFI3Dcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
284
285
|
throw new Error(
|
|
285
286
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
286
287
|
);
|
|
@@ -293,12 +294,13 @@ function useReownWalletSession() {
|
|
|
293
294
|
|
|
294
295
|
// src/DepositModalReown.tsx
|
|
295
296
|
|
|
296
|
-
var
|
|
297
|
-
|
|
297
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, );
|
|
298
|
+
var { useAppKitProvider } = appKitReact2;
|
|
299
|
+
var { useAppKitConnection } = solanaAdapterReact;
|
|
298
300
|
function DepositModalWithReown(props) {
|
|
299
301
|
const reown = useReownWalletSession();
|
|
300
|
-
const { walletProvider: solanaWalletProvider } =
|
|
301
|
-
const { connection: solanaConnection } =
|
|
302
|
+
const { walletProvider: solanaWalletProvider } = useAppKitProvider("solana");
|
|
303
|
+
const { connection: solanaConnection } = useAppKitConnection();
|
|
302
304
|
const reownWithSolana = _react.useMemo.call(void 0,
|
|
303
305
|
() => ({
|
|
304
306
|
...reown,
|
|
@@ -314,10 +316,11 @@ function DepositModalWithReown(props) {
|
|
|
314
316
|
reown.disconnect();
|
|
315
317
|
}, [reown.disconnect]);
|
|
316
318
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
317
|
-
|
|
319
|
+
_chunkNQMC5VKQcjs.DepositModalInner,
|
|
318
320
|
{
|
|
319
321
|
...props,
|
|
320
322
|
walletSession: reownWithSolana,
|
|
323
|
+
walletIntegration: "modal_connected",
|
|
321
324
|
onConnect: handleConnect,
|
|
322
325
|
onDisconnect: handleDisconnect
|
|
323
326
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkA6JPBMYYcjs = require('./chunk-A6JPBMYY.cjs');
|
|
5
|
+
require('./chunk-4J5ADVIN.cjs');
|
|
6
|
+
require('./chunk-HAQOFI3D.cjs');
|
|
7
|
+
require('./chunk-AQVJUXSG.cjs');
|
|
8
|
+
require('./chunk-4KCSH4T3.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.WithdrawModal = _chunkA6JPBMYYcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkA6JPBMYYcjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WithdrawModal,
|
|
3
|
+
buildWithdrawAnalyticsSessionProperties
|
|
4
|
+
} from "./chunk-GZ4GQ5MC.mjs";
|
|
5
|
+
import "./chunk-XCTRKCNM.mjs";
|
|
6
|
+
import "./chunk-UX35GYLM.mjs";
|
|
7
|
+
import "./chunk-LMG46EP2.mjs";
|
|
8
|
+
import "./chunk-VUATPOWJ.mjs";
|
|
9
|
+
export {
|
|
10
|
+
WithdrawModal,
|
|
11
|
+
buildWithdrawAnalyticsSessionProperties
|
|
12
|
+
};
|