@imtbl/sdk 1.74.9-alpha.2 → 1.74.10-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{blockchain_data-Bvc7kBdx.js → blockchain_data-Cwedjoix.js} +2 -2
  2. package/dist/blockchain_data.js +3 -3
  3. package/dist/browser/checkout/{AddTokensWidget-CnA5XYnd.js → AddTokensWidget-CO_PVJdq.js} +157 -65
  4. package/dist/browser/checkout/{BridgeWidget-DMGCRXjH.js → BridgeWidget-QK4NCq52.js} +9 -9
  5. package/dist/browser/checkout/{CommerceWidget-Byd8JyzF.js → CommerceWidget-BuXPIUZ9.js} +17 -17
  6. package/dist/browser/checkout/{CryptoFiatProvider-zCa2sVd8.js → CryptoFiatProvider-sAEnJG6C.js} +1 -1
  7. package/dist/browser/checkout/{FeesBreakdown-DMGyEpeX.js → FeesBreakdown-yRB20JH-.js} +1 -1
  8. package/dist/browser/checkout/{HandoverContent-BKYZunUN.js → HandoverContent-t9r-oBxF.js} +1 -1
  9. package/dist/browser/checkout/{OnRampWidget-B4lX9uAx.js → OnRampWidget-DieIS72Y.js} +3 -3
  10. package/dist/browser/checkout/{SaleWidget-BVL5meKc.js → SaleWidget-COsJhPPs.js} +14 -14
  11. package/dist/browser/checkout/{SpendingCapHero-B1RdHAbv.js → SpendingCapHero-C013cyRT.js} +1 -1
  12. package/dist/browser/checkout/{SwapWidget-D-pE_rmj.js → SwapWidget-B3EdQ5rO.js} +9 -9
  13. package/dist/browser/checkout/{TokenImage-zqxHMH6Q.js → TokenImage-Wgpb1UNJ.js} +1 -1
  14. package/dist/browser/checkout/{TopUpView-CiVyRmwY.js → TopUpView-COE6yWhK.js} +3 -3
  15. package/dist/browser/checkout/{WalletApproveHero-B1dSrUz8.js → WalletApproveHero-t4SnHNxx.js} +3 -3
  16. package/dist/browser/checkout/{WalletWidget-tPUDYOMn.js → WalletWidget-cnj9sfvN.js} +4 -4
  17. package/dist/browser/checkout/{auto-track-DoBXNc8j.js → auto-track-CuFVRGcc.js} +1 -1
  18. package/dist/browser/checkout/{index-ue2YeJ9e.js → index-2DJD2EEb.js} +1 -1
  19. package/dist/browser/checkout/{index-BAkbAfHQ.js → index-B7IP9SJX.js} +1 -1
  20. package/dist/browser/checkout/{index-CunjcrZL.js → index-BY3USqUM.js} +1 -1
  21. package/dist/browser/checkout/{index-DcIjQY3F.js → index-BYPtrzjt.js} +1 -1
  22. package/dist/browser/checkout/{index-FjQn7euV.js → index-BjmEtD5S.js} +2 -2
  23. package/dist/browser/checkout/{index-D1CE-3qJ.js → index-Cqrf-cz8.js} +1 -1
  24. package/dist/browser/checkout/{index-CE6vXlnR.js → index-DHw30dO4.js} +1 -1
  25. package/dist/browser/checkout/{index-D1mfi_l_.js → index-DOJ1U96T.js} +1 -1
  26. package/dist/browser/checkout/{index-DfpuYVUw.js → index-DgAj1QDX.js} +1 -1
  27. package/dist/browser/checkout/{index-Bj-EHPwO.js → index-I7NQs2yT.js} +51 -23
  28. package/dist/browser/checkout/{index.umd-CLczHgX0.js → index.umd-HcSZoM_a.js} +1 -1
  29. package/dist/browser/checkout/sdk.js +4 -4
  30. package/dist/browser/checkout/{useInterval-BkDSRSol.js → useInterval-C1Ii_rjQ.js} +1 -1
  31. package/dist/browser/checkout/widgets-esm.js +1 -1
  32. package/dist/browser/checkout/widgets.js +183 -63
  33. package/dist/{checkout-DB_LRkFS.js → checkout-BkrA8rf3.js} +5 -5
  34. package/dist/checkout.js +5 -5
  35. package/dist/{config-DSFNuPkG.js → config-C37HtulS.js} +1 -1
  36. package/dist/config.js +1 -1
  37. package/dist/{index-BL_yIeO6.js → index-BQ4XkQ24.js} +1 -1
  38. package/dist/{index-BP66zBHl.js → index-CJ_oTRNs.js} +3 -3
  39. package/dist/{index-CDxWXvoa.js → index-DNiLGo5S.js} +1 -1
  40. package/dist/{index-ryab87Ks.js → index-NGDaOPlW.js} +4 -4
  41. package/dist/{index-C4KjJWz6.js → index-T0Q3PGHR.js} +1 -1
  42. package/dist/{index-aKqRjQUm.js → index-p-NB3ZpM.js} +1 -1
  43. package/dist/index.browser.js +4 -4
  44. package/dist/index.browser.js.map +1 -1
  45. package/dist/index.cjs +7 -7
  46. package/dist/index.js +14 -14
  47. package/dist/{minting_backend-C2prT8wt.js → minting_backend-B4uLtTro.js} +3 -3
  48. package/dist/minting_backend.js +5 -5
  49. package/dist/{orderbook-C374ThsT.js → orderbook-B1sPtV5g.js} +1 -1
  50. package/dist/orderbook.js +2 -2
  51. package/dist/{passport-OHHUG62b.js → passport-CQup9ovw.js} +3 -3
  52. package/dist/passport.js +4 -4
  53. package/dist/{webhook-D7ErKnai.js → webhook-BHV3SsD9.js} +1 -1
  54. package/dist/webhook.js +2 -2
  55. package/dist/{x-BdJ3CeMm.js → x-Dh6qTC4X.js} +3 -3
  56. package/dist/x.js +4 -4
  57. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { A as APIError, B as BlockchainData } from './index-BP66zBHl.js';
2
- import { i as index } from './index-aKqRjQUm.js';
1
+ import { A as APIError, B as BlockchainData } from './index-CJ_oTRNs.js';
2
+ import { i as index } from './index-p-NB3ZpM.js';
3
3
 
4
4
  var blockchain_data = /*#__PURE__*/Object.freeze({
5
5
  __proto__: null,
@@ -1,6 +1,6 @@
1
- export { A as APIError, B as BlockchainData } from './index-BP66zBHl.js';
2
- export { i as Types } from './index-aKqRjQUm.js';
3
- import './index-CDxWXvoa.js';
1
+ export { A as APIError, B as BlockchainData } from './index-CJ_oTRNs.js';
2
+ export { i as Types } from './index-p-NB3ZpM.js';
3
+ import './index-DNiLGo5S.js';
4
4
  import 'axios';
5
5
  import 'lru-memorise';
6
6
  import 'global-const';
@@ -1,9 +1,9 @@
1
- import { r as reactExports, I as IMTBLWidgetEvents, A as AddTokensEventType, w as getDefaultExportFromCjs, x as commonjsGlobal, u as useTranslation, p as jsxs, o as jsx, M as MenuItem, y as tokenValueFormat, D as DEFAULT_TOKEN_FORMATTING_DECIMALS, z as BigNumber, F as Sticker, G as Stack, H as Body, J as hFlex, K as centerFlexChildren, N as Icon, Q as Badge, R as getRemoteVideo, T as FramedVideo, U as listVariants, X as motion, Y as listItemVariants, Z as Banner, _ as Fragment, $ as Divider, a0 as useAnalytics, a1 as useProvidersContext, a2 as UserJourney, a3 as EllipsizedText, a4 as Drawer, a5 as isPassportProvider, a6 as Tooltip, a7 as Box, a8 as Heading, a9 as Button, aa as WalletDrawer, ab as UnableToConnectDrawer, ac as WalletProviderRdns, ad as removeSpace, ae as getProviderSlugFromRdns, af as Web3Provider, ag as connectEIP6963Provider, ah as identifyUser, ai as ConnectEIP6963ProviderError, aj as ProvidersContextActions, j as ChainId, ak as commonjsRequire, al as getRemoteImage, am as vFlex, an as OnboardingPagination, ao as ViewContext, ap as useHandover, aq as HandoverTarget, ar as EventTargetContext, V as ViewActions, as as getRemoteRive, at as Trans, au as Link, av as keyframes, aw as getDefaultTokenImage, ax as TokenFilterTypes, h as getL2ChainId, ay as isNativeToken, az as getTokenImageByAddress, aA as SmartClone, aB as FramedImage, aC as FramedIcon, aD as ButtCon, aE as TextInput, aF as VerticalMenu, aG as fetchRiskAssessment, aH as isAddressSanctioned, aI as useInjectedProviders, aJ as trackFlow, aK as HeroFormControl, aL as HeroTextInput, aM as SimpleLayout, m as SharedViews, aN as orchestrationEvents, aO as requireSecp256k1$1, aP as requireLib_commonjs, aQ as require$$0$2, aR as bech32$2, aS as bnExports$1, aT as require$$0$3, aU as getAugmentedNamespace, aV as require$$0$4, aW as minimalisticAssert, aX as require$$2, aY as hash$6, aZ as trackError, a_ as MaxUint256, a$ as merge$2, b0 as SvgIcon, b1 as WalletWarningHero, b2 as Environment, b3 as t, b4 as PriceDisplay, L as LoadingView, b5 as useTheme, b6 as viewReducer, b7 as initialViewState, b8 as isValidAddress, b9 as amountInputValidation, ba as CloudImage, E as ErrorView, bb as ServiceUnavailableErrorView } from './index-Bj-EHPwO.js';
2
- import { f as formatUnits, p as parseUnits } from './index-BAkbAfHQ.js';
3
- import { r as retry, T as TokenImage } from './TokenImage-zqxHMH6Q.js';
4
- import { H as HandoverContent } from './HandoverContent-BKYZunUN.js';
5
- import { C as Contract } from './index-D1CE-3qJ.js';
6
- import { F as FeesBreakdown } from './FeesBreakdown-DMGyEpeX.js';
1
+ import { r as reactExports, I as IMTBLWidgetEvents, A as AddTokensEventType, w as getDefaultExportFromCjs, x as commonjsGlobal, u as useTranslation, p as jsxs, o as jsx, M as MenuItem, y as tokenValueFormat, D as DEFAULT_TOKEN_FORMATTING_DECIMALS, z as BigNumber, F as Sticker, G as Fragment, H as Stack, J as Body, K as hFlex, N as centerFlexChildren, Q as Icon, R as Badge, T as getRemoteVideo, U as FramedVideo, X as listVariants, Y as motion, Z as listItemVariants, _ as Banner, $ as Divider, a0 as useAnalytics, a1 as useProvidersContext, a2 as UserJourney, a3 as EllipsizedText, a4 as Drawer, a5 as isPassportProvider, a6 as Tooltip, a7 as Box, a8 as Heading, a9 as Button, aa as WalletDrawer, ab as UnableToConnectDrawer, ac as WalletProviderRdns, ad as removeSpace, ae as getProviderSlugFromRdns, af as Web3Provider, ag as connectEIP6963Provider, ah as identifyUser, ai as ConnectEIP6963ProviderError, aj as ProvidersContextActions, j as ChainId, ak as commonjsRequire, al as getRemoteImage, am as vFlex, an as OnboardingPagination, ao as ViewContext, ap as useHandover, aq as HandoverTarget, ar as EventTargetContext, V as ViewActions, as as getRemoteRive, at as Trans, au as Link, av as keyframes, aw as getDefaultTokenImage, ax as TokenFilterTypes, h as getL2ChainId, ay as isNativeToken, az as getTokenImageByAddress, aA as SmartClone, aB as FramedImage, aC as FramedIcon, aD as ButtCon, aE as TextInput, aF as VerticalMenu, aG as fetchRiskAssessment, aH as isAddressSanctioned, aI as useInjectedProviders, aJ as trackFlow, aK as HeroFormControl, aL as SimpleLayout, m as SharedViews, aM as orchestrationEvents, aN as HeroTextInput, aO as requireSecp256k1$1, aP as requireLib_commonjs, aQ as require$$0$2, aR as bech32$2, aS as bnExports$1, aT as require$$0$3, aU as getAugmentedNamespace, aV as require$$0$4, aW as minimalisticAssert, aX as require$$2, aY as hash$6, aZ as trackError, a_ as MaxUint256, a$ as merge$2, b0 as SvgIcon, b1 as WalletWarningHero, b2 as Environment, b3 as t, b4 as PriceDisplay, L as LoadingView, b5 as useTheme, b6 as viewReducer, b7 as initialViewState, b8 as isValidAddress, b9 as amountInputValidation, ba as CloudImage, E as ErrorView, bb as ServiceUnavailableErrorView } from './index-I7NQs2yT.js';
2
+ import { f as formatUnits, p as parseUnits } from './index-B7IP9SJX.js';
3
+ import { r as retry, T as TokenImage } from './TokenImage-Wgpb1UNJ.js';
4
+ import { H as HandoverContent } from './HandoverContent-t9r-oBxF.js';
5
+ import { C as Contract } from './index-Cqrf-cz8.js';
6
+ import { F as FeesBreakdown } from './FeesBreakdown-yRB20JH-.js';
7
7
 
8
8
  /**
9
9
  * The function `useInterval` sets up an interval that repeatedly calls a given callback function with
@@ -1449,7 +1449,9 @@ function RouteOption({ routeData, onClick, chains, disabled = false, isFastest =
1449
1449
  size,
1450
1450
  onClick: disabled ? undefined : handleClick,
1451
1451
  };
1452
- return (jsxs(MenuItem, { ...menuItemProps, children: [jsx(MenuItem.Label, { children: fromToken.name }), chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }), jsx(MenuItem.FramedImage, { circularFrame: true, use: jsx("img", { src: fromToken.iconUrl, alt: fromToken.name }) })] })), jsx(MenuItem.Caption, { children: `${t('views.ADD_TOKENS.fees.balance')} ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}` }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) }), jsxs(MenuItem.BottomSlot, { children: [jsx(MenuItem.BottomSlot.Divider, {}), jsxs(Stack, { rc: jsx("span", {}), direction: "row", justifyContent: "space-between", sx: {
1452
+ return (jsxs(MenuItem, { ...menuItemProps, children: [jsx(MenuItem.Label, { children: fromToken.name }), chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }), jsx(MenuItem.FramedImage, { circularFrame: true, use: jsx("img", { src: fromToken.iconUrl, alt: fromToken.name }) })] })), jsxs(MenuItem.Caption, { children: [`${t('views.ADD_TOKENS.fees.balance')} ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}`, routeData.isInsufficientGas && (jsxs(Fragment, { children: [jsx("br", {}), jsx("span", { style: { color: '#FF637F' }, children: t('views.ADD_TOKENS.noGasRouteMessage', {
1453
+ token: routeData.route.route.estimate.gasCosts[0].token.symbol,
1454
+ }) })] }))] }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) }), jsxs(MenuItem.BottomSlot, { children: [jsx(MenuItem.BottomSlot.Divider, {}), jsxs(Stack, { rc: jsx("span", {}), direction: "row", justifyContent: "space-between", sx: {
1453
1455
  w: '100%',
1454
1456
  }, children: [jsxs(Body, { sx: {
1455
1457
  ...hFlex,
@@ -1525,12 +1527,20 @@ const sortRoutesByFastestTime = (routes) => {
1525
1527
  if (!routes)
1526
1528
  return [];
1527
1529
  return routes.slice().sort((a, b) => {
1530
+ // Prioritize isInsufficientGas = false
1531
+ if (a.isInsufficientGas !== b.isInsufficientGas) {
1532
+ return a.isInsufficientGas ? 1 : -1;
1533
+ }
1534
+ // Sort by estimatedRouteDuration if isInsufficientGas is the same
1528
1535
  const timeA = a.route.route.estimate.estimatedRouteDuration;
1529
1536
  const timeB = b.route.route.estimate.estimatedRouteDuration;
1530
1537
  return timeA - timeB;
1531
1538
  });
1532
1539
  };
1533
1540
 
1541
+ const SQUID_SDK_BASE_URL = 'https://apiplus.squidrouter.com';
1542
+ const SQUID_NATIVE_TOKEN = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
1543
+
1534
1544
  const BASE_SLIPPAGE = 0.02;
1535
1545
  const useRoutes = () => {
1536
1546
  const latestRequestIdRef = reactExports.useRef(0);
@@ -1691,30 +1701,63 @@ const useRoutes = () => {
1691
1701
  return {};
1692
1702
  }
1693
1703
  };
1694
- const getRoutes = async (squid, amountDataArray, toTokenAddress) => {
1695
- const routePromises = amountDataArray.map((data) => getRoute(squid, data.fromToken, data.toToken, toTokenAddress, data.fromAmount, data.toAmount).then((route) => ({
1696
- amountData: { ...data, additionalBuffer: route.additionalBuffer },
1697
- route: route.route,
1698
- })));
1699
- const routesData = await Promise.all(routePromises);
1700
- return routesData.filter((route) => route?.route !== undefined);
1704
+ const getRoutesWithFeesValidation = async (squid, toTokenAddress, balances, fromAmountArray) => {
1705
+ const getGasCost = (route, chainId) => (route.route?.route.estimate.gasCosts || [])
1706
+ .filter((gasCost) => gasCost.token.chainId === chainId.toString())
1707
+ .reduce((sum, gasCost) => sum + parseFloat(formatUnits(gasCost.amount, gasCost.token.decimals)), 0);
1708
+ const getTotalFees = (route, chainId) => (route.route?.route.estimate.feeCosts || [])
1709
+ .filter((fee) => fee.token.chainId === chainId.toString())
1710
+ .reduce((sum, fee) => sum + parseFloat(formatUnits(fee.amount, fee.token.decimals)), 0);
1711
+ const findUserGasBalance = (chainId) => balances.find((balance) => balance.address.toLowerCase() === SQUID_NATIVE_TOKEN.toLowerCase()
1712
+ && balance.chainId.toString() === chainId.toString());
1713
+ const hasSufficientNativeTokenBalance = (userGasBalance, fromAmount, fromToken, totalGasCost, totalFeeCost) => {
1714
+ if (!userGasBalance)
1715
+ return false;
1716
+ const userBalance = parseFloat(formatUnits(userGasBalance.balance, userGasBalance.decimals));
1717
+ // If the fromToken is the native token, validate balance for both fromAmount and gas + fee costs
1718
+ // Otherwise, only validate balance for gas + fee costs
1719
+ const requiredAmount = fromToken.address.toLowerCase() === SQUID_NATIVE_TOKEN.toLowerCase()
1720
+ ? parseFloat(fromAmount) + totalGasCost + totalFeeCost
1721
+ : totalGasCost + totalFeeCost;
1722
+ return userBalance >= requiredAmount;
1723
+ };
1724
+ const routePromises = fromAmountArray.map(async (data) => {
1725
+ try {
1726
+ const routeResponse = await getRoute(squid, data.fromToken, data.toToken, toTokenAddress, data.fromAmount, data.toAmount);
1727
+ if (!routeResponse?.route)
1728
+ return null;
1729
+ const gasCost = getGasCost(routeResponse, data.balance.chainId);
1730
+ const feeCost = getTotalFees(routeResponse, data.balance.chainId);
1731
+ const userGasBalance = findUserGasBalance(data.balance.chainId);
1732
+ return {
1733
+ amountData: data,
1734
+ route: routeResponse.route,
1735
+ isInsufficientGas: !hasSufficientNativeTokenBalance(userGasBalance, data.fromAmount, data.fromToken, gasCost, feeCost),
1736
+ };
1737
+ }
1738
+ catch (error) {
1739
+ return null;
1740
+ }
1741
+ });
1742
+ const routesData = (await Promise.all(routePromises)).filter((route) => route !== null);
1743
+ return routesData;
1701
1744
  };
1702
1745
  const fetchRoutesWithRateLimit = async (squid, tokens, balances, toChanId, toTokenAddress, toAmount, bulkNumber = 5, delayMs = 1000, isSwapAllowed = true) => {
1703
1746
  const currentRequestId = ++latestRequestIdRef.current;
1704
- let amountDataArray = getSufficientFromAmounts(tokens, balances, toChanId, toTokenAddress, toAmount);
1747
+ let fromAmountDataArray = getSufficientFromAmounts(tokens, balances, toChanId, toTokenAddress, toAmount);
1705
1748
  if (!isSwapAllowed) {
1706
- amountDataArray = amountDataArray.filter((amountData) => amountData.balance.chainId !== toChanId);
1749
+ fromAmountDataArray = fromAmountDataArray.filter((amountData) => amountData.balance.chainId !== toChanId);
1707
1750
  }
1708
1751
  let allRoutes = [];
1709
- await Promise.all(amountDataArray
1752
+ await Promise.all(fromAmountDataArray
1710
1753
  .reduce((acc, _, i) => {
1711
1754
  if (i % bulkNumber === 0) {
1712
- acc.push(amountDataArray.slice(i, i + bulkNumber));
1755
+ acc.push(fromAmountDataArray.slice(i, i + bulkNumber));
1713
1756
  }
1714
1757
  return acc;
1715
1758
  }, [])
1716
- .map(async (slicedAmountDataArray) => {
1717
- allRoutes.push(...(await getRoutes(squid, slicedAmountDataArray, toTokenAddress)));
1759
+ .map(async (slicedFromAmountDataArray) => {
1760
+ allRoutes.push(...(await getRoutesWithFeesValidation(squid, toTokenAddress, balances, slicedFromAmountDataArray)));
1718
1761
  await delay(delayMs);
1719
1762
  }));
1720
1763
  if (!isSwapAllowed) {
@@ -1774,7 +1817,9 @@ function SelectedRouteOption({ checkout, routeData, chains, loading = false, wit
1774
1817
  }
1775
1818
  return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [jsx(MenuItem.FramedIcon, { icon: icon, variant: "bold", circularFrame: true, emphasized: false }), jsx(MenuItem.Caption, { children: copy })] }));
1776
1819
  }
1777
- return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [chain && (jsxs(Sticker, { position: { x: 'rightInside', y: 'bottomInside' }, children: [jsxs(Tooltip, { size: "small", children: [jsx(Tooltip.Target, { children: jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }) }), jsx(Tooltip.Content, { id: "route_tooltip_content", children: chain.name })] }), jsx(MenuItem.FramedImage, { circularFrame: true, padded: true, use: jsx("img", { src: fromToken?.iconUrl, alt: fromToken?.name }) })] })), jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { w: '100%' }, children: [jsxs(Stack, { gap: "0px", children: [jsx(MenuItem.Label, { children: fromToken?.name }), jsx(MenuItem.Caption, { children: `${t('views.ADD_TOKENS.fees.balance')} ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}` })] }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) })] })] }));
1820
+ return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [chain && (jsxs(Sticker, { position: { x: 'rightInside', y: 'bottomInside' }, children: [jsxs(Tooltip, { size: "small", children: [jsx(Tooltip.Target, { children: jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }) }), jsx(Tooltip.Content, { id: "route_tooltip_content", children: chain.name })] }), jsx(MenuItem.FramedImage, { circularFrame: true, padded: true, use: jsx("img", { src: fromToken?.iconUrl, alt: fromToken?.name }) })] })), jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { w: '100%' }, children: [jsxs(Stack, { gap: "0px", children: [jsx(MenuItem.Label, { children: fromToken?.name }), jsxs(MenuItem.Caption, { children: [`${t('views.ADD_TOKENS.fees.balance')} ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}`, routeData?.isInsufficientGas && (jsxs(Fragment, { children: [jsx("br", {}), jsx("span", { style: { color: '#FF637F' }, children: t('views.ADD_TOKENS.noGasRouteMessage', {
1821
+ token: routeData.route.route.estimate.gasCosts[0].token.symbol,
1822
+ }) })] }))] })] }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) })] })] }));
1778
1823
  }
1779
1824
 
1780
1825
  const disabledStyles = {
@@ -1974,9 +2019,6 @@ function PayWithWalletDrawer({ visible, onClose, onConnect, onPayWithCard, walle
1974
2019
  : t('drawers.wallet.payWithHeading'), visible: visible, onClose: onClose, providerType: "from", walletOptions: walletOptions, disabledOptions: disabledOptions, bottomSlot: payWithCardItem, onConnect: handleOnConnect, shouldIdentifyUser: false }));
1975
2020
  }
1976
2021
 
1977
- const SQUID_SDK_BASE_URL = 'https://apiplus.squidrouter.com';
1978
- const SQUID_NATIVE_TOKEN = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
1979
-
1980
2022
  function convertToUsd(tokens, amount, token) {
1981
2023
  if (!tokens || !amount || !token?.address) {
1982
2024
  return 0;
@@ -4897,6 +4939,7 @@ const FIXED_HANDOVER_DURATION = 2000;
4897
4939
  const APPROVE_TXN_ANIMATION = '/access_coins.riv';
4898
4940
  const EXECUTE_TXN_ANIMATION = '/swapping_coins.riv';
4899
4941
  const TOKEN_PRIORITY_ORDER = ['IMX', 'USDC', 'ETH'];
4942
+ const TOOLKIT_SQUID_URL = 'https://toolkit.immutable.com/squid-bridge/';
4900
4943
 
4901
4944
  const useError = (environment) => {
4902
4945
  const { viewDispatch } = reactExports.useContext(ViewContext);
@@ -5159,7 +5202,7 @@ function TokenDrawerMenu({ checkout, config, toTokenAddress, addTokensState, add
5159
5202
  pos: 'relative',
5160
5203
  cursor: 'pointer',
5161
5204
  // eslint-disable-next-line @typescript-eslint/naming-convention
5162
- '&:hover > div:first-child': {
5205
+ '&:hover > div:first-of-type': {
5163
5206
  boxShadow: ({ base }) => `0 0 0 ${base.border.size[200]} ${base.color.text.body.primary}`,
5164
5207
  },
5165
5208
  }, children: [jsx(FramedImage, { size: "xLarge", use: (jsx(TokenImage, { src: addTokensState.selectedToken?.icon, name: addTokensState.selectedToken?.name, defaultImage: defaultTokenImage })), padded: true, emphasized: true, circularFrame: true, sx: {
@@ -5192,6 +5235,37 @@ const checkSanctionedAddresses = async (addresses, config) => {
5192
5235
  return isAddressSanctioned(result);
5193
5236
  };
5194
5237
 
5238
+ function NoGasHero() {
5239
+ return (jsx(Box, { testId: "no-gas-hero", children: jsxs("svg", { width: "431", height: "243", viewBox: "0 0 431 243", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M143.152 175.023C143.116 180.739 146.858 186.445 154.383 190.79C161.909 195.135 171.795 197.295 181.697 197.274C191.598 197.254 201.51 195.053 209.093 190.677C216.675 186.301 220.484 180.574 220.52 174.863V185.172C220.484 190.888 216.67 196.609 209.093 200.986C201.51 205.362 191.598 207.563 181.697 207.583C171.795 207.604 161.909 205.444 154.383 201.099C146.858 196.754 143.116 191.048 143.152 185.332V175.023Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M181.697 197.275C171.795 197.295 161.909 195.135 154.383 190.79C146.858 186.445 143.116 180.739 143.152 175.023V185.332C143.116 191.048 146.858 196.754 154.383 201.099C161.909 205.444 171.795 207.604 181.697 207.583V197.275Z", fill: "#0D0D0D" }), jsx("path", { d: "M181.964 197.301C203.329 197.167 220.585 187.059 220.508 174.724C220.43 162.389 203.048 152.499 181.683 152.633C160.319 152.767 143.063 162.875 143.14 175.21C143.218 187.545 160.6 197.435 181.964 197.301Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M176.573 168.751L176.382 167.359L175.717 162.535L179.202 160.499L180.46 169.725C180.46 169.725 178.661 169.648 178.058 169.627C177.253 169.591 176.614 169.215 176.573 168.756V168.751ZM161.496 170.849C161.496 170.849 175.094 171.472 179.63 171.483C180.346 171.483 180.754 171.787 180.81 172.194C181.027 173.689 181.016 173.72 181.016 173.72L158.033 172.874L161.496 170.849ZM188.8 180.622L188.99 182.013L189.655 186.838L186.171 188.874L184.913 179.647C184.913 179.647 186.712 179.725 187.315 179.745C188.119 179.781 188.758 180.158 188.8 180.616V180.622ZM181.357 176.215C181.851 179.957 183.32 190.539 183.32 190.539L179.578 192.729L177.692 178.395C177.63 177.936 176.991 177.57 176.213 177.55L151.559 176.653L155.161 174.544L179.991 175.467C180.676 175.519 181.3 175.818 181.362 176.209L181.357 176.215ZM203.825 178.555L186.923 177.905L186.042 177.848C185.248 177.818 184.599 177.436 184.558 176.977L182.073 158.818L185.666 156.715L187.836 174.797C187.877 175.256 188.526 175.637 189.32 175.668L207.577 176.359L203.825 178.555ZM210.449 174.684C210.449 174.684 196.799 174.153 192.243 173.977C191.722 173.957 191.253 173.787 190.995 173.539C190.872 173.39 190.794 173.189 190.779 173.029L190.671 171.849L213.856 172.694L210.449 174.689V174.684Z", fill: "#0D0D0D" }), jsx("path", { d: "M143.152 159.559C143.116 165.276 146.858 170.982 154.383 175.327C161.909 179.672 171.795 181.832 181.697 181.811C191.598 181.791 201.51 179.59 209.093 175.214C216.675 170.837 220.484 165.111 220.52 159.4V169.709C220.484 175.425 216.67 181.146 209.093 185.523C201.51 189.899 191.598 192.1 181.697 192.12C171.795 192.141 161.909 189.981 154.383 185.636C146.858 181.291 143.116 175.585 143.152 169.868V159.559Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M181.697 181.811C171.795 181.832 161.909 179.672 154.383 175.327C146.858 170.982 143.116 165.276 143.152 159.56V169.869C143.116 175.585 146.858 181.291 154.383 185.636C161.909 189.981 171.795 192.141 181.697 192.12V181.811Z", fill: "#0D0D0D" }), jsx("path", { d: "M181.964 181.838C203.329 181.704 220.585 171.595 220.508 159.261C220.43 146.926 203.048 137.036 181.683 137.17C160.319 137.304 143.063 147.412 143.14 159.747C143.218 172.082 160.6 181.972 181.964 181.838Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M176.573 153.287L176.382 151.895L175.717 147.071L179.202 145.035L180.46 154.261C180.46 154.261 178.661 154.184 178.058 154.163C177.253 154.127 176.614 153.751 176.573 153.292V153.287ZM161.496 155.385C161.496 155.385 175.094 156.009 179.63 156.019C180.346 156.019 180.754 156.323 180.81 156.73C181.027 158.225 181.016 158.256 181.016 158.256L158.033 157.411L161.496 155.385ZM188.8 165.158L188.99 166.549L189.655 171.374L186.171 173.41L184.913 164.183C184.913 164.183 186.712 164.261 187.315 164.282C188.119 164.318 188.758 164.694 188.8 165.153V165.158ZM181.357 160.751C181.851 164.493 183.32 175.075 183.32 175.075L179.578 177.266L177.692 162.931C177.63 162.472 176.991 162.106 176.213 162.086L151.559 161.189L155.161 159.081L179.991 160.003C180.676 160.055 181.3 160.354 181.362 160.745L181.357 160.751ZM203.825 163.091L186.923 162.441L186.042 162.385C185.248 162.354 184.599 161.972 184.558 161.514L182.073 143.354L185.666 141.251L187.836 159.333C187.877 159.792 188.526 160.173 189.32 160.204L207.577 160.895L203.825 163.091ZM210.449 159.22C210.449 159.22 196.799 158.689 192.243 158.514C191.722 158.493 191.253 158.323 190.995 158.076C190.872 157.926 190.794 157.725 190.779 157.565L190.671 156.385L213.856 157.23L210.449 159.225V159.22Z", fill: "#0D0D0D" }), jsx("path", { d: "M143.152 144.096C143.116 149.812 146.858 155.518 154.383 159.864C161.909 164.209 171.795 166.369 181.697 166.348C191.598 166.327 201.51 164.126 209.093 159.75C216.675 155.374 220.484 149.647 220.52 143.936V154.245C220.484 159.962 216.67 165.683 209.093 170.059C201.51 174.435 191.598 176.636 181.697 176.657C171.795 176.678 161.909 174.518 154.383 170.173C146.858 165.827 143.116 160.121 143.152 154.405V144.096Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M181.697 166.348C171.795 166.369 161.909 164.209 154.383 159.864C146.858 155.518 143.116 149.813 143.152 144.096V154.405C143.116 160.121 146.858 165.827 154.383 170.173C161.909 174.518 171.795 176.678 181.697 176.657V166.348Z", fill: "#0D0D0D" }), jsx("path", { d: "M181.964 166.374C203.329 166.24 220.585 156.132 220.508 143.797C220.43 131.463 203.048 121.572 181.683 121.707C160.319 121.841 143.063 131.949 143.14 144.284C143.218 156.618 160.6 166.509 181.964 166.374Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M176.573 137.824L176.382 136.432L175.717 131.608L179.202 129.572L180.46 138.798C180.46 138.798 178.661 138.721 178.058 138.7C177.253 138.664 176.614 138.288 176.573 137.829V137.824ZM161.496 139.922C161.496 139.922 175.094 140.546 179.63 140.556C180.346 140.556 180.754 140.86 180.81 141.267C181.027 142.762 181.016 142.793 181.016 142.793L158.033 141.948L161.496 139.922ZM188.8 149.695L188.99 151.087L189.655 155.911L186.171 157.947L184.913 148.721C184.913 148.721 186.712 148.798 187.315 148.819C188.119 148.855 188.758 149.231 188.8 149.69V149.695ZM181.357 145.288C181.851 149.03 183.32 159.612 183.32 159.612L179.578 161.803L177.692 147.468C177.63 147.009 176.991 146.643 176.213 146.623L151.559 145.726L155.161 143.618L179.991 144.54C180.676 144.592 181.3 144.891 181.362 145.283L181.357 145.288ZM203.825 147.628L186.923 146.978L186.042 146.922C185.248 146.891 184.599 146.509 184.558 146.051L182.073 127.891L185.666 125.788L187.836 143.87C187.877 144.329 188.526 144.71 189.32 144.741L207.577 145.432L203.825 147.628ZM210.449 143.757C210.449 143.757 196.799 143.226 192.243 143.051C191.722 143.03 191.253 142.86 190.995 142.613C190.872 142.463 190.794 142.262 190.779 142.102L190.671 140.922L213.856 141.767L210.449 143.762V143.757Z", fill: "#0D0D0D" }), jsx("path", { d: "M143.152 128.632C143.116 134.349 146.858 140.055 154.383 144.4C161.909 148.745 171.795 150.905 181.697 150.884C191.598 150.864 201.51 148.663 209.093 144.287C216.675 139.91 220.484 134.184 220.52 128.473V138.782C220.484 144.498 216.67 150.219 209.093 154.596C201.51 158.972 191.598 161.173 181.697 161.193C171.795 161.214 161.909 159.054 154.383 154.709C146.858 150.364 143.116 144.658 143.152 138.941V128.632Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M181.697 150.884C171.795 150.905 161.909 148.745 154.383 144.4C146.858 140.055 143.116 134.349 143.152 128.633V138.942C143.116 144.658 146.858 150.364 154.383 154.709C161.909 159.054 171.795 161.214 181.697 161.193V150.884Z", fill: "#0D0D0D" }), jsx("path", { d: "M181.964 150.911C203.329 150.777 220.585 140.668 220.508 128.334C220.43 115.999 203.048 106.109 181.683 106.243C160.319 106.377 143.063 116.485 143.14 128.82C143.218 141.155 160.6 151.045 181.964 150.911Z", fill: "#F7F7F7", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M217.788 148.205C202.374 174.772 202.374 203.421 217.788 212.188C233.202 220.955 258.19 206.526 273.604 179.959C289.018 153.392 289.018 124.743 273.604 115.976C258.19 107.209 233.202 121.638 217.788 148.205ZM228.948 154.556C236.24 141.987 247.097 133.954 255.9 133.695L224.324 188.126C220.122 180.463 221.656 167.124 228.948 154.556ZM262.437 173.608C255.145 186.177 244.288 194.21 235.484 194.469L267.061 140.038C271.263 147.701 269.729 161.04 262.437 173.608Z", fill: "#FF637F", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M273.612 115.976L260.777 108.565C245.363 99.7984 220.374 114.227 204.96 140.801C189.546 167.368 189.546 196.018 204.96 204.785L217.795 212.195C202.381 203.429 202.381 174.779 217.795 148.212C233.202 121.638 258.19 107.209 273.605 115.983", fill: "#FF637F" }), jsx("path", { d: "M273.612 115.976L260.777 108.565C245.363 99.7984 220.374 114.227 204.96 140.801C189.546 167.368 189.546 196.018 204.96 204.785L217.795 212.195C202.381 203.429 202.381 174.779 217.795 148.212C233.202 121.638 258.19 107.209 273.605 115.983", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M228.948 154.555C236.24 141.987 247.097 133.954 255.901 133.695L224.324 188.126C220.122 180.463 221.656 167.124 228.948 154.555Z", fill: "#0D0D0D", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M262.444 173.616C255.152 186.184 244.296 194.217 235.492 194.476L267.068 140.045C271.27 147.708 269.736 161.047 262.444 173.616Z", fill: "#0D0D0D", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M204.953 140.794C189.539 167.361 189.539 196.011 204.953 204.777L217.788 212.188C202.374 203.421 202.374 174.772 217.788 148.205L204.953 140.794Z", fill: "#0D0D0D", stroke: "#0D0D0D", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }) }));
5240
+ }
5241
+
5242
+ function NotEnoughGasDrawer({ visible, routeData, onTryAgainClick, onToolkitClick, }) {
5243
+ const { t } = useTranslation();
5244
+ const tokenName = routeData?.route.route.estimate.gasCosts[0].token.symbol ?? '';
5245
+ return (jsx(Drawer, { size: "full", visible: visible, showHeaderBar: false, children: jsxs(Drawer.Content, { sx: {
5246
+ display: 'flex',
5247
+ flexDirection: 'column',
5248
+ justifyContent: 'space-between',
5249
+ alignItems: 'center',
5250
+ }, children: [jsx(NoGasHero, {}), jsxs(Box, { sx: {
5251
+ display: 'flex',
5252
+ flexDirection: 'column',
5253
+ alignItems: 'center',
5254
+ justifyContent: 'space-between',
5255
+ mb: 'base.spacing.x8',
5256
+ }, children: [jsx(Heading, { size: "small", sx: { textAlign: 'center', paddingX: 'base.spacing.x6', marginBottom: 'base.spacing.x3' }, children: t('views.ADD_TOKENS.noGasDrawer.heading', { token: tokenName }) }), jsx(Body, { sx: {
5257
+ color: 'base.color.text.body.secondary',
5258
+ textAlign: 'center',
5259
+ paddingX: 'base.spacing.x6',
5260
+ }, children: t('views.ADD_TOKENS.noGasDrawer.body') })] }), jsxs(Box, { sx: {
5261
+ display: 'flex',
5262
+ flexDirection: 'column',
5263
+ paddingX: 'base.spacing.x6',
5264
+ width: '100%',
5265
+ mb: 'base.spacing.x2',
5266
+ }, children: [jsx(Button, { sx: { width: '100%', mb: 'base.spacing.x4' }, testId: "non-passport-cta-button", variant: "primary", size: "large", onClick: onTryAgainClick, children: t('views.ADD_TOKENS.noGasDrawer.primaryAction') }), jsx(Button, { sx: { width: '100%', marginBottom: 'base.spacing.x10' }, testId: "non-passport-cta-button", variant: "tertiary", size: "large", onClick: onToolkitClick, children: t('views.ADD_TOKENS.noGasDrawer.secondaryAction', { token: tokenName }) })] })] }) }));
5267
+ }
5268
+
5195
5269
  function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOption = true, showSwapOption = true, showBridgeOption = true, onCloseButtonClick, showBackButton, onBackButtonClick, }) {
5196
5270
  const inputRef = reactExports.useRef(null);
5197
5271
  const { fetchRoutesWithRateLimit, resetRoutes } = useRoutes();
@@ -5211,6 +5285,7 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
5211
5285
  const [fetchingRoutes, setFetchingRoutes] = reactExports.useState(false);
5212
5286
  const [insufficientBalance, setInsufficientBalance] = reactExports.useState(false);
5213
5287
  const [isAmountInputSynced, setIsAmountInputSynced] = reactExports.useState(false);
5288
+ const [showNotEnoughGasDrawer, setShowNotEnoughGasDrawer] = reactExports.useState(false);
5214
5289
  const debouncedSetSelectedAmount = reactExports.useRef(debounce$2((value) => {
5215
5290
  addTokensDispatch({
5216
5291
  payload: {
@@ -5249,6 +5324,7 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
5249
5324
  isBridge: route.amountData.toToken.chainId !== route.amountData.fromToken.chainId,
5250
5325
  isSwap: route.amountData.toToken.chainId === route.amountData.fromToken.chainId,
5251
5326
  hasEmbeddedSwap: !!route.route.route.estimate.actions.find((action) => action.type === dist$3.ActionType.SWAP),
5327
+ isInsufficientGas: route.isInsufficientGas,
5252
5328
  },
5253
5329
  });
5254
5330
  }
@@ -5520,7 +5596,11 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
5520
5596
  && isAmountInputSynced;
5521
5597
  const loading = (routeInputsReady || fetchingRoutes)
5522
5598
  && !(selectedRouteData || insufficientBalance);
5523
- const readyToReview = routeInputsReady && !!toAddress && !!selectedRouteData && !loading;
5599
+ const readyToReview = routeInputsReady
5600
+ && !!toAddress
5601
+ && !!selectedRouteData
5602
+ && !selectedRouteData.isInsufficientGas
5603
+ && !loading;
5524
5604
  const handleWalletConnected = (providerType, provider, providerInfo) => {
5525
5605
  track({
5526
5606
  userJourney: UserJourney.ADD_TOKENS,
@@ -5559,49 +5639,61 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
5559
5639
  },
5560
5640
  });
5561
5641
  }, [id, experiments]);
5562
- return (jsx(SimpleLayout, { containerSx: { bg: 'transparent' }, header: (jsxs(Stack, { direction: "row", sx: {
5642
+ reactExports.useEffect(() => {
5643
+ if (selectedRouteData?.isInsufficientGas) {
5644
+ setShowNotEnoughGasDrawer(true);
5645
+ }
5646
+ else {
5647
+ setShowNotEnoughGasDrawer(false);
5648
+ }
5649
+ }, [selectedRouteData]);
5650
+ const handleToolkitClick = () => {
5651
+ setShowNotEnoughGasDrawer(false);
5652
+ window.open(TOOLKIT_SQUID_URL, '_blank');
5653
+ };
5654
+ return (jsxs(SimpleLayout, { containerSx: { bg: 'transparent' }, header: (jsxs(Stack, { direction: "row", sx: {
5563
5655
  pos: 'absolute',
5564
5656
  w: '100%',
5565
5657
  top: '0',
5566
5658
  pt: 'base.spacing.x4',
5567
5659
  px: 'base.spacing.x5',
5568
- }, justifyContent: "flex-start", children: [shouldShowBackButton && (jsx(ButtCon, { testId: "backButton", icon: "ArrowBackward", variant: "tertiary", size: "small", onClick: onBackButtonClick })), jsx(ButtCon, { variant: "tertiary", size: "small", icon: "Close", onClick: onCloseButtonClick, sx: { ml: 'auto' } })] })), children: jsxs(Stack, { alignItems: "center", sx: { flex: 1 }, children: [jsxs(Stack, { testId: "topSection", sx: {
5569
- flex: 1,
5570
- px: 'base.spacing.x2',
5571
- w: '100%',
5572
- pt: 'base.spacing.x1',
5573
- }, justifyContent: "center", alignItems: "center", children: [jsx(TokenDrawerMenu, { checkout: checkout, config: config, toTokenAddress: toTokenAddress, addTokensState: addTokensState, addTokensDispatch: addTokensDispatch }), showInitialEmptyState ? (jsx(Body, { weight: "bold", children: t('views.ADD_TOKENS.tokenSelection.buttonText') })) : (jsxs(HeroFormControl, { validationStatus: validateToAmount(inputValue).isValid || inputValue === '' ? 'success' : 'error', children: [jsxs(HeroFormControl.Label, { children: [t('views.ADD_TOKENS.tokenSelection.tokenLabel'), ' ', selectedToken.symbol] }), jsx(HeroTextInput, { inputRef: inputRef, testId: "add-tokens-amount-input", type: "text", value: inputValue, onChange: (event) => handleOnAmountInputChange(event), placeholder: "0", maxTextSize: "xLarge" }), jsx(HeroFormControl.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')}
5660
+ }, justifyContent: "flex-start", children: [shouldShowBackButton && (jsx(ButtCon, { testId: "backButton", icon: "ArrowBackward", variant: "tertiary", size: "small", onClick: onBackButtonClick })), jsx(ButtCon, { variant: "tertiary", size: "small", icon: "Close", onClick: onCloseButtonClick, sx: { ml: 'auto' } })] })), children: [jsxs(Stack, { alignItems: "center", sx: { flex: 1 }, children: [jsxs(Stack, { testId: "topSection", sx: {
5661
+ flex: 1,
5662
+ px: 'base.spacing.x2',
5663
+ w: '100%',
5664
+ pt: 'base.spacing.x1',
5665
+ }, justifyContent: "center", alignItems: "center", children: [jsx(TokenDrawerMenu, { checkout: checkout, config: config, toTokenAddress: toTokenAddress, addTokensState: addTokensState, addTokensDispatch: addTokensDispatch }), showInitialEmptyState ? (jsx(Body, { weight: "bold", children: t('views.ADD_TOKENS.tokenSelection.buttonText') })) : (jsxs(HeroFormControl, { validationStatus: validateToAmount(inputValue).isValid || inputValue === '' ? 'success' : 'error', children: [jsxs(HeroFormControl.Label, { children: [t('views.ADD_TOKENS.tokenSelection.tokenLabel'), ' ', selectedToken.symbol] }), jsx(HeroTextInput, { inputRef: inputRef, testId: "add-tokens-amount-input", type: "text", value: inputValue, onChange: (event) => handleOnAmountInputChange(event), placeholder: "0", maxTextSize: "xLarge" }), jsx(HeroFormControl.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')}
5574
5666
  $${getFormattedAmounts(selectedAmountUsd)}` })] }))] }), jsxs(Stack, { testId: "bottomSection", sx: {
5575
- alignSelf: 'stretch',
5576
- p: 'base.spacing.x3',
5577
- pb: 'base.spacing.x5',
5578
- bg: 'base.color.neutral.800',
5579
- bradtl: 'base.borderRadius.x8',
5580
- bradtr: 'base.borderRadius.x8',
5581
- }, gap: "base.spacing.x4", children: [jsxs(Stack, { gap: "0px", children: [jsx(SelectedWallet, { sx: selectedToken
5582
- && !fromAddress
5583
- && selectedAmount
5584
- ? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
5585
- : {}, label: t('views.ADD_TOKENS.walletSelection.from.label'), caption: t('views.ADD_TOKENS.walletSelection.from.caption'), providerInfo: {
5586
- ...fromProviderInfo,
5587
- address: fromAddress,
5588
- }, onClick: (event) => {
5589
- event.stopPropagation();
5590
- setShowPayWithDrawer(true);
5591
- }, children: selectedToken && fromAddress && selectedAmount && isAmountInputSynced && (jsxs(Fragment, { children: [jsx(MenuItem.BottomSlot.Divider, { sx: fromAddress ? { ml: 'base.spacing.x4' } : undefined }), jsx(SelectedRouteOption, { checkout: checkout, loading: loading, chains: chains, routeData: selectedRouteData, onClick: () => setShowOptionsDrawer(true), withSelectedWallet: !!fromAddress, insufficientBalance: insufficientBalance, showOnrampOption: shouldShowOnRampOption })] })) }), jsx(Stack, { sx: { pos: 'relative', h: 'base.spacing.x3' }, alignItems: "center", children: jsx(FramedIcon, { icon: "ArrowDown", sx: {
5592
- top: '0',
5593
- pos: 'absolute',
5594
- translate: '0 -30%',
5595
- bg: 'base.color.neutral.800',
5596
- } }) }), jsx(SelectedWallet, { sx: selectedToken
5597
- && fromAddress
5598
- && !toAddress
5599
- && selectedAmount
5600
- ? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
5601
- : {}, label: t('views.ADD_TOKENS.walletSelection.to.label'), caption: t('views.ADD_TOKENS.walletSelection.to.caption'), providerInfo: {
5602
- ...toProviderInfo,
5603
- address: toAddress,
5604
- }, chainInfo: getChainInfo(), onClick: () => setShowDeliverToDrawer(true), disabled: lockedToProvider })] }), jsx(Button, { testId: "add-tokens-button", size: "large", variant: readyToReview ? 'primary' : 'secondary', disabled: !readyToReview, onClick: handleReviewClick, sx: { opacity: readyToReview ? 1 : 0.5 }, children: t('views.ADD_TOKENS.review.buttonText') }), jsx(SquidFooter, {}), jsx(PayWithWalletDrawer, { visible: showPayWithDrawer, walletOptions: walletOptions, onClose: () => setShowPayWithDrawer(false), onPayWithCard: handleCardClick, onConnect: handleWalletConnected, insufficientBalance: insufficientBalance, showOnRampOption: shouldShowOnRampOption || !selectedToken }), jsx(OptionsDrawer, { checkout: checkout, routes: routes, showOnrampOption: shouldShowOnRampOption, showSwapOption: showSwapOption, showBridgeOption: showBridgeOption, visible: showOptionsDrawer, onClose: () => setShowOptionsDrawer(false), onCardClick: handleCardClick, onRouteClick: handleRouteClick, insufficientBalance: insufficientBalance }), jsx(DeliverToWalletDrawer, { visible: showDeliverToDrawer, walletOptions: walletOptions, onClose: handleDeliverToClose, onConnect: handleWalletConnected }), jsx(OnboardingDrawer, { environment: checkout?.config.environment })] })] }) }));
5667
+ alignSelf: 'stretch',
5668
+ p: 'base.spacing.x3',
5669
+ pb: 'base.spacing.x5',
5670
+ bg: 'base.color.neutral.800',
5671
+ bradtl: 'base.borderRadius.x8',
5672
+ bradtr: 'base.borderRadius.x8',
5673
+ }, gap: "base.spacing.x4", children: [jsxs(Stack, { gap: "0px", children: [jsx(SelectedWallet, { sx: selectedToken
5674
+ && !fromAddress
5675
+ && selectedAmount
5676
+ ? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
5677
+ : {}, label: t('views.ADD_TOKENS.walletSelection.from.label'), caption: t('views.ADD_TOKENS.walletSelection.from.caption'), providerInfo: {
5678
+ ...fromProviderInfo,
5679
+ address: fromAddress,
5680
+ }, onClick: (event) => {
5681
+ event.stopPropagation();
5682
+ setShowPayWithDrawer(true);
5683
+ }, children: selectedToken && fromAddress && selectedAmount && isAmountInputSynced && (jsxs(Fragment, { children: [jsx(MenuItem.BottomSlot.Divider, { sx: fromAddress ? { ml: 'base.spacing.x4' } : undefined }), jsx(SelectedRouteOption, { checkout: checkout, loading: loading, chains: chains, routeData: selectedRouteData, onClick: () => setShowOptionsDrawer(true), withSelectedWallet: !!fromAddress, insufficientBalance: insufficientBalance, showOnrampOption: shouldShowOnRampOption })] })) }), jsx(Stack, { sx: { pos: 'relative', h: 'base.spacing.x3' }, alignItems: "center", children: jsx(FramedIcon, { icon: "ArrowDown", sx: {
5684
+ top: '0',
5685
+ pos: 'absolute',
5686
+ translate: '0 -30%',
5687
+ bg: 'base.color.neutral.800',
5688
+ } }) }), jsx(SelectedWallet, { sx: selectedToken
5689
+ && fromAddress
5690
+ && !toAddress
5691
+ && selectedAmount
5692
+ ? { animation: `${PULSE_SHADOW} 2s infinite ease-in-out` }
5693
+ : {}, label: t('views.ADD_TOKENS.walletSelection.to.label'), caption: t('views.ADD_TOKENS.walletSelection.to.caption'), providerInfo: {
5694
+ ...toProviderInfo,
5695
+ address: toAddress,
5696
+ }, chainInfo: getChainInfo(), onClick: () => setShowDeliverToDrawer(true), disabled: lockedToProvider })] }), jsx(Button, { testId: "add-tokens-button", size: "large", variant: readyToReview ? 'primary' : 'secondary', disabled: !readyToReview, onClick: handleReviewClick, sx: { opacity: readyToReview ? 1 : 0.5 }, children: t('views.ADD_TOKENS.review.buttonText') }), jsx(SquidFooter, {}), jsx(PayWithWalletDrawer, { visible: showPayWithDrawer, walletOptions: walletOptions, onClose: () => setShowPayWithDrawer(false), onPayWithCard: handleCardClick, onConnect: handleWalletConnected, insufficientBalance: insufficientBalance, showOnRampOption: shouldShowOnRampOption || !selectedToken }), jsx(OptionsDrawer, { checkout: checkout, routes: routes, showOnrampOption: shouldShowOnRampOption, showSwapOption: showSwapOption, showBridgeOption: showBridgeOption, visible: showOptionsDrawer, onClose: () => setShowOptionsDrawer(false), onCardClick: handleCardClick, onRouteClick: handleRouteClick, insufficientBalance: insufficientBalance }), jsx(DeliverToWalletDrawer, { visible: showDeliverToDrawer, walletOptions: walletOptions, onClose: handleDeliverToClose, onConnect: handleWalletConnected }), jsx(OnboardingDrawer, { environment: checkout?.config.environment })] })] }), jsx(NotEnoughGasDrawer, { visible: showNotEnoughGasDrawer, routeData: selectedRouteData, onTryAgainClick: () => setShowNotEnoughGasDrawer(false), onToolkitClick: handleToolkitClick })] }));
5605
5697
  }
5606
5698
 
5607
5699
  var dist$2 = {};
@@ -173279,11 +173371,11 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
173279
173371
  state: RiveStateMachineInput.COMPLETED,
173280
173372
  headingText: t('views.ADD_TOKENS.handover.partialSuccess.heading'),
173281
173373
  subheadingText: (jsx(Trans, { i18nKey: t('views.ADD_TOKENS.handover.partialSuccess.subHeading'), components: {
173282
- squidLink: (jsx(Link, { size: "small", rc: (jsx("a", { target: "_blank", href: "https://toolkit.immutable.com/squid-bridge/", rel: "noreferrer" })) })),
173374
+ squidLink: (jsx(Link, { size: "small", rc: (jsx("a", { target: "_blank", href: TOOLKIT_SQUID_URL, rel: "noreferrer" })) })),
173283
173375
  } })),
173284
173376
  primaryButtonText: t('views.ADD_TOKENS.handover.partialSuccess.primaryButtonText'),
173285
173377
  onPrimaryButtonClick: () => {
173286
- window.open('https://toolkit.immutable.com/squid-bridge/', '_blank', 'noreferrer');
173378
+ window.open(TOOLKIT_SQUID_URL, '_blank', 'noreferrer');
173287
173379
  },
173288
173380
  secondaryButtonText: t('views.ADD_TOKENS.handover.partialSuccess.secondaryButtonText'),
173289
173381
  onSecondaryButtonClick: () => {
@@ -1,12 +1,12 @@
1
- import { bJ as axios, bK as CheckoutErrorType, bL as IMMUTABLE_API_BASE_URL, r as reactExports, I as IMTBLWidgetEvents, B as BridgeEventType, p as jsxs, o as jsx, bM as ShimmerBox, M as MenuItem, G as Stack, u as useTranslation, H as Body, a9 as Button, a7 as Box, bN as PASSPORT_URL, au as Link, bO as getChainIdBySlug, bP as getChainImage, bQ as networkName, aB as FramedImage, a3 as EllipsizedText, N as Icon, a0 as useAnalytics, a2 as UserJourney, bR as Accordion, $ as Divider, ao as ViewContext, _ as Fragment, V as ViewActions, bS as useWalletConnect, bT as isWalletConnectProvider, bU as Logo, bV as RawImage, bW as AXELAR_SCAN_URL, ay as isNativeToken, az as getTokenImageByAddress, bX as getNativeSymbolByChainSlug, be as calculateCryptoToFiat, ar as EventTargetContext, a5 as isPassportProvider, i as getL1ChainId, ax as TokenFilterTypes, h as getL2ChainId, ac as WalletProviderRdns, af as Web3Provider, aI as useInjectedProviders, bl as HeaderNavigation, bo as FooterLogo, aa as WalletDrawer, aM as SimpleLayout, bY as getChainSlugById, bZ as JsonRpcProvider, b_ as DEFAULT_TRANSACTIONS_RETRY_POLICY, L as LoadingView, j as ChainId, b$ as getChainNameById, b5 as useTheme, a8 as Heading, c0 as getWalletProviderNameByProvider, c1 as isMetaMaskProvider, c2 as WalletProviderName, a4 as Drawer, aD as ButtCon, c3 as ButtonNavigationStyles, aN as orchestrationEvents, y as tokenValueFormat, c4 as formatZeroAmount, c5 as NATIVE, aG as fetchRiskAssessment, b9 as amountInputValidation, al as getRemoteImage, ba as CloudImage, c6 as ETH_TOKEN_SYMBOL, z as BigNumber, b2 as Environment, c7 as GasEstimateType, c8 as DEFAULT_TOKEN_DECIMALS, c9 as DEFAULT_QUOTE_REFRESH_INTERVAL, ca as addChainChangedListener, cb as removeChainChangedListener, aH as isAddressSanctioned, cc as IMX_TOKEN_SYMBOL, m as SharedViews, cd as dist, ce as CHECKOUT_CDN_BASE_URL, cf as heroBackGroundStyles, cg as heroImageStyles, Q as Badge, ch as SimpleTextBody, ci as FooterButton, cj as getEthTokenImage, ck as WITHDRAWAL_CLAIM_GAS_LIMIT, aw as getDefaultTokenImage, b6 as viewReducer, b7 as initialViewState, cl as BridgeConfiguration, cm as ImmutableConfiguration, cn as TokenBridge, co as StatusView, bp as StatusType, E as ErrorView, bb as ServiceUnavailableErrorView, cp as ETH_SEPOLIA_TO_ZKEVM_TESTNET, cq as ETH_SEPOLIA_TO_ZKEVM_DEVNET, cr as ETH_MAINNET_TO_ZKEVM_MAINNET } from './index-Bj-EHPwO.js';
2
- import { C as CryptoFiatContext, a as CryptoFiatActions, b as CryptoFiatProvider } from './CryptoFiatProvider-zCa2sVd8.js';
3
- import { T as TokenImage, r as retry } from './TokenImage-zqxHMH6Q.js';
4
- import { B as BridgeWidgetViews, T as TopUpView } from './TopUpView-CiVyRmwY.js';
5
- import { f as formatUnits, p as parseUnits } from './index-BAkbAfHQ.js';
6
- import { S as SelectForm, T as TextInputForm, a as TransactionRejected, g as getAllowedBalances, F as Fees, N as NetworkSwitchDrawer, W as WalletApproveHero } from './WalletApproveHero-B1dSrUz8.js';
7
- import { u as useInterval } from './useInterval-BkDSRSol.js';
8
- import { C as Contract } from './index-D1CE-3qJ.js';
9
- import './FeesBreakdown-DMGyEpeX.js';
1
+ import { bJ as axios, bK as CheckoutErrorType, bL as IMMUTABLE_API_BASE_URL, r as reactExports, I as IMTBLWidgetEvents, B as BridgeEventType, p as jsxs, o as jsx, bM as ShimmerBox, M as MenuItem, H as Stack, u as useTranslation, J as Body, a9 as Button, a7 as Box, bN as PASSPORT_URL, au as Link, bO as getChainIdBySlug, bP as getChainImage, bQ as networkName, aB as FramedImage, a3 as EllipsizedText, Q as Icon, a0 as useAnalytics, a2 as UserJourney, bR as Accordion, $ as Divider, ao as ViewContext, G as Fragment, V as ViewActions, bS as useWalletConnect, bT as isWalletConnectProvider, bU as Logo, bV as RawImage, bW as AXELAR_SCAN_URL, ay as isNativeToken, az as getTokenImageByAddress, bX as getNativeSymbolByChainSlug, be as calculateCryptoToFiat, ar as EventTargetContext, a5 as isPassportProvider, i as getL1ChainId, ax as TokenFilterTypes, h as getL2ChainId, ac as WalletProviderRdns, af as Web3Provider, aI as useInjectedProviders, bl as HeaderNavigation, bo as FooterLogo, aa as WalletDrawer, aL as SimpleLayout, bY as getChainSlugById, bZ as JsonRpcProvider, b_ as DEFAULT_TRANSACTIONS_RETRY_POLICY, L as LoadingView, j as ChainId, b$ as getChainNameById, b5 as useTheme, a8 as Heading, c0 as getWalletProviderNameByProvider, c1 as isMetaMaskProvider, c2 as WalletProviderName, a4 as Drawer, aD as ButtCon, c3 as ButtonNavigationStyles, aM as orchestrationEvents, y as tokenValueFormat, c4 as formatZeroAmount, c5 as NATIVE, aG as fetchRiskAssessment, b9 as amountInputValidation, al as getRemoteImage, ba as CloudImage, c6 as ETH_TOKEN_SYMBOL, z as BigNumber, b2 as Environment, c7 as GasEstimateType, c8 as DEFAULT_TOKEN_DECIMALS, c9 as DEFAULT_QUOTE_REFRESH_INTERVAL, ca as addChainChangedListener, cb as removeChainChangedListener, aH as isAddressSanctioned, cc as IMX_TOKEN_SYMBOL, m as SharedViews, cd as dist, ce as CHECKOUT_CDN_BASE_URL, cf as heroBackGroundStyles, cg as heroImageStyles, R as Badge, ch as SimpleTextBody, ci as FooterButton, cj as getEthTokenImage, ck as WITHDRAWAL_CLAIM_GAS_LIMIT, aw as getDefaultTokenImage, b6 as viewReducer, b7 as initialViewState, cl as BridgeConfiguration, cm as ImmutableConfiguration, cn as TokenBridge, co as StatusView, bp as StatusType, E as ErrorView, bb as ServiceUnavailableErrorView, cp as ETH_SEPOLIA_TO_ZKEVM_TESTNET, cq as ETH_SEPOLIA_TO_ZKEVM_DEVNET, cr as ETH_MAINNET_TO_ZKEVM_MAINNET } from './index-I7NQs2yT.js';
2
+ import { C as CryptoFiatContext, a as CryptoFiatActions, b as CryptoFiatProvider } from './CryptoFiatProvider-sAEnJG6C.js';
3
+ import { T as TokenImage, r as retry } from './TokenImage-Wgpb1UNJ.js';
4
+ import { B as BridgeWidgetViews, T as TopUpView } from './TopUpView-COE6yWhK.js';
5
+ import { f as formatUnits, p as parseUnits } from './index-B7IP9SJX.js';
6
+ import { S as SelectForm, T as TextInputForm, a as TransactionRejected, g as getAllowedBalances, F as Fees, N as NetworkSwitchDrawer, W as WalletApproveHero } from './WalletApproveHero-t4SnHNxx.js';
7
+ import { u as useInterval } from './useInterval-C1Ii_rjQ.js';
8
+ import { C as Contract } from './index-Cqrf-cz8.js';
9
+ import './FeesBreakdown-yRB20JH-.js';
10
10
 
11
11
  // This module is intended to unwrap Axios default export as named.
12
12
  // Keep top-level export same with static properties
@@ -1,20 +1,20 @@
1
- import { I as IMTBLWidgetEvents, C as CommerceFlowType, P as ProviderEventType, a as CommerceEventType, b as ConnectEventType, c as CommerceFailureEventType, d as CommerceSuccessEventType, W as WalletEventType, e as CommerceUserActionEventType, S as SwapEventType, A as AddTokensEventType, B as BridgeEventType, O as OnRampEventType, f as SaleEventType, g as OrchestrationEventType, r as reactExports, V as ViewActions, h as getL2ChainId, i as getL1ChainId, j as ChainId, u as useTranslation, k as useViewState, l as useEventTargetState, m as SharedViews, n as commerceFlows, o as jsx, p as jsxs, L as LoadingView, E as ErrorView, q as ConnectWidget, s as ProvidersContextProvider, t as ConnectLoader, v as ViewContextProvider } from './index-Bj-EHPwO.js';
2
- import SwapWidget from './SwapWidget-D-pE_rmj.js';
3
- import BridgeWidget from './BridgeWidget-DMGCRXjH.js';
4
- import { O as OnRampWidget } from './OnRampWidget-B4lX9uAx.js';
5
- import WalletWidget from './WalletWidget-tPUDYOMn.js';
6
- import SaleWidget from './SaleWidget-BVL5meKc.js';
7
- import AddTokensWidget from './AddTokensWidget-CnA5XYnd.js';
8
- import './WalletApproveHero-B1dSrUz8.js';
9
- import './TokenImage-zqxHMH6Q.js';
10
- import './FeesBreakdown-DMGyEpeX.js';
11
- import './CryptoFiatProvider-zCa2sVd8.js';
12
- import './useInterval-BkDSRSol.js';
13
- import './index-BAkbAfHQ.js';
14
- import './TopUpView-CiVyRmwY.js';
15
- import './SpendingCapHero-B1RdHAbv.js';
16
- import './index-D1CE-3qJ.js';
17
- import './HandoverContent-BKYZunUN.js';
1
+ import { I as IMTBLWidgetEvents, C as CommerceFlowType, P as ProviderEventType, a as CommerceEventType, b as ConnectEventType, c as CommerceFailureEventType, d as CommerceSuccessEventType, W as WalletEventType, e as CommerceUserActionEventType, S as SwapEventType, A as AddTokensEventType, B as BridgeEventType, O as OnRampEventType, f as SaleEventType, g as OrchestrationEventType, r as reactExports, V as ViewActions, h as getL2ChainId, i as getL1ChainId, j as ChainId, u as useTranslation, k as useViewState, l as useEventTargetState, m as SharedViews, n as commerceFlows, o as jsx, p as jsxs, L as LoadingView, E as ErrorView, q as ConnectWidget, s as ProvidersContextProvider, t as ConnectLoader, v as ViewContextProvider } from './index-I7NQs2yT.js';
2
+ import SwapWidget from './SwapWidget-B3EdQ5rO.js';
3
+ import BridgeWidget from './BridgeWidget-QK4NCq52.js';
4
+ import { O as OnRampWidget } from './OnRampWidget-DieIS72Y.js';
5
+ import WalletWidget from './WalletWidget-cnj9sfvN.js';
6
+ import SaleWidget from './SaleWidget-COsJhPPs.js';
7
+ import AddTokensWidget from './AddTokensWidget-CO_PVJdq.js';
8
+ import './WalletApproveHero-t4SnHNxx.js';
9
+ import './TokenImage-Wgpb1UNJ.js';
10
+ import './FeesBreakdown-yRB20JH-.js';
11
+ import './CryptoFiatProvider-sAEnJG6C.js';
12
+ import './useInterval-C1Ii_rjQ.js';
13
+ import './index-B7IP9SJX.js';
14
+ import './TopUpView-COE6yWhK.js';
15
+ import './SpendingCapHero-C013cyRT.js';
16
+ import './index-Cqrf-cz8.js';
17
+ import './HandoverContent-t9r-oBxF.js';
18
18
 
19
19
  const sendCheckoutEvent = (eventTarget, detail) => {
20
20
  const event = new CustomEvent(IMTBLWidgetEvents.IMTBL_COMMERCE_WIDGET_EVENT, { detail });
@@ -1,4 +1,4 @@
1
- import { b2 as Environment, bJ as axios, r as reactExports, o as jsx } from './index-Bj-EHPwO.js';
1
+ import { b2 as Environment, bJ as axios, r as reactExports, o as jsx } from './index-I7NQs2yT.js';
2
2
 
3
3
  /**
4
4
  * Class representing the configuration for the CryptoFiatModule.
@@ -1,4 +1,4 @@
1
- import { p as jsxs, o as jsx, H as Body, b4 as PriceDisplay, a7 as Box, u as useTranslation, a4 as Drawer, M as MenuItem, _ as Fragment, $ as Divider, y as tokenValueFormat, c4 as formatZeroAmount, bo as FooterLogo } from './index-Bj-EHPwO.js';
1
+ import { p as jsxs, o as jsx, J as Body, b4 as PriceDisplay, a7 as Box, u as useTranslation, a4 as Drawer, M as MenuItem, G as Fragment, $ as Divider, y as tokenValueFormat, c4 as formatZeroAmount, bo as FooterLogo } from './index-I7NQs2yT.js';
2
2
 
3
3
  const feesBreakdownContentStyles = {
4
4
  display: 'flex',
@@ -1,4 +1,4 @@
1
- import { p as jsxs, a7 as Box, o as jsx, a8 as Heading, H as Body, a9 as Button } from './index-Bj-EHPwO.js';
1
+ import { p as jsxs, a7 as Box, o as jsx, a8 as Heading, J as Body, a9 as Button } from './index-I7NQs2yT.js';
2
2
 
3
3
  function HandoverContent({ headingText, subheadingText, primaryButtonText, onPrimaryButtonClick, secondaryButtonText, onSecondaryButtonClick, }) {
4
4
  return (jsxs(Box, { sx: {
@@ -1,6 +1,6 @@
1
- import { cJ as global, a0 as useAnalytics, r as reactExports, bB as ConnectLoaderContext, ar as EventTargetContext, u as useTranslation, ao as ViewContext, m as SharedViews, aG as fetchRiskAssessment, aH as isAddressSanctioned, V as ViewActions, cK as ExchangeType, o as jsx, aM as SimpleLayout, bl as HeaderNavigation, cL as sendOnRampWidgetCloseEvent, aN as orchestrationEvents, I as IMTBLWidgetEvents, a7 as Box, a2 as UserJourney, bo as FooterLogo, p as jsxs, ch as SimpleTextBody, b6 as viewReducer, b7 as initialViewState, c5 as NATIVE, L as LoadingView, cM as sendOnRampSuccessEvent, bp as StatusType, co as StatusView, cN as sendOnRampFailedEvent, bb as ServiceUnavailableErrorView } from './index-Bj-EHPwO.js';
2
- import { O as OnRampWidgetViews, T as TopUpView } from './TopUpView-CiVyRmwY.js';
3
- import { S as SpendingCapHero } from './SpendingCapHero-B1RdHAbv.js';
1
+ import { cJ as global, a0 as useAnalytics, r as reactExports, bB as ConnectLoaderContext, ar as EventTargetContext, u as useTranslation, ao as ViewContext, m as SharedViews, aG as fetchRiskAssessment, aH as isAddressSanctioned, V as ViewActions, cK as ExchangeType, o as jsx, aL as SimpleLayout, bl as HeaderNavigation, cL as sendOnRampWidgetCloseEvent, aM as orchestrationEvents, I as IMTBLWidgetEvents, a7 as Box, a2 as UserJourney, bo as FooterLogo, p as jsxs, ch as SimpleTextBody, b6 as viewReducer, b7 as initialViewState, c5 as NATIVE, L as LoadingView, cM as sendOnRampSuccessEvent, bp as StatusType, co as StatusView, cN as sendOnRampFailedEvent, bb as ServiceUnavailableErrorView } from './index-I7NQs2yT.js';
2
+ import { O as OnRampWidgetViews, T as TopUpView } from './TopUpView-COE6yWhK.js';
3
+ import { S as SpendingCapHero } from './SpendingCapHero-C013cyRT.js';
4
4
 
5
5
  function isNull(arg) {
6
6
  return arg === null;
@@ -1,17 +1,17 @@
1
- import { b2 as Environment, z as BigNumber, r as reactExports, bc as compareStr, ao as ViewContext, V as ViewActions, aG as fetchRiskAssessment, o as jsx, bd as SalePaymentTypes, a2 as UserJourney, u as useTranslation, be as calculateCryptoToFiat, a0 as useAnalytics, ar as EventTargetContext, bf as sendSaleWidgetCloseEvent, bg as sendSaleSuccessEvent, bh as sendSaleFailedEvent, bi as sendSaleTransactionSuccessEvent, bj as sendSalePaymentMethodEvent, bk as sendSalePaymentTokenEvent, bl as HeaderNavigation, p as jsxs, bm as LoadingOverlay, a7 as Box, _ as Fragment, aM as SimpleLayout, ap as useHandover, aq as HandoverTarget, as as getRemoteRive, a8 as Heading, bn as HandoverDuration, a5 as isPassportProvider, M as MenuItem, X as motion, U as listVariants, Y as listItemVariants, aH as isAddressSanctioned, m as SharedViews, bo as FooterLogo, bp as StatusType, bq as prettyFormatNumber, y as tokenValueFormat, br as ShimmerCircle, a9 as Button, G as Stack, bs as FundingStepType, bt as abbreviateWalletAddress, a4 as Drawer, bu as Caption, $ as Divider, bv as tokenSymbolNameOverrides, bw as ItemType, bx as TransactionOrGasType, by as GasTokenType, bz as RoutingOutcomeType, ay as isNativeToken, az as getTokenImageByAddress, bA as isGasFree, bB as ConnectLoaderContext, bC as eventTargetReducer, bD as initialEventTargetState, i as getL1ChainId, h as getL2ChainId, I as IMTBLWidgetEvents, bE as EventTargetActions, L as LoadingView, j as ChainId, bF as ConnectWidgetViews, q as ConnectWidget, S as SwapEventType, O as OnRampEventType, B as BridgeEventType, b as ConnectEventType, bG as ConnectLoaderActions, aD as ButtCon, H as Body, bH as widgetTheme, b6 as viewReducer, b7 as initialViewState, bI as BlockExplorerService, bb as ServiceUnavailableErrorView } from './index-Bj-EHPwO.js';
2
- import { C as Contract } from './index-D1CE-3qJ.js';
3
- import { u as useTransakEvents, O as OnRampWidget } from './OnRampWidget-B4lX9uAx.js';
4
- import { H as HandoverContent } from './HandoverContent-BKYZunUN.js';
5
- import { C as CryptoFiatContext, a as CryptoFiatActions, b as CryptoFiatProvider } from './CryptoFiatProvider-zCa2sVd8.js';
6
- import { u as useMount, T as TopUpView } from './TopUpView-CiVyRmwY.js';
7
- import { T as TokenImage } from './TokenImage-zqxHMH6Q.js';
8
- import { f as formatUnits } from './index-BAkbAfHQ.js';
9
- import { F as Fees } from './WalletApproveHero-B1dSrUz8.js';
10
- import BridgeWidget from './BridgeWidget-DMGCRXjH.js';
11
- import SwapWidget from './SwapWidget-D-pE_rmj.js';
12
- import './SpendingCapHero-B1RdHAbv.js';
13
- import './FeesBreakdown-DMGyEpeX.js';
14
- import './useInterval-BkDSRSol.js';
1
+ import { b2 as Environment, z as BigNumber, r as reactExports, bc as compareStr, ao as ViewContext, V as ViewActions, aG as fetchRiskAssessment, o as jsx, bd as SalePaymentTypes, a2 as UserJourney, u as useTranslation, be as calculateCryptoToFiat, a0 as useAnalytics, ar as EventTargetContext, bf as sendSaleWidgetCloseEvent, bg as sendSaleSuccessEvent, bh as sendSaleFailedEvent, bi as sendSaleTransactionSuccessEvent, bj as sendSalePaymentMethodEvent, bk as sendSalePaymentTokenEvent, bl as HeaderNavigation, p as jsxs, bm as LoadingOverlay, a7 as Box, G as Fragment, aL as SimpleLayout, ap as useHandover, aq as HandoverTarget, as as getRemoteRive, a8 as Heading, bn as HandoverDuration, a5 as isPassportProvider, M as MenuItem, Y as motion, X as listVariants, Z as listItemVariants, aH as isAddressSanctioned, m as SharedViews, bo as FooterLogo, bp as StatusType, bq as prettyFormatNumber, y as tokenValueFormat, br as ShimmerCircle, a9 as Button, H as Stack, bs as FundingStepType, bt as abbreviateWalletAddress, a4 as Drawer, bu as Caption, $ as Divider, bv as tokenSymbolNameOverrides, bw as ItemType, bx as TransactionOrGasType, by as GasTokenType, bz as RoutingOutcomeType, ay as isNativeToken, az as getTokenImageByAddress, bA as isGasFree, bB as ConnectLoaderContext, bC as eventTargetReducer, bD as initialEventTargetState, i as getL1ChainId, h as getL2ChainId, I as IMTBLWidgetEvents, bE as EventTargetActions, L as LoadingView, j as ChainId, bF as ConnectWidgetViews, q as ConnectWidget, S as SwapEventType, O as OnRampEventType, B as BridgeEventType, b as ConnectEventType, bG as ConnectLoaderActions, aD as ButtCon, J as Body, bH as widgetTheme, b6 as viewReducer, b7 as initialViewState, bI as BlockExplorerService, bb as ServiceUnavailableErrorView } from './index-I7NQs2yT.js';
2
+ import { C as Contract } from './index-Cqrf-cz8.js';
3
+ import { u as useTransakEvents, O as OnRampWidget } from './OnRampWidget-DieIS72Y.js';
4
+ import { H as HandoverContent } from './HandoverContent-t9r-oBxF.js';
5
+ import { C as CryptoFiatContext, a as CryptoFiatActions, b as CryptoFiatProvider } from './CryptoFiatProvider-sAEnJG6C.js';
6
+ import { u as useMount, T as TopUpView } from './TopUpView-COE6yWhK.js';
7
+ import { T as TokenImage } from './TokenImage-Wgpb1UNJ.js';
8
+ import { f as formatUnits } from './index-B7IP9SJX.js';
9
+ import { F as Fees } from './WalletApproveHero-t4SnHNxx.js';
10
+ import BridgeWidget from './BridgeWidget-QK4NCq52.js';
11
+ import SwapWidget from './SwapWidget-B3EdQ5rO.js';
12
+ import './SpendingCapHero-C013cyRT.js';
13
+ import './FeesBreakdown-yRB20JH-.js';
14
+ import './useInterval-C1Ii_rjQ.js';
15
15
 
16
16
  var SaleWidgetViews;
17
17
  (function (SaleWidgetViews) {