@rhinestone/deposit-modal 0.8.1 → 0.8.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.
Files changed (30) hide show
  1. package/dist/{DepositModalReown-UND3DEJH.cjs → DepositModalReown-A2W6R27Q.cjs} +9 -9
  2. package/dist/{DepositModalReown-4BSHOQ5Y.mjs → DepositModalReown-IB5WUXVT.mjs} +6 -6
  3. package/dist/{WithdrawModalReown-FVXSSGY5.mjs → WithdrawModalReown-A4S4BJHG.mjs} +5 -5
  4. package/dist/{WithdrawModalReown-TVZWJKQI.cjs → WithdrawModalReown-KUWNNA2X.cjs} +8 -8
  5. package/dist/{chunk-O5OKA27M.mjs → chunk-2O2FJYRY.mjs} +1 -1
  6. package/dist/{chunk-HQWZCOMS.cjs → chunk-3WIHTUQ6.cjs} +99 -99
  7. package/dist/{chunk-D3Y7ZBED.cjs → chunk-46BRQZ2P.cjs} +486 -457
  8. package/dist/{chunk-2JPB3PLB.mjs → chunk-4BLOPOVO.mjs} +2 -2
  9. package/dist/{chunk-Q3W53BKR.cjs → chunk-5E67UM3V.cjs} +7 -7
  10. package/dist/{chunk-7OKA6GNA.cjs → chunk-DSXMWQYB.cjs} +110 -105
  11. package/dist/{chunk-7KHEIMWD.mjs → chunk-KGZU3BL2.mjs} +40 -11
  12. package/dist/{chunk-4NN7UTWQ.cjs → chunk-ORKEBFMR.cjs} +4 -4
  13. package/dist/{chunk-U7SVYWVD.cjs → chunk-P5T4XSN2.cjs} +1 -1
  14. package/dist/{chunk-DABKCJVL.mjs → chunk-RARNNVZO.mjs} +1 -1
  15. package/dist/{chunk-WK5AFRSP.mjs → chunk-RH6XQHMA.mjs} +1 -1
  16. package/dist/{chunk-NASHLEVQ.mjs → chunk-TUSEN26M.mjs} +8 -3
  17. package/dist/{chunk-XRWQMIBY.cjs → chunk-UNVVUULP.cjs} +3 -3
  18. package/dist/{chunk-T43VUEJH.mjs → chunk-XK5RH4FZ.mjs} +4 -4
  19. package/dist/constants.cjs +2 -2
  20. package/dist/constants.mjs +1 -1
  21. package/dist/deposit.cjs +6 -6
  22. package/dist/deposit.mjs +5 -5
  23. package/dist/index.cjs +7 -7
  24. package/dist/index.mjs +6 -6
  25. package/dist/polymarket.cjs +6 -6
  26. package/dist/polymarket.mjs +3 -3
  27. package/dist/styles.css +118 -1
  28. package/dist/withdraw.cjs +5 -5
  29. package/dist/withdraw.mjs +4 -4
  30. package/package.json +1 -1
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
22
+ var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
23
23
 
24
24
  // src/components/ui/Modal.tsx
25
25
 
@@ -955,7 +955,7 @@ function createDepositService(baseUrl, options) {
955
955
  },
956
956
  async checkLiquidity(params) {
957
957
  if (params.destinationChainId === "solana") {
958
- const token = _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
958
+ const token = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
959
959
  return {
960
960
  hasLiquidity: true,
961
961
  symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _25 => _25.symbol]), () => ( "Token")),
@@ -1012,7 +1012,7 @@ function createDepositService(baseUrl, options) {
1012
1012
  const body = {
1013
1013
  account: params.account,
1014
1014
  // HyperCore has its own CAIP-2 namespace — never the eip155 placeholder.
1015
- sourceChainId: params.sourceChainId === "hypercore" ? _chunkU7SVYWVDcjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
1015
+ sourceChainId: params.sourceChainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
1016
1016
  sourceToken: params.sourceToken,
1017
1017
  amount: params.amount
1018
1018
  };
@@ -1335,14 +1335,14 @@ function normalizeOrchestratorPortfolio(data) {
1335
1335
  const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _32 => _32.balance, 'optionalAccess', _33 => _33.unlocked]), () => ( "0"));
1336
1336
  const normalizedName = tokenData.tokenName.trim();
1337
1337
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
1338
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkU7SVYWVDcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
1339
- const resolvedTokenAddress = isNativeSymbol ? _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
1338
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
1339
+ const resolvedTokenAddress = isNativeSymbol ? _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
1340
1340
  if (!resolvedTokenAddress) {
1341
1341
  continue;
1342
1342
  }
1343
- const registrySymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
1343
+ const registrySymbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
1344
1344
  const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
1345
- const decimals = registrySymbol !== "Token" ? _chunkU7SVYWVDcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1345
+ const decimals = registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1346
1346
  tokens.push({
1347
1347
  chainId: chainBalance.chainId,
1348
1348
  address: resolvedTokenAddress,
@@ -1362,13 +1362,13 @@ function normalizeOrchestratorPortfolio(data) {
1362
1362
  function normalizeDirectToken(token) {
1363
1363
  const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
1364
1364
  const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
1365
- const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkU7SVYWVDcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
1365
+ const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkP5T4XSN2cjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
1366
1366
  // HyperCore (`hypercore:mainnet`) is a non-EVM source; keep its USDC
1367
1367
  // instead of dropping it as an unparseable chain string.
1368
- _chunkU7SVYWVDcjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkU7SVYWVDcjs.parseEvmChainId.call(void 0, rawChainString)
1368
+ _chunkP5T4XSN2cjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkP5T4XSN2cjs.parseEvmChainId.call(void 0, rawChainString)
1369
1369
  ) : null)));
1370
1370
  if (chainId === null) return null;
1371
- const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkU7SVYWVDcjs.HYPERCORE_CHAIN_ID : void 0;
1371
+ const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_CHAIN_ID : void 0;
1372
1372
  const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
1373
1373
  if (!symbol) return null;
1374
1374
  const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "balance"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "amount"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "value"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()]))), () => ( _optionalChain([extractNumber, 'call', _43 => _43(token, "rawBalance"), 'optionalAccess', _44 => _44.toString, 'call', _45 => _45()])));
@@ -1376,14 +1376,14 @@ function normalizeDirectToken(token) {
1376
1376
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
1377
1377
  token.token,
1378
1378
  "address"
1379
- ))), () => ( (registryChainId !== void 0 ? _chunkU7SVYWVDcjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
1379
+ ))), () => ( (registryChainId !== void 0 ? _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
1380
1380
  if (!address) return null;
1381
1381
  const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
1382
1382
  const isSolanaToken = chainId === "solana";
1383
- const registrySymbol = isSolanaToken ? "Token" : _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, address, registryChainId);
1383
+ const registrySymbol = isSolanaToken ? "Token" : _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, address, registryChainId);
1384
1384
  const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
1385
1385
  const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
1386
- const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkU7SVYWVDcjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1386
+ const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1387
1387
  return {
1388
1388
  chainId,
1389
1389
  address,
@@ -1524,7 +1524,7 @@ function getPublicClient(chainId, rpcUrls) {
1524
1524
  const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
1525
1525
  let client = clientCache.get(cacheKey);
1526
1526
  if (!client) {
1527
- const chain = _chunkU7SVYWVDcjs.CHAIN_BY_ID[chainId];
1527
+ const chain = _chunkP5T4XSN2cjs.CHAIN_BY_ID[chainId];
1528
1528
  client = _viem.createPublicClient.call(void 0, {
1529
1529
  chain,
1530
1530
  transport: _viem.http.call(void 0, url)
@@ -2495,7 +2495,7 @@ var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fr
2495
2495
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
2496
2496
  "+6"
2497
2497
  ] });
2498
- var EXTRA_CHAIN_COUNT = Math.max(0, _chunkU7SVYWVDcjs.getSupportedChainIds.call(void 0, ).length - 3);
2498
+ var EXTRA_CHAIN_COUNT = Math.max(0, _chunkP5T4XSN2cjs.getSupportedChainIds.call(void 0, ).length - 3);
2499
2499
  var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2500
2500
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
2501
2501
  EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
@@ -2524,7 +2524,8 @@ function ConnectStep({
2524
2524
  onSelectDappImport,
2525
2525
  title = "Deposit",
2526
2526
  subtitle,
2527
- defaultMethodTab = "crypto"
2527
+ defaultMethodTab = "crypto",
2528
+ onMethodTabChange
2528
2529
  }) {
2529
2530
  const rows = _nullishCoalesce(walletRows, () => ( []));
2530
2531
  const handleConnect = _nullishCoalesce(onConnect, () => ( onRequestConnect));
@@ -2736,6 +2737,10 @@ function ConnectStep({
2736
2737
  const hasCash = cashRows.length > 0;
2737
2738
  const showToggle = hasCrypto && hasCash;
2738
2739
  const [tab, setTab] = _react.useState.call(void 0, defaultMethodTab);
2740
+ const handleTabChange = (next) => {
2741
+ setTab(next);
2742
+ _optionalChain([onMethodTabChange, 'optionalCall', _75 => _75(next)]);
2743
+ };
2739
2744
  const activeTab = showToggle ? tab : hasCash && !hasCrypto ? "cash" : "crypto";
2740
2745
  const activeRows = activeTab === "cash" ? cashRows : cryptoRows;
2741
2746
  _react.useEffect.call(void 0, () => {
@@ -2759,7 +2764,7 @@ function ConnectStep({
2759
2764
  {
2760
2765
  ariaLabel: "Deposit method type",
2761
2766
  value: activeTab,
2762
- onChange: setTab,
2767
+ onChange: handleTabChange,
2763
2768
  options: [
2764
2769
  { value: "crypto", label: "Crypto" },
2765
2770
  { value: "cash", label: "Cash" }
@@ -2808,7 +2813,7 @@ function TokenIcon({ symbol, className, fallback }) {
2808
2813
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2809
2814
  "img",
2810
2815
  {
2811
- src: _chunkU7SVYWVDcjs.tokenIconUrl.call(void 0, symbol),
2816
+ src: _chunkP5T4XSN2cjs.tokenIconUrl.call(void 0, symbol),
2812
2817
  alt: "",
2813
2818
  className: `rs-token-icon ${_nullishCoalesce(className, () => ( ""))}`.trimEnd(),
2814
2819
  decoding: "async",
@@ -2824,10 +2829,10 @@ TokenIcon.displayName = "TokenIcon";
2824
2829
  // src/core/useTokenPrices.ts
2825
2830
 
2826
2831
  function isErc20(token) {
2827
- return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
2832
+ return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
2828
2833
  }
2829
2834
  function caip2For(token) {
2830
- return `${_chunkU7SVYWVDcjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
2835
+ return `${_chunkP5T4XSN2cjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
2831
2836
  }
2832
2837
  async function fetchTokenPriceUsd(service, token) {
2833
2838
  if (isErc20(token)) {
@@ -2843,7 +2848,7 @@ async function fetchTokenPriceUsd(service, token) {
2843
2848
  }
2844
2849
  function useTokenPrices(service, tokens) {
2845
2850
  const [prices, setPrices] = _react.useState.call(void 0, {});
2846
- const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _75 => _75.symbol])));
2851
+ const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _76 => _76.symbol])));
2847
2852
  const entries = [
2848
2853
  ...new Map(
2849
2854
  defined.map((token) => {
@@ -2962,8 +2967,8 @@ function Tooltip({ content, children, className }) {
2962
2967
  function handleOutside(event) {
2963
2968
  const target = event.target;
2964
2969
  if (!target) return;
2965
- if (_optionalChain([triggerRef, 'access', _76 => _76.current, 'optionalAccess', _77 => _77.contains, 'call', _78 => _78(target)])) return;
2966
- if (_optionalChain([bubbleRef, 'access', _79 => _79.current, 'optionalAccess', _80 => _80.contains, 'call', _81 => _81(target)])) return;
2970
+ if (_optionalChain([triggerRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.contains, 'call', _79 => _79(target)])) return;
2971
+ if (_optionalChain([bubbleRef, 'access', _80 => _80.current, 'optionalAccess', _81 => _81.contains, 'call', _82 => _82(target)])) return;
2967
2972
  setOpen(false);
2968
2973
  }
2969
2974
  function handleKey(event) {
@@ -3158,7 +3163,7 @@ function asNumber(value) {
3158
3163
  const trimmed = value.trim();
3159
3164
  if (!trimmed) return void 0;
3160
3165
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
3161
- if (_optionalChain([caipMatch, 'optionalAccess', _82 => _82[1]])) {
3166
+ if (_optionalChain([caipMatch, 'optionalAccess', _83 => _83[1]])) {
3162
3167
  const parsed2 = Number(caipMatch[1]);
3163
3168
  return Number.isFinite(parsed2) ? parsed2 : void 0;
3164
3169
  }
@@ -3177,24 +3182,24 @@ function asAddress(value) {
3177
3182
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
3178
3183
  }
3179
3184
  function getEventTxHash(event) {
3180
- if (!_optionalChain([event, 'optionalAccess', _83 => _83.type])) return void 0;
3185
+ if (!_optionalChain([event, 'optionalAccess', _84 => _84.type])) return void 0;
3181
3186
  if (event.type === "deposit-received") {
3182
- return asString(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.transactionHash]));
3187
+ return asString(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.transactionHash]));
3183
3188
  }
3184
3189
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
3185
- const deposit = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.deposit])) ? event.data.deposit : void 0;
3186
- const source = isRecord(_optionalChain([event, 'access', _88 => _88.data, 'optionalAccess', _89 => _89.source])) ? event.data.source : void 0;
3187
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _90 => _90.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _91 => _91.transactionHash]))));
3190
+ const deposit = isRecord(_optionalChain([event, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.deposit])) ? event.data.deposit : void 0;
3191
+ const source = isRecord(_optionalChain([event, 'access', _89 => _89.data, 'optionalAccess', _90 => _90.source])) ? event.data.source : void 0;
3192
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _91 => _91.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _92 => _92.transactionHash]))));
3188
3193
  }
3189
3194
  if (event.type === "bridge-failed" || event.type === "error") {
3190
- const deposit = isRecord(_optionalChain([event, 'access', _92 => _92.data, 'optionalAccess', _93 => _93.deposit])) ? event.data.deposit : void 0;
3191
- const source = isRecord(_optionalChain([event, 'access', _94 => _94.data, 'optionalAccess', _95 => _95.source])) ? event.data.source : void 0;
3192
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _96 => _96.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _97 => _97.transactionHash]))));
3195
+ const deposit = isRecord(_optionalChain([event, 'access', _93 => _93.data, 'optionalAccess', _94 => _94.deposit])) ? event.data.deposit : void 0;
3196
+ const source = isRecord(_optionalChain([event, 'access', _95 => _95.data, 'optionalAccess', _96 => _96.source])) ? event.data.source : void 0;
3197
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _97 => _97.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _98 => _98.transactionHash]))));
3193
3198
  }
3194
3199
  return void 0;
3195
3200
  }
3196
3201
  function getEventSourceDetails(event) {
3197
- if (!_optionalChain([event, 'optionalAccess', _98 => _98.type]) || !isRecord(event.data)) return {};
3202
+ if (!_optionalChain([event, 'optionalAccess', _99 => _99.type]) || !isRecord(event.data)) return {};
3198
3203
  if (event.type === "deposit-received") {
3199
3204
  return {
3200
3205
  chainId: asNumber(event.data.chain),
@@ -3206,9 +3211,9 @@ function getEventSourceDetails(event) {
3206
3211
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
3207
3212
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
3208
3213
  return {
3209
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _99 => _99.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _100 => _100.chain])))),
3210
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _101 => _101.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _102 => _102.amount])))),
3211
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _103 => _103.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _104 => _104.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _105 => _105.token]))))
3214
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _100 => _100.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _101 => _101.chain])))),
3215
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _102 => _102.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _103 => _103.amount])))),
3216
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _104 => _104.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _105 => _105.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _106 => _106.token]))))
3212
3217
  };
3213
3218
  }
3214
3219
  return {};
@@ -3222,7 +3227,7 @@ function asChain(value) {
3222
3227
  return asNumber(value);
3223
3228
  }
3224
3229
  function getEventDestinationDetails(event) {
3225
- if (!_optionalChain([event, 'optionalAccess', _106 => _106.type]) || !isRecord(event.data)) return {};
3230
+ if (!_optionalChain([event, 'optionalAccess', _107 => _107.type]) || !isRecord(event.data)) return {};
3226
3231
  if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
3227
3232
  return {};
3228
3233
  }
@@ -3232,14 +3237,14 @@ function getEventDestinationDetails(event) {
3232
3237
  return {
3233
3238
  chainId: asChain(destination.chain),
3234
3239
  amount: asAmount(destination.amount),
3235
- token: _optionalChain([token, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0
3240
+ token: _optionalChain([token, 'optionalAccess', _108 => _108.trim, 'call', _109 => _109()]) || void 0
3236
3241
  };
3237
3242
  }
3238
3243
  function isDepositEvent(event) {
3239
- return _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "error";
3244
+ return _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error";
3240
3245
  }
3241
3246
  function isFailedEvent(event) {
3242
- return _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "error";
3247
+ return _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _116 => _116.type]) === "error";
3243
3248
  }
3244
3249
  function isHexString(value) {
3245
3250
  return value.startsWith("0x") || value.startsWith("0X");
@@ -3251,7 +3256,7 @@ function txRefsMatch(a, b) {
3251
3256
  return a === b;
3252
3257
  }
3253
3258
  function formatBridgeFailedMessage(event) {
3254
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _116 => _116.data]), () => ( {}));
3259
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _117 => _117.data]), () => ( {}));
3255
3260
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
3256
3261
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
3257
3262
  function toUserFacingFailure(raw) {
@@ -3279,7 +3284,7 @@ function formatBridgeFailedMessage(event) {
3279
3284
  return { message: "Bridge failed" };
3280
3285
  }
3281
3286
  function failureMessageForEvent(event) {
3282
- if (_optionalChain([event, 'optionalAccess', _117 => _117.type]) === "error") {
3287
+ if (_optionalChain([event, 'optionalAccess', _118 => _118.type]) === "error") {
3283
3288
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
3284
3289
  return _nullishCoalesce(message, () => ( "Unknown error"));
3285
3290
  }
@@ -3307,29 +3312,29 @@ var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
3307
3312
  function resolveTokenDisplay(token, chain, fallback) {
3308
3313
  if (token !== void 0) {
3309
3314
  if (chain === "solana") {
3310
- const solanaToken = _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, token);
3315
+ const solanaToken = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, token);
3311
3316
  if (solanaToken) {
3312
3317
  return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
3313
3318
  }
3314
3319
  } else if (chain === "hypercore") {
3315
- const t = _chunkU7SVYWVDcjs.HYPERCORE_SOURCE_TOKENS.find(
3320
+ const t = _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.find(
3316
3321
  (x) => x.address.toLowerCase() === token.toLowerCase()
3317
3322
  );
3318
3323
  if (t) return { symbol: t.symbol, decimals: t.decimals };
3319
3324
  } else if (EVM_ADDRESS_RE.test(token)) {
3320
- const symbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, token, chain);
3321
- const decimals = _chunkU7SVYWVDcjs.findTokenDecimals.call(void 0, token, chain);
3325
+ const symbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, token, chain);
3326
+ const decimals = _chunkP5T4XSN2cjs.findTokenDecimals.call(void 0, token, chain);
3322
3327
  if (symbol !== "Token" || decimals !== void 0) {
3323
3328
  return {
3324
- symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _118 => _118.symbol]), () => ( symbol)),
3325
- decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _119 => _119.decimals])))
3329
+ symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _119 => _119.symbol]), () => ( symbol)),
3330
+ decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _120 => _120.decimals])))
3326
3331
  };
3327
3332
  }
3328
3333
  }
3329
3334
  }
3330
3335
  return {
3331
- symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _120 => _120.symbol]), () => ( "Token")),
3332
- decimals: _optionalChain([fallback, 'optionalAccess', _121 => _121.decimals])
3336
+ symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _121 => _121.symbol]), () => ( "Token")),
3337
+ decimals: _optionalChain([fallback, 'optionalAccess', _122 => _122.decimals])
3333
3338
  };
3334
3339
  }
3335
3340
  function maxFractionDigitsFor(symbol) {
@@ -3367,13 +3372,13 @@ function priceUsdFor(symbol, prices) {
3367
3372
  }
3368
3373
  function isRecognizedToken(address, chain) {
3369
3374
  if (address === void 0 || chain === void 0) return false;
3370
- if (chain === "solana") return _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
3375
+ if (chain === "solana") return _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
3371
3376
  if (chain === "hypercore") {
3372
- return _chunkU7SVYWVDcjs.HYPERCORE_SOURCE_TOKENS.some(
3377
+ return _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.some(
3373
3378
  (t) => t.address.toLowerCase() === address.toLowerCase()
3374
3379
  );
3375
3380
  }
3376
- return EVM_ADDRESS_RE.test(address) && _chunkU7SVYWVDcjs.isRegistryTokenOnChain.call(void 0, address, chain);
3381
+ return EVM_ADDRESS_RE.test(address) && _chunkP5T4XSN2cjs.isRegistryTokenOnChain.call(void 0, address, chain);
3377
3382
  }
3378
3383
  function estimateReceiveAmount(params) {
3379
3384
  const {
@@ -3525,7 +3530,7 @@ function normalizeFeeUsd(value) {
3525
3530
  return Number.isFinite(value) ? Math.max(0, value) : null;
3526
3531
  }
3527
3532
  function formatUsdFee(value) {
3528
- return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call', _122 => _122(value), 'optionalAccess', _123 => _123.toFixed, 'call', _124 => _124(2)]), () => ( "0.00"))}`;
3533
+ return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call', _123 => _123(value), 'optionalAccess', _124 => _124.toFixed, 'call', _125 => _125(2)]), () => ( "0.00"))}`;
3529
3534
  }
3530
3535
  function getMarketNetworkFees(breakdown) {
3531
3536
  if (!breakdown) return null;
@@ -3579,12 +3584,12 @@ function isEventForTx(event, txHash) {
3579
3584
  return txRefsMatch(eventTxHash, txHash);
3580
3585
  }
3581
3586
  function parseWebhookTimestamp(event) {
3582
- if (typeof _optionalChain([event, 'optionalAccess', _125 => _125.time]) !== "string") return void 0;
3587
+ if (typeof _optionalChain([event, 'optionalAccess', _126 => _126.time]) !== "string") return void 0;
3583
3588
  const timestamp = Date.parse(event.time);
3584
3589
  return Number.isFinite(timestamp) ? timestamp : void 0;
3585
3590
  }
3586
3591
  function syncPhaseTimings(previous, event) {
3587
- if (!_optionalChain([event, 'optionalAccess', _126 => _126.type])) return previous;
3592
+ if (!_optionalChain([event, 'optionalAccess', _127 => _127.type])) return previous;
3588
3593
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
3589
3594
  const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") && previous.receivedAt === void 0;
3590
3595
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
@@ -3646,46 +3651,46 @@ function getCurrentPhaseId(state, phaseTimings) {
3646
3651
  if (state.type === "complete") {
3647
3652
  return void 0;
3648
3653
  }
3649
- if (_optionalChain([state, 'access', _127 => _127.lastEvent, 'optionalAccess', _128 => _128.type]) === "bridge-started" || _optionalChain([state, 'access', _129 => _129.lastEvent, 'optionalAccess', _130 => _130.type]) === "bridge-complete")
3654
+ if (_optionalChain([state, 'access', _128 => _128.lastEvent, 'optionalAccess', _129 => _129.type]) === "bridge-started" || _optionalChain([state, 'access', _130 => _130.lastEvent, 'optionalAccess', _131 => _131.type]) === "bridge-complete")
3650
3655
  return "bridging";
3651
- if (_optionalChain([state, 'access', _131 => _131.lastEvent, 'optionalAccess', _132 => _132.type]) === "deposit-received") return "received";
3656
+ if (_optionalChain([state, 'access', _132 => _132.lastEvent, 'optionalAccess', _133 => _133.type]) === "deposit-received") return "received";
3652
3657
  return "confirming";
3653
3658
  }
3654
3659
  function getCompletionDestinationTxHash(event) {
3655
- const eventData = _optionalChain([event, 'optionalAccess', _133 => _133.data]);
3656
- const swapTxHash = _optionalChain([eventData, 'optionalAccess', _134 => _134.swap, 'optionalAccess', _135 => _135.transactionHash]);
3657
- const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _136 => _136.destination, 'optionalAccess', _137 => _137.transactionHash]);
3660
+ const eventData = _optionalChain([event, 'optionalAccess', _134 => _134.data]);
3661
+ const swapTxHash = _optionalChain([eventData, 'optionalAccess', _135 => _135.swap, 'optionalAccess', _136 => _136.transactionHash]);
3662
+ const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _137 => _137.destination, 'optionalAccess', _138 => _138.transactionHash]);
3658
3663
  return _nullishCoalesce(swapTxHash, () => ( destinationTxHash));
3659
3664
  }
3660
3665
  function getTerminalProcessingOutcome(event) {
3661
- if (_optionalChain([event, 'optionalAccess', _138 => _138.type]) === "post-bridge-swap-complete") {
3666
+ if (_optionalChain([event, 'optionalAccess', _139 => _139.type]) === "post-bridge-swap-complete") {
3662
3667
  return {
3663
3668
  type: "complete",
3664
3669
  destinationTxHash: getCompletionDestinationTxHash(event)
3665
3670
  };
3666
3671
  }
3667
- if (_optionalChain([event, 'optionalAccess', _139 => _139.type]) === "post-bridge-swap-failed") {
3672
+ if (_optionalChain([event, 'optionalAccess', _140 => _140.type]) === "post-bridge-swap-failed") {
3668
3673
  return {
3669
3674
  type: "failed",
3670
3675
  message: formatBridgeFailedMessage(event).message
3671
3676
  };
3672
3677
  }
3673
- if (_optionalChain([event, 'optionalAccess', _140 => _140.type]) === "bridge-complete") {
3678
+ if (_optionalChain([event, 'optionalAccess', _141 => _141.type]) === "bridge-complete") {
3674
3679
  return {
3675
3680
  type: "complete",
3676
3681
  destinationTxHash: getCompletionDestinationTxHash(event)
3677
3682
  };
3678
3683
  }
3679
- if (_optionalChain([event, 'optionalAccess', _141 => _141.type]) === "bridge-failed") {
3684
+ if (_optionalChain([event, 'optionalAccess', _142 => _142.type]) === "bridge-failed") {
3680
3685
  return {
3681
3686
  type: "failed",
3682
3687
  message: formatBridgeFailedMessage(event).message
3683
3688
  };
3684
3689
  }
3685
- if (_optionalChain([event, 'optionalAccess', _142 => _142.type]) === "error") {
3690
+ if (_optionalChain([event, 'optionalAccess', _143 => _143.type]) === "error") {
3686
3691
  return {
3687
3692
  type: "failed",
3688
- message: _nullishCoalesce(_optionalChain([event, 'access', _143 => _143.data, 'optionalAccess', _144 => _144.message]), () => ( "Unknown error"))
3693
+ message: _nullishCoalesce(_optionalChain([event, 'access', _144 => _144.data, 'optionalAccess', _145 => _145.message]), () => ( "Unknown error"))
3689
3694
  };
3690
3695
  }
3691
3696
  return null;
@@ -3693,10 +3698,10 @@ function getTerminalProcessingOutcome(event) {
3693
3698
  function getInitialProcessingState(event, txHash) {
3694
3699
  if (!event || !isEventForTx(event, txHash)) return null;
3695
3700
  const terminal = getTerminalProcessingOutcome(event);
3696
- if (_optionalChain([terminal, 'optionalAccess', _145 => _145.type]) === "complete") {
3701
+ if (_optionalChain([terminal, 'optionalAccess', _146 => _146.type]) === "complete") {
3697
3702
  return { type: "complete", lastEvent: event };
3698
3703
  }
3699
- if (_optionalChain([terminal, 'optionalAccess', _146 => _146.type]) === "failed") {
3704
+ if (_optionalChain([terminal, 'optionalAccess', _147 => _147.type]) === "failed") {
3700
3705
  return { type: "failed", message: terminal.message, lastEvent: event };
3701
3706
  }
3702
3707
  if (isDepositEvent(event)) {
@@ -3799,7 +3804,7 @@ function ProcessingStep({
3799
3804
  flowLabel
3800
3805
  });
3801
3806
  const context = processingContextRef.current;
3802
- _optionalChain([onDepositCompleteRef, 'access', _147 => _147.current, 'optionalCall', _148 => _148(txHash, void 0, {
3807
+ _optionalChain([onDepositCompleteRef, 'access', _148 => _148.current, 'optionalCall', _149 => _149(txHash, void 0, {
3803
3808
  amount: context.amount,
3804
3809
  sourceChain: context.sourceChain,
3805
3810
  sourceToken: context.sourceToken,
@@ -3830,7 +3835,7 @@ function ProcessingStep({
3830
3835
  destinationTxHash: outcome.destinationTxHash,
3831
3836
  event: event.type
3832
3837
  });
3833
- _optionalChain([onDepositCompleteRef, 'access', _149 => _149.current, 'optionalCall', _150 => _150(txHash, outcome.destinationTxHash, {
3838
+ _optionalChain([onDepositCompleteRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, outcome.destinationTxHash, {
3834
3839
  amount: context.amount,
3835
3840
  sourceChain: context.sourceChain,
3836
3841
  sourceToken: context.sourceToken,
@@ -3846,7 +3851,7 @@ function ProcessingStep({
3846
3851
  message: outcome.message,
3847
3852
  event: event.type
3848
3853
  });
3849
- _optionalChain([onDepositFailedRef, 'access', _151 => _151.current, 'optionalCall', _152 => _152(txHash, outcome.message)]);
3854
+ _optionalChain([onDepositFailedRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153(txHash, outcome.message)]);
3850
3855
  }, [
3851
3856
  debug,
3852
3857
  onDepositCompleteRef,
@@ -3878,13 +3883,13 @@ function ProcessingStep({
3878
3883
  updatePhaseTimings(
3879
3884
  (previous) => syncPhaseTimings(previous, state.lastEvent)
3880
3885
  );
3881
- }, [_optionalChain([state, 'access', _153 => _153.lastEvent, 'optionalAccess', _154 => _154.time]), _optionalChain([state, 'access', _155 => _155.lastEvent, 'optionalAccess', _156 => _156.type]), updatePhaseTimings]);
3886
+ }, [_optionalChain([state, 'access', _154 => _154.lastEvent, 'optionalAccess', _155 => _155.time]), _optionalChain([state, 'access', _156 => _156.lastEvent, 'optionalAccess', _157 => _157.type]), updatePhaseTimings]);
3882
3887
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
3883
3888
  _react.useEffect.call(void 0, () => {
3884
3889
  let cancelled = false;
3885
3890
  let timeoutId;
3886
- const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _157 => _157.variant]) === "fiat";
3887
- const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _158 => _158.expectedOrderUuid]), () => ( null));
3891
+ const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _158 => _158.variant]) === "fiat";
3892
+ const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _159 => _159.expectedOrderUuid]), () => ( null));
3888
3893
  setSwappedFiatContext(null);
3889
3894
  if (isFiatSwappedOrder && !expectedOrderUuid) {
3890
3895
  return () => {
@@ -3934,8 +3939,8 @@ function ProcessingStep({
3934
3939
  smartAccount,
3935
3940
  txHash,
3936
3941
  isSwappedOrder,
3937
- _optionalChain([swappedContext, 'optionalAccess', _159 => _159.variant]),
3938
- _optionalChain([swappedContext, 'optionalAccess', _160 => _160.expectedOrderUuid])
3942
+ _optionalChain([swappedContext, 'optionalAccess', _160 => _160.variant]),
3943
+ _optionalChain([swappedContext, 'optionalAccess', _161 => _161.expectedOrderUuid])
3939
3944
  ]);
3940
3945
  _react.useEffect.call(void 0, () => {
3941
3946
  if (directTransfer) return;
@@ -3961,20 +3966,20 @@ function ProcessingStep({
3961
3966
  debugLog(debug, "processing", "poll:event", {
3962
3967
  type: lastEvent2.type,
3963
3968
  matchesTx: eventMatchesTx,
3964
- intentId: _optionalChain([eventData, 'optionalAccess', _161 => _161.intentId])
3969
+ intentId: _optionalChain([eventData, 'optionalAccess', _162 => _162.intentId])
3965
3970
  });
3966
3971
  }
3967
3972
  if (!isMounted) return;
3968
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _162 => _162.type]) === "bridge-complete") {
3973
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _163 => _163.type]) === "bridge-complete") {
3969
3974
  setState({ type: "complete", lastEvent: eventForCurrentTx });
3970
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _163 => _163.data, 'optionalAccess', _164 => _164.destination, 'optionalAccess', _165 => _165.transactionHash]);
3975
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _164 => _164.data, 'optionalAccess', _165 => _165.destination, 'optionalAccess', _166 => _166.transactionHash]);
3971
3976
  debugLog(debug, "processing", "state:complete", {
3972
3977
  txHash,
3973
3978
  destinationTxHash: destinationTxHash2,
3974
3979
  event: eventForCurrentTx.type
3975
3980
  });
3976
3981
  const context = processingContextRef.current;
3977
- _optionalChain([onDepositCompleteRef, 'access', _166 => _166.current, 'optionalCall', _167 => _167(txHash, destinationTxHash2, {
3982
+ _optionalChain([onDepositCompleteRef, 'access', _167 => _167.current, 'optionalCall', _168 => _168(txHash, destinationTxHash2, {
3978
3983
  amount: context.amount,
3979
3984
  sourceChain: context.sourceChain,
3980
3985
  sourceToken: context.sourceToken,
@@ -3985,7 +3990,7 @@ function ProcessingStep({
3985
3990
  })]);
3986
3991
  return;
3987
3992
  }
3988
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _168 => _168.type]) === "bridge-failed") {
3993
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _169 => _169.type]) === "bridge-failed") {
3989
3994
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
3990
3995
  setState({
3991
3996
  type: "failed",
@@ -3997,11 +4002,11 @@ function ProcessingStep({
3997
4002
  message: formatted.message,
3998
4003
  code: formatted.code
3999
4004
  });
4000
- _optionalChain([onDepositFailedRef, 'access', _169 => _169.current, 'optionalCall', _170 => _170(txHash, formatted.message)]);
4005
+ _optionalChain([onDepositFailedRef, 'access', _170 => _170.current, 'optionalCall', _171 => _171(txHash, formatted.message)]);
4001
4006
  return;
4002
4007
  }
4003
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _171 => _171.type]) === "error") {
4004
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _172 => _172.data, 'optionalAccess', _173 => _173.message]), () => ( "Unknown error"));
4008
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _172 => _172.type]) === "error") {
4009
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _173 => _173.data, 'optionalAccess', _174 => _174.message]), () => ( "Unknown error"));
4005
4010
  setState({
4006
4011
  type: "failed",
4007
4012
  message: errorMessage,
@@ -4011,7 +4016,7 @@ function ProcessingStep({
4011
4016
  txHash,
4012
4017
  message: errorMessage
4013
4018
  });
4014
- _optionalChain([onDepositFailedRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175(txHash, errorMessage)]);
4019
+ _optionalChain([onDepositFailedRef, 'access', _175 => _175.current, 'optionalCall', _176 => _176(txHash, errorMessage)]);
4015
4020
  return;
4016
4021
  }
4017
4022
  setState((previous) => ({
@@ -4072,7 +4077,7 @@ function ProcessingStep({
4072
4077
  txHash,
4073
4078
  timeoutMs: ESCALATED_DELAY_MS
4074
4079
  });
4075
- _optionalChain([onErrorRef, 'access', _176 => _176.current, 'optionalCall', _177 => _177(message, "PROCESS_TIMEOUT")]);
4080
+ _optionalChain([onErrorRef, 'access', _177 => _177.current, 'optionalCall', _178 => _178(message, "PROCESS_TIMEOUT")]);
4076
4081
  }, ESCALATED_DELAY_MS);
4077
4082
  return () => clearTimeout(timeoutId);
4078
4083
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -4084,13 +4089,13 @@ function ProcessingStep({
4084
4089
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
4085
4090
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
4086
4091
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
4087
- const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _178 => _178.data, 'optionalAccess', _179 => _179.destination, 'optionalAccess', _180 => _180.transactionHash]) || null;
4092
+ const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _179 => _179.data, 'optionalAccess', _180 => _180.destination, 'optionalAccess', _181 => _181.transactionHash]) || null;
4088
4093
  const sourceDetails = getEventSourceDetails(lastEvent);
4089
4094
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
4090
4095
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
4091
4096
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
4092
- const sourceExplorerUrl = _chunkU7SVYWVDcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
4093
- const destExplorerUrl = destinationTxHash ? _chunkU7SVYWVDcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
4097
+ const sourceExplorerUrl = _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
4098
+ const destExplorerUrl = destinationTxHash ? _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
4094
4099
  const sourceDisplay = (() => {
4095
4100
  const resolved = resolveTokenDisplay(displaySourceToken, displaySourceChain, {
4096
4101
  symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
@@ -4164,13 +4169,13 @@ function ProcessingStep({
4164
4169
  const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
4165
4170
  void delayPhaseId;
4166
4171
  void hasEscalatedDelay;
4167
- const sourceChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, displaySourceChain);
4168
- const targetChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, targetChain);
4169
- const sourceChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, displaySourceChain);
4170
- const targetChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
4172
+ const sourceChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, displaySourceChain);
4173
+ const targetChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, targetChain);
4174
+ const sourceChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, displaySourceChain);
4175
+ const targetChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, targetChain);
4171
4176
  const timerText = formatTimer(elapsedSeconds);
4172
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _181 => _181.feeSponsored]), () => ( false));
4173
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _182 => _182.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
4177
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _182 => _182.feeSponsored]), () => ( false));
4178
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _183 => _183.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
4174
4179
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
4175
4180
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
4176
4181
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -4181,20 +4186,20 @@ function ProcessingStep({
4181
4186
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
4182
4187
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
4183
4188
  if (isComplete && isSwappedOrder) {
4184
- const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _183 => _183.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _184 => _184.paymentMethod]))), () => ( null));
4189
+ const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _184 => _184.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _185 => _185.paymentMethod]))), () => ( null));
4185
4190
  const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
4186
- const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _185 => _185.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
4191
+ const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _186 => _186.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
4187
4192
  _nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
4188
4193
  effectivePaymentMethod
4189
4194
  ) : null;
4190
- const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _186 => _186.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
4191
- const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _187 => _187.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
4195
+ const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _187 => _187.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
4196
+ const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _188 => _188.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
4192
4197
  const depositedAmount = receiveDisplay;
4193
- const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _188 => _188.onrampFeeUsd]), () => ( null));
4198
+ const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _189 => _189.onrampFeeUsd]), () => ( null));
4194
4199
  const quoteFees = getMarketNetworkFees(quoteFeeBreakdown);
4195
4200
  const fallbackNetworkFeeUsd = quoteFees === null && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
4196
- const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _189 => _189.marketUsd]), () => ( null));
4197
- const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _190 => _190.networkUsd]), () => ( fallbackNetworkFeeUsd));
4201
+ const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _190 => _190.marketUsd]), () => ( null));
4202
+ const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _191 => _191.networkUsd]), () => ( fallbackNetworkFeeUsd));
4198
4203
  const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
4199
4204
  const feesTooltip = feeSponsored ? "On-ramp fees are charged by the payment provider. Market and network fees are sponsored for this deposit." : "Fees include on-ramp, market, and network costs for this deposit.";
4200
4205
  const feeRows = [];
@@ -4284,7 +4289,7 @@ function ProcessingStep({
4284
4289
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
4285
4290
  ] }),
4286
4291
  isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4287
- _optionalChain([swappedFiatContext, 'optionalAccess', _191 => _191.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
4292
+ _optionalChain([swappedFiatContext, 'optionalAccess', _192 => _192.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
4288
4293
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
4289
4294
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
4290
4295
  "$",
@@ -4296,7 +4301,7 @@ function ProcessingStep({
4296
4301
  ] })
4297
4302
  ] })
4298
4303
  ] }),
4299
- _optionalChain([swappedFiatContext, 'optionalAccess', _192 => _192.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
4304
+ _optionalChain([swappedFiatContext, 'optionalAccess', _193 => _193.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
4300
4305
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
4301
4306
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
4302
4307
  "$",