@embarkai/ui-kit 0.4.51 → 0.4.52

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.js CHANGED
@@ -805,7 +805,7 @@ var init_iframe_mpc_client = __esm({
805
805
 
806
806
  // src/internal/constants.ts
807
807
  import { Key, Mail, Wallet2 } from "lucide-react";
808
- var 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;
808
+ var 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;
809
809
  var init_constants = __esm({
810
810
  "src/internal/constants.ts"() {
811
811
  init_assets();
@@ -831,6 +831,7 @@ var init_constants = __esm({
831
831
  // Alias for twitter (API uses 'x')
832
832
  wallet: { name: "Wallet", icon: Wallet2, description: "External wallet (EOA)" }
833
833
  };
834
+ WRAPPED_TOKENS = ["WETH", "WBTC", "WBNB", "WLUMIA"];
834
835
  }
835
836
  });
836
837
 
@@ -11429,7 +11430,7 @@ function ChainItem(props) {
11429
11430
  children: name
11430
11431
  }
11431
11432
  ),
11432
- /* @__PURE__ */ jsx51(Badge, { variant: "secondary", children: badge })
11433
+ /* @__PURE__ */ jsx51(Badge, { variant: badge.toLowerCase() === "mainnet" ? "success" : "secondary", children: badge })
11433
11434
  ] }),
11434
11435
  isActiveChain && paymasterAddress && /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-xs", children: [
11435
11436
  /* @__PURE__ */ jsx51("span", { className: "flex-none uppercase", children: "Paymaster" }),
@@ -11554,7 +11555,7 @@ function ChainsMenu() {
11554
11555
  /* @__PURE__ */ jsx52(
11555
11556
  Switch,
11556
11557
  {
11557
- labels: { checked: "ALL", unchecked: "MAINNETS" },
11558
+ labels: { checked: "MAINNETS", unchecked: "ALL" },
11558
11559
  checked: isTestnets,
11559
11560
  onChange: () => setIsTestnets(!isTestnets)
11560
11561
  }
@@ -17856,7 +17857,7 @@ function isAssetRateAvailable(symbol) {
17856
17857
  }
17857
17858
  }
17858
17859
  function checkWrapedTokenSymbol(symbol) {
17859
- if (WRAPPED_SYMBOLS.includes(symbol)) {
17860
+ if (WRAPPED_TOKENS.includes(symbol)) {
17860
17861
  return symbol.slice(1);
17861
17862
  }
17862
17863
  return symbol.toUpperCase();
@@ -18008,10 +18009,11 @@ function PortfolioItem(props) {
18008
18009
  }
18009
18010
  );
18010
18011
  }
18011
- var WRAPPED_SYMBOLS, SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
18012
+ var SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
18012
18013
  var init_PortfolioItem = __esm({
18013
18014
  "src/internal/components/PortfolioMenu/PortfolioItem.tsx"() {
18014
18015
  init_ProviderContext();
18016
+ init_constants();
18015
18017
  init_no_image();
18016
18018
  init_tokens();
18017
18019
  init_base2();
@@ -18019,7 +18021,6 @@ var init_PortfolioItem = __esm({
18019
18021
  init_utils2();
18020
18022
  init_truncateMiddle();
18021
18023
  init_BalanceView2();
18022
- WRAPPED_SYMBOLS = ["WETH", "WBTC", "WBNB", "WLUMIA"];
18023
18024
  SKIP_SYMBOLS2 = ["TEST"];
18024
18025
  ASSETS_RATES_QUERY_KEY = "lumia-passport-assets-rates-query-key";
18025
18026
  }
@@ -18329,17 +18330,11 @@ var init_ReceiveMenu2 = __esm({
18329
18330
  });
18330
18331
 
18331
18332
  // src/internal/components/SecurityMenu/constants.ts
18332
- var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY, WELL_KNOWN_PROJECTS;
18333
+ var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY;
18333
18334
  var init_constants5 = __esm({
18334
18335
  "src/internal/components/SecurityMenu/constants.ts"() {
18335
18336
  KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
18336
18337
  CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
18337
- WELL_KNOWN_PROJECTS = {
18338
- // '327733f6-2e85-4afc-a505-e2c55d0a2659': 'https://staging-hub.lumia.org',
18339
- "11062797-f0a6-4737-bad8-086d1125dde1": "https://parlay.money",
18340
- "f7a70f92-58e9-4fe9-b713-61c27a24e3d6": "https://embark-demo-dapp.pages.dev"
18341
- // https://account.embarkai.io
18342
- };
18343
18338
  }
18344
18339
  });
18345
18340
 
@@ -18399,7 +18394,7 @@ import { Fragment as Fragment32, jsx as jsx86, jsxs as jsxs80 } from "react/jsx-
18399
18394
  function Application(props) {
18400
18395
  const { projectId, logo, name, appUrl, trustedAuthorizedApp, firstConnectedAt, untrustApp } = props;
18401
18396
  const { t } = useT();
18402
- const projectUrl = appUrl || WELL_KNOWN_PROJECTS[projectId] || null;
18397
+ const projectUrl = appUrl || null;
18403
18398
  return /* @__PURE__ */ jsxs80(
18404
18399
  "div",
18405
18400
  {
@@ -18512,7 +18507,6 @@ var init_ConnectedApps = __esm({
18512
18507
  init_i18n();
18513
18508
  init_button();
18514
18509
  init_highlight();
18515
- init_constants5();
18516
18510
  init_hooks2();
18517
18511
  }
18518
18512
  });
@@ -19376,7 +19370,6 @@ function useAvailableSenders() {
19376
19370
  return;
19377
19371
  }
19378
19372
  lastCalcedSenders.current = sendersAccumulator.map((s) => `${s.name}-${s.address}`);
19379
- console.info("[SENDER SELECTOR] setting bridge senders", sendersAccumulator);
19380
19373
  useBridgeStore.getState().setBridgeSenders(sendersAccumulator);
19381
19374
  useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
19382
19375
  }, [address, profiles]);
@@ -19995,7 +19988,11 @@ function useHyperlaneRoutes() {
19995
19988
  retry: false,
19996
19989
  enabled: !!address && page === "send" /* SEND */ && flow === "bridge",
19997
19990
  queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
19998
- queryFn: async () => getHyperlaneWarpRoutes()
19991
+ queryFn: async () => {
19992
+ const warpRoutes = await getHyperlaneWarpRoutes();
19993
+ useFlowSelectorStore.getState().setRenderKey(`hyperlane-bridge-warp-routes-loaded-${Date.now()}`);
19994
+ return warpRoutes;
19995
+ }
19999
19996
  });
20000
19997
  useEffect35(() => {
20001
19998
  if (!errorWarpRoutes) return;
@@ -20100,6 +20097,12 @@ import { useQuery as useQuery20, useQueryClient as useQueryClient23 } from "@tan
20100
20097
  import { useCallback as useCallback27, useEffect as useEffect37 } from "react";
20101
20098
  import { createPublicClient as createPublicClient2, erc20Abi as erc20Abi2, formatUnits as formatUnits7, http as http3 } from "viem";
20102
20099
  import { useSwitchChain as useSwitchChain2 } from "wagmi";
20100
+ function checkWrapedTokenSymbol2(symbol) {
20101
+ if (WRAPPED_TOKENS.includes(symbol)) {
20102
+ return symbol.slice(1);
20103
+ }
20104
+ return symbol.toUpperCase();
20105
+ }
20103
20106
  function useBridgeBalance(hyperlaneWarpRoutes) {
20104
20107
  const qc = useQueryClient23();
20105
20108
  const { t } = useT();
@@ -20125,7 +20128,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
20125
20128
  enabled: bridgeSender === "embarkai-wallet" && !!selectedWarpRoute && !!address && !!originChain,
20126
20129
  address
20127
20130
  });
20128
- const embarkTokenBalanace = assets.find((a) => a.symbol === selectedWarpRoute?.symbol);
20131
+ const embarkTokenBalanace = assets.find((a) => selectedWarpRoute?.symbol === checkWrapedTokenSymbol2(a.symbol));
20129
20132
  const originChainMeta = CHAINS_UI_META[originChain];
20130
20133
  const isSelectedTokenNative = selectedWarpRoute?.symbol?.toUpperCase() === originChainMeta?.chain?.nativeCurrency?.symbol?.toUpperCase();
20131
20134
  const { data: externalBalanceData, isLoading: isExternalBalanceLoading } = useQuery20({
@@ -20236,6 +20239,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
20236
20239
  var EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY;
20237
20240
  var init_useBridgeBalance = __esm({
20238
20241
  "src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts"() {
20242
+ init_constants();
20239
20243
  init_SessionContext();
20240
20244
  init_i18n();
20241
20245
  init_useBlockscoutAssets();
@@ -20254,10 +20258,10 @@ import { ArrowLeftRightIcon, ArrowRightLeftIcon, LoaderIcon as LoaderIcon9, Wall
20254
20258
  import { Fragment as Fragment35 } from "react";
20255
20259
  import { Fragment as Fragment36, jsx as jsx96, jsxs as jsxs89 } from "react/jsx-runtime";
20256
20260
  function SelectStep(props) {
20257
- const { swapChains, hyperlaneWarpRoutes, isLoadingWarpRoutes, handleQuoteEstimation } = props;
20261
+ const { swapChains, hyperlaneWarpRoutes = [], isLoadingWarpRoutes, handleQuoteEstimation } = props;
20258
20262
  const { t } = useT();
20259
20263
  const {
20260
- bridgeSenders,
20264
+ bridgeSenders = [],
20261
20265
  bridgeSender,
20262
20266
  originChain,
20263
20267
  destinationChain,
@@ -21165,12 +21169,11 @@ function HyperlaneBridge() {
21165
21169
  const { hyperlaneWarpRoutes, isLoadingWarpRoutes } = useHyperlaneRoutes();
21166
21170
  const { directWalletProfile } = useAvailableSenders();
21167
21171
  useMenuTitle(hyperlaneWarpRoutes);
21168
- useEffect38(
21169
- () => () => {
21172
+ useEffect38(() => {
21173
+ return () => {
21170
21174
  useBridgeStore.getState().resetSelections();
21171
- },
21172
- []
21173
- );
21175
+ };
21176
+ }, []);
21174
21177
  return /* @__PURE__ */ jsxs94(Fragment38, { children: [
21175
21178
  bridgeStep === "sender-selector" && /* @__PURE__ */ jsx102(SenderSelector, { directWalletProfile }),
21176
21179
  bridgeStep === "select" && /* @__PURE__ */ jsx102(
@@ -21321,7 +21324,7 @@ var init_useErc3643Compliance = __esm({
21321
21324
 
21322
21325
  // src/hooks/useNicknameResolve.ts
21323
21326
  import { useQuery as useQuery21 } from "@tanstack/react-query";
21324
- import { useState as useState28, useEffect as useEffect39, useMemo as useMemo14 } from "react";
21327
+ import { useEffect as useEffect39, useMemo as useMemo14, useState as useState28 } from "react";
21325
21328
  function looksLikeNickname(input) {
21326
21329
  if (!input) return false;
21327
21330
  if (input.startsWith("0x")) return false;
@@ -21352,7 +21355,7 @@ function useNicknameResolve(input, options) {
21352
21355
  }, [normalized, isNicknameInput, enabled]);
21353
21356
  const query = useQuery21({
21354
21357
  queryKey: [...QUERY_KEYS.nicknameResolve(debouncedInput), chainId],
21355
- queryFn: () => resolveNickname(debouncedInput, chainId),
21358
+ queryFn: async () => await resolveNickname(debouncedInput, chainId),
21356
21359
  enabled: enabled && isNicknameInput && debouncedInput.length > 0,
21357
21360
  staleTime: 1e3 * 60 * 5,
21358
21361
  // 5 minutes - addresses don't change often
@@ -21388,8 +21391,8 @@ var init_useNicknameResolve = __esm({
21388
21391
  "src/hooks/useNicknameResolve.ts"() {
21389
21392
  init_nickname();
21390
21393
  init_profile();
21391
- init_nickname_validation();
21392
21394
  init_nickname_fingerprint();
21395
+ init_nickname_validation();
21393
21396
  DEBOUNCE_MS2 = 300;
21394
21397
  }
21395
21398
  });
@@ -21833,79 +21836,84 @@ var init_AssetList = __esm({
21833
21836
  });
21834
21837
 
21835
21838
  // src/internal/components/SendMenu/send/components/NicknameData.tsx
21836
- import { AlertCircle as AlertCircle5, AlertTriangle as AlertTriangle6, AtSign as AtSign2, CheckCircle2 as CheckCircle24, ShieldAlert, ShieldCheck as ShieldCheck2 } from "lucide-react";
21839
+ import { AtSign as AtSign2, CheckCircle2 as CheckCircle24, ShieldAlert, ShieldCheck as ShieldCheck2 } from "lucide-react";
21840
+ import { useEffect as useEffect40 } from "react";
21837
21841
  import { jsx as jsx107, jsxs as jsxs98 } from "react/jsx-runtime";
21838
21842
  function NicknameData(props) {
21839
21843
  const { resolvedNicknameData, isNicknameInput } = props;
21840
21844
  const {
21845
+ data: nicknameData,
21841
21846
  resolvedAddress,
21842
21847
  isResolving,
21848
+ isFingerprintVerified,
21843
21849
  isNotFound,
21844
21850
  isWalletNotSetup,
21845
- isFrozen,
21846
- isFingerprintVerified,
21847
- data: nicknameData
21851
+ isFrozen
21848
21852
  } = resolvedNicknameData;
21849
- if (!isNicknameInput) return null;
21850
- if (resolvedAddress && !isResolving && nicknameData)
21851
- return /* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-[var(--ui-kit-gap)] rounded-[var(--ui-kit-el-bdrs)] px-[var(--ui-kit-gap)]", children: [
21852
- nicknameData.avatarSvg ? /* @__PURE__ */ jsx107(
21853
- "img",
21853
+ useEffect40(() => {
21854
+ if (!resolvedNicknameData?.data?.fingerprint || !isNicknameInput) return;
21855
+ useFlowSelectorStore.getState().setRenderKey(`nickname-resolved-${Date.now()}`);
21856
+ }, [resolvedNicknameData, isNicknameInput]);
21857
+ useEffect40(() => {
21858
+ if (isResolving) return;
21859
+ let errMessage = null;
21860
+ switch (true) {
21861
+ case isNotFound:
21862
+ errMessage = "Nickname not found";
21863
+ break;
21864
+ case isWalletNotSetup:
21865
+ errMessage = "This user has not set up wallet yet";
21866
+ break;
21867
+ case isFrozen:
21868
+ errMessage = "This handle is frozen. Proceed with caution.";
21869
+ break;
21870
+ default:
21871
+ errMessage = null;
21872
+ }
21873
+ if (!errMessage) return;
21874
+ useFlowSelectorStore.getState().setError(errMessage);
21875
+ }, [isResolving, isNotFound, isWalletNotSetup, isFrozen]);
21876
+ if (isResolving || !isNicknameInput || !resolvedAddress || !nicknameData) return null;
21877
+ return /* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-[var(--ui-kit-gap)] rounded-[var(--ui-kit-el-bdrs)] px-[var(--ui-kit-gap)]", children: [
21878
+ nicknameData.avatarSvg ? /* @__PURE__ */ jsx107(
21879
+ "img",
21880
+ {
21881
+ src: nicknameData.avatarSvg,
21882
+ alt: nicknameData.handle,
21883
+ className: "w-12 h-12 rounded-full object-cover flex-shrink-0",
21884
+ onError: (e) => {
21885
+ e.currentTarget.onerror = null;
21886
+ e.currentTarget.src = no_image_default;
21887
+ }
21888
+ }
21889
+ ) : /* @__PURE__ */ jsx107("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx107(AtSign2, { className: "w-5 h-5" }) }),
21890
+ /* @__PURE__ */ jsxs98("div", { className: "flex flex-col gap-1", children: [
21891
+ /* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[10px] text-[var(--ui-kit-bg-success)]", children: [
21892
+ /* @__PURE__ */ jsx107(CheckCircle24, { className: "w-4 h-4 flex-shrink-0" }),
21893
+ /* @__PURE__ */ jsx107("span", { children: nicknameData.handle })
21894
+ ] }),
21895
+ nicknameData.fingerprint && /* @__PURE__ */ jsxs98(
21896
+ "div",
21854
21897
  {
21855
- src: nicknameData.avatarSvg,
21856
- alt: nicknameData.handle,
21857
- className: "w-12 h-12 rounded-full object-cover flex-shrink-0",
21858
- onError: (e) => {
21859
- e.currentTarget.onerror = null;
21860
- e.currentTarget.src = no_image_default;
21861
- }
21898
+ className: cn(
21899
+ "flex items-center gap-[var(--ui-kit-gap)] text-[10px]",
21900
+ isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
21901
+ ),
21902
+ children: [
21903
+ isFingerprintVerified ? /* @__PURE__ */ jsx107(ShieldCheck2, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ jsx107(ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
21904
+ /* @__PURE__ */ jsx107("span", { children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` }),
21905
+ /* @__PURE__ */ jsx107("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
21906
+ ]
21862
21907
  }
21863
- ) : /* @__PURE__ */ jsx107("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx107(AtSign2, { className: "w-5 h-5" }) }),
21864
- /* @__PURE__ */ jsxs98("div", { className: "flex flex-col gap-1", children: [
21865
- /* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[10px] text-[var(--ui-kit-bg-success)]", children: [
21866
- /* @__PURE__ */ jsx107(CheckCircle24, { className: "w-4 h-4 flex-shrink-0" }),
21867
- /* @__PURE__ */ jsx107("span", { children: nicknameData.handle })
21868
- ] }),
21869
- nicknameData.fingerprint && /* @__PURE__ */ jsxs98(
21870
- "div",
21871
- {
21872
- className: cn(
21873
- "flex items-center gap-[var(--ui-kit-gap)] text-[10px]",
21874
- isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
21875
- ),
21876
- children: [
21877
- isFingerprintVerified ? /* @__PURE__ */ jsx107(ShieldCheck2, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ jsx107(ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
21878
- /* @__PURE__ */ jsx107("span", { children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` }),
21879
- /* @__PURE__ */ jsx107("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
21880
- ]
21881
- }
21882
- )
21883
- ] })
21884
- ] });
21885
- if (isFrozen && !isResolving) {
21886
- return /* @__PURE__ */ jsxs98(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
21887
- /* @__PURE__ */ jsx107(AlertTriangle6, { className: "w-4 h-4" }),
21888
- /* @__PURE__ */ jsx107("span", { children: "This handle is frozen. Proceed with caution." })
21889
- ] });
21890
- }
21891
- if (isWalletNotSetup && !isResolving) {
21892
- return /* @__PURE__ */ jsxs98(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
21893
- /* @__PURE__ */ jsx107(AlertCircle5, { className: "w-4 h-4" }),
21894
- /* @__PURE__ */ jsx107("span", { children: "This user has not set up wallet yet" })
21895
- ] });
21896
- }
21897
- if (isNotFound && !isResolving) {
21898
- return /* @__PURE__ */ jsxs98(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
21899
- /* @__PURE__ */ jsx107(AlertCircle5, { className: "w-4 h-4" }),
21900
- /* @__PURE__ */ jsx107("span", { children: "Nickname not found" })
21901
- ] });
21902
- }
21908
+ )
21909
+ ] })
21910
+ ] });
21903
21911
  }
21904
21912
  var init_NicknameData = __esm({
21905
21913
  "src/internal/components/SendMenu/send/components/NicknameData.tsx"() {
21906
21914
  init_no_image();
21907
21915
  init_utils2();
21908
- init_highlight();
21916
+ init_useFlowSelector();
21909
21917
  }
21910
21918
  });
21911
21919
 
@@ -21920,7 +21928,7 @@ var init_components3 = __esm({
21920
21928
  });
21921
21929
 
21922
21930
  // src/internal/components/SendMenu/send/sendSteps/InputSendStep.tsx
21923
- import { AlertCircle as AlertCircle6, AtSign as AtSign3, CheckCircle2 as CheckCircle25, Loader as Loader28, Wallet2 as Wallet24 } from "lucide-react";
21931
+ import { AlertCircle as AlertCircle5, AtSign as AtSign3, CheckCircle2 as CheckCircle25, Loader as Loader28, Wallet2 as Wallet24 } from "lucide-react";
21924
21932
  import { formatUnits as formatUnits10, isAddress as isAddress2 } from "viem";
21925
21933
  import { Fragment as Fragment40, jsx as jsx108, jsxs as jsxs99 } from "react/jsx-runtime";
21926
21934
  function InputSendStep(props) {
@@ -22099,7 +22107,7 @@ function InputSendStep(props) {
22099
22107
  /* @__PURE__ */ jsx108(CheckCircle25, { className: "h-4 w-4" }),
22100
22108
  /* @__PURE__ */ jsx108("span", { children: "Transfer compliant" })
22101
22109
  ] }) : /* @__PURE__ */ jsxs99(Fragment40, { children: [
22102
- /* @__PURE__ */ jsx108(AlertCircle6, { className: "h-4 w-4" }),
22110
+ /* @__PURE__ */ jsx108(AlertCircle5, { className: "h-4 w-4" }),
22103
22111
  /* @__PURE__ */ jsx108("span", { children: complianceError || "Transfer not allowed" })
22104
22112
  ] })
22105
22113
  }
@@ -22135,17 +22143,12 @@ var init_InputSendStep = __esm({
22135
22143
  });
22136
22144
 
22137
22145
  // src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx
22138
- import { AlertTriangle as AlertTriangle7, AtSign as AtSign4, Loader as Loader29, Shield as Shield2, ShieldAlert as ShieldAlert2, ShieldCheck as ShieldCheck3 } from "lucide-react";
22146
+ import { useMutation as useMutation20 } from "@tanstack/react-query";
22147
+ import { AlertTriangle as AlertTriangle6, AtSign as AtSign4, Loader as Loader29, Shield as Shield2, ShieldAlert as ShieldAlert2, ShieldCheck as ShieldCheck3 } from "lucide-react";
22139
22148
  import { Fragment as Fragment41, jsx as jsx109, jsxs as jsxs100 } from "react/jsx-runtime";
22140
22149
  function ConfirmSendStep(props) {
22141
- const {
22142
- sendTransaction,
22143
- refreshBalances,
22144
- erc3643Compliance,
22145
- isNicknameInput,
22146
- resolvedNicknameData,
22147
- isTransactionPending
22148
- } = props;
22150
+ const { sendTransaction, erc3643Compliance, isNicknameInput, resolvedNicknameData } = props;
22151
+ const { t } = useT();
22149
22152
  const chainConfig = useSession((st) => st.chainConfig);
22150
22153
  const { resolvedAddress, isFrozen, isFingerprintVerified, data: nicknameData } = resolvedNicknameData || {};
22151
22154
  const { canTransfer: erc3643CanTransfer } = erc3643Compliance || {};
@@ -22154,28 +22157,34 @@ function ConfirmSendStep(props) {
22154
22157
  const isNft = isNftAsset3(selectedAsset);
22155
22158
  const isSecurity = isSecurityToken2(selectedAsset);
22156
22159
  const effectiveAddress = isNicknameInput ? resolvedAddress : recipient;
22157
- const handleConfirm = async () => {
22158
- if (!effectiveAddress || !selectedAsset) return;
22159
- setTxStep("pending");
22160
- const txAmount = isNft ? "1" : amount;
22161
- const hash = await sendTransaction({
22162
- to: effectiveAddress,
22163
- value: txAmount,
22164
- assetType: selectedAsset.type,
22165
- tokenAddress: selectedAsset.address,
22166
- tokenId: selectedAsset.tokenId,
22167
- decimals: selectedAsset.decimals
22168
- });
22169
- if (hash) {
22170
- setTxStep("success");
22171
- setTimeout(() => refreshBalances(), 3e3);
22172
- } else {
22173
- setTxStep("input");
22160
+ const { mutate: handleConfirm, isPending: isTransactionPending } = useMutation20({
22161
+ mutationFn: async () => {
22162
+ if (!effectiveAddress || !selectedAsset) return;
22163
+ setTxStep("pending");
22164
+ const txAmount = isNft ? "1" : amount;
22165
+ return await sendTransaction({
22166
+ to: effectiveAddress,
22167
+ value: txAmount,
22168
+ assetType: selectedAsset.type,
22169
+ tokenAddress: selectedAsset.address,
22170
+ tokenId: selectedAsset.tokenId,
22171
+ decimals: selectedAsset.decimals
22172
+ });
22173
+ },
22174
+ onSuccess: (hash) => {
22175
+ if (hash) {
22176
+ setTxStep("success");
22177
+ } else {
22178
+ setTxStep("input");
22179
+ }
22180
+ },
22181
+ onError: (error) => {
22182
+ useFlowSelectorStore.getState().setError(error?.message || "Transaction failed");
22174
22183
  }
22175
- };
22184
+ });
22176
22185
  return /* @__PURE__ */ jsxs100(Fragment41, { children: [
22177
22186
  isNicknameInput && isFrozen && /* @__PURE__ */ jsxs100(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
22178
- /* @__PURE__ */ jsx109(AlertTriangle7, { className: "h-4 w-4" }),
22187
+ /* @__PURE__ */ jsx109(AlertTriangle6, { className: "h-4 w-4" }),
22179
22188
  /* @__PURE__ */ jsx109("span", { children: "This handle is frozen. Proceed with caution." })
22180
22189
  ] }),
22181
22190
  isSecurity && erc3643CanTransfer && /* @__PURE__ */ jsxs100(Highlight, { type: "success", className: "flex gap-[var(--ui-kit-gap)]", children: [
@@ -22238,7 +22247,7 @@ function ConfirmSendStep(props) {
22238
22247
  ] }) : (
22239
22248
  // Fungible token details
22240
22249
  /* @__PURE__ */ jsxs100("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22241
- /* @__PURE__ */ jsx109("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: "Amount:" }),
22250
+ /* @__PURE__ */ jsx109("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
22242
22251
  /* @__PURE__ */ jsxs100("span", { className: "text-sm font-bold", children: [
22243
22252
  amount,
22244
22253
  " ",
@@ -22247,7 +22256,7 @@ function ConfirmSendStep(props) {
22247
22256
  ] })
22248
22257
  ),
22249
22258
  /* @__PURE__ */ jsxs100("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22250
- /* @__PURE__ */ jsx109("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: "Network:" }),
22259
+ /* @__PURE__ */ jsx109("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
22251
22260
  /* @__PURE__ */ jsx109("span", { className: "text-sm font-bold", children: chainConfig.name })
22252
22261
  ] })
22253
22262
  ] })
@@ -22273,7 +22282,7 @@ function ConfirmSendStep(props) {
22273
22282
  ) : (
22274
22283
  // Fungible token details
22275
22284
  /* @__PURE__ */ jsxs100("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22276
- /* @__PURE__ */ jsx109("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "Amount:" }),
22285
+ /* @__PURE__ */ jsx109("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
22277
22286
  /* @__PURE__ */ jsxs100("span", { className: "font-semibold", children: [
22278
22287
  amount,
22279
22288
  " ",
@@ -22282,24 +22291,35 @@ function ConfirmSendStep(props) {
22282
22291
  ] })
22283
22292
  ),
22284
22293
  /* @__PURE__ */ jsxs100("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
22285
- /* @__PURE__ */ jsx109("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "Network:" }),
22294
+ /* @__PURE__ */ jsx109("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
22286
22295
  /* @__PURE__ */ jsx109("span", { children: chainConfig.name })
22287
22296
  ] })
22288
22297
  ] })
22289
22298
  ] }) }),
22290
- /* @__PURE__ */ jsxs100(Button, { onClick: handleConfirm, disabled: isTransactionPending, className: "w-full", size: "large", children: [
22291
- isTransactionPending && /* @__PURE__ */ jsx109(Loader29, { className: "h-4 w-4 animate-spin" }),
22292
- "CONFIRM"
22293
- ] })
22299
+ /* @__PURE__ */ jsxs100(
22300
+ Button,
22301
+ {
22302
+ onClick: () => handleConfirm(),
22303
+ disabled: isTransactionPending,
22304
+ className: "w-full",
22305
+ size: "large",
22306
+ children: [
22307
+ isTransactionPending && /* @__PURE__ */ jsx109(Loader29, { className: "h-4 w-4 animate-spin" }),
22308
+ t("passport:common.confirm")
22309
+ ]
22310
+ }
22311
+ )
22294
22312
  ] });
22295
22313
  }
22296
22314
  var init_ConfirmSendStep = __esm({
22297
22315
  "src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx"() {
22298
22316
  init_SessionContext();
22317
+ init_i18n();
22299
22318
  init_priceFormatter();
22300
22319
  init_utils2();
22301
22320
  init_button();
22302
22321
  init_highlight();
22322
+ init_useFlowSelector();
22303
22323
  init_useSendStore();
22304
22324
  init_utils9();
22305
22325
  }
@@ -22315,7 +22335,7 @@ var init_sendSteps = __esm({
22315
22335
 
22316
22336
  // src/internal/components/SendMenu/send/SendMenu.tsx
22317
22337
  import { CheckCircle2 as CheckCircle26, Loader as Loader30 } from "lucide-react";
22318
- import { useEffect as useEffect40, useMemo as useMemo15 } from "react";
22338
+ import { useEffect as useEffect41, useMemo as useMemo15 } from "react";
22319
22339
  import { parseUnits as parseUnits2 } from "viem";
22320
22340
  import { Fragment as Fragment42, jsx as jsx110, jsxs as jsxs101 } from "react/jsx-runtime";
22321
22341
  function SendMenu() {
@@ -22325,7 +22345,7 @@ function SendMenu() {
22325
22345
  const { t } = useT();
22326
22346
  const {
22327
22347
  assets,
22328
- refreshBalances,
22348
+ // refreshBalances,
22329
22349
  isLoading: isAssetsLoading
22330
22350
  } = useBlockscoutAssets({
22331
22351
  address
@@ -22337,10 +22357,10 @@ function SendMenu() {
22337
22357
  userOpHash,
22338
22358
  reset
22339
22359
  } = useSendTransaction();
22340
- useEffect40(() => {
22360
+ useEffect41(() => {
22341
22361
  useFlowSelectorStore.getState().setIsUiLocked(isAssetsLoading || isTransactionPending);
22342
22362
  }, [isAssetsLoading, isTransactionPending]);
22343
- useEffect40(() => {
22363
+ useEffect41(() => {
22344
22364
  useFlowSelectorStore.getState().setError(sendTransactionError || null);
22345
22365
  }, [sendTransactionError]);
22346
22366
  const {
@@ -22355,7 +22375,7 @@ function SendMenu() {
22355
22375
  } = useSendStore();
22356
22376
  const isNft = isNftAsset3(selectedAsset);
22357
22377
  const isSecurity = isSecurityToken2(selectedAsset);
22358
- useEffect40(
22378
+ useEffect41(
22359
22379
  () => () => {
22360
22380
  setSelectedAsset(null);
22361
22381
  setRecipient("");
@@ -22365,13 +22385,15 @@ function SendMenu() {
22365
22385
  },
22366
22386
  []
22367
22387
  );
22368
- useEffect40(() => {
22369
- const shouldSetNativeAsset = assets.length > 0 && !selectedAsset;
22370
- if (!shouldSetNativeAsset) return;
22371
- const native = assets.find((a) => a.type === "native");
22388
+ useEffect41(() => {
22389
+ const shouldNativeDefaultAsset = assets.length > 0 && !selectedAsset;
22390
+ if (!shouldNativeDefaultAsset) return;
22391
+ const chainNativeCurrency = useSession.getState().chainConfig?.nativeCurrency;
22392
+ const native = assets.find((a) => a.type === "native" && a.symbol === chainNativeCurrency?.symbol);
22372
22393
  if (isBalance(native)) return setSelectedAsset(native);
22373
22394
  const erc20 = assets.find((a) => a.type === "erc20");
22374
22395
  if (isBalance(erc20)) return setSelectedAsset(erc20);
22396
+ setSelectedAsset(assets[0]);
22375
22397
  }, [assets, selectedAsset]);
22376
22398
  const isNicknameInput = looksLikeNickname(recipient);
22377
22399
  const resolvedNicknameData = useNicknameResolve(recipient, { enabled: isNicknameInput, chainId: activeChainId });
@@ -22391,7 +22413,7 @@ function SendMenu() {
22391
22413
  enabled: isSecurity && !!effectiveAddress && !!complianceAmount,
22392
22414
  chainId: activeChainId
22393
22415
  });
22394
- useEffect40(() => {
22416
+ useEffect41(() => {
22395
22417
  const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
22396
22418
  switch (true) {
22397
22419
  case txStep === "select-asset":
@@ -22429,11 +22451,9 @@ function SendMenu() {
22429
22451
  ConfirmSendStep,
22430
22452
  {
22431
22453
  sendTransaction,
22432
- refreshBalances,
22433
22454
  erc3643Compliance,
22434
22455
  isNicknameInput,
22435
- resolvedNicknameData,
22436
- isTransactionPending
22456
+ resolvedNicknameData
22437
22457
  }
22438
22458
  ),
22439
22459
  txStep === "pending" && /* @__PURE__ */ jsxs101(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)]", children: [
@@ -22484,7 +22504,7 @@ var init_send = __esm({
22484
22504
 
22485
22505
  // src/internal/components/SendMenu/SendFlowSelector.tsx
22486
22506
  import { ArrowLeft as ArrowLeft19, ArrowRightIcon as ArrowRightIcon2, ArrowRightLeftIcon as ArrowRightLeftIcon2, InfoIcon as InfoIcon5 } from "lucide-react";
22487
- import { useEffect as useEffect41 } from "react";
22507
+ import { useEffect as useEffect42 } from "react";
22488
22508
  import { jsx as jsx111, jsxs as jsxs102 } from "react/jsx-runtime";
22489
22509
  function SelectorFlowButtons() {
22490
22510
  const { t } = useT();
@@ -22547,7 +22567,7 @@ function SendFlowSelector() {
22547
22567
  const error = useFlowSelectorStore((st) => st.error);
22548
22568
  const menuTitle = useFlowSelectorStore((st) => st.menuTitle);
22549
22569
  const selectorFlow = useFlowSelectorStore((st) => st.flow);
22550
- useEffect41(
22570
+ useEffect42(
22551
22571
  () => () => {
22552
22572
  useFlowSelectorStore.getState().setError(null);
22553
22573
  },
@@ -22713,7 +22733,7 @@ var init_constants6 = __esm({
22713
22733
  // src/internal/components/SettingsMenu/SettingsMenu.tsx
22714
22734
  import { useQuery as useQuery22 } from "@tanstack/react-query";
22715
22735
  import { ArrowLeft as ArrowLeft20, HardDrive as HardDrive3 } from "lucide-react";
22716
- import { useEffect as useEffect42 } from "react";
22736
+ import { useEffect as useEffect43 } from "react";
22717
22737
  import { jsx as jsx112, jsxs as jsxs103 } from "react/jsx-runtime";
22718
22738
  function useSettingsButtons() {
22719
22739
  const config = useProviderConfig().config;
@@ -22732,7 +22752,7 @@ function useSettingsButtons() {
22732
22752
  if (proMode) {
22733
22753
  settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: HardDrive3 });
22734
22754
  }
22735
- useEffect42(() => {
22755
+ useEffect43(() => {
22736
22756
  const cssvEl = document.querySelector(".embarkai-ui-scope");
22737
22757
  if (!cssvEl || !window?.getComputedStyle) {
22738
22758
  return;
@@ -23932,7 +23952,7 @@ var init_PageMap = __esm({
23932
23952
  });
23933
23953
 
23934
23954
  // src/internal/hooks/usePageMapper.tsx
23935
- import { useCallback as useCallback30, useEffect as useEffect43 } from "react";
23955
+ import { useCallback as useCallback30, useEffect as useEffect44 } from "react";
23936
23956
  import { jsx as jsx116 } from "react/jsx-runtime";
23937
23957
  function usePageMapper() {
23938
23958
  const page = useLayoutDataStore((st) => st.page);
@@ -23965,7 +23985,7 @@ function usePageMapper() {
23965
23985
  },
23966
23986
  [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
23967
23987
  );
23968
- useEffect43(() => {
23988
+ useEffect44(() => {
23969
23989
  if (page === null) return closeDialog();
23970
23990
  const pageItem = PAGE_MAP[page];
23971
23991
  if (!pageItem) {
@@ -23989,7 +24009,7 @@ var init_usePageMapper = __esm({
23989
24009
 
23990
24010
  // src/internal/hooks/useSettingsNotifications.ts
23991
24011
  import { useQuery as useQuery24 } from "@tanstack/react-query";
23992
- import { useEffect as useEffect44 } from "react";
24012
+ import { useEffect as useEffect45 } from "react";
23993
24013
  function useSettingsNotifications() {
23994
24014
  const address = useSession((st) => st.address);
23995
24015
  const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
@@ -24001,14 +24021,14 @@ function useSettingsNotifications() {
24001
24021
  queryKey: [QUERY_KEYS.userProfile, address],
24002
24022
  queryFn: getUserProfile
24003
24023
  });
24004
- useEffect44(() => {
24024
+ useEffect45(() => {
24005
24025
  const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
24006
24026
  setSettingsNotifications({
24007
24027
  ...COMPLETE_KYC_PROGRESS,
24008
24028
  status: isKYCVerified ? "resolved" : "active"
24009
24029
  });
24010
24030
  }, [userProfile, setSettingsNotifications]);
24011
- useEffect44(() => {
24031
+ useEffect45(() => {
24012
24032
  setSettingsNotifications({
24013
24033
  ...EMAIL_NOT_CONNECTED_NOTIFICATION,
24014
24034
  status: hasEmail ? "resolved" : "active"
@@ -24041,7 +24061,7 @@ var init_package = __esm({
24041
24061
  "package.json"() {
24042
24062
  package_default = {
24043
24063
  name: "@embarkai/ui-kit",
24044
- version: "0.4.51",
24064
+ version: "0.4.52",
24045
24065
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
24046
24066
  type: "module",
24047
24067
  main: "./dist/index.cjs",
@@ -24142,7 +24162,7 @@ var init_package = __esm({
24142
24162
  });
24143
24163
 
24144
24164
  // src/internal/components/Footer/Footer.tsx
24145
- import { useMutation as useMutation20, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
24165
+ import { useMutation as useMutation21, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
24146
24166
  import { Loader as Loader32, LogOut } from "lucide-react";
24147
24167
  import { useDisconnect as useDisconnect3 } from "wagmi";
24148
24168
  import { jsx as jsx117, jsxs as jsxs107 } from "react/jsx-runtime";
@@ -24164,7 +24184,7 @@ function Footer() {
24164
24184
  }
24165
24185
  }
24166
24186
  });
24167
- const { mutate: disconnect, isPending: isDisconnecting } = useMutation20({
24187
+ const { mutate: disconnect, isPending: isDisconnecting } = useMutation21({
24168
24188
  mutationFn: async (disconnectAddress) => {
24169
24189
  if (!disconnectAddress) throw new Error("No address to disconnect");
24170
24190
  const { setError, setStatus, setIsLoading } = useSession.getState();
@@ -24596,7 +24616,7 @@ var init_visually_hidden = __esm({
24596
24616
 
24597
24617
  // src/internal/components/Dialog/Dialog.tsx
24598
24618
  import { AnimatePresence, motion } from "framer-motion";
24599
- import { useEffect as useEffect45 } from "react";
24619
+ import { useEffect as useEffect46 } from "react";
24600
24620
  import { jsx as jsx121, jsxs as jsxs110 } from "react/jsx-runtime";
24601
24621
  function Dialog2() {
24602
24622
  const config = useProviderConfig().config;
@@ -24608,7 +24628,7 @@ function Dialog2() {
24608
24628
  const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
24609
24629
  const setPage = useLayoutDataStore((st) => st.setPage);
24610
24630
  const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
24611
- useEffect45(() => setIsSettings(!!session), [session, setIsSettings]);
24631
+ useEffect46(() => setIsSettings(!!session), [session, setIsSettings]);
24612
24632
  usePageMapper();
24613
24633
  useAutoConnect();
24614
24634
  useBackupStatusChanges();
@@ -24729,8 +24749,8 @@ var init_TssManager = __esm({
24729
24749
 
24730
24750
  // src/internal/components/WalletConnectHandler.tsx
24731
24751
  import { useConnectModal as useConnectModal2 } from "@rainbow-me/rainbowkit";
24732
- import { useMutation as useMutation21, useQueryClient as useQueryClient27 } from "@tanstack/react-query";
24733
- import React27, { useCallback as useCallback33, useEffect as useEffect46 } from "react";
24752
+ import { useMutation as useMutation22, useQueryClient as useQueryClient27 } from "@tanstack/react-query";
24753
+ import React27, { useCallback as useCallback33, useEffect as useEffect47 } from "react";
24734
24754
  import { useAccount, useDisconnect as useDisconnect4, useSignMessage as useSignMessage2 } from "wagmi";
24735
24755
  function WalletConnectHandler() {
24736
24756
  const qc = useQueryClient27();
@@ -24785,7 +24805,7 @@ function WalletConnectHandler() {
24785
24805
  const [hasStartedLinking, setHasStartedLinking] = React27.useState(false);
24786
24806
  const [modalWasOpened, setModalWasOpened] = React27.useState(false);
24787
24807
  const [pendingModalOpen, setPendingModalOpen] = React27.useState(false);
24788
- useEffect46(() => {
24808
+ useEffect47(() => {
24789
24809
  if (isWalletLinking && !hasStartedLinking) {
24790
24810
  console.log("[WalletConnectHandler] Starting wallet link flow:", {
24791
24811
  isConnected,
@@ -24823,18 +24843,18 @@ function WalletConnectHandler() {
24823
24843
  setProviderType,
24824
24844
  walletMode
24825
24845
  ]);
24826
- useEffect46(() => {
24846
+ useEffect47(() => {
24827
24847
  if (pendingModalOpen && !isConnected && openConnectModal) {
24828
24848
  setPendingModalOpen(false);
24829
24849
  openConnectModal();
24830
24850
  }
24831
24851
  }, [pendingModalOpen, isConnected, openConnectModal]);
24832
- useEffect46(() => {
24852
+ useEffect47(() => {
24833
24853
  if (connectModalOpen && hasStartedLinking) {
24834
24854
  setModalWasOpened(true);
24835
24855
  }
24836
24856
  }, [connectModalOpen, hasStartedLinking]);
24837
- useEffect46(() => {
24857
+ useEffect47(() => {
24838
24858
  if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
24839
24859
  console.log("[WalletConnectHandler] Modal closed without connecting");
24840
24860
  onLinkingComplete(false);
@@ -24842,7 +24862,7 @@ function WalletConnectHandler() {
24842
24862
  setModalWasOpened(false);
24843
24863
  }
24844
24864
  }, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
24845
- useEffect46(() => {
24865
+ useEffect47(() => {
24846
24866
  if (isWalletLinking) {
24847
24867
  const timeout = setTimeout(() => {
24848
24868
  console.warn("[WalletConnectHandler] Wallet linking timed out, resetting state");
@@ -24861,7 +24881,7 @@ function WalletConnectHandler() {
24861
24881
  }
24862
24882
  }, [isWalletLinking, setIsWalletLinking, disconnect]);
24863
24883
  const isAuthFlow = !passportWalletAddress;
24864
- const { mutate: handleWalletSign, isPending: isWalletSigning } = useMutation21({
24884
+ const { mutate: handleWalletSign, isPending: isWalletSigning } = useMutation22({
24865
24885
  mutationFn: async (payload) => {
24866
24886
  const { chainId, signingWalletAddress } = payload;
24867
24887
  if (!signingWalletAddress || !chainId) {
@@ -24962,7 +24982,7 @@ function WalletConnectHandler() {
24962
24982
  setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
24963
24983
  }
24964
24984
  });
24965
- useEffect46(() => {
24985
+ useEffect47(() => {
24966
24986
  if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking && modalWasOpened && !pendingModalOpen) {
24967
24987
  console.log("[WalletConnectHandler] handleWalletSign triggered");
24968
24988
  if (!passportWalletAddress) {
@@ -24972,7 +24992,7 @@ function WalletConnectHandler() {
24972
24992
  handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
24973
24993
  }
24974
24994
  }, [chain, isConnected, walletAddress, isWalletLinking, hasStartedLinking, modalWasOpened, pendingModalOpen]);
24975
- useEffect46(() => {
24995
+ useEffect47(() => {
24976
24996
  if (isConnected && !chain?.id && isWalletLinking && hasStartedLinking && !connectModalOpen && !isWalletSigning) {
24977
24997
  const timeout = setTimeout(() => {
24978
24998
  console.warn("[WalletConnectHandler] Wallet connected but chain info missing, resetting");
@@ -25008,7 +25028,7 @@ var init_WalletConnectHandler = __esm({
25008
25028
  });
25009
25029
 
25010
25030
  // src/internal/components/DirectWalletHandler.tsx
25011
- import { useEffect as useEffect47 } from "react";
25031
+ import { useEffect as useEffect48 } from "react";
25012
25032
  import { useAccount as useAccount2 } from "wagmi";
25013
25033
  function DirectWalletHandler() {
25014
25034
  const walletMode = useProviderConfig().config.current?.wallet?.mode || "linked";
@@ -25020,13 +25040,13 @@ function DirectWalletHandler() {
25020
25040
  const setExternalChainId = useExternalWalletStore((st) => st.setExternalChainId);
25021
25041
  const setConfigMode = useExternalWalletStore((st) => st.setConfigMode);
25022
25042
  const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
25023
- useEffect47(() => {
25043
+ useEffect48(() => {
25024
25044
  setConfigMode(walletMode);
25025
25045
  if (walletMode !== "both") {
25026
25046
  setActiveMode(walletMode);
25027
25047
  }
25028
25048
  }, [walletMode, setConfigMode, setActiveMode]);
25029
- useEffect47(() => {
25049
+ useEffect48(() => {
25030
25050
  if (isConnected && address && !isExternalConnected && connector && chain?.id) {
25031
25051
  setExternalWallet({
25032
25052
  address,
@@ -25035,17 +25055,17 @@ function DirectWalletHandler() {
25035
25055
  });
25036
25056
  }
25037
25057
  }, [isConnected, address, isExternalConnected, connector, chain?.id, setExternalWallet]);
25038
- useEffect47(() => {
25058
+ useEffect48(() => {
25039
25059
  if (isExternalConnected && !isConnected) {
25040
25060
  clearExternalWallet();
25041
25061
  }
25042
25062
  }, [isConnected, isExternalConnected, clearExternalWallet]);
25043
- useEffect47(() => {
25063
+ useEffect48(() => {
25044
25064
  if (isExternalConnected && isConnected && chain?.id) {
25045
25065
  setExternalChainId(chain.id);
25046
25066
  }
25047
25067
  }, [chain?.id, isConnected, isExternalConnected, setExternalChainId]);
25048
- useEffect47(() => {
25068
+ useEffect48(() => {
25049
25069
  if (isExternalConnected && isConnected && address && address !== externalAddress && connector && chain?.id) {
25050
25070
  setExternalWallet({
25051
25071
  address,
@@ -27874,7 +27894,7 @@ import {
27874
27894
  createContext,
27875
27895
  useCallback as useCallback34,
27876
27896
  useContext,
27877
- useEffect as useEffect48,
27897
+ useEffect as useEffect49,
27878
27898
  useMemo as useMemo17,
27879
27899
  useRef as useRef20
27880
27900
  } from "react";
@@ -27897,7 +27917,7 @@ function clearLegacyWagmiStorage() {
27897
27917
  function Provider(props) {
27898
27918
  const { children, projectId, initialConfig = {}, callbacks } = props;
27899
27919
  const callbacksRef = useRef20(callbacks);
27900
- useEffect48(() => notifyNoProjetctId(projectId), [projectId]);
27920
+ useEffect49(() => notifyNoProjetctId(projectId), [projectId]);
27901
27921
  const config = useRef20(merge3({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
27902
27922
  const updateConfig = useCallback34((updates) => {
27903
27923
  const prev = config.current;
@@ -27938,7 +27958,7 @@ function Provider(props) {
27938
27958
  const next = updates ? { ...prev, ...updates } : void 0;
27939
27959
  callbacksRef.current = next;
27940
27960
  }, []);
27941
- useEffect48(() => {
27961
+ useEffect49(() => {
27942
27962
  if (typeof window === "undefined" || !projectId) return;
27943
27963
  const mergedConfig = merge3(DEFAULT_PROVIDER_CONFIG, initialConfig);
27944
27964
  updateConfig(mergedConfig);
@@ -27958,7 +27978,7 @@ function Provider(props) {
27958
27978
  useSession.getState().setActiveChainId(mergedConfig.network.chainId);
27959
27979
  }
27960
27980
  }, [projectId, initialConfig]);
27961
- useEffect48(() => {
27981
+ useEffect49(() => {
27962
27982
  if (typeof window === "undefined" || !projectId) return;
27963
27983
  try {
27964
27984
  initSdkErrorTracking();
@@ -28048,7 +28068,7 @@ init_pro_mode();
28048
28068
  init_utils2();
28049
28069
  import { useQuery as useQuery26 } from "@tanstack/react-query";
28050
28070
  import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader34, Shield as Shield3 } from "lucide-react";
28051
- import { useEffect as useEffect49, useMemo as useMemo18 } from "react";
28071
+ import { useEffect as useEffect50, useMemo as useMemo18 } from "react";
28052
28072
  import { Fragment as Fragment47, jsx as jsx126, jsxs as jsxs112 } from "react/jsx-runtime";
28053
28073
  function getFormattedStatus(label, status, showStatus) {
28054
28074
  const isStatus = showStatus && status && status !== "idle" && status !== "ready";
@@ -28068,7 +28088,7 @@ function ConnectWalletButton(props) {
28068
28088
  const colorMode = useLayoutStore((st) => st.colorMode);
28069
28089
  const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
28070
28090
  const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
28071
- useEffect49(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
28091
+ useEffect50(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
28072
28092
  const { data: profile, isLoading: isProfileLoading } = useQuery26({
28073
28093
  retry: false,
28074
28094
  enabled: !!address,
@@ -28351,7 +28371,7 @@ init_useLayoutDataStore();
28351
28371
  init_getUserOperationByHash();
28352
28372
  init_getUserOperationReceipt();
28353
28373
  init_cn();
28354
- import { AlertCircle as AlertCircle8, CheckCircle2 as CheckCircle27, Clock as Clock2, Copy as Copy7, ExternalLink as ExternalLink3, RefreshCw as RefreshCw4 } from "lucide-react";
28374
+ import { AlertCircle as AlertCircle6, CheckCircle2 as CheckCircle27, Clock as Clock2, Copy as Copy7, ExternalLink as ExternalLink3, RefreshCw as RefreshCw4 } from "lucide-react";
28355
28375
  import * as React29 from "react";
28356
28376
 
28357
28377
  // src/internal/components/Address.tsx
@@ -28535,19 +28555,19 @@ var UserOpStatus = ({
28535
28555
  if (receipt) {
28536
28556
  const ok = !!receipt.success;
28537
28557
  return /* @__PURE__ */ jsxs114(Badge, { variant: ok ? "success" : "destructive", children: [
28538
- ok ? /* @__PURE__ */ jsx130(CheckCircle27, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-3 w-3" }),
28558
+ ok ? /* @__PURE__ */ jsx130(CheckCircle27, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-3 w-3" }),
28539
28559
  ok ? "Included" : "Failed"
28540
28560
  ] });
28541
28561
  }
28542
28562
  if (rejected) {
28543
28563
  return /* @__PURE__ */ jsxs114(Badge, { variant: "destructive", children: [
28544
- /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-3 w-3" }),
28564
+ /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-3 w-3" }),
28545
28565
  " Rejected by bundler"
28546
28566
  ] });
28547
28567
  }
28548
28568
  if (timedOut) {
28549
28569
  return /* @__PURE__ */ jsxs114(Badge, { variant: "warning", children: [
28550
- /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-3 w-3" }),
28570
+ /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-3 w-3" }),
28551
28571
  " Timeout - may be rejected"
28552
28572
  ] });
28553
28573
  }
@@ -28655,16 +28675,16 @@ var UserOpStatus = ({
28655
28675
  ] })
28656
28676
  ] }),
28657
28677
  error && /* @__PURE__ */ jsxs114("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
28658
- /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-4 w-4" }),
28678
+ /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-4 w-4" }),
28659
28679
  " ",
28660
28680
  error
28661
28681
  ] }),
28662
28682
  rejected && /* @__PURE__ */ jsxs114("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
28663
- /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-4 w-4" }),
28683
+ /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-4 w-4" }),
28664
28684
  "UserOperation was dropped from bundler mempool. This usually means it was invalid or replaced."
28665
28685
  ] }),
28666
28686
  timedOut && /* @__PURE__ */ jsxs114("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
28667
- /* @__PURE__ */ jsx130(AlertCircle8, { className: "h-4 w-4" }),
28687
+ /* @__PURE__ */ jsx130(AlertCircle6, { className: "h-4 w-4" }),
28668
28688
  "Stopped polling after ",
28669
28689
  Math.round(maxPollTimeMs / 1e3),
28670
28690
  "s. UserOperation may have been rejected by the bundler."
@@ -28740,13 +28760,13 @@ var Hash = ({
28740
28760
 
28741
28761
  // src/internal/components/TransactionsMenu/TransactionsList.tsx
28742
28762
  init_base2();
28743
- import { useEffect as useEffect51, useState as useState36 } from "react";
28763
+ import { useEffect as useEffect52, useState as useState36 } from "react";
28744
28764
  import { jsx as jsx132, jsxs as jsxs116 } from "react/jsx-runtime";
28745
28765
  var TransactionsList = ({ address, itemsCount = 10 }) => {
28746
28766
  const [transactions, setTransactions] = useState36([]);
28747
28767
  const [loading, setLoading] = useState36(true);
28748
28768
  const [error, setError] = useState36(null);
28749
- useEffect51(() => {
28769
+ useEffect52(() => {
28750
28770
  const fetchTransactions2 = async () => {
28751
28771
  try {
28752
28772
  setLoading(true);
@@ -29615,6 +29635,7 @@ init_tokens();
29615
29635
  init_wallets();
29616
29636
 
29617
29637
  // src/index.ts
29638
+ init_constants();
29618
29639
  init_i18n();
29619
29640
 
29620
29641
  // src/internal/exportedQueryKeys.ts
@@ -29657,6 +29678,7 @@ export {
29657
29678
  UserOperationTimeoutError,
29658
29679
  UserRejectedError,
29659
29680
  WALLET_ICONS,
29681
+ WRAPPED_TOKENS,
29660
29682
  combineI18NResources,
29661
29683
  createAccountAbstractionError,
29662
29684
  deployAccount,