@rhinestone/deposit-modal 0.0.0-dev-20260824102421 → 0.0.0-dev-20260824103554

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.
Files changed (41) hide show
  1. package/dist/ClaimModal-67RRFPT6.mjs +11 -0
  2. package/dist/ClaimModal-BQY6FNSR.cjs +11 -0
  3. package/dist/{DepositModalReown-NLX5RI5H.cjs → DepositModalReown-JJC37VCL.cjs} +13 -13
  4. package/dist/{DepositModalReown-H256XXZT.mjs → DepositModalReown-TNWNENGT.mjs} +5 -5
  5. package/dist/WithdrawModal-NZ2UIRL4.mjs +10 -0
  6. package/dist/WithdrawModal-X5KJ7D3B.cjs +10 -0
  7. package/dist/{chunk-7T7A3HXD.mjs → chunk-2EEULN4S.mjs} +1 -1
  8. package/dist/{chunk-SKWJXO3D.mjs → chunk-3MKUEORL.mjs} +1 -1
  9. package/dist/{chunk-L34PO37U.cjs → chunk-7ED22CNI.cjs} +1 -1
  10. package/dist/{chunk-VM2L2V3I.mjs → chunk-AWHML72E.mjs} +34 -2
  11. package/dist/{chunk-XQK6YFM3.cjs → chunk-DYZHRL5G.cjs} +59 -27
  12. package/dist/{chunk-JCPXPKQF.mjs → chunk-GB42DI7E.mjs} +4 -7
  13. package/dist/{chunk-TC4A43XZ.mjs → chunk-HCIREEDB.mjs} +4 -4
  14. package/dist/{chunk-K3G2ZE6R.mjs → chunk-HNBS5S5Y.mjs} +3 -3
  15. package/dist/{chunk-MJAZGEPN.mjs → chunk-IXZB2YKS.mjs} +2 -2
  16. package/dist/{chunk-454HYIJG.cjs → chunk-NXN7DD7N.cjs} +268 -268
  17. package/dist/{chunk-BGDYOQRX.cjs → chunk-OMFYDYOZ.cjs} +8 -8
  18. package/dist/{chunk-63UHZ7WR.cjs → chunk-RDFRXBJ5.cjs} +51 -51
  19. package/dist/{chunk-FWGLI5Z7.cjs → chunk-RLGIGVQV.cjs} +66 -66
  20. package/dist/{chunk-WRZRH2CI.mjs → chunk-RSZSFKN7.mjs} +1 -1
  21. package/dist/{chunk-XZVBHCCX.cjs → chunk-RUFL6U4N.cjs} +61 -64
  22. package/dist/{chunk-JTJGQPCC.cjs → chunk-SY2TMFSV.cjs} +3 -3
  23. package/dist/claim.cjs +6 -6
  24. package/dist/claim.mjs +5 -5
  25. package/dist/constants.cjs +2 -2
  26. package/dist/constants.d.cts +1 -1
  27. package/dist/constants.d.ts +1 -1
  28. package/dist/constants.mjs +1 -1
  29. package/dist/deposit.cjs +6 -6
  30. package/dist/deposit.mjs +5 -5
  31. package/dist/embed.cjs +18 -18
  32. package/dist/embed.mjs +8 -8
  33. package/dist/index.cjs +9 -9
  34. package/dist/index.mjs +8 -8
  35. package/dist/withdraw.cjs +5 -5
  36. package/dist/withdraw.mjs +4 -4
  37. package/package.json +1 -1
  38. package/dist/ClaimModal-GCG6UVTW.cjs +0 -11
  39. package/dist/ClaimModal-I55QBNYP.mjs +0 -11
  40. package/dist/WithdrawModal-3CNKJNAK.cjs +0 -10
  41. package/dist/WithdrawModal-J2FQJWFS.mjs +0 -10
@@ -0,0 +1,11 @@
1
+ import {
2
+ ClaimModal
3
+ } from "./chunk-HNBS5S5Y.mjs";
4
+ import "./chunk-IXZB2YKS.mjs";
5
+ import "./chunk-3MKUEORL.mjs";
6
+ import "./chunk-AWHML72E.mjs";
7
+ import "./chunk-RSZSFKN7.mjs";
8
+ import "./chunk-VUATPOWJ.mjs";
9
+ export {
10
+ ClaimModal
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkRDFRXBJ5cjs = require('./chunk-RDFRXBJ5.cjs');
4
+ require('./chunk-OMFYDYOZ.cjs');
5
+ require('./chunk-SY2TMFSV.cjs');
6
+ require('./chunk-DYZHRL5G.cjs');
7
+ require('./chunk-7ED22CNI.cjs');
8
+ require('./chunk-4KCSH4T3.cjs');
9
+
10
+
11
+ exports.ClaimModal = _chunkRDFRXBJ5cjs.ClaimModal;
@@ -1,16 +1,16 @@
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 _chunk454HYIJGcjs = require('./chunk-454HYIJG.cjs');
4
- require('./chunk-FWGLI5Z7.cjs');
5
- require('./chunk-JTJGQPCC.cjs');
3
+ var _chunkNXN7DD7Ncjs = require('./chunk-NXN7DD7N.cjs');
4
+ require('./chunk-RLGIGVQV.cjs');
5
+ require('./chunk-SY2TMFSV.cjs');
6
6
 
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkXQK6YFM3cjs = require('./chunk-XQK6YFM3.cjs');
13
- require('./chunk-L34PO37U.cjs');
12
+ var _chunkDYZHRL5Gcjs = require('./chunk-DYZHRL5G.cjs');
13
+ require('./chunk-7ED22CNI.cjs');
14
14
  require('./chunk-DW2EQA2U.cjs');
15
15
 
16
16
 
@@ -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, _chunkXQK6YFM3cjs.rpcUrlFor.call(void 0, rpcUrls, id));
94
+ transports[id] = _viem.http.call(void 0, _chunkDYZHRL5Gcjs.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(_chunkXQK6YFM3cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
101
+ return `${id}=${_nullishCoalesce(_chunkDYZHRL5Gcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
102
102
  }).join("|");
103
103
  }
104
104
  var cachedAdapter = null;
@@ -177,7 +177,7 @@ function ReownWalletProvider({
177
177
  backendUrl,
178
178
  children
179
179
  }) {
180
- const rpcUrls = _chunkXQK6YFM3cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
180
+ const rpcUrls = _chunkDYZHRL5Gcjs.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 = _chunkXQK6YFM3cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
192
+ const primed = _chunkDYZHRL5Gcjs.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 = _chunkXQK6YFM3cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
197
+ const primed = _chunkDYZHRL5Gcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
198
198
  setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
199
- _chunkXQK6YFM3cjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
199
+ _chunkDYZHRL5Gcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
200
200
  if (active) setState({ ready: true, chains });
201
201
  });
202
202
  return () => {
@@ -262,7 +262,7 @@ function useReownWalletSession() {
262
262
  await switchChainAsync({ chainId });
263
263
  }
264
264
  } catch (err) {
265
- if (_chunkXQK6YFM3cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
265
+ if (_chunkDYZHRL5Gcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
266
266
  throw new Error(
267
267
  `Switch to ${chainDisplayName(chainId)} in your wallet to continue`
268
268
  );
@@ -296,7 +296,7 @@ function DepositModalWithReown(props) {
296
296
  reown.disconnect();
297
297
  }, [reown.disconnect]);
298
298
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
299
- _chunk454HYIJGcjs.DepositModalInner,
299
+ _chunkNXN7DD7Ncjs.DepositModalInner,
300
300
  {
301
301
  ...props,
302
302
  walletSession: reownWithSolana,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-TC4A43XZ.mjs";
4
- import "./chunk-7T7A3HXD.mjs";
5
- import "./chunk-SKWJXO3D.mjs";
3
+ } from "./chunk-HCIREEDB.mjs";
4
+ import "./chunk-2EEULN4S.mjs";
5
+ import "./chunk-3MKUEORL.mjs";
6
6
  import {
7
7
  isUnsupportedChainSwitchError,
8
8
  peekRuntimeChains,
9
9
  primeRuntimeChains,
10
10
  rpcUrlFor,
11
11
  useStableRpcUrls
12
- } from "./chunk-VM2L2V3I.mjs";
13
- import "./chunk-WRZRH2CI.mjs";
12
+ } from "./chunk-AWHML72E.mjs";
13
+ import "./chunk-RSZSFKN7.mjs";
14
14
  import "./chunk-RN5VKWI6.mjs";
15
15
  import {
16
16
  SUPPORTED_CHAIN_IDS,
@@ -0,0 +1,10 @@
1
+ import {
2
+ WithdrawModal
3
+ } from "./chunk-GB42DI7E.mjs";
4
+ import "./chunk-2EEULN4S.mjs";
5
+ import "./chunk-AWHML72E.mjs";
6
+ import "./chunk-RSZSFKN7.mjs";
7
+ import "./chunk-VUATPOWJ.mjs";
8
+ export {
9
+ WithdrawModal
10
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkRUFL6U4Ncjs = require('./chunk-RUFL6U4N.cjs');
4
+ require('./chunk-RLGIGVQV.cjs');
5
+ require('./chunk-DYZHRL5G.cjs');
6
+ require('./chunk-7ED22CNI.cjs');
7
+ require('./chunk-4KCSH4T3.cjs');
8
+
9
+
10
+ exports.WithdrawModal = _chunkRUFL6U4Ncjs.WithdrawModal;
@@ -24,7 +24,7 @@ import {
24
24
  tokenAmountToNumber,
25
25
  useExplorerTxUrl,
26
26
  useLatestRef
27
- } from "./chunk-VM2L2V3I.mjs";
27
+ } from "./chunk-AWHML72E.mjs";
28
28
  import {
29
29
  NATIVE_TOKEN_ADDRESS,
30
30
  SOLANA_MAINNET_CAIP2,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CdnIcon,
3
3
  ChevronRightIcon
4
- } from "./chunk-VM2L2V3I.mjs";
4
+ } from "./chunk-AWHML72E.mjs";
5
5
 
6
6
  // src/components/ui/ListRow.tsx
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/core/version.ts
2
- var MODAL_VERSION = "0.0.0-dev-20260824102421";
2
+ var MODAL_VERSION = "0.0.0-dev-20260824103554";
3
3
  var SERVICE_HEADERS = {
4
4
  "Content-Type": "application/json",
5
5
  "x-deposit-modal-version": MODAL_VERSION
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serviceHeaders
3
- } from "./chunk-WRZRH2CI.mjs";
3
+ } from "./chunk-RSZSFKN7.mjs";
4
4
  import {
5
5
  CHAIN_DISPLAY_ORDER,
6
6
  HYPERCORE_CHAIN_ID,
@@ -2065,7 +2065,8 @@ import {
2065
2065
  useContext as useContext2,
2066
2066
  useEffect as useEffect2,
2067
2067
  useMemo as useMemo2,
2068
- useState as useState2
2068
+ useState as useState2,
2069
+ useSyncExternalStore
2069
2070
  } from "react";
2070
2071
 
2071
2072
  // src/core/public-client.ts
@@ -2088,15 +2089,31 @@ var BOOTSTRAP_RPC_URL = {
2088
2089
  42161: "https://arb1.arbitrum.io/rpc",
2089
2090
  747474: "https://rpc.katana.network"
2090
2091
  };
2092
+ var runtimeChainsVersion = 0;
2093
+ var runtimeChainListeners = /* @__PURE__ */ new Set();
2094
+ function subscribeToRuntimeChains(listener) {
2095
+ runtimeChainListeners.add(listener);
2096
+ return () => {
2097
+ runtimeChainListeners.delete(listener);
2098
+ };
2099
+ }
2100
+ function getRuntimeChainsVersion() {
2101
+ return runtimeChainsVersion;
2102
+ }
2091
2103
  function setRuntimeChains(chains) {
2104
+ let changed = false;
2092
2105
  for (const chain of chains) {
2093
2106
  const known = runtimeChainById.get(chain.id);
2094
2107
  if (known === chain) continue;
2095
2108
  runtimeChainById.set(chain.id, chain);
2109
+ changed = true;
2096
2110
  for (const key of clientCache.keys()) {
2097
2111
  if (key.startsWith(`${chain.id}|`)) clientCache.delete(key);
2098
2112
  }
2099
2113
  }
2114
+ if (!changed) return;
2115
+ runtimeChainsVersion += 1;
2116
+ for (const listener of runtimeChainListeners) listener();
2100
2117
  }
2101
2118
  function getPublicClient(chainId, rpcUrls) {
2102
2119
  const url = rpcUrlFor(rpcUrls, chainId);
@@ -2377,6 +2394,20 @@ function useChainName() {
2377
2394
  };
2378
2395
  }, [catalog]);
2379
2396
  }
2397
+ function useRuntimeChainsVersion() {
2398
+ return useSyncExternalStore(
2399
+ subscribeToRuntimeChains,
2400
+ getRuntimeChainsVersion,
2401
+ getRuntimeChainsVersion
2402
+ );
2403
+ }
2404
+ function useReadClient(chainId, rpcUrls) {
2405
+ const version = useRuntimeChainsVersion();
2406
+ return useMemo2(
2407
+ () => getPublicClient(chainId, rpcUrls),
2408
+ [chainId, rpcUrls, version]
2409
+ );
2410
+ }
2380
2411
  function useExplorerTxUrl() {
2381
2412
  const { catalog } = useChainCatalog();
2382
2413
  return useMemo2(() => {
@@ -3070,6 +3101,7 @@ export {
3070
3101
  useTargetTokens,
3071
3102
  useIsDepositChain,
3072
3103
  useChainName,
3104
+ useReadClient,
3073
3105
  useExplorerTxUrl,
3074
3106
  ChainCatalogProvider,
3075
3107
  useLatestRef,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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 _chunkL34PO37Ucjs = require('./chunk-L34PO37U.cjs');
3
+ var _chunk7ED22CNIcjs = require('./chunk-7ED22CNI.cjs');
4
4
 
5
5
 
6
6
 
@@ -891,7 +891,7 @@ function createDepositService(baseUrl, options) {
891
891
  try {
892
892
  const response = await fetch(apiUrl("/qr/tokens"), {
893
893
  method: "GET",
894
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, )
894
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, )
895
895
  });
896
896
  if (!response.ok) {
897
897
  debugLog(debug, scope, "getTopTokens:unavailable", {
@@ -918,7 +918,7 @@ function createDepositService(baseUrl, options) {
918
918
  try {
919
919
  const response = await fetch(apiUrl("/chains"), {
920
920
  method: "GET",
921
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, )
921
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, )
922
922
  });
923
923
  if (!response.ok) {
924
924
  debugLog(debug, scope, "getChains:unavailable", {
@@ -972,7 +972,7 @@ function createDepositService(baseUrl, options) {
972
972
  });
973
973
  const response = await fetch(url, {
974
974
  method: "POST",
975
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
975
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
976
976
  body: JSON.stringify({ account: params })
977
977
  });
978
978
  if (!response.ok) {
@@ -1004,7 +1004,7 @@ function createDepositService(baseUrl, options) {
1004
1004
  debugLog(debug, scope, "fetchPortfolio:request", { url, address });
1005
1005
  const response = await fetch(url, {
1006
1006
  method: "GET",
1007
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, )
1007
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, )
1008
1008
  });
1009
1009
  if (!response.ok) {
1010
1010
  const error = await response.json().catch(() => ({ error: "Unknown error" }));
@@ -1055,7 +1055,7 @@ function createDepositService(baseUrl, options) {
1055
1055
  });
1056
1056
  const response = await fetch(url, {
1057
1057
  method: "GET",
1058
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, )
1058
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, )
1059
1059
  });
1060
1060
  if (!response.ok) {
1061
1061
  const error = await response.json().catch(() => ({ error: "Unknown error" }));
@@ -1084,7 +1084,7 @@ function createDepositService(baseUrl, options) {
1084
1084
  debugLog(debug, scope, "checkAccount:request", { url, address });
1085
1085
  const response = await fetch(url, {
1086
1086
  method: "GET",
1087
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, )
1087
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, )
1088
1088
  });
1089
1089
  if (!response.ok) {
1090
1090
  const error = await response.json().catch(() => ({ error: "Unknown error" }));
@@ -1120,7 +1120,7 @@ function createDepositService(baseUrl, options) {
1120
1120
  );
1121
1121
  const response = await fetch(url, {
1122
1122
  method: "GET",
1123
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1123
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1124
1124
  cache: "no-store"
1125
1125
  });
1126
1126
  if (!response.ok) {
@@ -1148,7 +1148,7 @@ function createDepositService(baseUrl, options) {
1148
1148
  );
1149
1149
  const response = await fetch(url, {
1150
1150
  method: "GET",
1151
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1151
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1152
1152
  cache: "no-store"
1153
1153
  });
1154
1154
  if (!response.ok) {
@@ -1172,7 +1172,7 @@ function createDepositService(baseUrl, options) {
1172
1172
  );
1173
1173
  const response = await fetch(url, {
1174
1174
  method: "GET",
1175
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1175
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1176
1176
  cache: "no-store"
1177
1177
  });
1178
1178
  if (!response.ok) {
@@ -1194,7 +1194,7 @@ function createDepositService(baseUrl, options) {
1194
1194
  async getPositions(address) {
1195
1195
  const url = apiUrl(`/positions/${address}`);
1196
1196
  debugLog(debug, scope, "getPositions:request", { url, address });
1197
- const response = await fetch(url, { headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ) });
1197
+ const response = await fetch(url, { headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ) });
1198
1198
  if (!response.ok) {
1199
1199
  const error = await response.json().catch(() => ({ error: "Unknown error" }));
1200
1200
  debugError(debug, scope, "getPositions:failed", error, {
@@ -1228,7 +1228,7 @@ function createDepositService(baseUrl, options) {
1228
1228
  });
1229
1229
  const response = await fetch(url, {
1230
1230
  method: "POST",
1231
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1231
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1232
1232
  body: JSON.stringify({ account, market, chainId, asset, amount })
1233
1233
  });
1234
1234
  if (!response.ok) {
@@ -1264,7 +1264,7 @@ function createDepositService(baseUrl, options) {
1264
1264
  });
1265
1265
  const response = await fetch(url, {
1266
1266
  method: "POST",
1267
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1267
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1268
1268
  body: JSON.stringify({
1269
1269
  depositWallet,
1270
1270
  owner,
@@ -1306,7 +1306,7 @@ function createDepositService(baseUrl, options) {
1306
1306
  });
1307
1307
  const response = await fetch(url, {
1308
1308
  method: "GET",
1309
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1309
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1310
1310
  cache: "no-store"
1311
1311
  });
1312
1312
  if (!response.ok) {
@@ -1356,7 +1356,7 @@ function createDepositService(baseUrl, options) {
1356
1356
  });
1357
1357
  const response = await fetch(url, {
1358
1358
  method: "GET",
1359
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1359
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1360
1360
  cache: "no-store"
1361
1361
  });
1362
1362
  if (!response.ok) {
@@ -1404,7 +1404,7 @@ function createDepositService(baseUrl, options) {
1404
1404
  try {
1405
1405
  const response = await fetch(url, {
1406
1406
  method: "POST",
1407
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1407
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1408
1408
  body: JSON.stringify(body),
1409
1409
  cache: "no-store"
1410
1410
  });
@@ -1444,7 +1444,7 @@ function createDepositService(baseUrl, options) {
1444
1444
  try {
1445
1445
  const response = await fetch(url, {
1446
1446
  method: "POST",
1447
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1447
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1448
1448
  body: JSON.stringify({ ...params, kind: "auto" }),
1449
1449
  cache: "no-store"
1450
1450
  });
@@ -1538,7 +1538,7 @@ function createDepositService(baseUrl, options) {
1538
1538
  try {
1539
1539
  response = await fetch(url, {
1540
1540
  method: "POST",
1541
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1541
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1542
1542
  body: JSON.stringify(params)
1543
1543
  });
1544
1544
  } catch (error) {
@@ -1589,7 +1589,7 @@ function createDepositService(baseUrl, options) {
1589
1589
  try {
1590
1590
  const response = await fetch(url, {
1591
1591
  method: "GET",
1592
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1592
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1593
1593
  cache: "no-store"
1594
1594
  });
1595
1595
  if (!response.ok) {
@@ -1621,7 +1621,7 @@ function createDepositService(baseUrl, options) {
1621
1621
  try {
1622
1622
  const response = await fetch(url, {
1623
1623
  method: "GET",
1624
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1624
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1625
1625
  cache: "no-store"
1626
1626
  });
1627
1627
  if (!response.ok) {
@@ -1646,7 +1646,7 @@ function createDepositService(baseUrl, options) {
1646
1646
  });
1647
1647
  const response = await fetch(url, {
1648
1648
  method: "POST",
1649
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1649
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1650
1650
  body: JSON.stringify(params)
1651
1651
  });
1652
1652
  if (!response.ok) {
@@ -1678,7 +1678,7 @@ function createDepositService(baseUrl, options) {
1678
1678
  });
1679
1679
  const response = await fetch(url, {
1680
1680
  method: "POST",
1681
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1681
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1682
1682
  body: JSON.stringify(params)
1683
1683
  });
1684
1684
  if (!response.ok) {
@@ -1715,7 +1715,7 @@ function createDepositService(baseUrl, options) {
1715
1715
  debugLog(debug, scope, "getSwappedConnectExchanges:request");
1716
1716
  const response = await fetch(url, {
1717
1717
  method: "GET",
1718
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1718
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1719
1719
  cache: "no-store"
1720
1720
  });
1721
1721
  if (!response.ok) {
@@ -1768,7 +1768,7 @@ function createDepositService(baseUrl, options) {
1768
1768
  try {
1769
1769
  const response = await fetch(url, {
1770
1770
  method: "GET",
1771
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1771
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1772
1772
  cache: "no-store"
1773
1773
  });
1774
1774
  if (!response.ok) {
@@ -1854,7 +1854,7 @@ function createDepositService(baseUrl, options) {
1854
1854
  try {
1855
1855
  const response = await fetch(url, {
1856
1856
  method: "GET",
1857
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1857
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1858
1858
  cache: "no-store"
1859
1859
  });
1860
1860
  if (!response.ok) {
@@ -1881,7 +1881,7 @@ function createDepositService(baseUrl, options) {
1881
1881
  );
1882
1882
  const response = await fetch(url, {
1883
1883
  method: "GET",
1884
- headers: _chunkL34PO37Ucjs.serviceHeaders.call(void 0, ),
1884
+ headers: _chunk7ED22CNIcjs.serviceHeaders.call(void 0, ),
1885
1885
  cache: "no-store"
1886
1886
  });
1887
1887
  if (!response.ok) return null;
@@ -2068,6 +2068,7 @@ function useStableRpcUrls(rpcUrls) {
2068
2068
 
2069
2069
 
2070
2070
 
2071
+
2071
2072
  // src/core/public-client.ts
2072
2073
 
2073
2074
  var clientCache = /* @__PURE__ */ new Map();
@@ -2088,15 +2089,31 @@ var BOOTSTRAP_RPC_URL = {
2088
2089
  42161: "https://arb1.arbitrum.io/rpc",
2089
2090
  747474: "https://rpc.katana.network"
2090
2091
  };
2092
+ var runtimeChainsVersion = 0;
2093
+ var runtimeChainListeners = /* @__PURE__ */ new Set();
2094
+ function subscribeToRuntimeChains(listener) {
2095
+ runtimeChainListeners.add(listener);
2096
+ return () => {
2097
+ runtimeChainListeners.delete(listener);
2098
+ };
2099
+ }
2100
+ function getRuntimeChainsVersion() {
2101
+ return runtimeChainsVersion;
2102
+ }
2091
2103
  function setRuntimeChains(chains) {
2104
+ let changed = false;
2092
2105
  for (const chain of chains) {
2093
2106
  const known = runtimeChainById.get(chain.id);
2094
2107
  if (known === chain) continue;
2095
2108
  runtimeChainById.set(chain.id, chain);
2109
+ changed = true;
2096
2110
  for (const key of clientCache.keys()) {
2097
2111
  if (key.startsWith(`${chain.id}|`)) clientCache.delete(key);
2098
2112
  }
2099
2113
  }
2114
+ if (!changed) return;
2115
+ runtimeChainsVersion += 1;
2116
+ for (const listener of runtimeChainListeners) listener();
2100
2117
  }
2101
2118
  function getPublicClient(chainId, rpcUrls) {
2102
2119
  const url = rpcUrlFor(rpcUrls, chainId);
@@ -2377,6 +2394,20 @@ function useChainName() {
2377
2394
  };
2378
2395
  }, [catalog]);
2379
2396
  }
2397
+ function useRuntimeChainsVersion() {
2398
+ return _react.useSyncExternalStore.call(void 0,
2399
+ subscribeToRuntimeChains,
2400
+ getRuntimeChainsVersion,
2401
+ getRuntimeChainsVersion
2402
+ );
2403
+ }
2404
+ function useReadClient(chainId, rpcUrls) {
2405
+ const version = useRuntimeChainsVersion();
2406
+ return _react.useMemo.call(void 0,
2407
+ () => getPublicClient(chainId, rpcUrls),
2408
+ [chainId, rpcUrls, version]
2409
+ );
2410
+ }
2380
2411
  function useExplorerTxUrl() {
2381
2412
  const { catalog } = useChainCatalog();
2382
2413
  return _react.useMemo.call(void 0, () => {
@@ -3091,4 +3122,5 @@ function checkBackendUrl(component, backendUrl) {
3091
3122
 
3092
3123
 
3093
3124
 
3094
- exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronRightIcon = ChevronRightIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.CoinsIcon = CoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.CardIcon = CardIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.MigrateAssetsIcon = MigrateAssetsIcon; exports.AppleIcon = AppleIcon; exports.BodyHeader = BodyHeader; exports.CdnIcon = CdnIcon; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.catalogKeyForChain = catalogKeyForChain; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.chainIdsByValue = chainIdsByValue; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.formatFeeUsd = formatFeeUsd; exports.quoteFeeRow = quoteFeeRow; exports.quoteFeeGroups = quoteFeeGroups; exports.SwappedConnectFeeChangedError = SwappedConnectFeeChangedError; exports.SUPPORTED_CONNECT_EXCHANGE_COUNT = SUPPORTED_CONNECT_EXCHANGE_COUNT; exports.resolveAppFeeBps = resolveAppFeeBps; exports.PermitDepositSubmitError = PermitDepositSubmitError; exports.createDepositService = createDepositService; exports.rpcUrlFor = rpcUrlFor; exports.RpcUrlsProvider = RpcUrlsProvider; exports.useRpcUrls = useRpcUrls; exports.useStableRpcUrls = useStableRpcUrls; exports.getPublicClient = getPublicClient; exports.peekRuntimeChains = peekRuntimeChains; exports.primeRuntimeChains = primeRuntimeChains; exports.useChainCatalog = useChainCatalog; exports.useCatalogChain = useCatalogChain; exports.useDepositChainIds = useDepositChainIds; exports.useDestinationChains = useDestinationChains; exports.useTargetTokens = useTargetTokens; exports.useIsDepositChain = useIsDepositChain; exports.useChainName = useChainName; exports.useExplorerTxUrl = useExplorerTxUrl; exports.ChainCatalogProvider = ChainCatalogProvider; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.Callout = Callout; exports.TokenIcon = TokenIcon; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.resolveTokenDisplay = resolveTokenDisplay; exports.formatTokenAmount = formatTokenAmount; exports.tokenAmountToNumber = tokenAmountToNumber; exports.formatRawTokenAmount = formatRawTokenAmount; exports.isDisplayStablecoinSymbol = isDisplayStablecoinSymbol; exports.isRecognizedToken = isRecognizedToken; exports.estimateReceiveAmount = estimateReceiveAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.applyTheme = applyTheme; exports.checkBackendUrl = checkBackendUrl;
3125
+
3126
+ exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronRightIcon = ChevronRightIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.CoinsIcon = CoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.CardIcon = CardIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.MigrateAssetsIcon = MigrateAssetsIcon; exports.AppleIcon = AppleIcon; exports.BodyHeader = BodyHeader; exports.CdnIcon = CdnIcon; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.catalogKeyForChain = catalogKeyForChain; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.chainIdsByValue = chainIdsByValue; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.formatFeeUsd = formatFeeUsd; exports.quoteFeeRow = quoteFeeRow; exports.quoteFeeGroups = quoteFeeGroups; exports.SwappedConnectFeeChangedError = SwappedConnectFeeChangedError; exports.SUPPORTED_CONNECT_EXCHANGE_COUNT = SUPPORTED_CONNECT_EXCHANGE_COUNT; exports.resolveAppFeeBps = resolveAppFeeBps; exports.PermitDepositSubmitError = PermitDepositSubmitError; exports.createDepositService = createDepositService; exports.rpcUrlFor = rpcUrlFor; exports.RpcUrlsProvider = RpcUrlsProvider; exports.useRpcUrls = useRpcUrls; exports.useStableRpcUrls = useStableRpcUrls; exports.getPublicClient = getPublicClient; exports.peekRuntimeChains = peekRuntimeChains; exports.primeRuntimeChains = primeRuntimeChains; exports.useChainCatalog = useChainCatalog; exports.useCatalogChain = useCatalogChain; exports.useDepositChainIds = useDepositChainIds; exports.useDestinationChains = useDestinationChains; exports.useTargetTokens = useTargetTokens; exports.useIsDepositChain = useIsDepositChain; exports.useChainName = useChainName; exports.useReadClient = useReadClient; exports.useExplorerTxUrl = useExplorerTxUrl; exports.ChainCatalogProvider = ChainCatalogProvider; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.Callout = Callout; exports.TokenIcon = TokenIcon; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.resolveTokenDisplay = resolveTokenDisplay; exports.formatTokenAmount = formatTokenAmount; exports.tokenAmountToNumber = tokenAmountToNumber; exports.formatRawTokenAmount = formatRawTokenAmount; exports.isDisplayStablecoinSymbol = isDisplayStablecoinSymbol; exports.isRecognizedToken = isRecognizedToken; exports.estimateReceiveAmount = estimateReceiveAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.applyTheme = applyTheme; exports.checkBackendUrl = checkBackendUrl;
@@ -4,7 +4,7 @@ import {
4
4
  isSubmissionUncertain,
5
5
  useTokenPrices,
6
6
  warnRemovedProps
7
- } from "./chunk-7T7A3HXD.mjs";
7
+ } from "./chunk-2EEULN4S.mjs";
8
8
  import {
9
9
  BodyHeader,
10
10
  Button,
@@ -30,15 +30,15 @@ import {
30
30
  formatTokenAmount,
31
31
  formatUserError,
32
32
  getAssetId,
33
- getPublicClient,
34
33
  isNativeAsset,
35
34
  isRecognizedToken,
36
35
  useDestinationChains,
37
36
  useLatestRef,
37
+ useReadClient,
38
38
  useRpcUrls,
39
39
  useStableRpcUrls,
40
40
  useTargetTokens
41
- } from "./chunk-VM2L2V3I.mjs";
41
+ } from "./chunk-AWHML72E.mjs";
42
42
  import {
43
43
  NATIVE_TOKEN_ADDRESS,
44
44
  getChainIcon,
@@ -821,10 +821,7 @@ function WithdrawFlow({
821
821
  const registration = useWithdrawStore((s) => s.registration);
822
822
  const flowStep = useWithdrawStore((s) => s.step);
823
823
  const reviewedRecipient = useWithdrawStore((s) => s.recipient);
824
- const publicClient = useMemo2(
825
- () => getPublicClient(sourceChain, rpcUrls),
826
- [sourceChain, rpcUrls]
827
- );
824
+ const publicClient = useReadClient(sourceChain, rpcUrls);
828
825
  const recipientForRegistration = useMemo2(() => {
829
826
  if (!recipientInput) return void 0;
830
827
  return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
@@ -18,10 +18,10 @@ import {
18
18
  runAccountSetupDeduped,
19
19
  txRefsMatch,
20
20
  warnRemovedProps
21
- } from "./chunk-7T7A3HXD.mjs";
21
+ } from "./chunk-2EEULN4S.mjs";
22
22
  import {
23
23
  ListRow
24
- } from "./chunk-SKWJXO3D.mjs";
24
+ } from "./chunk-3MKUEORL.mjs";
25
25
  import {
26
26
  AlertTriangleIcon,
27
27
  AppleIcon,
@@ -85,7 +85,7 @@ import {
85
85
  useLatestRef,
86
86
  useRpcUrls,
87
87
  useStableRpcUrls
88
- } from "./chunk-VM2L2V3I.mjs";
88
+ } from "./chunk-AWHML72E.mjs";
89
89
  import {
90
90
  MULTICALL3_ADDRESS,
91
91
  POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
@@ -9242,7 +9242,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
9242
9242
  // src/DepositModal.tsx
9243
9243
  import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
9244
9244
  var ReownDepositInner = lazy2(
9245
- () => import("./DepositModalReown-H256XXZT.mjs").then((m) => ({ default: m.DepositModalReown }))
9245
+ () => import("./DepositModalReown-TNWNENGT.mjs").then((m) => ({ default: m.DepositModalReown }))
9246
9246
  );
9247
9247
  function sortByCreatedAtDesc(items) {
9248
9248
  return [...items].sort((a, b) => {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  RecoveryError,
3
3
  submitSignedRecovery
4
- } from "./chunk-MJAZGEPN.mjs";
4
+ } from "./chunk-IXZB2YKS.mjs";
5
5
  import {
6
6
  ListRow
7
- } from "./chunk-SKWJXO3D.mjs";
7
+ } from "./chunk-3MKUEORL.mjs";
8
8
  import {
9
9
  AlertTriangleIcon,
10
10
  BodyHeader,
@@ -30,7 +30,7 @@ import {
30
30
  useExplorerTxUrl,
31
31
  useLatestRef,
32
32
  useStableRpcUrls
33
- } from "./chunk-VM2L2V3I.mjs";
33
+ } from "./chunk-AWHML72E.mjs";
34
34
  import {
35
35
  getChainIcon,
36
36
  getChainName,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  debugError,
3
3
  debugLog
4
- } from "./chunk-VM2L2V3I.mjs";
4
+ } from "./chunk-AWHML72E.mjs";
5
5
  import {
6
6
  serviceHeaders
7
- } from "./chunk-WRZRH2CI.mjs";
7
+ } from "./chunk-RSZSFKN7.mjs";
8
8
 
9
9
  // src/core/recovery.ts
10
10
  var RECOVER_DOMAIN = {