@rhinestone/deposit-modal 0.12.0 → 0.12.2
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-MVVRUXO4.mjs → DepositModalReown-TEC3MEZ4.mjs} +7 -7
- package/dist/{DepositModalReown-PZXHTPIS.cjs → DepositModalReown-VG66OTIU.cjs} +17 -17
- package/dist/{chunk-2AMRKYJ4.mjs → chunk-2TPSF77V.mjs} +4 -4
- package/dist/{chunk-YR43AAX5.mjs → chunk-3STTWRAN.mjs} +0 -5
- package/dist/{chunk-53IGTENZ.mjs → chunk-4ZXQPFNU.mjs} +1 -1
- package/dist/{chunk-XJB3VG4C.cjs → chunk-75DVGSAX.cjs} +2 -2
- package/dist/{chunk-LBJFACLH.cjs → chunk-BRYNGLDM.cjs} +77 -72
- package/dist/{chunk-EUIPQ3T4.mjs → chunk-FLVLYO64.mjs} +3 -3
- package/dist/{chunk-5IP67CL5.mjs → chunk-FXXUIK4E.mjs} +15 -10
- package/dist/{chunk-2PQ34KU3.cjs → chunk-HL5NUKZW.cjs} +3 -3
- package/dist/{chunk-GZNMBZHY.mjs → chunk-IAGFDSNC.mjs} +1 -1
- package/dist/{chunk-QF5T6HXC.mjs → chunk-J46WDSRD.mjs} +3 -4
- package/dist/{chunk-RMYUE6HJ.mjs → chunk-JE4R5VA3.mjs} +1 -1
- package/dist/{chunk-4SRVZRZF.cjs → chunk-L32UI7LA.cjs} +1 -1
- package/dist/{chunk-4R2ZHSDQ.cjs → chunk-O7BCVQ6L.cjs} +1 -6
- package/dist/{chunk-LTPVHQXJ.cjs → chunk-OIN4CXCP.cjs} +378 -378
- package/dist/{chunk-6ZJTZ7DS.cjs → chunk-PWLEBV5V.cjs} +78 -79
- package/dist/{chunk-Q5MFRAWD.mjs → chunk-SDSKIJC7.mjs} +6 -6
- package/dist/{chunk-WZJMJFP7.cjs → chunk-TM7VGHAG.cjs} +62 -62
- package/dist/{chunk-BK54FZAE.cjs → chunk-UQIJU6HV.cjs} +79 -79
- package/dist/claim.cjs +6 -6
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.mjs +7 -7
- package/dist/index.cjs +10 -10
- package/dist/index.mjs +9 -9
- package/dist/polymarket.cjs +5 -5
- package/dist/polymarket.mjs +2 -2
- package/dist/styles.css +9 -0
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.mjs +5 -5
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-SDSKIJC7.mjs";
|
|
4
|
+
import "./chunk-J46WDSRD.mjs";
|
|
5
|
+
import "./chunk-JE4R5VA3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
isUnsupportedChainSwitchError,
|
|
8
8
|
peekRuntimeChains,
|
|
9
9
|
primeRuntimeChains,
|
|
10
10
|
rpcUrlFor,
|
|
11
11
|
useStableRpcUrls
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-FXXUIK4E.mjs";
|
|
13
|
+
import "./chunk-IAGFDSNC.mjs";
|
|
14
|
+
import "./chunk-4ZXQPFNU.mjs";
|
|
15
15
|
import {
|
|
16
16
|
SUPPORTED_CHAINS,
|
|
17
17
|
getChainName
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3STTWRAN.mjs";
|
|
19
19
|
|
|
20
20
|
// src/DepositModalReown.tsx
|
|
21
21
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
@@ -1,21 +1,21 @@
|
|
|
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
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkOIN4CXCPcjs = require('./chunk-OIN4CXCP.cjs');
|
|
4
|
+
require('./chunk-PWLEBV5V.cjs');
|
|
5
|
+
require('./chunk-HL5NUKZW.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
12
|
+
var _chunkBRYNGLDMcjs = require('./chunk-BRYNGLDM.cjs');
|
|
13
|
+
require('./chunk-L32UI7LA.cjs');
|
|
14
|
+
require('./chunk-75DVGSAX.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
|
|
19
19
|
|
|
20
20
|
// src/DepositModalReown.tsx
|
|
21
21
|
var _react = require('react');
|
|
@@ -72,7 +72,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
72
72
|
[_networks.katana.id]: _networks.katana,
|
|
73
73
|
[_networks.hyperEvm.id]: _networks.hyperEvm
|
|
74
74
|
};
|
|
75
|
-
var EVM_NETWORKS =
|
|
75
|
+
var EVM_NETWORKS = _chunkO7BCVQ6Lcjs.SUPPORTED_CHAINS.map((chain) => {
|
|
76
76
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
77
77
|
if (!network) {
|
|
78
78
|
throw new Error(
|
|
@@ -91,14 +91,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
91
91
|
const transports = {};
|
|
92
92
|
for (const network of networks) {
|
|
93
93
|
const id = Number(network.id);
|
|
94
|
-
transports[id] = _viem.http.call(void 0,
|
|
94
|
+
transports[id] = _viem.http.call(void 0, _chunkBRYNGLDMcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
95
95
|
}
|
|
96
96
|
return transports;
|
|
97
97
|
}
|
|
98
98
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
99
99
|
return networks.map((network) => {
|
|
100
100
|
const id = Number(network.id);
|
|
101
|
-
return `${id}=${_nullishCoalesce(
|
|
101
|
+
return `${id}=${_nullishCoalesce(_chunkBRYNGLDMcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
102
102
|
}).join("|");
|
|
103
103
|
}
|
|
104
104
|
var cachedAdapter = null;
|
|
@@ -164,7 +164,7 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
|
|
|
164
164
|
function chainDisplayName(chainId) {
|
|
165
165
|
const runtime = runtimeNetworkById.get(chainId);
|
|
166
166
|
if (runtime) return runtime.name;
|
|
167
|
-
return
|
|
167
|
+
return _chunkO7BCVQ6Lcjs.getChainName.call(void 0, chainId);
|
|
168
168
|
}
|
|
169
169
|
function resolveAppKitNetwork(chainId) {
|
|
170
170
|
return _nullishCoalesce(getAppKitNetwork(chainId), () => ( runtimeNetworkById.get(chainId)));
|
|
@@ -177,7 +177,7 @@ function ReownWalletProvider({
|
|
|
177
177
|
backendUrl,
|
|
178
178
|
children
|
|
179
179
|
}) {
|
|
180
|
-
const rpcUrls =
|
|
180
|
+
const rpcUrls = _chunkBRYNGLDMcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
181
181
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
182
182
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
183
183
|
if (!rpcUrls) return void 0;
|
|
@@ -189,14 +189,14 @@ function ReownWalletProvider({
|
|
|
189
189
|
return out;
|
|
190
190
|
}, [rpcUrls]);
|
|
191
191
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
192
|
-
const primed =
|
|
192
|
+
const primed = _chunkBRYNGLDMcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
193
193
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
194
194
|
});
|
|
195
195
|
_react.useEffect.call(void 0, () => {
|
|
196
196
|
let active = true;
|
|
197
|
-
const primed =
|
|
197
|
+
const primed = _chunkBRYNGLDMcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
198
198
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
199
|
-
|
|
199
|
+
_chunkBRYNGLDMcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
200
200
|
if (active) setState({ ready: true, chains });
|
|
201
201
|
});
|
|
202
202
|
return () => {
|
|
@@ -258,7 +258,7 @@ function useReownWallet() {
|
|
|
258
258
|
await switchChainAsync({ chainId });
|
|
259
259
|
}
|
|
260
260
|
} catch (err) {
|
|
261
|
-
if (
|
|
261
|
+
if (_chunkBRYNGLDMcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
262
262
|
throw new Error(
|
|
263
263
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
264
264
|
);
|
|
@@ -292,7 +292,7 @@ function DepositModalWithReown(props) {
|
|
|
292
292
|
reown.disconnect();
|
|
293
293
|
}, [reown.disconnect]);
|
|
294
294
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
295
|
-
|
|
295
|
+
_chunkOIN4CXCPcjs.DepositModalInner,
|
|
296
296
|
{
|
|
297
297
|
...props,
|
|
298
298
|
reownWallet: reownWithSolana,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ListRow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JE4R5VA3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AlertTriangleIcon,
|
|
6
6
|
BodyHeader,
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
useExplorerTxUrl,
|
|
29
29
|
useLatestRef,
|
|
30
30
|
useStableRpcUrls
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FXXUIK4E.mjs";
|
|
32
32
|
import {
|
|
33
33
|
SERVICE_HEADERS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-IAGFDSNC.mjs";
|
|
35
35
|
import {
|
|
36
36
|
getChainIcon,
|
|
37
37
|
getChainName,
|
|
38
38
|
getTokenDecimalsByAddress,
|
|
39
39
|
getTokenSymbol,
|
|
40
40
|
tokenIconUrl
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3STTWRAN.mjs";
|
|
42
42
|
|
|
43
43
|
// src/ClaimModal.tsx
|
|
44
44
|
import {
|
|
@@ -9,10 +9,6 @@ function targetChainToCaip2(targetChain) {
|
|
|
9
9
|
if (isHyperCoreDestination(targetChain)) return HYPERCORE_SPOT_CAIP2;
|
|
10
10
|
return toEvmCaip2(targetChain);
|
|
11
11
|
}
|
|
12
|
-
function targetChainToAccountKey(targetChain) {
|
|
13
|
-
if (isHyperCoreDestination(targetChain)) return HYPERCORE_MAINNET_CAIP2;
|
|
14
|
-
return targetChainToCaip2(targetChain);
|
|
15
|
-
}
|
|
16
12
|
function parseEvmChainId(value) {
|
|
17
13
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
18
14
|
return value;
|
|
@@ -893,7 +889,6 @@ export {
|
|
|
893
889
|
SOLANA_MAINNET_CAIP2,
|
|
894
890
|
toEvmCaip2,
|
|
895
891
|
targetChainToCaip2,
|
|
896
|
-
targetChainToAccountKey,
|
|
897
892
|
parseEvmChainId,
|
|
898
893
|
isSolanaCaip2,
|
|
899
894
|
isHyperCoreCaip2,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/dapp-imports/polymarket/constants.ts
|
|
6
6
|
var POLYMARKET_POLYGON_CHAIN_ID = 137;
|
|
@@ -9,7 +9,7 @@ var POLYMARKET_USDCE_ADDRESS = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
|
|
|
9
9
|
var POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS = "0x2957922Eb93258b93368531d39fAcCA3B4dC5854";
|
|
10
10
|
var SAFE_MULTI_SEND_CALL_ONLY_ADDRESS = "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D";
|
|
11
11
|
var GAMMA_API_PUBLIC_PROFILE = "https://gamma-api.polymarket.com/public-profile";
|
|
12
|
-
var POLYMARKET_ICON_URL =
|
|
12
|
+
var POLYMARKET_ICON_URL = _chunkO7BCVQ6Lcjs.cdnIconUrl.call(void 0, "dapps", "polymarket");
|
|
13
13
|
|
|
14
14
|
// src/core/dapp-imports/polymarket/gamma-api.ts
|
|
15
15
|
var _viem = require('viem');
|