@embarkai/ui-kit 0.4.51 → 0.4.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -815,7 +815,7 @@ var init_iframe_mpc_client = __esm({
815
815
  });
816
816
 
817
817
  // src/internal/constants.ts
818
- var import_lucide_react, LOCAL_COLOR_MODE_KEY, LOOCAL_BACKUP_STATUS_KEY, DEFAULT_AUTH_MENU_HEIGHT, DEFAULT_MAIN_MENU_HEIGHT, MAX_CONTENT_HEIGHT, MAIN_DIALOG_ANIMATION_SPEED, Y_ANIMATION_SETUP, BLOCKSCOUT_QUERY_STALE_TIME, BLOCKSCOUT_QUERY_GC_TIME, BLOCKSCOUT_REFRESH_DEBOUNCE, IPFS_GATEWAY, PROVIDERS_META;
818
+ var import_lucide_react, LOCAL_COLOR_MODE_KEY, LOOCAL_BACKUP_STATUS_KEY, DEFAULT_AUTH_MENU_HEIGHT, DEFAULT_MAIN_MENU_HEIGHT, MAX_CONTENT_HEIGHT, MAIN_DIALOG_ANIMATION_SPEED, Y_ANIMATION_SETUP, BLOCKSCOUT_QUERY_STALE_TIME, BLOCKSCOUT_QUERY_GC_TIME, BLOCKSCOUT_REFRESH_DEBOUNCE, IPFS_GATEWAY, PROVIDERS_META, WRAPPED_TOKENS;
819
819
  var init_constants = __esm({
820
820
  "src/internal/constants.ts"() {
821
821
  import_lucide_react = require("lucide-react");
@@ -842,6 +842,7 @@ var init_constants = __esm({
842
842
  // Alias for twitter (API uses 'x')
843
843
  wallet: { name: "Wallet", icon: import_lucide_react.Wallet2, description: "External wallet (EOA)" }
844
844
  };
845
+ WRAPPED_TOKENS = ["WETH", "WBTC", "WBNB", "WLUMIA"];
845
846
  }
846
847
  });
847
848
 
@@ -11454,7 +11455,7 @@ function ChainItem(props) {
11454
11455
  children: name
11455
11456
  }
11456
11457
  ),
11457
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge, { variant: "secondary", children: badge })
11458
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge, { variant: badge.toLowerCase() === "mainnet" ? "success" : "secondary", children: badge })
11458
11459
  ] }),
11459
11460
  isActiveChain && paymasterAddress && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-xs", children: [
11460
11461
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-none uppercase", children: "Paymaster" }),
@@ -11578,7 +11579,7 @@ function ChainsMenu() {
11578
11579
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11579
11580
  Switch,
11580
11581
  {
11581
- labels: { checked: "ALL", unchecked: "MAINNETS" },
11582
+ labels: { checked: "MAINNETS", unchecked: "ALL" },
11582
11583
  checked: isTestnets,
11583
11584
  onChange: () => setIsTestnets(!isTestnets)
11584
11585
  }
@@ -17902,6 +17903,9 @@ function isSecurityToken(asset) {
17902
17903
  if (!("type" in asset)) return false;
17903
17904
  return asset.type === "erc3643";
17904
17905
  }
17906
+ function isProjectAssetConfig(asset) {
17907
+ return "balanceQueryKey" in asset && "balanceQuery" in asset;
17908
+ }
17905
17909
  function isAssetRateAvailable(symbol) {
17906
17910
  switch (symbol) {
17907
17911
  // list of prohibited symbols without market data on Binance
@@ -17914,7 +17918,7 @@ function isAssetRateAvailable(symbol) {
17914
17918
  }
17915
17919
  }
17916
17920
  function checkWrapedTokenSymbol(symbol) {
17917
- if (WRAPPED_SYMBOLS.includes(symbol)) {
17921
+ if (WRAPPED_TOKENS.includes(symbol)) {
17918
17922
  return symbol.slice(1);
17919
17923
  }
17920
17924
  return symbol.toUpperCase();
@@ -17985,11 +17989,17 @@ function PortfolioItemImage(props) {
17985
17989
  function PortfolioItem(props) {
17986
17990
  const { address, asset, isProjectAsset } = props;
17987
17991
  const providerConfig = useProviderConfig().config.current;
17988
- const { assets: projectAssets, showBalanceAs: showBalanceAsSymbol } = providerConfig.projectAssets || {};
17989
17992
  const customAssetRateQuery = providerConfig.portfolio?.assetRateQuery;
17990
- const qc = (0, import_react_query38.useQueryClient)();
17991
- const { balanceQueryKey } = projectAssets?.find((a) => a.symbol === showBalanceAsSymbol) || {};
17992
- const projectAssetBalance = !!balanceQueryKey ? qc.getQueryData(balanceQueryKey) : null;
17993
+ const projectAssetQuery = isProjectAsset && isProjectAssetConfig(asset) ? {
17994
+ queryKey: asset.balanceQueryKey,
17995
+ queryFn: asset.balanceQuery
17996
+ } : void 0;
17997
+ const { data: projectAssetBalance } = (0, import_react_query38.useQuery)({
17998
+ enabled: !!projectAssetQuery,
17999
+ retry: false,
18000
+ queryKey: projectAssetQuery?.queryKey ?? ["project-asset-balance-disabled", asset.symbol],
18001
+ queryFn: async () => projectAssetQuery?.queryFn() ?? null
18002
+ });
17993
18003
  const isNft = isNftAsset(asset);
17994
18004
  const isSecurity = isSecurityToken(asset);
17995
18005
  const embeddedRate = Number(asset.exchangeRateUsd || 0);
@@ -18002,8 +18012,8 @@ function PortfolioItem(props) {
18002
18012
  // customAssetRateQueryKey
18003
18013
  queryFn: async () => await resolveAssetRate(asset.symbol, asset.address, customAssetRateQuery)
18004
18014
  });
18005
- const showProjectFiatBalance = isProjectAsset && !!projectAssetBalance?.fiatFormatted;
18006
- const renderBalance = showProjectFiatBalance ? projectAssetBalance?.fiatFormatted || 0 : Number((0, import_viem9.formatUnits)(BigInt(asset?.balance || "0"), asset?.decimals || 18));
18015
+ const hasProjectAssetBalance = isProjectAsset && projectAssetBalance != null;
18016
+ const renderBalance = hasProjectAssetBalance ? projectAssetBalance.cryptoFormatted : Number((0, import_viem9.formatUnits)(BigInt(asset?.balance || "0"), asset?.decimals || 18));
18007
18017
  const resolvedRate = hasEmbeddedRate ? embeddedRate : Number(assetRate?.price || 0);
18008
18018
  const usdRenderBalance = resolvedRate > 0 ? renderBalance * resolvedRate : 0;
18009
18019
  const shortContractAddress = asset.address ? truncateMiddle(asset.address, 6, 4) : null;
@@ -18066,10 +18076,11 @@ function PortfolioItem(props) {
18066
18076
  }
18067
18077
  );
18068
18078
  }
18069
- var import_react_query38, import_lucide_react50, import_viem9, import_jsx_runtime83, WRAPPED_SYMBOLS, SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
18079
+ var import_react_query38, import_lucide_react50, import_viem9, import_jsx_runtime83, SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
18070
18080
  var init_PortfolioItem = __esm({
18071
18081
  "src/internal/components/PortfolioMenu/PortfolioItem.tsx"() {
18072
18082
  init_ProviderContext();
18083
+ init_constants();
18073
18084
  import_react_query38 = require("@tanstack/react-query");
18074
18085
  import_lucide_react50 = require("lucide-react");
18075
18086
  import_viem9 = require("viem");
@@ -18081,7 +18092,6 @@ var init_PortfolioItem = __esm({
18081
18092
  init_truncateMiddle();
18082
18093
  init_BalanceView2();
18083
18094
  import_jsx_runtime83 = require("react/jsx-runtime");
18084
- WRAPPED_SYMBOLS = ["WETH", "WBTC", "WBNB", "WLUMIA"];
18085
18095
  SKIP_SYMBOLS2 = ["TEST"];
18086
18096
  ASSETS_RATES_QUERY_KEY = "lumia-passport-assets-rates-query-key";
18087
18097
  }
@@ -18393,17 +18403,11 @@ var init_ReceiveMenu2 = __esm({
18393
18403
  });
18394
18404
 
18395
18405
  // src/internal/components/SecurityMenu/constants.ts
18396
- var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY, WELL_KNOWN_PROJECTS;
18406
+ var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY;
18397
18407
  var init_constants5 = __esm({
18398
18408
  "src/internal/components/SecurityMenu/constants.ts"() {
18399
18409
  KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
18400
18410
  CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
18401
- WELL_KNOWN_PROJECTS = {
18402
- // '327733f6-2e85-4afc-a505-e2c55d0a2659': 'https://staging-hub.lumia.org',
18403
- "11062797-f0a6-4737-bad8-086d1125dde1": "https://parlay.money",
18404
- "f7a70f92-58e9-4fe9-b713-61c27a24e3d6": "https://embark-demo-dapp.pages.dev"
18405
- // https://account.embarkai.io
18406
- };
18407
18411
  }
18408
18412
  });
18409
18413
 
@@ -18461,7 +18465,7 @@ var init_hooks2 = __esm({
18461
18465
  function Application(props) {
18462
18466
  const { projectId, logo, name, appUrl, trustedAuthorizedApp, firstConnectedAt, untrustApp } = props;
18463
18467
  const { t } = useT();
18464
- const projectUrl = appUrl || WELL_KNOWN_PROJECTS[projectId] || null;
18468
+ const projectUrl = appUrl || null;
18465
18469
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
18466
18470
  "div",
18467
18471
  {
@@ -18577,7 +18581,6 @@ var init_ConnectedApps = __esm({
18577
18581
  import_lucide_react53 = require("lucide-react");
18578
18582
  init_button();
18579
18583
  init_highlight();
18580
- init_constants5();
18581
18584
  init_hooks2();
18582
18585
  import_jsx_runtime86 = require("react/jsx-runtime");
18583
18586
  }
@@ -19447,7 +19450,6 @@ function useAvailableSenders() {
19447
19450
  return;
19448
19451
  }
19449
19452
  lastCalcedSenders.current = sendersAccumulator.map((s) => `${s.name}-${s.address}`);
19450
- console.info("[SENDER SELECTOR] setting bridge senders", sendersAccumulator);
19451
19453
  useBridgeStore.getState().setBridgeSenders(sendersAccumulator);
19452
19454
  useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
19453
19455
  }, [address, profiles]);
@@ -20070,7 +20072,11 @@ function useHyperlaneRoutes() {
20070
20072
  retry: false,
20071
20073
  enabled: !!address && page === "send" /* SEND */ && flow === "bridge",
20072
20074
  queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
20073
- queryFn: async () => getHyperlaneWarpRoutes()
20075
+ queryFn: async () => {
20076
+ const warpRoutes = await getHyperlaneWarpRoutes();
20077
+ useFlowSelectorStore.getState().setRenderKey(`hyperlane-bridge-warp-routes-loaded-${Date.now()}`);
20078
+ return warpRoutes;
20079
+ }
20074
20080
  });
20075
20081
  (0, import_react66.useEffect)(() => {
20076
20082
  if (!errorWarpRoutes) return;
@@ -20174,6 +20180,12 @@ var init_ResolveChainIcon = __esm({
20174
20180
  });
20175
20181
 
20176
20182
  // src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
20183
+ function checkWrapedTokenSymbol2(symbol) {
20184
+ if (WRAPPED_TOKENS.includes(symbol)) {
20185
+ return symbol.slice(1);
20186
+ }
20187
+ return symbol.toUpperCase();
20188
+ }
20177
20189
  function useBridgeBalance(hyperlaneWarpRoutes) {
20178
20190
  const qc = (0, import_react_query46.useQueryClient)();
20179
20191
  const { t } = useT();
@@ -20199,7 +20211,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
20199
20211
  enabled: bridgeSender === "embarkai-wallet" && !!selectedWarpRoute && !!address && !!originChain,
20200
20212
  address
20201
20213
  });
20202
- const embarkTokenBalanace = assets.find((a) => a.symbol === selectedWarpRoute?.symbol);
20214
+ const embarkTokenBalanace = assets.find((a) => selectedWarpRoute?.symbol === checkWrapedTokenSymbol2(a.symbol));
20203
20215
  const originChainMeta = CHAINS_UI_META[originChain];
20204
20216
  const isSelectedTokenNative = selectedWarpRoute?.symbol?.toUpperCase() === originChainMeta?.chain?.nativeCurrency?.symbol?.toUpperCase();
20205
20217
  const { data: externalBalanceData, isLoading: isExternalBalanceLoading } = (0, import_react_query46.useQuery)({
@@ -20310,6 +20322,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
20310
20322
  var import_core6, import_react_query46, import_react68, import_viem13, import_wagmi5, EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY;
20311
20323
  var init_useBridgeBalance = __esm({
20312
20324
  "src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts"() {
20325
+ init_constants();
20313
20326
  init_SessionContext();
20314
20327
  init_i18n();
20315
20328
  import_core6 = require("@embarkai/core");
@@ -20330,10 +20343,10 @@ var init_useBridgeBalance = __esm({
20330
20343
 
20331
20344
  // src/internal/components/SendMenu/hyperbridge/steps/SelectStep.tsx
20332
20345
  function SelectStep(props) {
20333
- const { swapChains, hyperlaneWarpRoutes, isLoadingWarpRoutes, handleQuoteEstimation } = props;
20346
+ const { swapChains, hyperlaneWarpRoutes = [], isLoadingWarpRoutes, handleQuoteEstimation } = props;
20334
20347
  const { t } = useT();
20335
20348
  const {
20336
- bridgeSenders,
20349
+ bridgeSenders = [],
20337
20350
  bridgeSender,
20338
20351
  originChain,
20339
20352
  destinationChain,
@@ -21245,12 +21258,11 @@ function HyperlaneBridge() {
21245
21258
  const { hyperlaneWarpRoutes, isLoadingWarpRoutes } = useHyperlaneRoutes();
21246
21259
  const { directWalletProfile } = useAvailableSenders();
21247
21260
  useMenuTitle(hyperlaneWarpRoutes);
21248
- (0, import_react72.useEffect)(
21249
- () => () => {
21261
+ (0, import_react72.useEffect)(() => {
21262
+ return () => {
21250
21263
  useBridgeStore.getState().resetSelections();
21251
- },
21252
- []
21253
- );
21264
+ };
21265
+ }, []);
21254
21266
  return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
21255
21267
  bridgeStep === "sender-selector" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SenderSelector, { directWalletProfile }),
21256
21268
  bridgeStep === "select" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
@@ -21434,7 +21446,7 @@ function useNicknameResolve(input, options) {
21434
21446
  }, [normalized, isNicknameInput, enabled]);
21435
21447
  const query = (0, import_react_query48.useQuery)({
21436
21448
  queryKey: [...QUERY_KEYS.nicknameResolve(debouncedInput), chainId],
21437
- queryFn: () => resolveNickname(debouncedInput, chainId),
21449
+ queryFn: async () => await resolveNickname(debouncedInput, chainId),
21438
21450
  enabled: enabled && isNicknameInput && debouncedInput.length > 0,
21439
21451
  staleTime: 1e3 * 60 * 5,
21440
21452
  // 5 minutes - addresses don't change often
@@ -21472,8 +21484,8 @@ var init_useNicknameResolve = __esm({
21472
21484
  import_react74 = require("react");
21473
21485
  init_nickname();
21474
21486
  init_profile();
21475
- init_nickname_validation();
21476
21487
  init_nickname_fingerprint();
21488
+ init_nickname_validation();
21477
21489
  DEBOUNCE_MS2 = 300;
21478
21490
  }
21479
21491
  });
@@ -21924,76 +21936,81 @@ var init_AssetList = __esm({
21924
21936
  function NicknameData(props) {
21925
21937
  const { resolvedNicknameData, isNicknameInput } = props;
21926
21938
  const {
21939
+ data: nicknameData,
21927
21940
  resolvedAddress,
21928
21941
  isResolving,
21942
+ isFingerprintVerified,
21929
21943
  isNotFound,
21930
21944
  isWalletNotSetup,
21931
- isFrozen,
21932
- isFingerprintVerified,
21933
- data: nicknameData
21945
+ isFrozen
21934
21946
  } = resolvedNicknameData;
21935
- if (!isNicknameInput) return null;
21936
- if (resolvedAddress && !isResolving && nicknameData)
21937
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] rounded-[var(--ui-kit-el-bdrs)] px-[var(--ui-kit-gap)]", children: [
21938
- nicknameData.avatarSvg ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
21939
- "img",
21947
+ (0, import_react77.useEffect)(() => {
21948
+ if (!resolvedNicknameData?.data?.fingerprint || !isNicknameInput) return;
21949
+ useFlowSelectorStore.getState().setRenderKey(`nickname-resolved-${Date.now()}`);
21950
+ }, [resolvedNicknameData, isNicknameInput]);
21951
+ (0, import_react77.useEffect)(() => {
21952
+ if (isResolving) return;
21953
+ let errMessage = null;
21954
+ switch (true) {
21955
+ case isNotFound:
21956
+ errMessage = "Nickname not found";
21957
+ break;
21958
+ case isWalletNotSetup:
21959
+ errMessage = "This user has not set up wallet yet";
21960
+ break;
21961
+ case isFrozen:
21962
+ errMessage = "This handle is frozen. Proceed with caution.";
21963
+ break;
21964
+ default:
21965
+ errMessage = null;
21966
+ }
21967
+ if (!errMessage) return;
21968
+ useFlowSelectorStore.getState().setError(errMessage);
21969
+ }, [isResolving, isNotFound, isWalletNotSetup, isFrozen]);
21970
+ if (isResolving || !isNicknameInput || !resolvedAddress || !nicknameData) return null;
21971
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] rounded-[var(--ui-kit-el-bdrs)] px-[var(--ui-kit-gap)]", children: [
21972
+ nicknameData.avatarSvg ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
21973
+ "img",
21974
+ {
21975
+ src: nicknameData.avatarSvg,
21976
+ alt: nicknameData.handle,
21977
+ className: "w-12 h-12 rounded-full object-cover flex-shrink-0",
21978
+ onError: (e) => {
21979
+ e.currentTarget.onerror = null;
21980
+ e.currentTarget.src = no_image_default;
21981
+ }
21982
+ }
21983
+ ) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.AtSign, { className: "w-5 h-5" }) }),
21984
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex flex-col gap-1", children: [
21985
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[10px] text-[var(--ui-kit-bg-success)]", children: [
21986
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.CheckCircle2, { className: "w-4 h-4 flex-shrink-0" }),
21987
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: nicknameData.handle })
21988
+ ] }),
21989
+ nicknameData.fingerprint && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
21990
+ "div",
21940
21991
  {
21941
- src: nicknameData.avatarSvg,
21942
- alt: nicknameData.handle,
21943
- className: "w-12 h-12 rounded-full object-cover flex-shrink-0",
21944
- onError: (e) => {
21945
- e.currentTarget.onerror = null;
21946
- e.currentTarget.src = no_image_default;
21947
- }
21992
+ className: cn(
21993
+ "flex items-center gap-[var(--ui-kit-gap)] text-[10px]",
21994
+ isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
21995
+ ),
21996
+ children: [
21997
+ isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.ShieldCheck, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
21998
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` }),
21999
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
22000
+ ]
21948
22001
  }
21949
- ) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.AtSign, { className: "w-5 h-5" }) }),
21950
- /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex flex-col gap-1", children: [
21951
- /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[10px] text-[var(--ui-kit-bg-success)]", children: [
21952
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.CheckCircle2, { className: "w-4 h-4 flex-shrink-0" }),
21953
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: nicknameData.handle })
21954
- ] }),
21955
- nicknameData.fingerprint && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
21956
- "div",
21957
- {
21958
- className: cn(
21959
- "flex items-center gap-[var(--ui-kit-gap)] text-[10px]",
21960
- isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
21961
- ),
21962
- children: [
21963
- isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.ShieldCheck, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
21964
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` }),
21965
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
21966
- ]
21967
- }
21968
- )
21969
- ] })
21970
- ] });
21971
- if (isFrozen && !isResolving) {
21972
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
21973
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.AlertTriangle, { className: "w-4 h-4" }),
21974
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "This handle is frozen. Proceed with caution." })
21975
- ] });
21976
- }
21977
- if (isWalletNotSetup && !isResolving) {
21978
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
21979
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.AlertCircle, { className: "w-4 h-4" }),
21980
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "This user has not set up wallet yet" })
21981
- ] });
21982
- }
21983
- if (isNotFound && !isResolving) {
21984
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
21985
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react67.AlertCircle, { className: "w-4 h-4" }),
21986
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "Nickname not found" })
21987
- ] });
21988
- }
22002
+ )
22003
+ ] })
22004
+ ] });
21989
22005
  }
21990
- var import_lucide_react67, import_jsx_runtime107;
22006
+ var import_lucide_react67, import_react77, import_jsx_runtime107;
21991
22007
  var init_NicknameData = __esm({
21992
22008
  "src/internal/components/SendMenu/send/components/NicknameData.tsx"() {
21993
22009
  import_lucide_react67 = require("lucide-react");
22010
+ import_react77 = require("react");
21994
22011
  init_no_image();
21995
22012
  init_utils2();
21996
- init_highlight();
22013
+ init_useFlowSelector();
21997
22014
  import_jsx_runtime107 = require("react/jsx-runtime");
21998
22015
  }
21999
22016
  });
@@ -22226,14 +22243,8 @@ var init_InputSendStep = __esm({
22226
22243
 
22227
22244
  // src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx
22228
22245
  function ConfirmSendStep(props) {
22229
- const {
22230
- sendTransaction,
22231
- refreshBalances,
22232
- erc3643Compliance,
22233
- isNicknameInput,
22234
- resolvedNicknameData,
22235
- isTransactionPending
22236
- } = props;
22246
+ const { sendTransaction, erc3643Compliance, isNicknameInput, resolvedNicknameData } = props;
22247
+ const { t } = useT();
22237
22248
  const chainConfig = useSession((st) => st.chainConfig);
22238
22249
  const { resolvedAddress, isFrozen, isFingerprintVerified, data: nicknameData } = resolvedNicknameData || {};
22239
22250
  const { canTransfer: erc3643CanTransfer } = erc3643Compliance || {};
@@ -22242,25 +22253,31 @@ function ConfirmSendStep(props) {
22242
22253
  const isNft = isNftAsset3(selectedAsset);
22243
22254
  const isSecurity = isSecurityToken2(selectedAsset);
22244
22255
  const effectiveAddress = isNicknameInput ? resolvedAddress : recipient;
22245
- const handleConfirm = async () => {
22246
- if (!effectiveAddress || !selectedAsset) return;
22247
- setTxStep("pending");
22248
- const txAmount = isNft ? "1" : amount;
22249
- const hash = await sendTransaction({
22250
- to: effectiveAddress,
22251
- value: txAmount,
22252
- assetType: selectedAsset.type,
22253
- tokenAddress: selectedAsset.address,
22254
- tokenId: selectedAsset.tokenId,
22255
- decimals: selectedAsset.decimals
22256
- });
22257
- if (hash) {
22258
- setTxStep("success");
22259
- setTimeout(() => refreshBalances(), 3e3);
22260
- } else {
22261
- setTxStep("input");
22256
+ const { mutate: handleConfirm, isPending: isTransactionPending } = (0, import_react_query49.useMutation)({
22257
+ mutationFn: async () => {
22258
+ if (!effectiveAddress || !selectedAsset) return;
22259
+ setTxStep("pending");
22260
+ const txAmount = isNft ? "1" : amount;
22261
+ return await sendTransaction({
22262
+ to: effectiveAddress,
22263
+ value: txAmount,
22264
+ assetType: selectedAsset.type,
22265
+ tokenAddress: selectedAsset.address,
22266
+ tokenId: selectedAsset.tokenId,
22267
+ decimals: selectedAsset.decimals
22268
+ });
22269
+ },
22270
+ onSuccess: (hash) => {
22271
+ if (hash) {
22272
+ setTxStep("success");
22273
+ } else {
22274
+ setTxStep("input");
22275
+ }
22276
+ },
22277
+ onError: (error) => {
22278
+ useFlowSelectorStore.getState().setError(error?.message || "Transaction failed");
22262
22279
  }
22263
- };
22280
+ });
22264
22281
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_jsx_runtime109.Fragment, { children: [
22265
22282
  isNicknameInput && isFrozen && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
22266
22283
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react69.AlertTriangle, { className: "h-4 w-4" }),
@@ -22326,7 +22343,7 @@ function ConfirmSendStep(props) {
22326
22343
  ] }) : (
22327
22344
  // Fungible token details
22328
22345
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22329
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: "Amount:" }),
22346
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
22330
22347
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { className: "text-sm font-bold", children: [
22331
22348
  amount,
22332
22349
  " ",
@@ -22335,7 +22352,7 @@ function ConfirmSendStep(props) {
22335
22352
  ] })
22336
22353
  ),
22337
22354
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22338
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: "Network:" }),
22355
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
22339
22356
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-sm font-bold", children: chainConfig.name })
22340
22357
  ] })
22341
22358
  ] })
@@ -22361,7 +22378,7 @@ function ConfirmSendStep(props) {
22361
22378
  ) : (
22362
22379
  // Fungible token details
22363
22380
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22364
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "Amount:" }),
22381
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
22365
22382
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { className: "font-semibold", children: [
22366
22383
  amount,
22367
22384
  " ",
@@ -22370,26 +22387,38 @@ function ConfirmSendStep(props) {
22370
22387
  ] })
22371
22388
  ),
22372
22389
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22373
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "Network:" }),
22390
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
22374
22391
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { children: chainConfig.name })
22375
22392
  ] })
22376
22393
  ] })
22377
22394
  ] }) }),
22378
- /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Button, { onClick: handleConfirm, disabled: isTransactionPending, className: "w-full", size: "large", children: [
22379
- isTransactionPending && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react69.Loader, { className: "h-4 w-4 animate-spin" }),
22380
- "CONFIRM"
22381
- ] })
22395
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
22396
+ Button,
22397
+ {
22398
+ onClick: () => handleConfirm(),
22399
+ disabled: isTransactionPending,
22400
+ className: "w-full",
22401
+ size: "large",
22402
+ children: [
22403
+ isTransactionPending && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react69.Loader, { className: "h-4 w-4 animate-spin" }),
22404
+ t("passport:common.confirm")
22405
+ ]
22406
+ }
22407
+ )
22382
22408
  ] });
22383
22409
  }
22384
- var import_lucide_react69, import_jsx_runtime109;
22410
+ var import_react_query49, import_lucide_react69, import_jsx_runtime109;
22385
22411
  var init_ConfirmSendStep = __esm({
22386
22412
  "src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx"() {
22387
22413
  init_SessionContext();
22414
+ init_i18n();
22415
+ import_react_query49 = require("@tanstack/react-query");
22388
22416
  import_lucide_react69 = require("lucide-react");
22389
22417
  init_priceFormatter();
22390
22418
  init_utils2();
22391
22419
  init_button();
22392
22420
  init_highlight();
22421
+ init_useFlowSelector();
22393
22422
  init_useSendStore();
22394
22423
  init_utils9();
22395
22424
  import_jsx_runtime109 = require("react/jsx-runtime");
@@ -22412,7 +22441,7 @@ function SendMenu() {
22412
22441
  const { t } = useT();
22413
22442
  const {
22414
22443
  assets,
22415
- refreshBalances,
22444
+ // refreshBalances,
22416
22445
  isLoading: isAssetsLoading
22417
22446
  } = useBlockscoutAssets({
22418
22447
  address
@@ -22424,10 +22453,10 @@ function SendMenu() {
22424
22453
  userOpHash,
22425
22454
  reset
22426
22455
  } = useSendTransaction();
22427
- (0, import_react77.useEffect)(() => {
22456
+ (0, import_react78.useEffect)(() => {
22428
22457
  useFlowSelectorStore.getState().setIsUiLocked(isAssetsLoading || isTransactionPending);
22429
22458
  }, [isAssetsLoading, isTransactionPending]);
22430
- (0, import_react77.useEffect)(() => {
22459
+ (0, import_react78.useEffect)(() => {
22431
22460
  useFlowSelectorStore.getState().setError(sendTransactionError || null);
22432
22461
  }, [sendTransactionError]);
22433
22462
  const {
@@ -22442,7 +22471,7 @@ function SendMenu() {
22442
22471
  } = useSendStore();
22443
22472
  const isNft = isNftAsset3(selectedAsset);
22444
22473
  const isSecurity = isSecurityToken2(selectedAsset);
22445
- (0, import_react77.useEffect)(
22474
+ (0, import_react78.useEffect)(
22446
22475
  () => () => {
22447
22476
  setSelectedAsset(null);
22448
22477
  setRecipient("");
@@ -22452,18 +22481,20 @@ function SendMenu() {
22452
22481
  },
22453
22482
  []
22454
22483
  );
22455
- (0, import_react77.useEffect)(() => {
22456
- const shouldSetNativeAsset = assets.length > 0 && !selectedAsset;
22457
- if (!shouldSetNativeAsset) return;
22458
- const native = assets.find((a) => a.type === "native");
22484
+ (0, import_react78.useEffect)(() => {
22485
+ const shouldNativeDefaultAsset = assets.length > 0 && !selectedAsset;
22486
+ if (!shouldNativeDefaultAsset) return;
22487
+ const chainNativeCurrency = useSession.getState().chainConfig?.nativeCurrency;
22488
+ const native = assets.find((a) => a.type === "native" && a.symbol === chainNativeCurrency?.symbol);
22459
22489
  if (isBalance(native)) return setSelectedAsset(native);
22460
22490
  const erc20 = assets.find((a) => a.type === "erc20");
22461
22491
  if (isBalance(erc20)) return setSelectedAsset(erc20);
22492
+ setSelectedAsset(assets[0]);
22462
22493
  }, [assets, selectedAsset]);
22463
22494
  const isNicknameInput = looksLikeNickname(recipient);
22464
22495
  const resolvedNicknameData = useNicknameResolve(recipient, { enabled: isNicknameInput, chainId: activeChainId });
22465
22496
  const effectiveAddress = isNicknameInput ? resolvedNicknameData?.resolvedAddress : recipient;
22466
- const complianceAmount = (0, import_react77.useMemo)(() => {
22497
+ const complianceAmount = (0, import_react78.useMemo)(() => {
22467
22498
  if (!isSecurity || !amount || !selectedAsset) return void 0;
22468
22499
  try {
22469
22500
  return (0, import_viem18.parseUnits)(amount, selectedAsset.decimals || 18);
@@ -22478,7 +22509,7 @@ function SendMenu() {
22478
22509
  enabled: isSecurity && !!effectiveAddress && !!complianceAmount,
22479
22510
  chainId: activeChainId
22480
22511
  });
22481
- (0, import_react77.useEffect)(() => {
22512
+ (0, import_react78.useEffect)(() => {
22482
22513
  const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
22483
22514
  switch (true) {
22484
22515
  case txStep === "select-asset":
@@ -22516,11 +22547,9 @@ function SendMenu() {
22516
22547
  ConfirmSendStep,
22517
22548
  {
22518
22549
  sendTransaction,
22519
- refreshBalances,
22520
22550
  erc3643Compliance,
22521
22551
  isNicknameInput,
22522
- resolvedNicknameData,
22523
- isTransactionPending
22552
+ resolvedNicknameData
22524
22553
  }
22525
22554
  ),
22526
22555
  txStep === "pending" && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)]", children: [
@@ -22542,7 +22571,7 @@ function SendMenu() {
22542
22571
  ] })
22543
22572
  ] });
22544
22573
  }
22545
- var import_lucide_react70, import_react77, import_viem18, import_jsx_runtime110;
22574
+ var import_lucide_react70, import_react78, import_viem18, import_jsx_runtime110;
22546
22575
  var init_SendMenu = __esm({
22547
22576
  "src/internal/components/SendMenu/send/SendMenu.tsx"() {
22548
22577
  init_SessionContext();
@@ -22551,7 +22580,7 @@ var init_SendMenu = __esm({
22551
22580
  init_useSendTransaction();
22552
22581
  init_useT();
22553
22582
  import_lucide_react70 = require("lucide-react");
22554
- import_react77 = require("react");
22583
+ import_react78 = require("react");
22555
22584
  import_viem18 = require("viem");
22556
22585
  init_useBlockscoutAssets();
22557
22586
  init_useLayoutDataStore();
@@ -22636,7 +22665,7 @@ function SendFlowSelector() {
22636
22665
  const error = useFlowSelectorStore((st) => st.error);
22637
22666
  const menuTitle = useFlowSelectorStore((st) => st.menuTitle);
22638
22667
  const selectorFlow = useFlowSelectorStore((st) => st.flow);
22639
- (0, import_react78.useEffect)(
22668
+ (0, import_react79.useEffect)(
22640
22669
  () => () => {
22641
22670
  useFlowSelectorStore.getState().setError(null);
22642
22671
  },
@@ -22713,12 +22742,12 @@ function SendFlowSelector() {
22713
22742
  }
22714
22743
  );
22715
22744
  }
22716
- var import_lucide_react71, import_react78, import_jsx_runtime111, SELECTOR_FLOW;
22745
+ var import_lucide_react71, import_react79, import_jsx_runtime111, SELECTOR_FLOW;
22717
22746
  var init_SendFlowSelector = __esm({
22718
22747
  "src/internal/components/SendMenu/SendFlowSelector.tsx"() {
22719
22748
  init_i18n();
22720
22749
  import_lucide_react71 = require("lucide-react");
22721
- import_react78 = require("react");
22750
+ import_react79 = require("react");
22722
22751
  init_useLayoutDataStore();
22723
22752
  init_useLayoutStore();
22724
22753
  init_utils2();
@@ -22773,12 +22802,12 @@ function getServerSnapshot() {
22773
22802
  return false;
22774
22803
  }
22775
22804
  function useProMode() {
22776
- return (0, import_react79.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
22805
+ return (0, import_react80.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
22777
22806
  }
22778
- var import_react79, STORAGE_KEY, EVENT_NAME;
22807
+ var import_react80, STORAGE_KEY, EVENT_NAME;
22779
22808
  var init_pro_mode = __esm({
22780
22809
  "src/internal/lib/pro-mode.ts"() {
22781
- import_react79 = require("react");
22810
+ import_react80 = require("react");
22782
22811
  STORAGE_KEY = "embarkai_pro_mode";
22783
22812
  EVENT_NAME = "embarkai-pro-mode-changed";
22784
22813
  }
@@ -22820,7 +22849,7 @@ function useSettingsButtons() {
22820
22849
  if (proMode) {
22821
22850
  settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: import_lucide_react73.HardDrive });
22822
22851
  }
22823
- (0, import_react80.useEffect)(() => {
22852
+ (0, import_react81.useEffect)(() => {
22824
22853
  const cssvEl = document.querySelector(".embarkai-ui-scope");
22825
22854
  if (!cssvEl || !window?.getComputedStyle) {
22826
22855
  return;
@@ -22842,7 +22871,7 @@ function SettingsMenu() {
22842
22871
  const setPage = useLayoutDataStore((st) => st.setPage);
22843
22872
  const settingsButtons = useSettingsButtons();
22844
22873
  useProvidersList();
22845
- (0, import_react_query49.useQuery)({
22874
+ (0, import_react_query50.useQuery)({
22846
22875
  retry: 1,
22847
22876
  enabled: !!address,
22848
22877
  queryKey: [QUERY_KEYS.nicknameInfo, address],
@@ -22884,15 +22913,15 @@ function SettingsMenu() {
22884
22913
  }
22885
22914
  );
22886
22915
  }
22887
- var import_react_query49, import_lucide_react73, import_react80, import_jsx_runtime112;
22916
+ var import_react_query50, import_lucide_react73, import_react81, import_jsx_runtime112;
22888
22917
  var init_SettingsMenu = __esm({
22889
22918
  "src/internal/components/SettingsMenu/SettingsMenu.tsx"() {
22890
22919
  init_ProviderContext();
22891
22920
  init_SessionContext();
22892
22921
  init_i18n();
22893
- import_react_query49 = require("@tanstack/react-query");
22922
+ import_react_query50 = require("@tanstack/react-query");
22894
22923
  import_lucide_react73 = require("lucide-react");
22895
- import_react80 = require("react");
22924
+ import_react81 = require("react");
22896
22925
  init_nickname();
22897
22926
  init_profile();
22898
22927
  init_useLayoutDataStore();
@@ -23758,26 +23787,26 @@ var init_TransactionsGroup = __esm({
23758
23787
 
23759
23788
  // src/internal/components/TransactionsMenu/TransactionsMenu.tsx
23760
23789
  function TransactionsMenu() {
23761
- const qc = (0, import_react_query50.useQueryClient)();
23790
+ const qc = (0, import_react_query51.useQueryClient)();
23762
23791
  const address = useSession((st) => st.address);
23763
23792
  const chainConfig = useSession((st) => st.chainConfig);
23764
23793
  const { t } = useT();
23765
23794
  const setPage = useLayoutDataStore((st) => st.setPage);
23766
23795
  const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
23767
- const [expandedGroups, setExpandedGroups] = (0, import_react81.useState)({});
23796
+ const [expandedGroups, setExpandedGroups] = (0, import_react82.useState)({});
23768
23797
  const historySupported = isTransactionHistorySupported(chainConfig?.id);
23769
23798
  const {
23770
23799
  data: txHistoryGroups = [],
23771
23800
  isLoading: isTxHistoryLoading,
23772
23801
  isFetching: isTxHistoryFetching,
23773
23802
  error: txHistoryError
23774
- } = (0, import_react_query50.useQuery)({
23803
+ } = (0, import_react_query51.useQuery)({
23775
23804
  retry: false,
23776
23805
  enabled: !!address && !!chainConfig?.id && historySupported,
23777
23806
  queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address],
23778
23807
  queryFn: () => getTransactionsListQuery({ address, chainConfig })
23779
23808
  });
23780
- const refreshTxHistory = (0, import_react81.useCallback)(
23809
+ const refreshTxHistory = (0, import_react82.useCallback)(
23781
23810
  () => qc.invalidateQueries({ queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address] }),
23782
23811
  [qc, chainConfig.id, address]
23783
23812
  );
@@ -23826,14 +23855,14 @@ function TransactionsMenu() {
23826
23855
  }
23827
23856
  );
23828
23857
  }
23829
- var import_react_query50, import_lucide_react76, import_react81, import_jsx_runtime115;
23858
+ var import_react_query51, import_lucide_react76, import_react82, import_jsx_runtime115;
23830
23859
  var init_TransactionsMenu = __esm({
23831
23860
  "src/internal/components/TransactionsMenu/TransactionsMenu.tsx"() {
23832
23861
  init_SessionContext();
23833
23862
  init_i18n();
23834
- import_react_query50 = require("@tanstack/react-query");
23863
+ import_react_query51 = require("@tanstack/react-query");
23835
23864
  import_lucide_react76 = require("lucide-react");
23836
- import_react81 = require("react");
23865
+ import_react82 = require("react");
23837
23866
  init_useLayoutDataStore();
23838
23867
  init_useLayoutStore();
23839
23868
  init_Expandable2();
@@ -24031,7 +24060,7 @@ function usePageMapper() {
24031
24060
  setIsDialogOpen,
24032
24061
  setIsDialogClosing
24033
24062
  } = useLayoutStore();
24034
- const closeDialog = (0, import_react82.useCallback)(() => {
24063
+ const closeDialog = (0, import_react83.useCallback)(() => {
24035
24064
  setIsDialogClosing(true);
24036
24065
  setTimeout(() => {
24037
24066
  setDialogContent(null);
@@ -24042,7 +24071,7 @@ function usePageMapper() {
24042
24071
  setIsDialogOpen(false);
24043
24072
  }, CLEAR_DIALOG_TIMEOUT);
24044
24073
  }, [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogForced, setIsDialogOpen, setIsDialogClosing]);
24045
- const openDialog = (0, import_react82.useCallback)(
24074
+ const openDialog = (0, import_react83.useCallback)(
24046
24075
  (pageItem) => {
24047
24076
  const PageContentComponent = pageItem.component;
24048
24077
  setDialogTitle(pageItem.title);
@@ -24052,7 +24081,7 @@ function usePageMapper() {
24052
24081
  },
24053
24082
  [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
24054
24083
  );
24055
- (0, import_react82.useEffect)(() => {
24084
+ (0, import_react83.useEffect)(() => {
24056
24085
  if (page === null) return closeDialog();
24057
24086
  const pageItem = PAGE_MAP[page];
24058
24087
  if (!pageItem) {
@@ -24063,10 +24092,10 @@ function usePageMapper() {
24063
24092
  openDialog(pageItem);
24064
24093
  }, [page, closeDialog, openDialog]);
24065
24094
  }
24066
- var import_react82, import_jsx_runtime116, CLEAR_DIALOG_TIMEOUT;
24095
+ var import_react83, import_jsx_runtime116, CLEAR_DIALOG_TIMEOUT;
24067
24096
  var init_usePageMapper = __esm({
24068
24097
  "src/internal/hooks/usePageMapper.tsx"() {
24069
- import_react82 = require("react");
24098
+ import_react83 = require("react");
24070
24099
  init_PageMap();
24071
24100
  init_constants();
24072
24101
  init_useLayoutDataStore();
@@ -24082,32 +24111,32 @@ function useSettingsNotifications() {
24082
24111
  const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
24083
24112
  const providers = import_auth23.jwtTokenManager.getProviders();
24084
24113
  const hasEmail = providers.includes("email");
24085
- const { data: userProfile = null } = (0, import_react_query51.useQuery)({
24114
+ const { data: userProfile = null } = (0, import_react_query52.useQuery)({
24086
24115
  retry: false,
24087
24116
  enabled: !!address,
24088
24117
  queryKey: [QUERY_KEYS.userProfile, address],
24089
24118
  queryFn: getUserProfile
24090
24119
  });
24091
- (0, import_react83.useEffect)(() => {
24120
+ (0, import_react84.useEffect)(() => {
24092
24121
  const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
24093
24122
  setSettingsNotifications({
24094
24123
  ...COMPLETE_KYC_PROGRESS,
24095
24124
  status: isKYCVerified ? "resolved" : "active"
24096
24125
  });
24097
24126
  }, [userProfile, setSettingsNotifications]);
24098
- (0, import_react83.useEffect)(() => {
24127
+ (0, import_react84.useEffect)(() => {
24099
24128
  setSettingsNotifications({
24100
24129
  ...EMAIL_NOT_CONNECTED_NOTIFICATION,
24101
24130
  status: hasEmail ? "resolved" : "active"
24102
24131
  });
24103
24132
  }, [hasEmail, setSettingsNotifications]);
24104
24133
  }
24105
- var import_react_query51, import_react83, EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
24134
+ var import_react_query52, import_react84, EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
24106
24135
  var init_useSettingsNotifications = __esm({
24107
24136
  "src/internal/hooks/useSettingsNotifications.ts"() {
24108
24137
  init_SessionContext();
24109
- import_react_query51 = require("@tanstack/react-query");
24110
- import_react83 = require("react");
24138
+ import_react_query52 = require("@tanstack/react-query");
24139
+ import_react84 = require("react");
24111
24140
  init_auth();
24112
24141
  init_profile();
24113
24142
  init_useLayoutDataStore();
@@ -24130,7 +24159,7 @@ var init_package = __esm({
24130
24159
  "package.json"() {
24131
24160
  package_default = {
24132
24161
  name: "@embarkai/ui-kit",
24133
- version: "0.4.51",
24162
+ version: "0.4.53",
24134
24163
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
24135
24164
  type: "module",
24136
24165
  main: "./dist/index.cjs",
@@ -24232,7 +24261,7 @@ var init_package = __esm({
24232
24261
 
24233
24262
  // src/internal/components/Footer/Footer.tsx
24234
24263
  function Footer() {
24235
- const qc = (0, import_react_query52.useQueryClient)();
24264
+ const qc = (0, import_react_query53.useQueryClient)();
24236
24265
  const { callbacksRef } = useProviderConfig();
24237
24266
  const { t } = useT();
24238
24267
  const address = useSession((st) => st.address);
@@ -24249,7 +24278,7 @@ function Footer() {
24249
24278
  }
24250
24279
  }
24251
24280
  });
24252
- const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query52.useMutation)({
24281
+ const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query53.useMutation)({
24253
24282
  mutationFn: async (disconnectAddress) => {
24254
24283
  if (!disconnectAddress) throw new Error("No address to disconnect");
24255
24284
  const { setError, setStatus, setIsLoading } = useSession.getState();
@@ -24335,7 +24364,7 @@ function Footer() {
24335
24364
  }
24336
24365
  );
24337
24366
  }
24338
- var import_react_query52, import_lucide_react77, import_wagmi7, import_jsx_runtime117;
24367
+ var import_react_query53, import_lucide_react77, import_wagmi7, import_jsx_runtime117;
24339
24368
  var init_Footer = __esm({
24340
24369
  "src/internal/components/Footer/Footer.tsx"() {
24341
24370
  init_package();
@@ -24343,7 +24372,7 @@ var init_Footer = __esm({
24343
24372
  init_ProviderContext();
24344
24373
  init_SessionContext();
24345
24374
  init_i18n();
24346
- import_react_query52 = require("@tanstack/react-query");
24375
+ import_react_query53 = require("@tanstack/react-query");
24347
24376
  import_lucide_react77 = require("lucide-react");
24348
24377
  import_wagmi7 = require("wagmi");
24349
24378
  init_auth();
@@ -24376,11 +24405,11 @@ function Header() {
24376
24405
  const chainConfig = useSession((st) => st.chainConfig);
24377
24406
  const { t } = useT();
24378
24407
  const proMode = useProMode();
24379
- const [proToast, setProToast] = (0, import_react84.useState)(false);
24380
- const [copied, setCopied] = (0, import_react84.useState)(false);
24381
- const clickCountRef = (0, import_react84.useRef)(0);
24382
- const clickTimerRef = (0, import_react84.useRef)(null);
24383
- const handleAvatarClick = (0, import_react84.useCallback)(() => {
24408
+ const [proToast, setProToast] = (0, import_react85.useState)(false);
24409
+ const [copied, setCopied] = (0, import_react85.useState)(false);
24410
+ const clickCountRef = (0, import_react85.useRef)(0);
24411
+ const clickTimerRef = (0, import_react85.useRef)(null);
24412
+ const handleAvatarClick = (0, import_react85.useCallback)(() => {
24384
24413
  clickCountRef.current += 1;
24385
24414
  if (clickTimerRef.current) {
24386
24415
  clearTimeout(clickTimerRef.current);
@@ -24398,7 +24427,7 @@ function Header() {
24398
24427
  }, 1e3);
24399
24428
  }
24400
24429
  }, []);
24401
- const { data: profile, isLoading: isProfileLoading } = (0, import_react_query53.useQuery)({
24430
+ const { data: profile, isLoading: isProfileLoading } = (0, import_react_query54.useQuery)({
24402
24431
  retry: false,
24403
24432
  enabled: !!address,
24404
24433
  queryKey: [QUERY_KEYS.userProfile, address],
@@ -24480,7 +24509,7 @@ function Header() {
24480
24509
  }
24481
24510
  );
24482
24511
  }
24483
- var import_react_query53, import_lucide_react78, import_react84, import_jsx_runtime118;
24512
+ var import_react_query54, import_lucide_react78, import_react85, import_jsx_runtime118;
24484
24513
  var init_Header = __esm({
24485
24514
  "src/internal/components/Header/Header.tsx"() {
24486
24515
  init_lumia2();
@@ -24488,9 +24517,9 @@ var init_Header = __esm({
24488
24517
  init_ProviderContext();
24489
24518
  init_SessionContext();
24490
24519
  init_useT();
24491
- import_react_query53 = require("@tanstack/react-query");
24520
+ import_react_query54 = require("@tanstack/react-query");
24492
24521
  import_lucide_react78 = require("lucide-react");
24493
- import_react84 = require("react");
24522
+ import_react85 = require("react");
24494
24523
  init_icons();
24495
24524
  init_auth();
24496
24525
  init_profile();
@@ -24521,7 +24550,7 @@ function useDecideContentStyles() {
24521
24550
  style: (0, import_lodash_es10.merge)({}, mobileStyles)
24522
24551
  };
24523
24552
  }
24524
- var DialogPrimitive, import_lodash_es10, import_lucide_react79, import_react85, import_jsx_runtime119, Dialog, DialogPortal, DialogOverlay, CONTENT_BG_SETUP, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription;
24553
+ var DialogPrimitive, import_lodash_es10, import_lucide_react79, import_react86, import_jsx_runtime119, Dialog, DialogPortal, DialogOverlay, CONTENT_BG_SETUP, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription;
24525
24554
  var init_dialog = __esm({
24526
24555
  "src/internal/components/ui/dialog.tsx"() {
24527
24556
  init_utils2();
@@ -24530,14 +24559,14 @@ var init_dialog = __esm({
24530
24559
  DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
24531
24560
  import_lodash_es10 = require("lodash-es");
24532
24561
  import_lucide_react79 = require("lucide-react");
24533
- import_react85 = require("react");
24562
+ import_react86 = require("react");
24534
24563
  init_useLayoutDataStore();
24535
24564
  init_useLayoutStore();
24536
24565
  init_button();
24537
24566
  import_jsx_runtime119 = require("react/jsx-runtime");
24538
24567
  Dialog = DialogPrimitive.Root;
24539
24568
  DialogPortal = DialogPrimitive.Portal;
24540
- DialogOverlay = (0, import_react85.forwardRef)(
24569
+ DialogOverlay = (0, import_react86.forwardRef)(
24541
24570
  ({ className, closing, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
24542
24571
  DialogPrimitive.Overlay,
24543
24572
  {
@@ -24559,7 +24588,7 @@ var init_dialog = __esm({
24559
24588
  border: "1px solid var(--ui-kit-bd)",
24560
24589
  boxShadow: "var(--ui-kit-shadow, 0px 4px 10px var(--ui-kit-shadow-c, rgba(0, 0, 0, 0.1)))"
24561
24590
  };
24562
- DialogContent = (0, import_react85.forwardRef)(
24591
+ DialogContent = (0, import_react86.forwardRef)(
24563
24592
  ({ className, children, colorMode, ...props }, ref) => {
24564
24593
  const { t, i18n } = useT();
24565
24594
  const isSessionLoading = useSession((st) => st.isLoading);
@@ -24662,7 +24691,7 @@ var init_dialog = __esm({
24662
24691
  DialogHeader.displayName = "DialogHeader";
24663
24692
  DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
24664
24693
  DialogFooter.displayName = "DialogFooter";
24665
- DialogTitle = (0, import_react85.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
24694
+ DialogTitle = (0, import_react86.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
24666
24695
  DialogPrimitive.Title,
24667
24696
  {
24668
24697
  ref,
@@ -24671,7 +24700,7 @@ var init_dialog = __esm({
24671
24700
  }
24672
24701
  ));
24673
24702
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
24674
- DialogDescription = (0, import_react85.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
24703
+ DialogDescription = (0, import_react86.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
24675
24704
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
24676
24705
  }
24677
24706
  });
@@ -24696,7 +24725,7 @@ function Dialog2() {
24696
24725
  const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
24697
24726
  const setPage = useLayoutDataStore((st) => st.setPage);
24698
24727
  const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
24699
- (0, import_react86.useEffect)(() => setIsSettings(!!session), [session, setIsSettings]);
24728
+ (0, import_react87.useEffect)(() => setIsSettings(!!session), [session, setIsSettings]);
24700
24729
  usePageMapper();
24701
24730
  useAutoConnect();
24702
24731
  useBackupStatusChanges();
@@ -24734,13 +24763,13 @@ function Dialog2() {
24734
24763
  }
24735
24764
  );
24736
24765
  }
24737
- var import_framer_motion, import_react86, import_jsx_runtime121;
24766
+ var import_framer_motion, import_react87, import_jsx_runtime121;
24738
24767
  var init_Dialog = __esm({
24739
24768
  "src/internal/components/Dialog/Dialog.tsx"() {
24740
24769
  init_ProviderContext();
24741
24770
  init_SessionContext();
24742
24771
  import_framer_motion = require("framer-motion");
24743
- import_react86 = require("react");
24772
+ import_react87 = require("react");
24744
24773
  init_constants();
24745
24774
  init_useAutoConnect();
24746
24775
  init_useBackupStatusChanges();
@@ -24766,14 +24795,14 @@ var init_Dialog2 = __esm({
24766
24795
  });
24767
24796
 
24768
24797
  // src/internal/components/TssManager.tsx
24769
- var import_react87, TssManagerWithRef;
24798
+ var import_react88, TssManagerWithRef;
24770
24799
  var init_TssManager = __esm({
24771
24800
  "src/internal/components/TssManager.tsx"() {
24772
24801
  init_SessionContext();
24773
- import_react87 = __toESM(require("react"), 1);
24802
+ import_react88 = __toESM(require("react"), 1);
24774
24803
  init_auth();
24775
24804
  init_clients();
24776
- TssManagerWithRef = import_react87.default.forwardRef((props, ref) => {
24805
+ TssManagerWithRef = import_react88.default.forwardRef((props, ref) => {
24777
24806
  const { mpcPin } = props;
24778
24807
  const usePaymaster = useSession((st) => st.usePaymaster);
24779
24808
  const publicClient = useSession((st) => st.publicClient);
@@ -24781,14 +24810,14 @@ var init_TssManager = __esm({
24781
24810
  const setStatus = useSession((st) => st.setStatus);
24782
24811
  const setSession = useSession((st) => st.setSession);
24783
24812
  const setAddress = useSession((st) => st.setAddress);
24784
- const onSessionCreated = (0, import_react87.useCallback)(
24813
+ const onSessionCreated = (0, import_react88.useCallback)(
24785
24814
  (session, address) => {
24786
24815
  setSession(session);
24787
24816
  setAddress(address);
24788
24817
  },
24789
24818
  [setSession, setAddress]
24790
24819
  );
24791
- const createSessionWithKeyshare = import_react87.default.useCallback(
24820
+ const createSessionWithKeyshare = import_react88.default.useCallback(
24792
24821
  async (userId, hasServerKeyshare, isNewUser) => {
24793
24822
  setStatus("checking key management setup...");
24794
24823
  await ensureKeyshare(userId, hasServerKeyshare, setStatus, isNewUser);
@@ -24813,7 +24842,7 @@ var init_TssManager = __esm({
24813
24842
  },
24814
24843
  [setStatus, usePaymaster, activeChainId, publicClient, mpcPin]
24815
24844
  );
24816
- import_react87.default.useImperativeHandle(ref, () => ({ createSessionWithKeyshare }), [createSessionWithKeyshare]);
24845
+ import_react88.default.useImperativeHandle(ref, () => ({ createSessionWithKeyshare }), [createSessionWithKeyshare]);
24817
24846
  return null;
24818
24847
  });
24819
24848
  }
@@ -24821,7 +24850,7 @@ var init_TssManager = __esm({
24821
24850
 
24822
24851
  // src/internal/components/WalletConnectHandler.tsx
24823
24852
  function WalletConnectHandler() {
24824
- const qc = (0, import_react_query54.useQueryClient)();
24853
+ const qc = (0, import_react_query55.useQueryClient)();
24825
24854
  const { callbacksRef } = useProviderConfig();
24826
24855
  const passportWalletAddress = useSession((st) => st.address);
24827
24856
  const { address: walletAddress, isConnected, chain, connector } = (0, import_wagmi8.useAccount)();
@@ -24841,7 +24870,7 @@ function WalletConnectHandler() {
24841
24870
  const projectId = providerConfig?.projectId;
24842
24871
  const setExternalWallet = useExternalWalletStore((st) => st.setExternalWallet);
24843
24872
  const setPendingWalletLogin = useLayoutDataStore((st) => st.setPendingWalletLogin);
24844
- const onLinkingComplete = (0, import_react88.useCallback)(
24873
+ const onLinkingComplete = (0, import_react89.useCallback)(
24845
24874
  async (success) => {
24846
24875
  setIsWalletLinking(false);
24847
24876
  if (!success && !passportWalletAddress) {
@@ -24870,10 +24899,10 @@ function WalletConnectHandler() {
24870
24899
  },
24871
24900
  [qc, passportWalletAddress, setProviderType, setPage, setIsWalletLinking]
24872
24901
  );
24873
- const [hasStartedLinking, setHasStartedLinking] = import_react88.default.useState(false);
24874
- const [modalWasOpened, setModalWasOpened] = import_react88.default.useState(false);
24875
- const [pendingModalOpen, setPendingModalOpen] = import_react88.default.useState(false);
24876
- (0, import_react88.useEffect)(() => {
24902
+ const [hasStartedLinking, setHasStartedLinking] = import_react89.default.useState(false);
24903
+ const [modalWasOpened, setModalWasOpened] = import_react89.default.useState(false);
24904
+ const [pendingModalOpen, setPendingModalOpen] = import_react89.default.useState(false);
24905
+ (0, import_react89.useEffect)(() => {
24877
24906
  if (isWalletLinking && !hasStartedLinking) {
24878
24907
  console.log("[WalletConnectHandler] Starting wallet link flow:", {
24879
24908
  isConnected,
@@ -24911,18 +24940,18 @@ function WalletConnectHandler() {
24911
24940
  setProviderType,
24912
24941
  walletMode
24913
24942
  ]);
24914
- (0, import_react88.useEffect)(() => {
24943
+ (0, import_react89.useEffect)(() => {
24915
24944
  if (pendingModalOpen && !isConnected && openConnectModal) {
24916
24945
  setPendingModalOpen(false);
24917
24946
  openConnectModal();
24918
24947
  }
24919
24948
  }, [pendingModalOpen, isConnected, openConnectModal]);
24920
- (0, import_react88.useEffect)(() => {
24949
+ (0, import_react89.useEffect)(() => {
24921
24950
  if (connectModalOpen && hasStartedLinking) {
24922
24951
  setModalWasOpened(true);
24923
24952
  }
24924
24953
  }, [connectModalOpen, hasStartedLinking]);
24925
- (0, import_react88.useEffect)(() => {
24954
+ (0, import_react89.useEffect)(() => {
24926
24955
  if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
24927
24956
  console.log("[WalletConnectHandler] Modal closed without connecting");
24928
24957
  onLinkingComplete(false);
@@ -24930,7 +24959,7 @@ function WalletConnectHandler() {
24930
24959
  setModalWasOpened(false);
24931
24960
  }
24932
24961
  }, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
24933
- (0, import_react88.useEffect)(() => {
24962
+ (0, import_react89.useEffect)(() => {
24934
24963
  if (isWalletLinking) {
24935
24964
  const timeout = setTimeout(() => {
24936
24965
  console.warn("[WalletConnectHandler] Wallet linking timed out, resetting state");
@@ -24949,7 +24978,7 @@ function WalletConnectHandler() {
24949
24978
  }
24950
24979
  }, [isWalletLinking, setIsWalletLinking, disconnect]);
24951
24980
  const isAuthFlow = !passportWalletAddress;
24952
- const { mutate: handleWalletSign, isPending: isWalletSigning } = (0, import_react_query54.useMutation)({
24981
+ const { mutate: handleWalletSign, isPending: isWalletSigning } = (0, import_react_query55.useMutation)({
24953
24982
  mutationFn: async (payload) => {
24954
24983
  const { chainId, signingWalletAddress } = payload;
24955
24984
  if (!signingWalletAddress || !chainId) {
@@ -25050,7 +25079,7 @@ function WalletConnectHandler() {
25050
25079
  setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
25051
25080
  }
25052
25081
  });
25053
- (0, import_react88.useEffect)(() => {
25082
+ (0, import_react89.useEffect)(() => {
25054
25083
  if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking && modalWasOpened && !pendingModalOpen) {
25055
25084
  console.log("[WalletConnectHandler] handleWalletSign triggered");
25056
25085
  if (!passportWalletAddress) {
@@ -25060,7 +25089,7 @@ function WalletConnectHandler() {
25060
25089
  handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
25061
25090
  }
25062
25091
  }, [chain, isConnected, walletAddress, isWalletLinking, hasStartedLinking, modalWasOpened, pendingModalOpen]);
25063
- (0, import_react88.useEffect)(() => {
25092
+ (0, import_react89.useEffect)(() => {
25064
25093
  if (isConnected && !chain?.id && isWalletLinking && hasStartedLinking && !connectModalOpen && !isWalletSigning) {
25065
25094
  const timeout = setTimeout(() => {
25066
25095
  console.warn("[WalletConnectHandler] Wallet connected but chain info missing, resetting");
@@ -25082,15 +25111,15 @@ function WalletConnectHandler() {
25082
25111
  ]);
25083
25112
  return null;
25084
25113
  }
25085
- var import_rainbowkit2, import_react_query54, import_react88, import_wagmi8;
25114
+ var import_rainbowkit2, import_react_query55, import_react89, import_wagmi8;
25086
25115
  var init_WalletConnectHandler = __esm({
25087
25116
  "src/internal/components/WalletConnectHandler.tsx"() {
25088
25117
  init_ProviderContext();
25089
25118
  init_SessionContext();
25090
25119
  init_linkedProfiles();
25091
25120
  import_rainbowkit2 = require("@rainbow-me/rainbowkit");
25092
- import_react_query54 = require("@tanstack/react-query");
25093
- import_react88 = __toESM(require("react"), 1);
25121
+ import_react_query55 = require("@tanstack/react-query");
25122
+ import_react89 = __toESM(require("react"), 1);
25094
25123
  import_wagmi8 = require("wagmi");
25095
25124
  init_wallet();
25096
25125
  init_AuthMenu2();
@@ -25111,13 +25140,13 @@ function DirectWalletHandler() {
25111
25140
  const setExternalChainId = useExternalWalletStore((st) => st.setExternalChainId);
25112
25141
  const setConfigMode = useExternalWalletStore((st) => st.setConfigMode);
25113
25142
  const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
25114
- (0, import_react89.useEffect)(() => {
25143
+ (0, import_react90.useEffect)(() => {
25115
25144
  setConfigMode(walletMode);
25116
25145
  if (walletMode !== "both") {
25117
25146
  setActiveMode(walletMode);
25118
25147
  }
25119
25148
  }, [walletMode, setConfigMode, setActiveMode]);
25120
- (0, import_react89.useEffect)(() => {
25149
+ (0, import_react90.useEffect)(() => {
25121
25150
  if (isConnected && address && !isExternalConnected && connector && chain?.id) {
25122
25151
  setExternalWallet({
25123
25152
  address,
@@ -25126,17 +25155,17 @@ function DirectWalletHandler() {
25126
25155
  });
25127
25156
  }
25128
25157
  }, [isConnected, address, isExternalConnected, connector, chain?.id, setExternalWallet]);
25129
- (0, import_react89.useEffect)(() => {
25158
+ (0, import_react90.useEffect)(() => {
25130
25159
  if (isExternalConnected && !isConnected) {
25131
25160
  clearExternalWallet();
25132
25161
  }
25133
25162
  }, [isConnected, isExternalConnected, clearExternalWallet]);
25134
- (0, import_react89.useEffect)(() => {
25163
+ (0, import_react90.useEffect)(() => {
25135
25164
  if (isExternalConnected && isConnected && chain?.id) {
25136
25165
  setExternalChainId(chain.id);
25137
25166
  }
25138
25167
  }, [chain?.id, isConnected, isExternalConnected, setExternalChainId]);
25139
- (0, import_react89.useEffect)(() => {
25168
+ (0, import_react90.useEffect)(() => {
25140
25169
  if (isExternalConnected && isConnected && address && address !== externalAddress && connector && chain?.id) {
25141
25170
  setExternalWallet({
25142
25171
  address,
@@ -25147,10 +25176,10 @@ function DirectWalletHandler() {
25147
25176
  }, [address, isConnected, isExternalConnected, externalAddress, chain?.id, connector, setExternalWallet]);
25148
25177
  return null;
25149
25178
  }
25150
- var import_react89, import_wagmi9;
25179
+ var import_react90, import_wagmi9;
25151
25180
  var init_DirectWalletHandler = __esm({
25152
25181
  "src/internal/components/DirectWalletHandler.tsx"() {
25153
- import_react89 = require("react");
25182
+ import_react90 = require("react");
25154
25183
  import_wagmi9 = require("wagmi");
25155
25184
  init_ProviderContext();
25156
25185
  init_useExternalWalletStore();
@@ -25175,7 +25204,7 @@ function waitForStoreHydration() {
25175
25204
  }
25176
25205
  function SessionProvider({ children }) {
25177
25206
  const config = useProviderConfig().config;
25178
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_react90.Fragment, { children: [
25207
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_react91.Fragment, { children: [
25179
25208
  children,
25180
25209
  config.current?.wallet?.enabled && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(WalletConnectHandler, {}),
25181
25210
  config.current?.wallet?.enabled && (config.current?.wallet?.mode === "direct" || config.current?.wallet?.mode === "both") && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DirectWalletHandler, {}),
@@ -25190,11 +25219,11 @@ function SessionProvider({ children }) {
25190
25219
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Dialog2, {})
25191
25220
  ] });
25192
25221
  }
25193
- var import_read21, import_react90, import_zustand13, import_middleware4, import_jsx_runtime122, useSession, requireActiveChainId;
25222
+ var import_read21, import_react91, import_zustand13, import_middleware4, import_jsx_runtime122, useSession, requireActiveChainId;
25194
25223
  var init_SessionContext = __esm({
25195
25224
  "src/context/SessionContext.tsx"() {
25196
25225
  import_read21 = require("@embarkai/core/read");
25197
- import_react90 = require("react");
25226
+ import_react91 = require("react");
25198
25227
  import_zustand13 = require("zustand");
25199
25228
  import_middleware4 = require("zustand/middleware");
25200
25229
  init_BalanceFeedProvider2();
@@ -27863,7 +27892,7 @@ var init_rainbowkit = __esm({
27863
27892
  function RainbowKitProvider({ children }) {
27864
27893
  const config = useProviderConfig().config;
27865
27894
  const colorMode = useLayoutStore((st) => st.colorMode);
27866
- const rainbowConfig = (0, import_react91.useMemo)(
27895
+ const rainbowConfig = (0, import_react92.useMemo)(
27867
27896
  () => createRainbowConfig({
27868
27897
  projectId: config.current?.wallet?.walletConnectProjectId,
27869
27898
  allowedWallets: config.current?.wallet?.allowedWallets,
@@ -27877,7 +27906,7 @@ function RainbowKitProvider({ children }) {
27877
27906
  config.current?.wallet?.walletConnectProjectId
27878
27907
  ]
27879
27908
  );
27880
- const customTheme = (0, import_react91.useMemo)(() => {
27909
+ const customTheme = (0, import_react92.useMemo)(() => {
27881
27910
  if (!config.current?.wallet?.enabled) return {};
27882
27911
  return colorMode === "dark" ? {
27883
27912
  ...(0, import_rainbowkit4.darkTheme)(),
@@ -27894,11 +27923,11 @@ function RainbowKitProvider({ children }) {
27894
27923
  if (!config.current?.wallet?.enabled) return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_jsx_runtime123.Fragment, { children });
27895
27924
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_wagmi11.WagmiProvider, { config: rainbowConfig, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_rainbowkit4.RainbowKitProvider, { theme: customTheme, modalSize: "compact", showRecentTransactions: true, children }) });
27896
27925
  }
27897
- var import_rainbowkit4, import_react91, import_wagmi11, import_styles, import_jsx_runtime123;
27926
+ var import_rainbowkit4, import_react92, import_wagmi11, import_styles, import_jsx_runtime123;
27898
27927
  var init_RainbowKitContext = __esm({
27899
27928
  "src/context/RainbowKitContext.tsx"() {
27900
27929
  import_rainbowkit4 = require("@rainbow-me/rainbowkit");
27901
- import_react91 = require("react");
27930
+ import_react92 = require("react");
27902
27931
  import_wagmi11 = require("wagmi");
27903
27932
  init_rainbowkit();
27904
27933
  init_useLayoutStore();
@@ -27954,10 +27983,10 @@ function clearLegacyWagmiStorage() {
27954
27983
  }
27955
27984
  function Provider(props) {
27956
27985
  const { children, projectId, initialConfig = {}, callbacks } = props;
27957
- const callbacksRef = (0, import_react92.useRef)(callbacks);
27958
- (0, import_react92.useEffect)(() => notifyNoProjetctId(projectId), [projectId]);
27959
- const config = (0, import_react92.useRef)((0, import_lodash_es11.merge)({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
27960
- const updateConfig = (0, import_react92.useCallback)((updates) => {
27986
+ const callbacksRef = (0, import_react93.useRef)(callbacks);
27987
+ (0, import_react93.useEffect)(() => notifyNoProjetctId(projectId), [projectId]);
27988
+ const config = (0, import_react93.useRef)((0, import_lodash_es11.merge)({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
27989
+ const updateConfig = (0, import_react93.useCallback)((updates) => {
27961
27990
  const prev = config.current;
27962
27991
  const next = { ...prev };
27963
27992
  if (updates.projectId !== void 0) next.projectId = updates.projectId;
@@ -27991,12 +28020,12 @@ function Provider(props) {
27991
28020
  if (updates.translations) next.translations = { ...next.translations, ...updates.translations };
27992
28021
  config.current = next;
27993
28022
  }, []);
27994
- const updateCallbacks = (0, import_react92.useCallback)((updates) => {
28023
+ const updateCallbacks = (0, import_react93.useCallback)((updates) => {
27995
28024
  const prev = callbacksRef.current;
27996
28025
  const next = updates ? { ...prev, ...updates } : void 0;
27997
28026
  callbacksRef.current = next;
27998
28027
  }, []);
27999
- (0, import_react92.useEffect)(() => {
28028
+ (0, import_react93.useEffect)(() => {
28000
28029
  if (typeof window === "undefined" || !projectId) return;
28001
28030
  const mergedConfig = (0, import_lodash_es11.merge)(DEFAULT_PROVIDER_CONFIG, initialConfig);
28002
28031
  updateConfig(mergedConfig);
@@ -28016,7 +28045,7 @@ function Provider(props) {
28016
28045
  useSession.getState().setActiveChainId(mergedConfig.network.chainId);
28017
28046
  }
28018
28047
  }, [projectId, initialConfig]);
28019
- (0, import_react92.useEffect)(() => {
28048
+ (0, import_react93.useEffect)(() => {
28020
28049
  if (typeof window === "undefined" || !projectId) return;
28021
28050
  try {
28022
28051
  (0, import_error_tracking4.initSdkErrorTracking)();
@@ -28045,7 +28074,7 @@ function Provider(props) {
28045
28074
  console.error("[PROVIDER] Error setting up iframe manager:", error);
28046
28075
  }
28047
28076
  }, [projectId]);
28048
- const contextValue = (0, import_react92.useMemo)(
28077
+ const contextValue = (0, import_react93.useMemo)(
28049
28078
  () => ({
28050
28079
  config,
28051
28080
  updateConfig,
@@ -28066,12 +28095,12 @@ function Provider(props) {
28066
28095
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(WagmiProvider2, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(UIContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(SessionProvider, { children }) }) })
28067
28096
  );
28068
28097
  }
28069
- var import_error_tracking4, import_lodash_es11, import_react92, import_jsx_runtime125, UIContext, useProviderConfig;
28098
+ var import_error_tracking4, import_lodash_es11, import_react93, import_jsx_runtime125, UIContext, useProviderConfig;
28070
28099
  var init_ProviderContext = __esm({
28071
28100
  "src/context/ProviderContext.tsx"() {
28072
28101
  import_error_tracking4 = require("@embarkai/core/internal/error-tracking");
28073
28102
  import_lodash_es11 = require("lodash-es");
28074
- import_react92 = require("react");
28103
+ import_react93 = require("react");
28075
28104
  init_initial();
28076
28105
  init_iframe_manager();
28077
28106
  init_RainbowKitContext();
@@ -28079,9 +28108,9 @@ var init_ProviderContext = __esm({
28079
28108
  init_utils11();
28080
28109
  init_WagmiContext();
28081
28110
  import_jsx_runtime125 = require("react/jsx-runtime");
28082
- UIContext = (0, import_react92.createContext)(void 0);
28111
+ UIContext = (0, import_react93.createContext)(void 0);
28083
28112
  useProviderConfig = () => {
28084
- const ctx = (0, import_react92.useContext)(UIContext);
28113
+ const ctx = (0, import_react93.useContext)(UIContext);
28085
28114
  if (!ctx) throw new Error("useProviderConfig must be used within a Provider");
28086
28115
  return ctx;
28087
28116
  };
@@ -28111,6 +28140,7 @@ __export(index_exports, {
28111
28140
  UserOperationTimeoutError: () => UserOperationTimeoutError,
28112
28141
  UserRejectedError: () => UserRejectedError,
28113
28142
  WALLET_ICONS: () => WALLET_ICONS,
28143
+ WRAPPED_TOKENS: () => WRAPPED_TOKENS,
28114
28144
  combineI18NResources: () => combineI18NResources,
28115
28145
  createAccountAbstractionError: () => createAccountAbstractionError,
28116
28146
  deployAccount: () => deployAccount,
@@ -28189,9 +28219,9 @@ init_ProviderContext();
28189
28219
  // src/components/ConnectWalletButton.tsx
28190
28220
  init_lumia2();
28191
28221
  init_embarkAI2();
28192
- var import_react_query55 = require("@tanstack/react-query");
28222
+ var import_react_query56 = require("@tanstack/react-query");
28193
28223
  var import_lucide_react80 = require("lucide-react");
28194
- var import_react93 = require("react");
28224
+ var import_react94 = require("react");
28195
28225
  init_SessionContext();
28196
28226
  init_auth();
28197
28227
  init_profile();
@@ -28224,15 +28254,15 @@ function ConnectWalletButton(props) {
28224
28254
  const colorMode = useLayoutStore((st) => st.colorMode);
28225
28255
  const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
28226
28256
  const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
28227
- (0, import_react93.useEffect)(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
28228
- const { data: profile, isLoading: isProfileLoading } = (0, import_react_query55.useQuery)({
28257
+ (0, import_react94.useEffect)(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
28258
+ const { data: profile, isLoading: isProfileLoading } = (0, import_react_query56.useQuery)({
28229
28259
  retry: false,
28230
28260
  enabled: !!address,
28231
28261
  queryKey: [QUERY_KEYS.userProfile, address],
28232
28262
  queryFn: getUserProfile
28233
28263
  });
28234
28264
  const displayName = profile?.nicknameDisplay || profile?.displayName || import_auth23.jwtTokenManager.getDisplayName();
28235
- const indicators = (0, import_react93.useMemo)(() => {
28265
+ const indicators = (0, import_react94.useMemo)(() => {
28236
28266
  const userId = session?.mpcUserId;
28237
28267
  if (!userId) return { server: false, local: false, backup: false };
28238
28268
  const server = import_auth23.jwtTokenManager.getHasKeyshare() ?? false;
@@ -28414,7 +28444,7 @@ var useActiveChainId = () => useSession((st) => st.activeChainId);
28414
28444
  var useHydrated = () => useSession((st) => st.hasHydrated);
28415
28445
 
28416
28446
  // src/hooks/useOpenPage.ts
28417
- var import_react94 = require("react");
28447
+ var import_react95 = require("react");
28418
28448
  init_SessionContext();
28419
28449
  init_useLayoutDataStore();
28420
28450
  function useOpenPage() {
@@ -28422,7 +28452,7 @@ function useOpenPage() {
28422
28452
  const setPage = useLayoutDataStore((st) => st.setPage);
28423
28453
  const setPageParams = useLayoutDataStore((st) => st.setPageParams);
28424
28454
  const address = useSession((st) => st.address);
28425
- const open = (0, import_react94.useCallback)(
28455
+ const open = (0, import_react95.useCallback)(
28426
28456
  (passportPage, params) => {
28427
28457
  if (!address) return setPage("auth" /* AUTH */);
28428
28458
  if (!!address && passportPage === "auth" /* AUTH */) return setPage("manage-wallet" /* MANAGE_WALLET */);
@@ -28431,7 +28461,7 @@ function useOpenPage() {
28431
28461
  },
28432
28462
  [setPage, setPageParams, address]
28433
28463
  );
28434
- const close = (0, import_react94.useCallback)(() => setPage(null), [setPage]);
28464
+ const close = (0, import_react95.useCallback)(() => setPage(null), [setPage]);
28435
28465
  return { open, close, isOpen: page !== null };
28436
28466
  }
28437
28467
 
@@ -28892,14 +28922,14 @@ var Hash = ({
28892
28922
  };
28893
28923
 
28894
28924
  // src/internal/components/TransactionsMenu/TransactionsList.tsx
28895
- var import_react95 = require("react");
28925
+ var import_react96 = require("react");
28896
28926
  init_base2();
28897
28927
  var import_jsx_runtime132 = require("react/jsx-runtime");
28898
28928
  var TransactionsList = ({ address, itemsCount = 10 }) => {
28899
- const [transactions, setTransactions] = (0, import_react95.useState)([]);
28900
- const [loading, setLoading] = (0, import_react95.useState)(true);
28901
- const [error, setError] = (0, import_react95.useState)(null);
28902
- (0, import_react95.useEffect)(() => {
28929
+ const [transactions, setTransactions] = (0, import_react96.useState)([]);
28930
+ const [loading, setLoading] = (0, import_react96.useState)(true);
28931
+ const [error, setError] = (0, import_react96.useState)(null);
28932
+ (0, import_react96.useEffect)(() => {
28903
28933
  const fetchTransactions2 = async () => {
28904
28934
  try {
28905
28935
  setLoading(true);
@@ -29190,13 +29220,13 @@ function useUserOpStatus(options = {}) {
29190
29220
  init_useErc3643Compliance();
29191
29221
 
29192
29222
  // src/hooks/useWalletMode.ts
29193
- var import_react96 = require("react");
29223
+ var import_react97 = require("react");
29194
29224
  init_useExternalWalletStore();
29195
29225
  function useWalletMode() {
29196
29226
  const configMode = useExternalWalletStore((st) => st.configMode);
29197
29227
  const activeMode = useExternalWalletStore((st) => st.activeMode);
29198
29228
  const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
29199
- const switchMode = (0, import_react96.useCallback)(
29229
+ const switchMode = (0, import_react97.useCallback)(
29200
29230
  (mode) => {
29201
29231
  if (configMode !== "both") return;
29202
29232
  setActiveMode(mode);
@@ -29212,7 +29242,7 @@ function useWalletMode() {
29212
29242
  }
29213
29243
 
29214
29244
  // src/hooks/useDirectWallet.ts
29215
- var import_react97 = require("react");
29245
+ var import_react98 = require("react");
29216
29246
  var import_rainbowkit6 = require("@rainbow-me/rainbowkit");
29217
29247
  var import_wagmi13 = require("wagmi");
29218
29248
  init_useExternalWalletStore();
@@ -29226,13 +29256,13 @@ function useDirectWallet() {
29226
29256
  const { disconnect: wagmiDisconnect } = (0, import_wagmi13.useDisconnect)();
29227
29257
  const { openConnectModal } = (0, import_rainbowkit6.useConnectModal)();
29228
29258
  const setIsWalletLinking = useLayoutDataStore((st) => st.setIsWalletLinking);
29229
- const connect = (0, import_react97.useCallback)(() => {
29259
+ const connect = (0, import_react98.useCallback)(() => {
29230
29260
  setIsWalletLinking(true);
29231
29261
  }, [setIsWalletLinking]);
29232
- const reconnect = (0, import_react97.useCallback)(() => {
29262
+ const reconnect = (0, import_react98.useCallback)(() => {
29233
29263
  if (openConnectModal) openConnectModal();
29234
29264
  }, [openConnectModal]);
29235
- const disconnect = (0, import_react97.useCallback)(() => {
29265
+ const disconnect = (0, import_react98.useCallback)(() => {
29236
29266
  wagmiDisconnect();
29237
29267
  clearExternalWallet();
29238
29268
  }, [wagmiDisconnect, clearExternalWallet]);
@@ -29248,7 +29278,7 @@ function useDirectWallet() {
29248
29278
  }
29249
29279
 
29250
29280
  // src/hooks/useSendDirectTransaction.ts
29251
- var import_react98 = require("react");
29281
+ var import_react99 = require("react");
29252
29282
  var import_viem20 = require("viem");
29253
29283
  var import_wagmi14 = require("wagmi");
29254
29284
  init_useExternalWalletStore();
@@ -29257,10 +29287,10 @@ function useSendDirectTransaction() {
29257
29287
  const externalChainId = useExternalWalletStore((st) => st.externalChainId);
29258
29288
  const { sendTransactionAsync } = (0, import_wagmi14.useSendTransaction)();
29259
29289
  const { switchChainAsync } = (0, import_wagmi14.useSwitchChain)();
29260
- const [isPending, setIsPending] = (0, import_react98.useState)(false);
29261
- const [error, setError] = (0, import_react98.useState)(null);
29262
- const [txHash, setTxHash] = (0, import_react98.useState)(null);
29263
- const sendTransaction = (0, import_react98.useCallback)(
29290
+ const [isPending, setIsPending] = (0, import_react99.useState)(false);
29291
+ const [error, setError] = (0, import_react99.useState)(null);
29292
+ const [txHash, setTxHash] = (0, import_react99.useState)(null);
29293
+ const sendTransaction = (0, import_react99.useCallback)(
29264
29294
  async (params) => {
29265
29295
  if (!isConnected) {
29266
29296
  setError("No external wallet connected");
@@ -29294,7 +29324,7 @@ function useSendDirectTransaction() {
29294
29324
  },
29295
29325
  [isConnected, externalChainId, sendTransactionAsync, switchChainAsync]
29296
29326
  );
29297
- const reset = (0, import_react98.useCallback)(() => {
29327
+ const reset = (0, import_react99.useCallback)(() => {
29298
29328
  setError(null);
29299
29329
  setTxHash(null);
29300
29330
  setIsPending(false);
@@ -29303,7 +29333,7 @@ function useSendDirectTransaction() {
29303
29333
  }
29304
29334
 
29305
29335
  // src/hooks/useTransferToLinkedWallet.ts
29306
- var import_react99 = require("react");
29336
+ var import_react100 = require("react");
29307
29337
  var import_viem21 = require("viem");
29308
29338
  init_SessionContext();
29309
29339
  init_account2();
@@ -29322,14 +29352,14 @@ var ERC20_TRANSFER_ABI2 = [
29322
29352
  function useTransferToLinkedWallet() {
29323
29353
  const session = useSession((st) => st.session);
29324
29354
  const { profiles } = useLinkedProfiles();
29325
- const [isPending, setIsPending] = (0, import_react99.useState)(false);
29326
- const [error, setError] = (0, import_react99.useState)(null);
29327
- const [userOpHash, setUserOpHash] = (0, import_react99.useState)(null);
29328
- const linkedWallets = (0, import_react99.useMemo)(
29355
+ const [isPending, setIsPending] = (0, import_react100.useState)(false);
29356
+ const [error, setError] = (0, import_react100.useState)(null);
29357
+ const [userOpHash, setUserOpHash] = (0, import_react100.useState)(null);
29358
+ const linkedWallets = (0, import_react100.useMemo)(
29329
29359
  () => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
29330
29360
  [profiles]
29331
29361
  );
29332
- const transfer = (0, import_react99.useCallback)(
29362
+ const transfer = (0, import_react100.useCallback)(
29333
29363
  async (params) => {
29334
29364
  if (!session) {
29335
29365
  setError("No active session");
@@ -29380,7 +29410,7 @@ function useTransferToLinkedWallet() {
29380
29410
  },
29381
29411
  [session, linkedWallets]
29382
29412
  );
29383
- const reset = (0, import_react99.useCallback)(() => {
29413
+ const reset = (0, import_react100.useCallback)(() => {
29384
29414
  setError(null);
29385
29415
  setUserOpHash(null);
29386
29416
  setIsPending(false);
@@ -29404,7 +29434,7 @@ function useNativeWalletSignature() {
29404
29434
 
29405
29435
  // src/hooks/useLogout.ts
29406
29436
  var import_auth25 = require("@embarkai/core/auth");
29407
- var import_react100 = require("react");
29437
+ var import_react101 = require("react");
29408
29438
  var import_wagmi16 = require("wagmi");
29409
29439
  init_ProviderContext();
29410
29440
  init_SessionContext();
@@ -29424,7 +29454,7 @@ function useLogout() {
29424
29454
  }
29425
29455
  }
29426
29456
  });
29427
- const logout2 = (0, import_react100.useCallback)(async () => {
29457
+ const logout2 = (0, import_react101.useCallback)(async () => {
29428
29458
  const { setSession, setIsLoading, setAddress, setStatus, setError } = useSession.getState();
29429
29459
  const prevAddress = address;
29430
29460
  let userId = null;
@@ -29542,7 +29572,7 @@ function useTransactions() {
29542
29572
 
29543
29573
  // src/modules/assets.ts
29544
29574
  init_SessionContext();
29545
- var import_react101 = __toESM(require("react"), 1);
29575
+ var import_react102 = __toESM(require("react"), 1);
29546
29576
  var import_viem23 = require("viem");
29547
29577
  var import_wagmi18 = require("wagmi");
29548
29578
  var COMMON_TOKENS = [
@@ -29698,7 +29728,7 @@ function useTokenBalance(tokenAddress, userAddress) {
29698
29728
  }
29699
29729
  });
29700
29730
  const { tokenInfo } = useTokenInfo(tokenAddress);
29701
- const formattedBalance = import_react101.default.useMemo(() => {
29731
+ const formattedBalance = import_react102.default.useMemo(() => {
29702
29732
  if (!balance || !tokenInfo) return "0";
29703
29733
  return (0, import_viem23.formatUnits)(balance, tokenInfo.decimals);
29704
29734
  }, [balance, tokenInfo]);
@@ -29768,6 +29798,7 @@ init_tokens();
29768
29798
  init_wallets();
29769
29799
 
29770
29800
  // src/index.ts
29801
+ init_constants();
29771
29802
  init_i18n();
29772
29803
 
29773
29804
  // src/internal/exportedQueryKeys.ts
@@ -29811,6 +29842,7 @@ autorun();
29811
29842
  UserOperationTimeoutError,
29812
29843
  UserRejectedError,
29813
29844
  WALLET_ICONS,
29845
+ WRAPPED_TOKENS,
29814
29846
  combineI18NResources,
29815
29847
  createAccountAbstractionError,
29816
29848
  deployAccount,