@rhinestone/deposit-modal 0.4.3 → 0.5.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.
@@ -31,6 +31,7 @@ import {
31
31
  PlusCircleIcon,
32
32
  PoweredBy,
33
33
  ProcessingStep,
34
+ RpcUrlsProvider,
34
35
  Spinner,
35
36
  Tooltip,
36
37
  TransferCryptoIcon,
@@ -60,11 +61,13 @@ import {
60
61
  isNativeAsset,
61
62
  loadSessionOwnerFromStorage,
62
63
  portfolioToAssets,
64
+ rpcUrlFor,
63
65
  saveSessionOwnerToStorage,
64
66
  tokenFormatter,
65
67
  txRefsMatch,
66
- useLatestRef
67
- } from "./chunk-7EQQD7B4.mjs";
68
+ useLatestRef,
69
+ useRpcUrls
70
+ } from "./chunk-PS7HJ62M.mjs";
68
71
  import {
69
72
  SAFE_ABI
70
73
  } from "./chunk-F7P4MV72.mjs";
@@ -2108,7 +2111,15 @@ function SwappedOrderTracker({
2108
2111
  {
2109
2112
  className: "rs-swapped-tracker-step-marker",
2110
2113
  "aria-hidden": "true",
2111
- children: status === "complete" ? /* @__PURE__ */ jsx8(CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ jsx8(CloseIcon, {}) : status === "active" ? /* @__PURE__ */ jsx8(Spinner, {}) : null
2114
+ children: status === "complete" ? /* @__PURE__ */ jsx8(CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ jsx8(CloseIcon, {}) : status === "active" ? /* @__PURE__ */ jsx8(Spinner, {}) : /* @__PURE__ */ jsx8(
2115
+ "svg",
2116
+ {
2117
+ className: "rs-swapped-tracker-step-ring",
2118
+ viewBox: "0 0 16 16",
2119
+ "aria-hidden": "true",
2120
+ children: /* @__PURE__ */ jsx8("circle", { cx: "8", cy: "8", r: "7" })
2121
+ }
2122
+ )
2112
2123
  }
2113
2124
  )
2114
2125
  ]
@@ -2154,6 +2165,7 @@ var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
2154
2165
  var DEPOSIT_POLL_FAST_INTERVAL_MS = 500;
2155
2166
  var IFRAME_LOAD_TIMEOUT_MS = 15e3;
2156
2167
  var SWAPPED_IFRAME_ORIGINS = /* @__PURE__ */ new Set([
2168
+ "https://connect.swapped.com",
2157
2169
  "https://sandbox.swapped.com",
2158
2170
  "https://widget.swapped.com"
2159
2171
  ]);
@@ -2213,6 +2225,7 @@ function SwappedIframeStep({
2213
2225
  const [orderState, setOrderState] = useState6(null);
2214
2226
  const [latestEvent, setLatestEvent] = useState6(null);
2215
2227
  const [phase, setPhase] = useState6("iframe");
2228
+ const iframeRef = useRef6(null);
2216
2229
  const completeFiredRef = useRef6(false);
2217
2230
  const failedFiredRef = useRef6(false);
2218
2231
  const expectedOrderUuidRef = useRef6(null);
@@ -2335,10 +2348,15 @@ function SwappedIframeStep({
2335
2348
  useEffect6(() => {
2336
2349
  function onMessage(e) {
2337
2350
  if (!SWAPPED_IFRAME_ORIGINS.has(e.origin)) return;
2351
+ if (e.source !== iframeRef.current?.contentWindow) return;
2338
2352
  const parsed = parseSwappedIframeMessage(e.data);
2339
2353
  if (!parsed) return;
2354
+ const orderId = parsed.orderId;
2355
+ if (!orderId || orderId !== expectedOrderUuidRef.current) {
2356
+ return;
2357
+ }
2340
2358
  setOrderState((prev) => ({
2341
- orderId: parsed.orderId ?? prev?.orderId ?? "",
2359
+ orderId,
2342
2360
  status: parsed.status,
2343
2361
  orderCrypto: parsed.orderCrypto ?? prev?.orderCrypto ?? null,
2344
2362
  orderCryptoAmount: parsed.orderCryptoAmount ?? prev?.orderCryptoAmount ?? null,
@@ -2438,6 +2456,7 @@ function SwappedIframeStep({
2438
2456
  widgetUrl && !loadError && /* @__PURE__ */ jsx9(
2439
2457
  "iframe",
2440
2458
  {
2459
+ ref: iframeRef,
2441
2460
  src: widgetUrl,
2442
2461
  title: iframeTitle,
2443
2462
  className: "rs-fiat-onramp-iframe",
@@ -3347,21 +3366,15 @@ import {
3347
3366
  createTransferInstruction
3348
3367
  } from "@solana/spl-token";
3349
3368
  var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
3350
- var configuredSolanaRpcUrl = null;
3351
3369
  var cachedConnections = /* @__PURE__ */ new Map();
3352
- function configureSolanaRpcUrl(rpcUrl) {
3353
- const normalized = rpcUrl?.trim();
3354
- configuredSolanaRpcUrl = normalized ? normalized : null;
3355
- cachedConnections.clear();
3356
- }
3357
- function getSolanaRpcUrl() {
3358
- return configuredSolanaRpcUrl ?? DEFAULT_SOLANA_RPC_URL;
3370
+ function getSolanaRpcUrl(rpcUrls) {
3371
+ return rpcUrlFor(rpcUrls, "solana") ?? DEFAULT_SOLANA_RPC_URL;
3359
3372
  }
3360
- function hasConfiguredSolanaRpcUrl() {
3361
- return configuredSolanaRpcUrl !== null;
3373
+ function hasConfiguredSolanaRpcUrl(rpcUrls) {
3374
+ return rpcUrlFor(rpcUrls, "solana") !== void 0;
3362
3375
  }
3363
- function getSolanaConnection() {
3364
- const rpcUrl = getSolanaRpcUrl();
3376
+ function getSolanaConnection(rpcUrls) {
3377
+ const rpcUrl = getSolanaRpcUrl(rpcUrls);
3365
3378
  const cached = cachedConnections.get(rpcUrl);
3366
3379
  if (cached) {
3367
3380
  return cached;
@@ -3460,6 +3473,7 @@ function SolanaConfirmStep({
3460
3473
  onError,
3461
3474
  debug
3462
3475
  }) {
3476
+ const rpcUrls = useRpcUrls();
3463
3477
  const [isSubmitting, setIsSubmitting] = useState10(false);
3464
3478
  const [error, setError] = useState10(null);
3465
3479
  const targetSymbol = getTargetTokenSymbol(targetToken, targetChain);
@@ -3525,7 +3539,7 @@ function SolanaConfirmStep({
3525
3539
  "Deposit account is not registered yet. Please restart setup and try again."
3526
3540
  );
3527
3541
  }
3528
- const connection = hasConfiguredSolanaRpcUrl() ? getSolanaConnection() : solanaConnection ?? getSolanaConnection();
3542
+ const connection = hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : solanaConnection ?? getSolanaConnection(rpcUrls);
3529
3543
  const amountUnits = parseUnits4(sourceAmount, token.decimals);
3530
3544
  debugLog(debug, "solana-confirm", "tx:build:start", {
3531
3545
  token: token.symbol,
@@ -4584,7 +4598,8 @@ function applyAction(state, action) {
4584
4598
  processing: {
4585
4599
  ...state.processing,
4586
4600
  txHash: action.txHash,
4587
- directTransfer: action.directTransfer ?? false
4601
+ directTransfer: action.directTransfer ?? false,
4602
+ swappedContext: action.swappedContext ?? null
4588
4603
  },
4589
4604
  flow: { ...state.flow, step: "processing" }
4590
4605
  };
@@ -4753,7 +4768,8 @@ function applyAction(state, action) {
4753
4768
  deposit: { ...state.deposit, ...RESET_DEPOSIT_FIELDS },
4754
4769
  processing: {
4755
4770
  txHash: null,
4756
- directTransfer: false
4771
+ directTransfer: false,
4772
+ swappedContext: null
4757
4773
  },
4758
4774
  // Drop fetched availability wholesale. The fetch effect refetches
4759
4775
  // unconditionally on remount (so keeping the map saves nothing),
@@ -4834,7 +4850,8 @@ function createInitialState(overrides) {
4834
4850
  },
4835
4851
  processing: {
4836
4852
  txHash: null,
4837
- directTransfer: false
4853
+ directTransfer: false,
4854
+ swappedContext: null
4838
4855
  },
4839
4856
  dappImport: {
4840
4857
  activeProviderId: null,
@@ -5300,7 +5317,8 @@ function deriveStep(flow, d, p, activeEntry, fiat, exchange) {
5300
5317
  sourceSymbol: d.sourceSymbol ?? void 0,
5301
5318
  sourceDecimals: d.sourceDecimals ?? void 0,
5302
5319
  inputAmountUsd: d.inputAmountUsd ?? void 0,
5303
- directTransfer: p.directTransfer
5320
+ directTransfer: p.directTransfer,
5321
+ swappedContext: p.swappedContext ?? void 0
5304
5322
  };
5305
5323
  }
5306
5324
  }
@@ -5358,6 +5376,7 @@ function DepositFlow({
5358
5376
  onError,
5359
5377
  debug
5360
5378
  }) {
5379
+ const rpcUrls = useRpcUrls();
5361
5380
  const onStepChangeRef = useLatestRef(onStepChange);
5362
5381
  const onEventRef = useLatestRef(onEvent);
5363
5382
  const onLifecycleRef = useLatestRef(onLifecycle);
@@ -5497,7 +5516,7 @@ function DepositFlow({
5497
5516
  return {
5498
5517
  ownerAddress: dappAddress,
5499
5518
  walletClient: void 0,
5500
- publicClient: dappPublicClient ?? getPublicClient(setupChainId),
5519
+ publicClient: dappPublicClient ?? getPublicClient(setupChainId, rpcUrls),
5501
5520
  switchChain: void 0
5502
5521
  };
5503
5522
  }
@@ -5506,7 +5525,7 @@ function DepositFlow({
5506
5525
  return {
5507
5526
  ownerAddress: dappWalletClient.account.address,
5508
5527
  walletClient: dappWalletClient,
5509
- publicClient: dappPublicClient ?? getPublicClient(fallbackChainId),
5528
+ publicClient: dappPublicClient ?? getPublicClient(fallbackChainId, rpcUrls),
5510
5529
  switchChain: dappSwitchChain
5511
5530
  };
5512
5531
  }
@@ -5520,7 +5539,7 @@ function DepositFlow({
5520
5539
  return {
5521
5540
  ownerAddress: dappAddress,
5522
5541
  walletClient: void 0,
5523
- publicClient: dappPublicClient ?? getPublicClient(setupChainId),
5542
+ publicClient: dappPublicClient ?? getPublicClient(setupChainId, rpcUrls),
5524
5543
  switchChain: void 0
5525
5544
  };
5526
5545
  }
@@ -5529,7 +5548,7 @@ function DepositFlow({
5529
5548
  return {
5530
5549
  ownerAddress: dappWalletClient.account.address,
5531
5550
  walletClient: dappWalletClient,
5532
- publicClient: dappPublicClient ?? getPublicClient(fallbackChainId),
5551
+ publicClient: dappPublicClient ?? getPublicClient(fallbackChainId, rpcUrls),
5533
5552
  switchChain: dappSwitchChain
5534
5553
  };
5535
5554
  }
@@ -5537,7 +5556,7 @@ function DepositFlow({
5537
5556
  return {
5538
5557
  ownerAddress: reownWallet.address,
5539
5558
  walletClient: reownWallet.walletClient,
5540
- publicClient: reownWallet.publicClient ?? getPublicClient(setupChainId),
5559
+ publicClient: reownWallet.publicClient ?? getPublicClient(setupChainId, rpcUrls),
5541
5560
  switchChain: reownWallet.switchChain
5542
5561
  };
5543
5562
  }
@@ -5552,7 +5571,8 @@ function DepositFlow({
5552
5571
  dappSwitchChain,
5553
5572
  dappAddress,
5554
5573
  reownWallet,
5555
- setupChainId
5574
+ setupChainId,
5575
+ rpcUrls
5556
5576
  ]);
5557
5577
  useEffect10(() => {
5558
5578
  if (flowMode !== "wallet" && flowMode !== "dapp-import") {
@@ -5575,7 +5595,7 @@ function DepositFlow({
5575
5595
  return {
5576
5596
  ownerAddress: dappAddress,
5577
5597
  walletClient: void 0,
5578
- publicClient: dappPublicClient ?? getPublicClient(setupChainId),
5598
+ publicClient: dappPublicClient ?? getPublicClient(setupChainId, rpcUrls),
5579
5599
  switchChain: void 0
5580
5600
  };
5581
5601
  }
@@ -5894,7 +5914,7 @@ function DepositFlow({
5894
5914
  eoa: dappImportOwner,
5895
5915
  getPublicClient: (chainId) => {
5896
5916
  try {
5897
- return getPublicClient(chainId);
5917
+ return getPublicClient(chainId, rpcUrls);
5898
5918
  } catch {
5899
5919
  return null;
5900
5920
  }
@@ -5922,7 +5942,8 @@ function DepositFlow({
5922
5942
  dappImportOwner,
5923
5943
  enabledDappImportProviders,
5924
5944
  dappImportAttemptNonce,
5925
- storeApi
5945
+ storeApi,
5946
+ rpcUrls
5926
5947
  ]);
5927
5948
  useLayoutEffect2(() => {
5928
5949
  if (!initialDappImportProvider) return;
@@ -6394,6 +6415,14 @@ function DepositFlow({
6394
6415
  orderCrypto: info.orderCrypto
6395
6416
  });
6396
6417
  const amount = info.amount ?? "0";
6418
+ const stateAtComplete = storeApi.getState();
6419
+ const swappedContext = stateAtComplete.flow.mode === "exchange-connect" ? {
6420
+ variant: "connect",
6421
+ method: stateAtComplete.exchange.selectedConnection
6422
+ } : stateAtComplete.flow.mode === "fiat-onramp" ? {
6423
+ variant: "fiat",
6424
+ method: stateAtComplete.fiat.selectedMethod
6425
+ } : void 0;
6397
6426
  storeApi.dispatch({
6398
6427
  type: "deposit/submitted",
6399
6428
  txHash: info.txHash,
@@ -6401,7 +6430,8 @@ function DepositFlow({
6401
6430
  sourceToken: SWAPPED_SOURCE_TOKEN,
6402
6431
  amount,
6403
6432
  sourceSymbol: info.orderCrypto ?? "USDC",
6404
- sourceDecimals: SWAPPED_SOURCE_DECIMALS
6433
+ sourceDecimals: SWAPPED_SOURCE_DECIMALS,
6434
+ swappedContext
6405
6435
  });
6406
6436
  onLifecycleRef.current?.({
6407
6437
  type: "submitted",
@@ -6663,6 +6693,7 @@ function DepositFlow({
6663
6693
  sourceSymbol: step.sourceSymbol,
6664
6694
  sourceDecimals: step.sourceDecimals,
6665
6695
  amountUsd: step.inputAmountUsd,
6696
+ swappedContext: step.swappedContext,
6666
6697
  hasPostBridgeActions: Boolean(postBridgeActions?.length),
6667
6698
  service,
6668
6699
  directTransfer: step.directTransfer,
@@ -6730,6 +6761,7 @@ function DepositFlow({
6730
6761
  sourceSymbol: step.sourceSymbol,
6731
6762
  sourceDecimals: step.sourceDecimals,
6732
6763
  amountUsd: step.inputAmountUsd,
6764
+ swappedContext: step.swappedContext,
6733
6765
  hasPostBridgeActions: Boolean(postBridgeActions?.length),
6734
6766
  service,
6735
6767
  directTransfer: step.directTransfer,
@@ -6900,7 +6932,7 @@ function DepositFlow({
6900
6932
  if (signerContext.publicClient.chain?.id === chainId) {
6901
6933
  return signerContext.publicClient;
6902
6934
  }
6903
- return getPublicClient(chainId);
6935
+ return getPublicClient(chainId, rpcUrls);
6904
6936
  };
6905
6937
  return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
6906
6938
  effectiveStep.type === "setup" && /* @__PURE__ */ jsx19(
@@ -7325,7 +7357,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
7325
7357
  // src/DepositModal.tsx
7326
7358
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
7327
7359
  var ReownDepositInner = lazy2(
7328
- () => import("./DepositModalReown-ORSBSEMO.mjs").then((m) => ({ default: m.DepositModalReown }))
7360
+ () => import("./DepositModalReown-6AO4QURQ.mjs").then((m) => ({ default: m.DepositModalReown }))
7329
7361
  );
7330
7362
  function sortByCreatedAtDesc(items) {
7331
7363
  return [...items].sort((a, b) => {
@@ -7375,7 +7407,7 @@ function DepositModalInner({
7375
7407
  recipient,
7376
7408
  appBalanceUsd,
7377
7409
  backendUrl = DEFAULT_BACKEND_URL,
7378
- solanaRpcUrl,
7410
+ rpcUrls,
7379
7411
  signerAddress = DEFAULT_SIGNER_ADDRESS,
7380
7412
  sessionChainIds,
7381
7413
  forceRegister = false,
@@ -7430,7 +7462,7 @@ function DepositModalInner({
7430
7462
  return;
7431
7463
  }
7432
7464
  let cancelled = false;
7433
- getHyperEvmReadClient().getCode({ address: recipient }).then((code) => {
7465
+ getHyperEvmReadClient(rpcUrls).getCode({ address: recipient }).then((code) => {
7434
7466
  if (cancelled) return;
7435
7467
  const isContract = isContractBytecode(code);
7436
7468
  setRecipientIsContract(isContract);
@@ -7446,7 +7478,7 @@ function DepositModalInner({
7446
7478
  return () => {
7447
7479
  cancelled = true;
7448
7480
  };
7449
- }, [targetChain, recipient, onErrorRef]);
7481
+ }, [targetChain, recipient, onErrorRef, rpcUrls]);
7450
7482
  const service = useMemo9(
7451
7483
  () => createDepositService(backendUrl, {
7452
7484
  debug,
@@ -7467,9 +7499,6 @@ function DepositModalInner({
7467
7499
  applyTheme(modalRef.current, theme);
7468
7500
  }
7469
7501
  }, [isOpen, theme]);
7470
- useEffect11(() => {
7471
- configureSolanaRpcUrl(solanaRpcUrl);
7472
- }, [solanaRpcUrl]);
7473
7502
  useEffect11(() => {
7474
7503
  if (isOpen) {
7475
7504
  onReadyRef.current?.();
@@ -7579,7 +7608,7 @@ function DepositModalInner({
7579
7608
  }, [isOpen, store]);
7580
7609
  const showBackButton = uiConfig?.showBackButton ?? true;
7581
7610
  const canGoBack = backHandler !== void 0;
7582
- return /* @__PURE__ */ jsx21(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx21(
7611
+ return /* @__PURE__ */ jsx21(RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ jsx21(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx21(
7583
7612
  Modal,
7584
7613
  {
7585
7614
  isOpen,
@@ -7680,7 +7709,7 @@ function DepositModalInner({
7680
7709
  )
7681
7710
  ] })
7682
7711
  }
7683
- ) });
7712
+ ) }) });
7684
7713
  }
7685
7714
 
7686
7715
  export {
package/dist/deposit.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
3
+ var _chunkMXFZ6Q7Fcjs = require('./chunk-MXFZ6Q7F.cjs');
4
4
  require('./chunk-NRNJAQUA.cjs');
5
- require('./chunk-EDUWRMQI.cjs');
5
+ require('./chunk-PPFG3VBD.cjs');
6
6
  require('./chunk-UEKPBRBY.cjs');
7
7
  require('./chunk-ABVRVW3P.cjs');
8
8
 
9
9
 
10
- exports.DepositModal = _chunk36R7XKXPcjs.DepositModal;
10
+ exports.DepositModal = _chunkMXFZ6Q7Fcjs.DepositModal;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { f as DepositModalProps } from './types-CUOqIIvZ.cjs';
3
- export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.cjs';
2
+ import { f as DepositModalProps } from './types-_m8w8BYq.cjs';
3
+ export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, k as RpcUrlMap } from './types-_m8w8BYq.cjs';
4
4
  import 'viem';
5
5
 
6
6
  declare function DepositModal(props: DepositModalProps): react.JSX.Element;
package/dist/deposit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { f as DepositModalProps } from './types-CUOqIIvZ.js';
3
- export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.js';
2
+ import { f as DepositModalProps } from './types-_m8w8BYq.js';
3
+ export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, k as RpcUrlMap } from './types-_m8w8BYq.js';
4
4
  import 'viem';
5
5
 
6
6
  declare function DepositModal(props: DepositModalProps): react.JSX.Element;
package/dist/deposit.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-ANPDY6NJ.mjs";
3
+ } from "./chunk-ZYYLKWU2.mjs";
4
4
  import "./chunk-FJWLC4AM.mjs";
5
- import "./chunk-7EQQD7B4.mjs";
5
+ import "./chunk-PS7HJ62M.mjs";
6
6
  import "./chunk-F7P4MV72.mjs";
7
7
  import "./chunk-WJX3TJFK.mjs";
8
8
  export {
package/dist/index.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
3
+ var _chunkMXFZ6Q7Fcjs = require('./chunk-MXFZ6Q7F.cjs');
4
4
  require('./chunk-NRNJAQUA.cjs');
5
5
 
6
6
 
7
- var _chunk3NZUMDSTcjs = require('./chunk-3NZUMDST.cjs');
8
- require('./chunk-EDUWRMQI.cjs');
7
+ var _chunkXQH2APMOcjs = require('./chunk-XQH2APMO.cjs');
8
+ require('./chunk-PPFG3VBD.cjs');
9
9
  require('./chunk-UEKPBRBY.cjs');
10
10
 
11
11
 
@@ -85,4 +85,4 @@ async function disconnectWallet() {
85
85
 
86
86
 
87
87
 
88
- exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk36R7XKXPcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk3NZUMDSTcjs.WithdrawModal; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.isSupportedTokenAddressForChain;
88
+ exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkMXFZ6Q7Fcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkXQH2APMOcjs.WithdrawModal; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.isSupportedTokenAddressForChain;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DepositModal } from './deposit.cjs';
2
2
  export { WithdrawModal } from './withdraw.cjs';
3
- export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.cjs';
3
+ export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, k as RpcUrlMap, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, l as WithdrawCompleteEventData, m as WithdrawFailedEventData, n as WithdrawLifecycleEvent, o as WithdrawModalProps, p as WithdrawSubmittedEventData } from './types-_m8w8BYq.cjs';
4
4
  export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
5
5
  export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.cjs';
6
6
  import 'react';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DepositModal } from './deposit.js';
2
2
  export { WithdrawModal } from './withdraw.js';
3
- export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.js';
3
+ export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, k as RpcUrlMap, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, l as WithdrawCompleteEventData, m as WithdrawFailedEventData, n as WithdrawLifecycleEvent, o as WithdrawModalProps, p as WithdrawSubmittedEventData } from './types-_m8w8BYq.js';
4
4
  export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
5
5
  export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.js';
6
6
  import 'react';
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-ANPDY6NJ.mjs";
3
+ } from "./chunk-ZYYLKWU2.mjs";
4
4
  import "./chunk-FJWLC4AM.mjs";
5
5
  import {
6
6
  WithdrawModal
7
- } from "./chunk-IDJBMNV2.mjs";
8
- import "./chunk-7EQQD7B4.mjs";
7
+ } from "./chunk-V6KJKRE7.mjs";
8
+ import "./chunk-PS7HJ62M.mjs";
9
9
  import "./chunk-F7P4MV72.mjs";
10
10
  import {
11
11
  CHAIN_BY_ID,
package/dist/styles.css CHANGED
@@ -2336,6 +2336,10 @@
2336
2336
  background: var(--rs-background);
2337
2337
  }
2338
2338
 
2339
+ .rs-review-detail-icon--square {
2340
+ border-radius: 2px;
2341
+ }
2342
+
2339
2343
  .rs-review-detail-icon img {
2340
2344
  width: 100%;
2341
2345
  height: 100%;
@@ -5014,19 +5018,24 @@
5014
5018
  flex-direction: column;
5015
5019
  align-items: center;
5016
5020
  justify-content: center;
5017
- gap: 24px;
5018
- padding: 32px 0 24px;
5021
+ min-height: 182px;
5022
+ gap: 12px;
5023
+ padding: 0;
5019
5024
  text-align: center;
5020
5025
  }
5021
5026
 
5022
5027
  .rs-finalising-spinner {
5023
5028
  display: inline-flex;
5029
+ align-items: center;
5030
+ justify-content: center;
5031
+ width: 114px;
5032
+ height: 114px;
5024
5033
  color: var(--color-blue10);
5025
5034
  }
5026
5035
 
5027
5036
  .rs-finalising-spinner .rs-spinner {
5028
- width: 56px;
5029
- height: 56px;
5037
+ width: 82px;
5038
+ height: 82px;
5030
5039
  }
5031
5040
 
5032
5041
  .rs-finalising-text {
@@ -5279,55 +5288,76 @@
5279
5288
  margin: 0;
5280
5289
  display: flex;
5281
5290
  flex-direction: column;
5282
- flex-grow: 1;
5291
+ gap: 8px;
5283
5292
  }
5284
5293
 
5285
5294
  .rs-swapped-tracker-step {
5286
5295
  position: relative;
5287
5296
  display: flex;
5288
- align-items: center;
5297
+ align-items: flex-start;
5289
5298
  justify-content: space-between;
5290
5299
  gap: 12px;
5291
- padding: 16px 0;
5300
+ min-height: 36px;
5301
+ padding: 0;
5302
+ }
5303
+
5304
+ .rs-swapped-tracker-step:last-child {
5305
+ min-height: 17px;
5292
5306
  }
5293
5307
 
5294
- /* Dashed vertical connector between adjacent step markers. */
5295
- .rs-swapped-tracker-step + .rs-swapped-tracker-step::before {
5308
+ /* Dashed vertical connector below each marker. */
5309
+ .rs-swapped-tracker-step:not(:last-child)::after {
5296
5310
  content: "";
5297
5311
  position: absolute;
5298
- top: -14px;
5299
- right: 11px;
5300
- width: 2px;
5301
- height: 28px;
5312
+ top: 20px;
5313
+ right: 7.5px;
5314
+ width: 1px;
5315
+ height: 16px;
5302
5316
  background: repeating-linear-gradient(
5303
5317
  to bottom,
5304
5318
  #5f5f5f 0,
5305
5319
  #5f5f5f 3px,
5306
5320
  transparent 3px,
5307
- transparent 7px
5321
+ transparent 6px
5308
5322
  );
5309
5323
  }
5310
5324
 
5311
5325
  .rs-swapped-tracker-step-label {
5312
5326
  font-size: 15px;
5313
- color: var(--rs-foreground);
5327
+ line-height: 17px;
5328
+ color: var(--rs-muted);
5314
5329
  flex-grow: 1;
5315
5330
  }
5316
5331
 
5317
5332
  .rs-swapped-tracker-step-marker {
5318
- width: 24px;
5319
- height: 24px;
5333
+ position: relative;
5334
+ width: 16px;
5335
+ height: 16px;
5320
5336
  border-radius: 50%;
5321
5337
  flex-shrink: 0;
5322
5338
  display: flex;
5323
5339
  align-items: center;
5324
5340
  justify-content: center;
5325
5341
  background: transparent;
5326
- border: 1.5px solid #d4d4d8;
5342
+ border: 0;
5327
5343
  color: transparent;
5328
5344
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
5329
5345
  }
5330
5346
 
5347
+ .rs-swapped-tracker-step-ring {
5348
+ width: 16px;
5349
+ height: 16px;
5350
+ overflow: visible;
5351
+ }
5352
+
5353
+ .rs-swapped-tracker-step-ring circle {
5354
+ fill: none;
5355
+ stroke: #5f5f5f;
5356
+ stroke-width: 1.5;
5357
+ stroke-linecap: round;
5358
+ stroke-dasharray: 3 3;
5359
+ }
5360
+
5331
5361
  .rs-swapped-tracker-step--active .rs-swapped-tracker-step-marker {
5332
5362
  border-color: transparent;
5333
5363
  border-width: 0;
@@ -5340,9 +5370,9 @@
5340
5370
 
5341
5371
  .rs-swapped-tracker-step--active .rs-swapped-tracker-step-marker .rs-spinner {
5342
5372
  display: block;
5343
- flex: 0 0 24px;
5344
- width: 24px;
5345
- height: 24px;
5373
+ flex: 0 0 16px;
5374
+ width: 16px;
5375
+ height: 16px;
5346
5376
  }
5347
5377
 
5348
5378
  /* Satisfying scale-pop when a step ticks complete — the color transition
@@ -5351,13 +5381,14 @@
5351
5381
  animation: rs-tracker-step-complete 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
5352
5382
  background: #18181b;
5353
5383
  border-color: #18181b;
5384
+ border-style: solid;
5354
5385
  color: #fff;
5355
5386
  }
5356
5387
 
5357
5388
  .rs-swapped-tracker-step--complete .rs-swapped-tracker-step-marker svg {
5358
- width: 14px;
5359
- height: 14px;
5360
- stroke-width: 3;
5389
+ width: 10px;
5390
+ height: 10px;
5391
+ stroke-width: 4;
5361
5392
  }
5362
5393
 
5363
5394
  /* Failed step marker — terminal processor failure or cancellation. Red in
@@ -5365,13 +5396,14 @@
5365
5396
  .rs-swapped-tracker-step--failed .rs-swapped-tracker-step-marker {
5366
5397
  background: #fb2c36;
5367
5398
  border-color: #fb2c36;
5399
+ border-style: solid;
5368
5400
  color: #fff;
5369
5401
  }
5370
5402
 
5371
5403
  .rs-swapped-tracker-step--failed .rs-swapped-tracker-step-marker svg {
5372
- width: 14px;
5373
- height: 14px;
5374
- stroke-width: 3;
5404
+ width: 10px;
5405
+ height: 10px;
5406
+ stroke-width: 4;
5375
5407
  }
5376
5408
 
5377
5409
  /* Terminal message block shown below the steps on failure / cancellation. */
@@ -5410,10 +5442,6 @@
5410
5442
  background: var(--rs-border);
5411
5443
  }
5412
5444
 
5413
- .rs-modal[data-theme="dark"] .rs-swapped-tracker-step--pending .rs-swapped-tracker-step-marker {
5414
- border-color: #3f3f46;
5415
- }
5416
-
5417
5445
  .rs-modal[data-theme="dark"] .rs-swapped-tracker-step--active .rs-swapped-tracker-step-marker {
5418
5446
  border-color: transparent;
5419
5447
  color: #fafafa;