@embarkai/ui-kit 0.4.111 → 0.4.112

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
@@ -6031,6 +6031,32 @@ var init_ChainSync2 = __esm({
6031
6031
  }
6032
6032
  });
6033
6033
 
6034
+ // src/internal/hooks/useAllowExternalModalsScroll.ts
6035
+ import { useEffect as useEffect4 } from "react";
6036
+ function isFromExternalModal(event) {
6037
+ return event.composedPath().some((node) => node instanceof Element && EXTERNAL_MODAL_TAGS.has(node.tagName));
6038
+ }
6039
+ function stopExternalModalScrollEvent(event) {
6040
+ if (isFromExternalModal(event)) event.stopPropagation();
6041
+ }
6042
+ function useAllowExternalModalsScroll(enabled) {
6043
+ useEffect4(() => {
6044
+ if (!enabled || typeof document === "undefined") return;
6045
+ const body = document.body;
6046
+ SCROLL_EVENTS.forEach((type) => body.addEventListener(type, stopExternalModalScrollEvent, { passive: true }));
6047
+ return () => {
6048
+ SCROLL_EVENTS.forEach((type) => body.removeEventListener(type, stopExternalModalScrollEvent));
6049
+ };
6050
+ }, [enabled]);
6051
+ }
6052
+ var EXTERNAL_MODAL_TAGS, SCROLL_EVENTS;
6053
+ var init_useAllowExternalModalsScroll = __esm({
6054
+ "src/internal/hooks/useAllowExternalModalsScroll.ts"() {
6055
+ EXTERNAL_MODAL_TAGS = /* @__PURE__ */ new Set(["W3M-MODAL", "APPKIT-MODAL", "WCM-MODAL"]);
6056
+ SCROLL_EVENTS = ["wheel", "touchmove"];
6057
+ }
6058
+ });
6059
+
6034
6060
  // src/internal/clients/account/register-smart-account-address.ts
6035
6061
  async function registerSmartAccountAddress(chainId, smartAccountAddress, factoryAddress) {
6036
6062
  const accessToken = jwtTokenManager2.getAccessToken();
@@ -6959,7 +6985,7 @@ var init_clients = __esm({
6959
6985
  });
6960
6986
 
6961
6987
  // src/internal/hooks/useAutoConnect.ts
6962
- import { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef2 } from "react";
6988
+ import { useCallback as useCallback3, useEffect as useEffect5, useRef as useRef2 } from "react";
6963
6989
  function useAutoConnect() {
6964
6990
  const {
6965
6991
  config: { current: config },
@@ -7021,7 +7047,7 @@ function useAutoConnect() {
7021
7047
  [usePaymaster, setStatus, activeChainId]
7022
7048
  );
7023
7049
  const autoConnectAttemptedRef = useRef2(false);
7024
- useEffect4(() => {
7050
+ useEffect5(() => {
7025
7051
  if (!hasHydrated) return;
7026
7052
  if (autoConnectAttemptedRef.current) return;
7027
7053
  setIsLoading(true);
@@ -7160,7 +7186,7 @@ var init_useAutoConnect = __esm({
7160
7186
  });
7161
7187
 
7162
7188
  // src/hooks/useOpenPage.ts
7163
- import { useCallback as useCallback4, useEffect as useEffect5, useRef as useRef3 } from "react";
7189
+ import { useCallback as useCallback4, useEffect as useEffect6, useRef as useRef3 } from "react";
7164
7190
  function useOpenPage() {
7165
7191
  const page = useLayoutDataStore((st) => st.page);
7166
7192
  const setPage = useLayoutDataStore((st) => st.setPage);
@@ -7190,7 +7216,7 @@ function useOpenPage() {
7190
7216
  }
7191
7217
  function usePageParams() {
7192
7218
  const currentParams = useRef3({});
7193
- useEffect5(() => {
7219
+ useEffect6(() => {
7194
7220
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
7195
7221
  if (!pageParams) return;
7196
7222
  currentParams.current = pageParams;
@@ -7206,13 +7232,13 @@ var init_useOpenPage = __esm({
7206
7232
  });
7207
7233
 
7208
7234
  // src/internal/hooks/useBackupStatusChanges.ts
7209
- import { useEffect as useEffect6, useRef as useRef4 } from "react";
7235
+ import { useEffect as useEffect7, useRef as useRef4 } from "react";
7210
7236
  function useBackupStatusChanges() {
7211
7237
  const { open: openPage } = useOpenPage();
7212
7238
  const requestSeqRef = useRef4(0);
7213
7239
  const openPageRef = useRef4(openPage);
7214
7240
  openPageRef.current = openPage;
7215
- useEffect6(() => {
7241
+ useEffect7(() => {
7216
7242
  async function handleBackupStatusChanged(event) {
7217
7243
  const detail = event?.detail;
7218
7244
  console.log("[BACKUP STATUS] changed:", detail);
@@ -7254,7 +7280,7 @@ var init_useBackupStatusChanges = __esm({
7254
7280
 
7255
7281
  // src/internal/hooks/useDetectMaxScrollHeight.ts
7256
7282
  import { debounce } from "lodash-es";
7257
- import { useCallback as useCallback5, useEffect as useEffect7 } from "react";
7283
+ import { useCallback as useCallback5, useEffect as useEffect8 } from "react";
7258
7284
  function useDetectMaxScrollHeight() {
7259
7285
  const page = useLayoutDataStore((state) => state.page);
7260
7286
  const setIsMobileView = useLayoutStore((state) => state.setIsMobileView);
@@ -7268,7 +7294,7 @@ function useDetectMaxScrollHeight() {
7268
7294
  }, DEBOUNCE_DELAY),
7269
7295
  [page, setMaxScrollHeight, setIsMobileView]
7270
7296
  );
7271
- useEffect7(() => {
7297
+ useEffect8(() => {
7272
7298
  const obs = new ResizeObserver(([entry]) => onResize(entry.contentRect));
7273
7299
  const doc = window.document.getElementsByTagName("html")[0];
7274
7300
  if (doc) obs.observe(doc);
@@ -7286,7 +7312,7 @@ var init_useDetectMaxScrollHeight = __esm({
7286
7312
  });
7287
7313
 
7288
7314
  // src/internal/hooks/useListenIframeAuthEvents.ts
7289
- import { useCallback as useCallback6, useEffect as useEffect8 } from "react";
7315
+ import { useCallback as useCallback6, useEffect as useEffect9 } from "react";
7290
7316
  function useListenIframeAuthEvents() {
7291
7317
  const setPage = useLayoutDataStore((state) => state.setPage);
7292
7318
  const setIsIframeReady = useSession((state) => state.setIsIframeReady);
@@ -7306,7 +7332,7 @@ function useListenIframeAuthEvents() {
7306
7332
  },
7307
7333
  [setPage, setIsIframeReady]
7308
7334
  );
7309
- useEffect8(() => {
7335
+ useEffect9(() => {
7310
7336
  window.addEventListener("message", handleIframeMessage);
7311
7337
  return () => window.removeEventListener("message", handleIframeMessage);
7312
7338
  }, [handleIframeMessage]);
@@ -7319,7 +7345,7 @@ var init_useListenIframeAuthEvents = __esm({
7319
7345
  });
7320
7346
 
7321
7347
  // src/internal/components/Expandable/hooks/useExpandable.ts
7322
- import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef5 } from "react";
7348
+ import { useCallback as useCallback7, useEffect as useEffect10, useRef as useRef5 } from "react";
7323
7349
  var DEFERRED_DELAY, useExpandable;
7324
7350
  var init_useExpandable = __esm({
7325
7351
  "src/internal/components/Expandable/hooks/useExpandable.ts"() {
@@ -7328,7 +7354,7 @@ var init_useExpandable = __esm({
7328
7354
  const { isExpanded = false, initHeight = 0, minHeight = 0 } = props;
7329
7355
  const expandableRef = useRef5(null);
7330
7356
  const contentRef = useRef5(null);
7331
- useEffect9(() => {
7357
+ useEffect10(() => {
7332
7358
  if (!expandableRef.current) return;
7333
7359
  expandableRef.current.style.setProperty("--ui-kit-expandable-h", `${initHeight}px )`);
7334
7360
  }, []);
@@ -7344,7 +7370,7 @@ var init_useExpandable = __esm({
7344
7370
  expandableHeightTimerRef.current = null;
7345
7371
  }, DEFERRED_DELAY);
7346
7372
  }, []);
7347
- useEffect9(() => {
7373
+ useEffect10(() => {
7348
7374
  if (!contentRef.current || !expandableRef.current) return;
7349
7375
  const resizeObs = new ResizeObserver(() => setExpandableHeight(minHeight, isExpanded));
7350
7376
  const domMutationObs = new MutationObserver(() => setExpandableHeight(minHeight, isExpanded));
@@ -9610,9 +9636,9 @@ var init_useActivityLog = __esm({
9610
9636
 
9611
9637
  // src/internal/components/ActivityLogMenu/useActivityLogMenuParams.ts
9612
9638
  import { keys } from "lodash-es";
9613
- import { useEffect as useEffect10 } from "react";
9639
+ import { useEffect as useEffect11 } from "react";
9614
9640
  function useActivityLogMenuParams() {
9615
- useEffect10(() => {
9641
+ useEffect11(() => {
9616
9642
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
9617
9643
  if (!pageParams || !keys(pageParams).length) return;
9618
9644
  setTimeout(() => useActivityLogFilters.setState(pageParams), 0);
@@ -10184,7 +10210,7 @@ var init_emailChallenge = __esm({
10184
10210
  // src/internal/components/AuthMenu/SignInStep/Email.tsx
10185
10211
  import { useMutation as useMutation2 } from "@tanstack/react-query";
10186
10212
  import { ChevronRight, Loader as Loader2, Mail as Mail2 } from "lucide-react";
10187
- import { useEffect as useEffect11, useRef as useRef7 } from "react";
10213
+ import { useEffect as useEffect12, useRef as useRef7 } from "react";
10188
10214
  import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
10189
10215
  function Email() {
10190
10216
  const { callbacksRef } = useProviderConfig();
@@ -10255,7 +10281,7 @@ function Email() {
10255
10281
  }
10256
10282
  onSendVerificationCode(email);
10257
10283
  };
10258
- useEffect11(() => {
10284
+ useEffect12(() => {
10259
10285
  if (!focusRef.current || !isMobileView) return;
10260
10286
  focusRef.current?.focus();
10261
10287
  setTimeout(() => {
@@ -11178,7 +11204,7 @@ var init_useAuthMenuHanders = __esm({
11178
11204
  });
11179
11205
 
11180
11206
  // src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx
11181
- import { useEffect as useEffect12, useRef as useRef9, useState as useState4 } from "react";
11207
+ import { useEffect as useEffect13, useRef as useRef9, useState as useState4 } from "react";
11182
11208
  import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
11183
11209
  var getRemainingSeconds, VerificationCodeInput;
11184
11210
  var init_VerificationCodeInput = __esm({
@@ -11193,7 +11219,7 @@ var init_VerificationCodeInput = __esm({
11193
11219
  const { t } = useT();
11194
11220
  const setAlert = useAuthStore((st) => st.setAlert);
11195
11221
  const [timeLeft, setTimeLeft] = useState4(() => getRemainingSeconds(expiresAt));
11196
- useEffect12(() => {
11222
+ useEffect13(() => {
11197
11223
  let intervalId;
11198
11224
  const syncTimeLeft = () => {
11199
11225
  const remaining = getRemainingSeconds(expiresAt);
@@ -11217,7 +11243,7 @@ var init_VerificationCodeInput = __esm({
11217
11243
  const lastSubmittedRef = useRef9(null);
11218
11244
  const inputsRef = useRef9([]);
11219
11245
  const [digits, setDigits] = useState4(["", "", "", "", "", ""]);
11220
- useEffect12(() => {
11246
+ useEffect13(() => {
11221
11247
  const code = digits.join("");
11222
11248
  if (code.length === 6 && digits.every((d) => d !== "") && !isLoading) {
11223
11249
  if (lastSubmittedRef.current !== code) {
@@ -11226,7 +11252,7 @@ var init_VerificationCodeInput = __esm({
11226
11252
  }
11227
11253
  }
11228
11254
  }, [digits, isLoading, onVerifyCode]);
11229
- useEffect12(() => {
11255
+ useEffect13(() => {
11230
11256
  const t2 = setTimeout(() => {
11231
11257
  inputsRef.current[0]?.focus();
11232
11258
  }, 0);
@@ -11531,7 +11557,7 @@ var init_VerifyStep2 = __esm({
11531
11557
 
11532
11558
  // src/internal/components/AuthMenu/AuthMenu.tsx
11533
11559
  import { Loader as Loader4 } from "lucide-react";
11534
- import { useEffect as useEffect13, useMemo as useMemo2 } from "react";
11560
+ import { useEffect as useEffect14, useMemo as useMemo2 } from "react";
11535
11561
  import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
11536
11562
  var AuthMenu;
11537
11563
  var init_AuthMenu = __esm({
@@ -11558,7 +11584,7 @@ var init_AuthMenu = __esm({
11558
11584
  const step = useAuthStore((st) => st.step);
11559
11585
  const alert2 = useAuthStore((st) => st.alert);
11560
11586
  const { pendingLoginResponseRef, onAuthSuccess, goBackToSignIn } = useAuthMenuHandlers();
11561
- useEffect13(() => {
11587
+ useEffect14(() => {
11562
11588
  if (!pendingWalletLogin) return;
11563
11589
  const loginResponse = pendingWalletLogin;
11564
11590
  useLayoutDataStore.getState().setPendingWalletLogin(null);
@@ -11568,7 +11594,7 @@ var init_AuthMenu = __esm({
11568
11594
  onAuthSuccess();
11569
11595
  });
11570
11596
  }, [pendingWalletLogin]);
11571
- useEffect13(() => {
11597
+ useEffect14(() => {
11572
11598
  useLayoutDataStore.getState().setTransitionPageHeight(DEFAULT_AUTH_MENU_HEIGHT);
11573
11599
  return () => {
11574
11600
  const { setStep, setPasskeyStatus, setEmail, setEmailChallenge, setAlert } = useAuthStore.getState();
@@ -11760,7 +11786,7 @@ var init_onboarder = __esm({
11760
11786
 
11761
11787
  // src/internal/components/Onboarding/OnboardingOverlay.tsx
11762
11788
  import { ChevronRightIcon, LoaderIcon as LoaderIcon2, XIcon } from "lucide-react";
11763
- import { useEffect as useEffect14, useMemo as useMemo3, useState as useState6 } from "react";
11789
+ import { useEffect as useEffect15, useMemo as useMemo3, useState as useState6 } from "react";
11764
11790
  import { createPortal as createPortal2 } from "react-dom";
11765
11791
  import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
11766
11792
  function getTooltipXPos(params) {
@@ -11786,7 +11812,7 @@ function getTooltipYPos(params) {
11786
11812
  function OnboardingOverlay() {
11787
11813
  const { t } = useT();
11788
11814
  const page = useLayoutDataStore((st) => st.page);
11789
- useEffect14(() => {
11815
+ useEffect15(() => {
11790
11816
  setTimeout(() => {
11791
11817
  if (!page) {
11792
11818
  useOnboardingStore.getState().setMountIntoNode(document.body);
@@ -11822,7 +11848,7 @@ function OnboardingOverlay() {
11822
11848
  };
11823
11849
  return { ...getTooltipXPos(posParams), ...getTooltipYPos(posParams) };
11824
11850
  }, [elRect, isMobileView]);
11825
- useEffect14(() => {
11851
+ useEffect15(() => {
11826
11852
  if (!waitSecs) return;
11827
11853
  setContinueCountdown(waitSecs);
11828
11854
  const countdownInterval = setInterval(() => {
@@ -11981,9 +12007,9 @@ var init_OnboardingOverlay = __esm({
11981
12007
  });
11982
12008
 
11983
12009
  // src/internal/components/Onboarding/useOnboardingTouirAvailable.ts
11984
- import { useEffect as useEffect15 } from "react";
12010
+ import { useEffect as useEffect16 } from "react";
11985
12011
  function useOnboardingTourAvailable(isAvailable) {
11986
- useEffect15(() => {
12012
+ useEffect16(() => {
11987
12013
  useOnboardingStore.getState().setIsTourAvailable(isAvailable);
11988
12014
  return () => useOnboardingStore.getState().setIsTourAvailable(false);
11989
12015
  }, [isAvailable]);
@@ -12553,11 +12579,11 @@ var init_priceFormatter = __esm({
12553
12579
 
12554
12580
  // src/internal/components/BuyMenu/useBuyMenuStore.ts
12555
12581
  import { keys as keys2, noop } from "lodash-es";
12556
- import { useEffect as useEffect16 } from "react";
12582
+ import { useEffect as useEffect17 } from "react";
12557
12583
  import { create as create7 } from "zustand";
12558
12584
  import { persist as persist2 } from "zustand/middleware";
12559
12585
  function useBuyMenuParams() {
12560
- useEffect16(() => {
12586
+ useEffect17(() => {
12561
12587
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
12562
12588
  if (!pageParams || !keys2(pageParams).length) return;
12563
12589
  const { amount, crypto: crypto2, onRampWidgetRedirected } = pageParams || {};
@@ -13732,11 +13758,11 @@ var init_BinanceTxHistory = __esm({
13732
13758
 
13733
13759
  // src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
13734
13760
  import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
13735
- import { useEffect as useEffect18, useRef as useRef10 } from "react";
13761
+ import { useEffect as useEffect19, useRef as useRef10 } from "react";
13736
13762
  function useBinanceSseTxTracing(walletAddress) {
13737
13763
  const qc = useQueryClient4();
13738
13764
  const debounceRef = useRef10(null);
13739
- useEffect18(() => {
13765
+ useEffect19(() => {
13740
13766
  if (!walletAddress) return;
13741
13767
  const iframeManager = getIframeManager();
13742
13768
  if (!iframeManager) return;
@@ -13778,7 +13804,7 @@ var init_utils7 = __esm({
13778
13804
  // src/internal/components/BuyMenu/binance/Binance.tsx
13779
13805
  import { useMutation as useMutation5, useQuery as useQuery4, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
13780
13806
  import { LoaderIcon as LoaderIcon5 } from "lucide-react";
13781
- import { useEffect as useEffect19 } from "react";
13807
+ import { useEffect as useEffect20 } from "react";
13782
13808
  import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
13783
13809
  function Binance() {
13784
13810
  const qc = useQueryClient5();
@@ -13831,7 +13857,7 @@ function Binance() {
13831
13857
  });
13832
13858
  const paymentModes = paymentModesData?.data?.paymentMethods || [];
13833
13859
  const selectedPaymentMode = paymentModes?.find((el) => getPayMethodID(el) === paymentMode) || null;
13834
- useEffect19(() => {
13860
+ useEffect20(() => {
13835
13861
  useBuyMenuStore.getState().setMinAmount(Number(selectedPaymentMode?.fiatMinLimit || "0"));
13836
13862
  }, [selectedPaymentMode]);
13837
13863
  const { mutate: estimateQuote, isPending: isQuoteEstimating } = useMutation5({
@@ -13859,22 +13885,22 @@ function Binance() {
13859
13885
  }
13860
13886
  });
13861
13887
  const availableFiats = (tradingPairsData?.data?.fiatCurrencies || []).map((ticker) => ({ ticker }));
13862
- useEffect19(() => {
13888
+ useEffect20(() => {
13863
13889
  if (!!selectedFiat || !availableFiats?.length) return;
13864
13890
  const targetFiat = availableFiats.find((item) => PREFERRED_FIATS.includes(item.ticker)) || availableFiats[0];
13865
13891
  useBuyMenuStore.getState().setSelectedFiat(targetFiat.ticker);
13866
13892
  }, [availableFiats, selectedFiat]);
13867
- useEffect19(() => {
13893
+ useEffect20(() => {
13868
13894
  if (!!selectedCrypto || !networkAvailableCryptoList?.length) return;
13869
13895
  const targetCrypto = networkAvailableCryptoList.find((item) => PREFERRED_CRYPTOS.includes(item.cryptoCurrency)) || networkAvailableCryptoList[0];
13870
13896
  useBuyMenuStore.getState().setSelectedCrypto(targetCrypto.cryptoCurrency);
13871
13897
  }, [networkAvailableCryptoList, selectedCrypto]);
13872
- useEffect19(() => {
13898
+ useEffect20(() => {
13873
13899
  if (!!paymentMode || !paymentModes.length) return;
13874
13900
  const targetPaymentMode = paymentModes.find((item) => item.payMethodCode === PREFERRED_PAYMENT_METHOD) || paymentModes[0];
13875
13901
  useBinanceStore.getState().setPaymentMode(getPayMethodID(targetPaymentMode));
13876
13902
  }, [paymentModes]);
13877
- useEffect19(() => {
13903
+ useEffect20(() => {
13878
13904
  return () => {
13879
13905
  useBinanceStore.getState().setPaymentMode(null);
13880
13906
  qc.resetQueries({ queryKey: [QUERY_KEYS2.binanceTradingPairs] });
@@ -14393,11 +14419,11 @@ var init_networks = __esm({
14393
14419
 
14394
14420
  // src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
14395
14421
  import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
14396
- import { useEffect as useEffect20, useRef as useRef11 } from "react";
14422
+ import { useEffect as useEffect21, useRef as useRef11 } from "react";
14397
14423
  function useFinchpaySseTxTracing(walletAddress) {
14398
14424
  const qc = useQueryClient6();
14399
14425
  const debounceRef = useRef11(null);
14400
- useEffect20(() => {
14426
+ useEffect21(() => {
14401
14427
  if (!walletAddress) return;
14402
14428
  const iframeManager = getIframeManager();
14403
14429
  if (!iframeManager) return;
@@ -14446,7 +14472,7 @@ var init_utils8 = __esm({
14446
14472
  // src/internal/components/BuyMenu/finchpay/FinchPay.tsx
14447
14473
  import { useQuery as useQuery5, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
14448
14474
  import { DollarSign, LoaderIcon as LoaderIcon7 } from "lucide-react";
14449
- import { useEffect as useEffect21 } from "react";
14475
+ import { useEffect as useEffect22 } from "react";
14450
14476
  import { Fragment as Fragment14, jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
14451
14477
  function FinchPay() {
14452
14478
  const qc = useQueryClient7();
@@ -14522,7 +14548,7 @@ function FinchPay() {
14522
14548
  })
14523
14549
  });
14524
14550
  const minimum = Number(limitsData?.min_amount || "0");
14525
- useEffect21(() => {
14551
+ useEffect22(() => {
14526
14552
  if (minimum <= 0) return;
14527
14553
  useBuyMenuStore.getState().setMinAmount(minimum);
14528
14554
  }, [minimum]);
@@ -14550,23 +14576,23 @@ function FinchPay() {
14550
14576
  // defaults to CARD estimation, widgetUrl
14551
14577
  })
14552
14578
  });
14553
- useEffect21(() => {
14579
+ useEffect22(() => {
14554
14580
  const { error: errorTitle, message: errorMessage } = handleErrors([currenciesError, limitsError, estimateError]);
14555
14581
  if (!errorTitle && !errorMessage) return;
14556
14582
  console.error(`[BuyModal][Binance] ${errorTitle}: ${errorMessage}`);
14557
14583
  useBuyMenuStore.getState().setError(errorMessage);
14558
14584
  }, [currenciesError, limitsError, estimateError]);
14559
- useEffect21(() => {
14585
+ useEffect22(() => {
14560
14586
  if (!!selectedFiat || currenciesData.fiats.length === 0) return;
14561
14587
  const fallbackFiat = currenciesData.fiats[0];
14562
14588
  const targetFiat = currenciesData.fiats.find((f) => f.ticker.toUpperCase() === "USD") || fallbackFiat;
14563
14589
  useBuyMenuStore.getState().setSelectedFiat(targetFiat.ticker);
14564
14590
  }, [currenciesData, selectedFiat]);
14565
- useEffect21(() => {
14591
+ useEffect22(() => {
14566
14592
  if (!!selectedCrypto || currenciesData.currentNetworkCoins.length === 0) return;
14567
14593
  useBuyMenuStore.getState().setSelectedCrypto(currenciesData.currentNetworkCoins[0].ticker);
14568
14594
  }, [currenciesData, selectedCrypto]);
14569
- useEffect21(() => {
14595
+ useEffect22(() => {
14570
14596
  return () => {
14571
14597
  qc.resetQueries({ queryKey: [QUERY_KEYS2.finchPayCurrencies] });
14572
14598
  qc.resetQueries({ queryKey: [QUERY_KEYS2.finchPayLimits] });
@@ -14820,7 +14846,7 @@ var init_ProviderSelector = __esm({
14820
14846
  });
14821
14847
 
14822
14848
  // src/internal/components/BuyMenu/useHandleInputAmount.ts
14823
- import { useEffect as useEffect22, useRef as useRef12 } from "react";
14849
+ import { useEffect as useEffect23, useRef as useRef12 } from "react";
14824
14850
  var ON_INPUT_QUERY_DELAY, useHandleInputAmount;
14825
14851
  var init_useHandleInputAmount = __esm({
14826
14852
  "src/internal/components/BuyMenu/useHandleInputAmount.ts"() {
@@ -14833,7 +14859,7 @@ var init_useHandleInputAmount = __esm({
14833
14859
  const srcInputAmount = useBuyMenuStore((st) => st.srcInputAmount);
14834
14860
  const minAmount = useBuyMenuStore((st) => st.minAmount);
14835
14861
  const queryAmountTimer = useRef12(null);
14836
- useEffect22(() => {
14862
+ useEffect23(() => {
14837
14863
  if (queryAmountTimer.current) clearTimeout(queryAmountTimer.current);
14838
14864
  queryAmountTimer.current = setTimeout(() => {
14839
14865
  const checkedValue = Math.ceil(Math.max(Number(srcInputAmount), Number(minAmount)));
@@ -14841,7 +14867,7 @@ var init_useHandleInputAmount = __esm({
14841
14867
  useBuyMenuStore.getState().setSrcQueryAmount(checkedValue);
14842
14868
  }, ON_INPUT_QUERY_DELAY);
14843
14869
  }, [minAmount, srcInputAmount]);
14844
- useEffect22(() => {
14870
+ useEffect23(() => {
14845
14871
  if (lastRampProviderRef.current === rampProvider) return;
14846
14872
  const {
14847
14873
  setIsProviderSummary,
@@ -16526,7 +16552,7 @@ var init_EmailNotConnectedWarning = __esm({
16526
16552
 
16527
16553
  // src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts
16528
16554
  import { useQueryClient as useQueryClient11 } from "@tanstack/react-query";
16529
- import React29, { useEffect as useEffect23 } from "react";
16555
+ import React29, { useEffect as useEffect24 } from "react";
16530
16556
  function normalizeSocialLinkError(message) {
16531
16557
  if (message === "X_ALREADY_LINKED") {
16532
16558
  return "This X account is already linked to another account";
@@ -16601,7 +16627,7 @@ function useLinkSocial() {
16601
16627
  [config.social?.providers]
16602
16628
  );
16603
16629
  const [socialLinkStarted, setSocialLinkStarted] = React29.useState(false);
16604
- useEffect23(() => {
16630
+ useEffect24(() => {
16605
16631
  const key = providerType?.toLowerCase();
16606
16632
  console.log("[useLinkSocial] Effect triggered:", { key, linkIsLoading, socialLinkStarted });
16607
16633
  if (key && key !== "telegram" && key !== "email" && key !== "passkey" && key !== "wallet") {
@@ -16680,7 +16706,7 @@ var init_telegram2 = __esm({
16680
16706
 
16681
16707
  // src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
16682
16708
  import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
16683
- import { useCallback as useCallback16, useEffect as useEffect24, useState as useState12 } from "react";
16709
+ import { useCallback as useCallback16, useEffect as useEffect25, useState as useState12 } from "react";
16684
16710
  function useLinkTelegram() {
16685
16711
  const {
16686
16712
  config: { current: config },
@@ -16738,7 +16764,7 @@ function useLinkTelegram() {
16738
16764
  }
16739
16765
  }, [config.social?.providers]);
16740
16766
  const [telegramLinkStarted, setTelegramLinkStarted] = useState12(false);
16741
- useEffect24(() => {
16767
+ useEffect25(() => {
16742
16768
  console.log("[useLinkTelegram] Effect triggered:", { providerType, linkIsLoading, telegramLinkStarted });
16743
16769
  if (providerType === "telegram" && !linkIsLoading && !telegramLinkStarted) {
16744
16770
  console.log("[useLinkTelegram] Starting Telegram link flow");
@@ -16746,7 +16772,7 @@ function useLinkTelegram() {
16746
16772
  handleLinkTelegram();
16747
16773
  }
16748
16774
  }, [providerType, handleLinkTelegram, linkIsLoading, telegramLinkStarted]);
16749
- useEffect24(() => {
16775
+ useEffect25(() => {
16750
16776
  if (providerType !== "telegram") {
16751
16777
  setTelegramLinkStarted(false);
16752
16778
  }
@@ -17259,10 +17285,10 @@ var init_ManageWalletMenu = __esm({
17259
17285
 
17260
17286
  // src/internal/components/ConnectExternalWalletMenu/useConnectExternalWalletMenuParams.ts
17261
17287
  import { keys as keys3 } from "lodash-es";
17262
- import { useEffect as useEffect25, useRef as useRef13 } from "react";
17288
+ import { useEffect as useEffect26, useRef as useRef13 } from "react";
17263
17289
  function useConnectExternalWalletMenuParams() {
17264
17290
  const paramsRef = useRef13(null);
17265
- useEffect25(() => {
17291
+ useEffect26(() => {
17266
17292
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
17267
17293
  if (!pageParams || !keys3(pageParams).length) return;
17268
17294
  paramsRef.current = pageParams;
@@ -18415,7 +18441,7 @@ var init_guardian_backup = __esm({
18415
18441
 
18416
18442
  // src/internal/components/DevicesMenu/DeviceManageScreen.tsx
18417
18443
  import { ArrowLeft as ArrowLeft10, Cpu, Download, HardDrive, Loader2 as Loader23, Trash2, Upload } from "lucide-react";
18418
- import { useCallback as useCallback19, useEffect as useEffect26, useRef as useRef14, useState as useState16 } from "react";
18444
+ import { useCallback as useCallback19, useEffect as useEffect27, useRef as useRef14, useState as useState16 } from "react";
18419
18445
  import { Fragment as Fragment20, jsx as jsx76, jsxs as jsxs67 } from "react/jsx-runtime";
18420
18446
  function formatSize(bytes) {
18421
18447
  if (bytes < 1024) return `${bytes} B`;
@@ -18435,12 +18461,12 @@ function DeviceManageScreen() {
18435
18461
  const [statusMessage, setStatusMessage] = useState16(null);
18436
18462
  const [errorMessage, setErrorMessage] = useState16(null);
18437
18463
  const [waitingConfirm, setWaitingConfirm] = useState16(false);
18438
- useEffect26(() => {
18464
+ useEffect27(() => {
18439
18465
  if (!statusMessage) return;
18440
18466
  const t = setTimeout(() => setStatusMessage(null), 3e3);
18441
18467
  return () => clearTimeout(t);
18442
18468
  }, [statusMessage]);
18443
- useEffect26(() => {
18469
+ useEffect27(() => {
18444
18470
  if (!deviceId || !isWebSerialAvailable()) {
18445
18471
  setScreen({ step: "error", message: "WebSerial not available" });
18446
18472
  return;
@@ -19372,7 +19398,7 @@ var init_cloudStorage = __esm({
19372
19398
 
19373
19399
  // src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts
19374
19400
  import { useMutation as useMutation12, useQueryClient as useQueryClient16 } from "@tanstack/react-query";
19375
- import { useCallback as useCallback22, useEffect as useEffect27 } from "react";
19401
+ import { useCallback as useCallback22, useEffect as useEffect28 } from "react";
19376
19402
  function useCreateBackup() {
19377
19403
  const qc = useQueryClient16();
19378
19404
  const session = useSession((st) => st.session);
@@ -19381,7 +19407,7 @@ function useCreateBackup() {
19381
19407
  const usePasskey = useRestoreStore((st) => st.usePasskey);
19382
19408
  const restorePassword = useRestoreStore((st) => st.restorePassword);
19383
19409
  const selectedCloudProvider = useRestoreStore((st) => st.selectedCloudProvider);
19384
- useEffect27(() => {
19410
+ useEffect28(() => {
19385
19411
  if (!hasServerVault) {
19386
19412
  useRestoreStore.getState().setMethod("server");
19387
19413
  useLayoutStore.getState().setIsDialogForced(true);
@@ -19691,7 +19717,7 @@ var init_useRestoreAccount = __esm({
19691
19717
  });
19692
19718
 
19693
19719
  // src/internal/components/KeyshareRestoreMenu/hooks/useValidateFileBackup.ts
19694
- import { useEffect as useEffect28 } from "react";
19720
+ import { useEffect as useEffect29 } from "react";
19695
19721
  function validateRestoreFileFormat(parsedData) {
19696
19722
  if (typeof parsedData !== "object" || parsedData === null) return false;
19697
19723
  const data = parsedData;
@@ -19701,7 +19727,7 @@ function useValidateFileBackup() {
19701
19727
  const restoreFile = useRestoreStore((st) => st.restoreFile);
19702
19728
  const setError = useRestoreStore((st) => st.setError);
19703
19729
  const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
19704
- useEffect28(() => {
19730
+ useEffect29(() => {
19705
19731
  if (!restoreFile) {
19706
19732
  return;
19707
19733
  }
@@ -19929,7 +19955,7 @@ var init_onboarding_setup4 = __esm({
19929
19955
 
19930
19956
  // src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx
19931
19957
  import { ChevronRight as ChevronRight3, Eye, EyeOff, Info as Info3, Key as Key5, Loader as Loader12, Plus } from "lucide-react";
19932
- import { useEffect as useEffect29, useRef as useRef15 } from "react";
19958
+ import { useEffect as useEffect30, useRef as useRef15 } from "react";
19933
19959
  import { Fragment as Fragment23, jsx as jsx80, jsxs as jsxs71 } from "react/jsx-runtime";
19934
19960
  function PasswordPasskey(props) {
19935
19961
  const { t } = useT();
@@ -19958,7 +19984,7 @@ function PasswordPasskey(props) {
19958
19984
  } = useRestoreStore();
19959
19985
  const { config } = useProviderConfig();
19960
19986
  const isPasskeyEnabled = config.current.passkey.enabled;
19961
- useEffect29(() => {
19987
+ useEffect30(() => {
19962
19988
  if (!isPasskeyEnabled && usePasskey) setUsePasskey(false);
19963
19989
  }, [isPasskeyEnabled, usePasskey]);
19964
19990
  return /* @__PURE__ */ jsxs71(Fragment23, { children: [
@@ -20296,7 +20322,7 @@ var init_File = __esm({
20296
20322
  import { useQueryClient as useQueryClient17 } from "@tanstack/react-query";
20297
20323
  import dayjs4 from "dayjs";
20298
20324
  import { Download as Download3, Key as Key6, Upload as Upload3 } from "lucide-react";
20299
- import { useEffect as useEffect30 } from "react";
20325
+ import { useEffect as useEffect31 } from "react";
20300
20326
  import { Fragment as Fragment26, jsx as jsx83, jsxs as jsxs74 } from "react/jsx-runtime";
20301
20327
  function Server(props) {
20302
20328
  const { isLoading, mode = "restore", serverHandler, createPasskeyHandler } = props;
@@ -20306,7 +20332,7 @@ function Server(props) {
20306
20332
  const usePasskey = useRestoreStore((st) => st.usePasskey);
20307
20333
  const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
20308
20334
  const serverRecoveryStatus = qc.getQueryData([CHECK_BACKUP_QUERY_KEY, address]);
20309
- useEffect30(() => {
20335
+ useEffect31(() => {
20310
20336
  if (mode === "backup" || !serverRecoveryStatus?.created?.encryptionMethod) return;
20311
20337
  setUsePasskey(serverRecoveryStatus.created.encryptionMethod === "passkey");
20312
20338
  }, [mode, serverRecoveryStatus, setUsePasskey]);
@@ -20498,7 +20524,7 @@ var init_select = __esm({
20498
20524
  // src/internal/components/KeyshareRestoreMenu/methods/Cloud.tsx
20499
20525
  import { useQuery as useQuery11 } from "@tanstack/react-query";
20500
20526
  import { ArrowLeft as ArrowLeft13, CloudDownload, CloudUpload, Loader as Loader13 } from "lucide-react";
20501
- import { useEffect as useEffect31 } from "react";
20527
+ import { useEffect as useEffect32 } from "react";
20502
20528
  import { Fragment as Fragment27, jsx as jsx85, jsxs as jsxs76 } from "react/jsx-runtime";
20503
20529
  function Cloud2(props) {
20504
20530
  const { isLoading, mode = "restore", cloudHandler } = props;
@@ -20519,7 +20545,7 @@ function Cloud2(props) {
20519
20545
  return availableProviders.map((p) => ({ id: p.id, name: p.name, available: p.isAvailable() }));
20520
20546
  }
20521
20547
  });
20522
- useEffect31(() => {
20548
+ useEffect32(() => {
20523
20549
  if (isCloudProvidersLoading) return;
20524
20550
  if (!!cloudProvidersError) {
20525
20551
  console.error("[KeyshareBackup] Failed to load cloud providers:", cloudProvidersError);
@@ -20759,7 +20785,7 @@ var init_methods = __esm({
20759
20785
  // src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
20760
20786
  import { useMutation as useMutation14, useQuery as useQuery12, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
20761
20787
  import { AlertCircle as AlertCircle2, CheckCircle2 as CheckCircle22, CloudDownload as CloudDownload2, Loader as Loader14, UserCircle as UserCircle2 } from "lucide-react";
20762
- import { useEffect as useEffect32 } from "react";
20788
+ import { useEffect as useEffect33 } from "react";
20763
20789
  import { useDisconnect as useDisconnect4 } from "wagmi";
20764
20790
  import { Fragment as Fragment29, jsx as jsx87, jsxs as jsxs78 } from "react/jsx-runtime";
20765
20791
  var RESTORE_COMPONENTS, KeyshareRestoreMenu;
@@ -20795,7 +20821,7 @@ var init_KeyshareRestoreMenu = __esm({
20795
20821
  const error = useRestoreStore((st) => st.error);
20796
20822
  const success = useRestoreStore((st) => st.success);
20797
20823
  const currentRestoreMethod = useRestoreStore((st) => st.method);
20798
- useEffect32(() => {
20824
+ useEffect33(() => {
20799
20825
  const { setIsDialogForced } = useLayoutStore.getState();
20800
20826
  const { setRestorePassword, setRestoreFile, setShowPassword, setUsePasskey, setMethod } = useRestoreStore.getState();
20801
20827
  setIsDialogForced(true);
@@ -20834,7 +20860,7 @@ var init_KeyshareRestoreMenu = __esm({
20834
20860
  queryFn: async () => await getShareRecoveryStats()
20835
20861
  });
20836
20862
  const hasServerBackup = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
20837
- useEffect32(() => {
20863
+ useEffect33(() => {
20838
20864
  if (!!hasServerBackup) useRestoreStore.getState().setMethod("server");
20839
20865
  }, [hasServerBackup]);
20840
20866
  const { mutate: disconnect, isPending: isDisconnecting } = useMutation14({
@@ -20974,7 +21000,7 @@ var init_KeyshareRestoreMenu = __esm({
20974
21000
  // src/internal/components/KeyshareRestoreMenu/KeyshareBackupMenu.tsx
20975
21001
  import { useQuery as useQuery13 } from "@tanstack/react-query";
20976
21002
  import { AlertCircle as AlertCircle3, ArrowLeft as ArrowLeft14, CheckCircle2 as CheckCircle23, Loader as Loader15, LockIcon } from "lucide-react";
20977
- import { useEffect as useEffect33 } from "react";
21003
+ import { useEffect as useEffect34 } from "react";
20978
21004
  import { Fragment as Fragment30, jsx as jsx88, jsxs as jsxs79 } from "react/jsx-runtime";
20979
21005
  function KeyshareBackupMenu() {
20980
21006
  const address = useSession((st) => st.address);
@@ -20985,7 +21011,7 @@ function KeyshareBackupMenu() {
20985
21011
  const usePasskey = useRestoreStore((st) => st.usePasskey);
20986
21012
  const error = useRestoreStore((st) => st.error);
20987
21013
  const success = useRestoreStore((st) => st.success);
20988
- useEffect33(() => {
21014
+ useEffect34(() => {
20989
21015
  const { setSuccess, setError, setRestorePassword, setRestoreFile, setShowPassword, setUsePasskey, setMethod } = useRestoreStore.getState();
20990
21016
  return () => {
20991
21017
  setSuccess(null);
@@ -21005,7 +21031,7 @@ function KeyshareBackupMenu() {
21005
21031
  });
21006
21032
  useOnboardingTourAvailable(!isRecoveryLoading && currentBackupMethod === "server" && !usePasskey);
21007
21033
  const hasRecoveryData2 = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
21008
- useEffect33(() => {
21034
+ useEffect34(() => {
21009
21035
  if (!!hasRecoveryData2) useRestoreStore.getState().setMethod("server");
21010
21036
  }, [hasRecoveryData2]);
21011
21037
  const {
@@ -21252,7 +21278,7 @@ var init_SumsubIframeManager = __esm({
21252
21278
  });
21253
21279
 
21254
21280
  // src/internal/components/KYC/useSumsubIframe.ts
21255
- import { useEffect as useEffect34, useRef as useRef16, useState as useState21 } from "react";
21281
+ import { useEffect as useEffect35, useRef as useRef16, useState as useState21 } from "react";
21256
21282
  function useSumsubIframe({ iframeUrl }) {
21257
21283
  const config = useProviderConfig().config;
21258
21284
  const { colorMode } = useColorMode();
@@ -21262,7 +21288,7 @@ function useSumsubIframe({ iframeUrl }) {
21262
21288
  const [height, setHeight] = useState21(0);
21263
21289
  const [status, setStatus] = useState21("");
21264
21290
  const levelName = config.current?.kyc?.options?.levelName;
21265
- useEffect34(() => {
21291
+ useEffect35(() => {
21266
21292
  setError(null);
21267
21293
  setIsLoading(true);
21268
21294
  setStatus("Preparing verification...");
@@ -22764,11 +22790,11 @@ var init_useNicknameStore = __esm({
22764
22790
  // src/internal/components/NicknameMenu/useNicknameAvailability.ts
22765
22791
  import { useMutation as useMutation15 } from "@tanstack/react-query";
22766
22792
  import { debounce as debounce4 } from "lodash-es";
22767
- import { useCallback as useCallback25, useEffect as useEffect35 } from "react";
22793
+ import { useCallback as useCallback25, useEffect as useEffect36 } from "react";
22768
22794
  function useNicknameAvailability(currentNickname) {
22769
22795
  const { t } = useT();
22770
22796
  const nicknameValue = useNicknameStore((st) => st.nicknameValue);
22771
- useEffect35(() => {
22797
+ useEffect36(() => {
22772
22798
  if (!currentNickname) return;
22773
22799
  useNicknameStore.getState().setNicknameValue(currentNickname);
22774
22800
  }, [currentNickname]);
@@ -22790,7 +22816,7 @@ function useNicknameAvailability(currentNickname) {
22790
22816
  }
22791
22817
  });
22792
22818
  const debouncedCheckAvailability = useCallback25(debounce4(checkAvailability, DEBOUNCE_MS), [checkAvailability]);
22793
- useEffect35(() => {
22819
+ useEffect36(() => {
22794
22820
  if (!currentNickname) return;
22795
22821
  const normalizedInputValue = normalizeNickname(nicknameValue);
22796
22822
  const { valid: isNicknameValid } = validateNickname(nicknameValue);
@@ -22819,7 +22845,7 @@ var init_useNicknameAvailability = __esm({
22819
22845
  // src/internal/components/NicknameMenu/NicknameEditForm.tsx
22820
22846
  import { useMutation as useMutation16, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
22821
22847
  import { AtSignIcon, CopyIcon as CopyIcon2, LoaderIcon as LoaderIcon12, SaveIcon } from "lucide-react";
22822
- import { useCallback as useCallback26, useEffect as useEffect36, useRef as useRef18, useState as useState23 } from "react";
22848
+ import { useCallback as useCallback26, useEffect as useEffect37, useRef as useRef18, useState as useState23 } from "react";
22823
22849
  import { Fragment as Fragment34, jsx as jsx98, jsxs as jsxs89 } from "react/jsx-runtime";
22824
22850
  function NicknameEditForm(props) {
22825
22851
  const { isInitialUser, nicknameInfo } = props;
@@ -22834,7 +22860,7 @@ function NicknameEditForm(props) {
22834
22860
  const { isCheckingAvailability } = useNicknameAvailability(nicknameInfo ? nicknameInfo.handle : "");
22835
22861
  const [isNicknameCopied, setIsNicknameCopied] = useState23(false);
22836
22862
  const exitTimerRef = useRef18(null);
22837
- useEffect36(() => () => {
22863
+ useEffect37(() => () => {
22838
22864
  if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
22839
22865
  }, []);
22840
22866
  const { mutate: changeNickname2, isPending: isNicknameChanging } = useMutation16({
@@ -22998,7 +23024,7 @@ var init_NicknameEditForm = __esm({
22998
23024
  import { useQuery as useQuery19 } from "@tanstack/react-query";
22999
23025
  import dayjs5 from "dayjs";
23000
23026
  import { ArrowLeft as ArrowLeft18, Loader as Loader18 } from "lucide-react";
23001
- import { useEffect as useEffect37 } from "react";
23027
+ import { useEffect as useEffect38 } from "react";
23002
23028
  import { jsx as jsx99, jsxs as jsxs90 } from "react/jsx-runtime";
23003
23029
  function NicknameMenu() {
23004
23030
  const { isInitialUser } = usePageParams().current;
@@ -23018,7 +23044,7 @@ function NicknameMenu() {
23018
23044
  queryFn: async () => await getNicknameInfo()
23019
23045
  });
23020
23046
  const resolvedError = nicknameError || nicknameInfoError?.message || null;
23021
- useEffect37(() => () => useNicknameStore.getState().reset(), []);
23047
+ useEffect38(() => () => useNicknameStore.getState().reset(), []);
23022
23048
  return /* @__PURE__ */ jsxs90(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
23023
23049
  /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-[var(--ui-kit-gap)] ", children: [
23024
23050
  /* @__PURE__ */ jsx99(
@@ -23210,7 +23236,7 @@ var init_nickname_fingerprint = __esm({
23210
23236
  import { useQuery as useQuery20 } from "@tanstack/react-query";
23211
23237
  import { ArrowLeft as ArrowLeft19, AtSignIcon as AtSignIcon2, CheckCircle2 as CheckCircle24, Copy as Copy2, FingerprintIcon, LoaderIcon as LoaderIcon13, Wallet2Icon as Wallet2Icon4 } from "lucide-react";
23212
23238
  import QRCode from "qrcode";
23213
- import { useEffect as useEffect38, useMemo as useMemo15, useState as useState24 } from "react";
23239
+ import { useEffect as useEffect39, useMemo as useMemo15, useState as useState24 } from "react";
23214
23240
  import { Fragment as Fragment35, jsx as jsx100, jsxs as jsxs91 } from "react/jsx-runtime";
23215
23241
  function ReceiveMenu() {
23216
23242
  const { t } = useT();
@@ -23236,7 +23262,7 @@ function ReceiveMenu() {
23236
23262
  return null;
23237
23263
  }
23238
23264
  }, [session?.ownerAddress]);
23239
- useEffect38(() => {
23265
+ useEffect39(() => {
23240
23266
  if (!address) return;
23241
23267
  QRCode.toDataURL(address, {
23242
23268
  width: 200,
@@ -24038,7 +24064,7 @@ var init_utils10 = __esm({
24038
24064
  });
24039
24065
 
24040
24066
  // src/internal/components/SecurityMenu/UserPolicies/usePolicyForm.ts
24041
- import { useEffect as useEffect39, useState as useState25 } from "react";
24067
+ import { useEffect as useEffect40, useState as useState25 } from "react";
24042
24068
  import { create as create14 } from "zustand";
24043
24069
  function updateDestinations(patch) {
24044
24070
  usePolicyForm.setState((st) => ({ ...st, destinations: { ...st?.destinations, ...patch } }));
@@ -24050,7 +24076,7 @@ function useWatchFormData() {
24050
24076
  const [showFormErrors, setShowFormErrors] = useState25(false);
24051
24077
  const formData = usePolicyForm();
24052
24078
  const formState = usePolicyFormValidation();
24053
- useEffect39(() => {
24079
+ useEffect40(() => {
24054
24080
  if (!formData) return;
24055
24081
  setShowFormErrors(false);
24056
24082
  const errors = {};
@@ -24077,7 +24103,7 @@ function useWatchFormData() {
24077
24103
  }
24078
24104
  usePolicyFormValidation.setState(errors, true);
24079
24105
  }, [formData]);
24080
- useEffect39(() => () => usePolicyFormValidation.setState({}, true), []);
24106
+ useEffect40(() => () => usePolicyFormValidation.setState({}, true), []);
24081
24107
  const formErrorItem = Object.entries(formState).find(([_, value]) => value?.error);
24082
24108
  const formErrorMessage = formErrorItem ? `${formErrorItem[0].toUpperCase()}: ${formErrorItem[1]?.error}` : "";
24083
24109
  return {
@@ -24584,9 +24610,9 @@ var init_UserPolicies2 = __esm({
24584
24610
 
24585
24611
  // src/internal/components/SecurityMenu/useSecurityMenuParams.ts
24586
24612
  import { keys as keys4 } from "lodash-es";
24587
- import { useEffect as useEffect40 } from "react";
24613
+ import { useEffect as useEffect41 } from "react";
24588
24614
  function useSecurityMenuParams() {
24589
- useEffect40(() => {
24615
+ useEffect41(() => {
24590
24616
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
24591
24617
  if (!pageParams || !keys4(pageParams).length) return;
24592
24618
  const { submenu } = pageParams;
@@ -24620,7 +24646,7 @@ var init_useSecurityMenuParams = __esm({
24620
24646
 
24621
24647
  // src/internal/components/SecurityMenu/SecurityMenu.tsx
24622
24648
  import { ArrowLeft as ArrowLeft20, LayoutGridIcon, ShieldCogIcon } from "lucide-react";
24623
- import { useEffect as useEffect41 } from "react";
24649
+ import { useEffect as useEffect42 } from "react";
24624
24650
  import { Fragment as Fragment38, jsx as jsx108, jsxs as jsxs99 } from "react/jsx-runtime";
24625
24651
  function SecurityMenuContent() {
24626
24652
  const { t } = useT();
@@ -24629,7 +24655,7 @@ function SecurityMenuContent() {
24629
24655
  const { appToUntrust, showConnectedApps, showAssetsPolicies } = useSecurityStore();
24630
24656
  const policyForm = usePolicyForm();
24631
24657
  useOnboardingTourAvailable(!showConnectedApps && !showAssetsPolicies);
24632
- useEffect41(() => {
24658
+ useEffect42(() => {
24633
24659
  let securityTitle = "";
24634
24660
  switch (true) {
24635
24661
  case showConnectedApps:
@@ -24650,7 +24676,7 @@ function SecurityMenuContent() {
24650
24676
  return () => {
24651
24677
  };
24652
24678
  }, [t, showConnectedApps, showAssetsPolicies, policyForm]);
24653
- useEffect41(
24679
+ useEffect42(
24654
24680
  () => () => {
24655
24681
  usePolicyForm.setState(null, true);
24656
24682
  useSecurityStore.setState(
@@ -24946,12 +24972,12 @@ var init_SenderSelector = __esm({
24946
24972
  });
24947
24973
 
24948
24974
  // src/internal/components/SendMenu/hyperbridge/hooks/useAvailableSenders.ts
24949
- import { useEffect as useEffect42, useRef as useRef19 } from "react";
24975
+ import { useEffect as useEffect43, useRef as useRef19 } from "react";
24950
24976
  function useAvailableSenders() {
24951
24977
  const address = useSession((st) => st.address);
24952
24978
  const { profiles } = useLinkedProfiles();
24953
24979
  const lastCalcedSenders = useRef19([]);
24954
- useEffect42(() => {
24980
+ useEffect43(() => {
24955
24981
  const sendersAccumulator = [
24956
24982
  {
24957
24983
  type: "embarkai-wallet",
@@ -25654,7 +25680,7 @@ var init_useBridge = __esm({
25654
25680
 
25655
25681
  // src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneRoutes.ts
25656
25682
  import { useQuery as useQuery24 } from "@tanstack/react-query";
25657
- import { useEffect as useEffect43 } from "react";
25683
+ import { useEffect as useEffect44 } from "react";
25658
25684
  function useHyperlaneRoutes() {
25659
25685
  const address = useSession((st) => st.address);
25660
25686
  const page = useLayoutDataStore((st) => st.page);
@@ -25670,7 +25696,7 @@ function useHyperlaneRoutes() {
25670
25696
  queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
25671
25697
  queryFn: async () => await getHyperlaneWarpRoutes()
25672
25698
  });
25673
- useEffect43(() => {
25699
+ useEffect44(() => {
25674
25700
  if (!errorWarpRoutes) return;
25675
25701
  useFlowSelectorStore.getState().setError(errorWarpRoutes.message);
25676
25702
  const { resetSelections, setRecipient, setOriginChain, setDestinationChain } = useBridgeStore.getState();
@@ -25679,7 +25705,7 @@ function useHyperlaneRoutes() {
25679
25705
  setOriginChain(null);
25680
25706
  setDestinationChain(null);
25681
25707
  }, [errorWarpRoutes]);
25682
- useEffect43(() => {
25708
+ useEffect44(() => {
25683
25709
  if (!!hyperRoute || !hyperlaneWarpRoutes.length) return;
25684
25710
  let targetHyperRouteToSelect = hyperlaneWarpRoutes.find((route) => route.routeId === hyperRoute);
25685
25711
  if (!targetHyperRouteToSelect) {
@@ -25718,13 +25744,13 @@ var init_useHyperlaneRoutes = __esm({
25718
25744
  });
25719
25745
 
25720
25746
  // src/internal/components/SendMenu/hyperbridge/hooks/useMenuTitle.ts
25721
- import { useEffect as useEffect44 } from "react";
25747
+ import { useEffect as useEffect45 } from "react";
25722
25748
  function useMenuTitle(warpRoutes) {
25723
25749
  const { t } = useT();
25724
25750
  const bridgeStep = useBridgeStore((st) => st.bridgeStep);
25725
25751
  const hyperRoute = useBridgeStore((st) => st.hyperRoute);
25726
25752
  const hyperRouteMeta = warpRoutes?.length ? warpRoutes.find((route) => route.routeId === hyperRoute) : null;
25727
- useEffect44(() => {
25753
+ useEffect45(() => {
25728
25754
  const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
25729
25755
  switch (true) {
25730
25756
  case bridgeStep === "sender-selector":
@@ -25918,7 +25944,7 @@ var init_ResolveChainIcon = __esm({
25918
25944
  // src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
25919
25945
  import { CHAINS_BROWSERS_TRANSPORTS as CHAINS_BROWSERS_TRANSPORTS2 } from "@embarkai/core";
25920
25946
  import { useQuery as useQuery25, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
25921
- import { useCallback as useCallback29, useEffect as useEffect45 } from "react";
25947
+ import { useCallback as useCallback29, useEffect as useEffect46 } from "react";
25922
25948
  import { createPublicClient as createPublicClient2, erc20Abi as erc20Abi3, formatUnits as formatUnits9, http as http3 } from "viem";
25923
25949
  import { useSwitchChain as useSwitchChain3 } from "wagmi";
25924
25950
  function useBridgeBalance(isLoadingWarpRoutes, hyperlaneWarpRoutes) {
@@ -26024,7 +26050,7 @@ function useBridgeBalance(isLoadingWarpRoutes, hyperlaneWarpRoutes) {
26024
26050
  },
26025
26051
  [refreshBalances, qc]
26026
26052
  );
26027
- useEffect45(() => {
26053
+ useEffect46(() => {
26028
26054
  if (!!isLoadingWarpRoutes || !bridgeSender || !originChain) return;
26029
26055
  switch (bridgeSender) {
26030
26056
  case "embarkai-wallet":
@@ -26987,7 +27013,7 @@ var init_steps = __esm({
26987
27013
  });
26988
27014
 
26989
27015
  // src/internal/components/SendMenu/hyperbridge/HyperlaneBridge.tsx
26990
- import { useEffect as useEffect46 } from "react";
27016
+ import { useEffect as useEffect47 } from "react";
26991
27017
  import { jsx as jsx117, jsxs as jsxs106 } from "react/jsx-runtime";
26992
27018
  function HyperlaneBridge() {
26993
27019
  const bridgeStep = useBridgeStore((st) => st.bridgeStep);
@@ -26995,7 +27021,7 @@ function HyperlaneBridge() {
26995
27021
  const { hyperlaneWarpRoutes, isLoadingWarpRoutes } = useHyperlaneRoutes();
26996
27022
  const { directWalletProfiles } = useAvailableSenders();
26997
27023
  useMenuTitle(hyperlaneWarpRoutes);
26998
- useEffect46(() => {
27024
+ useEffect47(() => {
26999
27025
  return () => {
27000
27026
  useBridgeStore.getState().resetSelections();
27001
27027
  };
@@ -27150,7 +27176,7 @@ var init_useErc3643Compliance = __esm({
27150
27176
 
27151
27177
  // src/hooks/useNicknameResolve.ts
27152
27178
  import { useQuery as useQuery26 } from "@tanstack/react-query";
27153
- import { useEffect as useEffect47, useMemo as useMemo18, useState as useState29 } from "react";
27179
+ import { useEffect as useEffect48, useMemo as useMemo18, useState as useState29 } from "react";
27154
27180
  function looksLikeNickname(input) {
27155
27181
  if (!input) return false;
27156
27182
  if (input.startsWith("0x")) return false;
@@ -27164,7 +27190,7 @@ function useNicknameResolve(input, options) {
27164
27190
  const [isDebouncing, setIsDebouncing] = useState29(false);
27165
27191
  const normalized = normalizeNickname(input);
27166
27192
  const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
27167
- useEffect47(() => {
27193
+ useEffect48(() => {
27168
27194
  if (!isNicknameInput || !enabled) {
27169
27195
  setDebouncedInput("");
27170
27196
  setIsDebouncing(false);
@@ -27632,7 +27658,7 @@ var init_AssetList = __esm({
27632
27658
 
27633
27659
  // src/internal/components/SendMenu/send/components/NicknameData.tsx
27634
27660
  import { AtSign, CheckCircle2 as CheckCircle25, ShieldAlert, ShieldCheck as ShieldCheck2 } from "lucide-react";
27635
- import { useEffect as useEffect48 } from "react";
27661
+ import { useEffect as useEffect49 } from "react";
27636
27662
  import { jsx as jsx122, jsxs as jsxs110 } from "react/jsx-runtime";
27637
27663
  function NicknameData(props) {
27638
27664
  const { resolvedNicknameData, isNicknameInput } = props;
@@ -27645,7 +27671,7 @@ function NicknameData(props) {
27645
27671
  isWalletNotSetup,
27646
27672
  isFrozen
27647
27673
  } = resolvedNicknameData;
27648
- useEffect48(() => {
27674
+ useEffect49(() => {
27649
27675
  if (isResolving) return;
27650
27676
  let errMessage = null;
27651
27677
  switch (true) {
@@ -28214,7 +28240,7 @@ var init_sendSteps = __esm({
28214
28240
 
28215
28241
  // src/internal/components/SendMenu/send/SendMenu.tsx
28216
28242
  import { CheckCircle2 as CheckCircle27, Loader as Loader28 } from "lucide-react";
28217
- import { useEffect as useEffect49, useMemo as useMemo19 } from "react";
28243
+ import { useEffect as useEffect50, useMemo as useMemo19 } from "react";
28218
28244
  import { parseUnits as parseUnits2 } from "viem";
28219
28245
  import { Fragment as Fragment44, jsx as jsx125, jsxs as jsxs113 } from "react/jsx-runtime";
28220
28246
  function SendMenu() {
@@ -28235,16 +28261,16 @@ function SendMenu() {
28235
28261
  userOpHash,
28236
28262
  reset
28237
28263
  } = useSendTransaction();
28238
- useEffect49(() => {
28264
+ useEffect50(() => {
28239
28265
  useFlowSelectorStore.getState().setIsUiLocked(isAssetsLoading || isTransactionPending);
28240
28266
  }, [isAssetsLoading, isTransactionPending]);
28241
- useEffect49(() => {
28267
+ useEffect50(() => {
28242
28268
  useFlowSelectorStore.getState().setError(sendTransactionError || null);
28243
28269
  }, [sendTransactionError]);
28244
28270
  const { txStep, recipient, amount, selectedAsset, setSelectedAsset } = useSendStore();
28245
28271
  const isNft = isNftAsset3(selectedAsset);
28246
28272
  const isSecurity = isSecurityToken2(selectedAsset);
28247
- useEffect49(() => {
28273
+ useEffect50(() => {
28248
28274
  const shouldDefaultAsset = assets.length > 0 && !selectedAsset;
28249
28275
  if (!shouldDefaultAsset) return;
28250
28276
  const chainNativeCurrency = useSession.getState().chainConfig?.nativeCurrency;
@@ -28254,7 +28280,7 @@ function SendMenu() {
28254
28280
  if (isBalance(erc20)) return setSelectedAsset(erc20);
28255
28281
  setSelectedAsset(assets[0]);
28256
28282
  }, [assets, selectedAsset]);
28257
- useEffect49(
28283
+ useEffect50(
28258
28284
  () => () => {
28259
28285
  useSendStore.getState().reset();
28260
28286
  reset();
@@ -28279,7 +28305,7 @@ function SendMenu() {
28279
28305
  enabled: isSecurity && !!effectiveAddress && !!complianceAmount,
28280
28306
  chainId: activeChainId
28281
28307
  });
28282
- useEffect49(() => {
28308
+ useEffect50(() => {
28283
28309
  const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
28284
28310
  switch (true) {
28285
28311
  case txStep === "select-asset":
@@ -28378,10 +28404,10 @@ var init_send = __esm({
28378
28404
 
28379
28405
  // src/internal/components/SendMenu/useSendMenuParams.ts
28380
28406
  import { keys as keys5 } from "lodash-es";
28381
- import { useEffect as useEffect50 } from "react";
28407
+ import { useEffect as useEffect51 } from "react";
28382
28408
  function useSendMenuParams() {
28383
28409
  const { config } = useProviderConfig();
28384
- useEffect50(() => {
28410
+ useEffect51(() => {
28385
28411
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
28386
28412
  if (!pageParams || !keys5(pageParams).length) return;
28387
28413
  const { sendFlow, send, bridge } = pageParams || {};
@@ -28446,7 +28472,7 @@ var init_useSendMenuParams = __esm({
28446
28472
 
28447
28473
  // src/internal/components/SendMenu/SendFlowSelector.tsx
28448
28474
  import { ArrowLeft as ArrowLeft21, ArrowRightIcon as ArrowRightIcon2, ArrowRightLeftIcon as ArrowRightLeftIcon3 } from "lucide-react";
28449
- import { useEffect as useEffect51, useMemo as useMemo20 } from "react";
28475
+ import { useEffect as useEffect52, useMemo as useMemo20 } from "react";
28450
28476
  import { jsx as jsx126, jsxs as jsxs114 } from "react/jsx-runtime";
28451
28477
  function SelectorFlowButtons() {
28452
28478
  const { t } = useT();
@@ -28507,13 +28533,13 @@ function SendFlowSelector() {
28507
28533
  const sendStep = useSendStore((st) => st.txStep);
28508
28534
  const bridgeStep = useBridgeStore((st) => st.bridgeStep);
28509
28535
  useOnboardingTourAvailable(sendStep === "input" && bridgeStep === "select");
28510
- useEffect51(
28536
+ useEffect52(
28511
28537
  () => () => {
28512
28538
  useFlowSelectorStore.getState().setError(null);
28513
28539
  },
28514
28540
  []
28515
28541
  );
28516
- useEffect51(() => {
28542
+ useEffect52(() => {
28517
28543
  if (!!config?.current?.features?.showAssetBridge) return;
28518
28544
  if (selectorFlow === "bridge") useFlowSelectorStore.getState().setFlow("send");
28519
28545
  }, [selectorFlow]);
@@ -29858,7 +29884,7 @@ var init_PageMap = __esm({
29858
29884
  });
29859
29885
 
29860
29886
  // src/internal/hooks/usePageMapper.tsx
29861
- import { useCallback as useCallback32, useEffect as useEffect52 } from "react";
29887
+ import { useCallback as useCallback32, useEffect as useEffect53 } from "react";
29862
29888
  import { jsx as jsx130 } from "react/jsx-runtime";
29863
29889
  function usePageMapper() {
29864
29890
  const page = useLayoutDataStore((st) => st.page);
@@ -29881,7 +29907,7 @@ function usePageMapper() {
29881
29907
  // isDialogAnimating: true
29882
29908
  });
29883
29909
  }, []);
29884
- useEffect52(() => {
29910
+ useEffect53(() => {
29885
29911
  if (page === null) return closeDialog();
29886
29912
  const pageItem = PAGE_MAP[page];
29887
29913
  if (!pageItem) {
@@ -29904,20 +29930,20 @@ var init_usePageMapper = __esm({
29904
29930
  });
29905
29931
 
29906
29932
  // src/internal/hooks/useSettingsNotifications.ts
29907
- import { useEffect as useEffect53 } from "react";
29933
+ import { useEffect as useEffect54 } from "react";
29908
29934
  function useSettingsNotifications() {
29909
29935
  const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
29910
29936
  const providers = jwtTokenManager2.getProviders();
29911
29937
  const hasEmail = providers.includes("email");
29912
29938
  const { data: userProfile = null } = useUserProfile();
29913
- useEffect53(() => {
29939
+ useEffect54(() => {
29914
29940
  const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
29915
29941
  setSettingsNotifications({
29916
29942
  ...COMPLETE_KYC_PROGRESS,
29917
29943
  status: isKYCVerified ? "resolved" : "active"
29918
29944
  });
29919
29945
  }, [userProfile, setSettingsNotifications]);
29920
- useEffect53(() => {
29946
+ useEffect54(() => {
29921
29947
  setSettingsNotifications({
29922
29948
  ...EMAIL_NOT_CONNECTED_NOTIFICATION,
29923
29949
  status: hasEmail ? "resolved" : "active"
@@ -29949,7 +29975,7 @@ var init_package = __esm({
29949
29975
  "package.json"() {
29950
29976
  package_default = {
29951
29977
  name: "@embarkai/ui-kit",
29952
- version: "0.4.111",
29978
+ version: "0.4.112",
29953
29979
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
29954
29980
  type: "module",
29955
29981
  main: "./dist/index.cjs",
@@ -30452,21 +30478,23 @@ var init_dialog = __esm({
30452
30478
  init_button();
30453
30479
  Dialog = DialogPrimitive.Root;
30454
30480
  DialogPortal = DialogPrimitive.Portal;
30455
- DialogOverlay = forwardRef6(({ className, closing, ...props }, ref) => /* @__PURE__ */ jsx133(
30456
- "div",
30457
- {
30458
- ref,
30459
- style: { backdropFilter: "blur(var(--ui-kit-backdrop-blur))" },
30460
- className: cn2(
30461
- "w-[100dvw] h-[100dvh]",
30462
- "fixed inset-0 z-[9998] bg-[var(--ui-kit-overlay)]",
30463
- closing ? "animate-dialog-out" : "animate-dialog-in",
30464
- className
30465
- ),
30466
- ...props
30467
- }
30468
- ));
30469
- DialogOverlay.displayName = "DialogOverlay";
30481
+ DialogOverlay = forwardRef6(
30482
+ ({ className, closing, ...props }, ref) => /* @__PURE__ */ jsx133(
30483
+ DialogPrimitive.Overlay,
30484
+ {
30485
+ ref,
30486
+ style: { backdropFilter: "blur(var(--ui-kit-backdrop-blur))" },
30487
+ className: cn2(
30488
+ "w-[100dvw] h-[100dvh]",
30489
+ "fixed inset-0 z-[9998] bg-[var(--ui-kit-overlay)]",
30490
+ closing ? "animate-dialog-out" : "animate-dialog-in",
30491
+ className
30492
+ ),
30493
+ ...props
30494
+ }
30495
+ )
30496
+ );
30497
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
30470
30498
  CONTENT_BG_SETUP = {
30471
30499
  backgroundColor: "var(--ui-kit-bg)",
30472
30500
  border: "1px solid var(--ui-kit-bd)",
@@ -30608,7 +30636,7 @@ var init_visually_hidden = __esm({
30608
30636
 
30609
30637
  // src/internal/components/Dialog/Dialog.tsx
30610
30638
  import { AnimatePresence, motion } from "motion/react";
30611
- import { useEffect as useEffect54 } from "react";
30639
+ import { useEffect as useEffect55 } from "react";
30612
30640
  import { jsx as jsx135, jsxs as jsxs121 } from "react/jsx-runtime";
30613
30641
  function Dialog2() {
30614
30642
  const config = useProviderConfig().config;
@@ -30618,19 +30646,19 @@ function Dialog2() {
30618
30646
  const { colorMode, maxScrollHeight, isDialogOpen, dialogContent, isDialogForced } = useLayoutStore();
30619
30647
  const page = useLayoutDataStore((st) => st.page);
30620
30648
  const transitionPageHeight = useLayoutDataStore((st) => st.transitionPageHeight);
30621
- useEffect54(() => useLayoutStore.setState({ isSettings: !!session }), [session]);
30649
+ useEffect55(() => useLayoutStore.setState({ isSettings: !!session }), [session]);
30622
30650
  usePageMapper();
30623
30651
  useAutoConnect();
30624
30652
  useBackupStatusChanges();
30625
30653
  useDetectMaxScrollHeight();
30626
30654
  useSettingsNotifications();
30627
30655
  useListenIframeAuthEvents();
30656
+ useAllowExternalModalsScroll(isDialogOpen);
30628
30657
  const isHeaderHidden = !session || page === "keysare-backup" /* KEYSARE_BACKUP */ && !hasServerVault;
30629
30658
  return /* @__PURE__ */ jsx135(
30630
30659
  Dialog,
30631
30660
  {
30632
30661
  open: isDialogOpen,
30633
- modal: false,
30634
30662
  onOpenChange: (open) => {
30635
30663
  if (isDialogForced) return;
30636
30664
  if (!open) {
@@ -30684,6 +30712,7 @@ var init_Dialog = __esm({
30684
30712
  init_ProviderContext();
30685
30713
  init_SessionContext();
30686
30714
  init_constants();
30715
+ init_useAllowExternalModalsScroll();
30687
30716
  init_useAutoConnect();
30688
30717
  init_useBackupStatusChanges();
30689
30718
  init_useDetectMaxScrollHeight();
@@ -30708,19 +30737,19 @@ var init_Dialog2 = __esm({
30708
30737
  });
30709
30738
 
30710
30739
  // src/internal/components/DirectWalletHandler.tsx
30711
- import { useEffect as useEffect55 } from "react";
30740
+ import { useEffect as useEffect56 } from "react";
30712
30741
  import { useConnection } from "wagmi";
30713
30742
  function DirectWalletHandler() {
30714
30743
  const walletMode = useProviderConfig().config.current?.wallet?.mode || "both";
30715
30744
  const externalAddress = useExternalWalletStore((st) => st.externalAddress);
30716
30745
  const isExternalConnected = useExternalWalletStore((st) => st.isExternalConnected);
30717
30746
  const { address, isConnected, chain, connector } = useConnection();
30718
- useEffect55(() => {
30747
+ useEffect56(() => {
30719
30748
  const { setConfigMode, setActiveMode } = useExternalWalletStore.getState();
30720
30749
  setConfigMode(walletMode);
30721
30750
  if (walletMode !== "both") setActiveMode(walletMode);
30722
30751
  }, [walletMode]);
30723
- useEffect55(() => {
30752
+ useEffect56(() => {
30724
30753
  if ((!!externalAddress || isExternalConnected) && !isConnected) {
30725
30754
  useExternalWalletStore.getState().clearExternalWallet();
30726
30755
  return;
@@ -33304,7 +33333,7 @@ import {
33304
33333
  createContext,
33305
33334
  useCallback as useCallback35,
33306
33335
  useContext,
33307
- useEffect as useEffect56,
33336
+ useEffect as useEffect57,
33308
33337
  useMemo as useMemo21,
33309
33338
  useRef as useRef22
33310
33339
  } from "react";
@@ -33328,7 +33357,7 @@ function clearLegacyWagmiStorage() {
33328
33357
  function Provider(props) {
33329
33358
  const { children, projectId, initialConfig = {}, callbacks } = props;
33330
33359
  const callbacksRef = useRef22(callbacks);
33331
- useEffect56(() => notifyNoProjetctId(projectId), [projectId]);
33360
+ useEffect57(() => notifyNoProjetctId(projectId), [projectId]);
33332
33361
  const config = useRef22(merge3({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
33333
33362
  const wagmiConfig3 = useRef22(getWagmiConfig(config.current?.wallet?.walletConnectId || null));
33334
33363
  const updateConfig = useCallback35((updates) => {
@@ -33370,7 +33399,7 @@ function Provider(props) {
33370
33399
  const next = updates ? { ...prev, ...updates } : void 0;
33371
33400
  callbacksRef.current = next;
33372
33401
  }, []);
33373
- useEffect56(() => {
33402
+ useEffect57(() => {
33374
33403
  if (typeof window === "undefined" || !projectId) return;
33375
33404
  const mergedConfig = merge3(DEFAULT_PROVIDER_CONFIG, initialConfig);
33376
33405
  updateConfig(mergedConfig);
@@ -33390,7 +33419,7 @@ function Provider(props) {
33390
33419
  useSession.getState().setActiveChainId(mergedConfig.network.chainId);
33391
33420
  }
33392
33421
  }, [projectId, initialConfig]);
33393
- useEffect56(() => {
33422
+ useEffect57(() => {
33394
33423
  if (typeof window === "undefined" || !projectId) return;
33395
33424
  try {
33396
33425
  initSdkErrorTracking();
@@ -33470,7 +33499,7 @@ init_useUserProfile();
33470
33499
  init_pro_mode();
33471
33500
  init_utils();
33472
33501
  import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader32, Shield as Shield2 } from "lucide-react";
33473
- import { useEffect as useEffect57, useMemo as useMemo22 } from "react";
33502
+ import { useEffect as useEffect58, useMemo as useMemo22 } from "react";
33474
33503
  import { Fragment as Fragment48, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
33475
33504
  function getFormattedStatus(label, status, showStatus) {
33476
33505
  const isStatus = showStatus && status && status !== "idle" && status !== "ready";
@@ -33490,7 +33519,7 @@ function ConnectWalletButton(props) {
33490
33519
  const colorMode = useLayoutStore((st) => st.colorMode);
33491
33520
  const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
33492
33521
  const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
33493
- useEffect57(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
33522
+ useEffect58(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
33494
33523
  const { data: profile, isLoading: isProfileLoading } = useUserProfile();
33495
33524
  const displayName = profile?.nicknameDisplay || profile?.displayName || jwtTokenManager2.getDisplayName();
33496
33525
  const indicators = useMemo22(() => {
@@ -34136,13 +34165,13 @@ var Hash = ({
34136
34165
 
34137
34166
  // src/internal/components/TransactionsMenu/TransactionsList.tsx
34138
34167
  init_base3();
34139
- import { useEffect as useEffect59, useState as useState37 } from "react";
34168
+ import { useEffect as useEffect60, useState as useState37 } from "react";
34140
34169
  import { jsx as jsx144, jsxs as jsxs127 } from "react/jsx-runtime";
34141
34170
  var TransactionsList = ({ address, itemsCount = 10 }) => {
34142
34171
  const [transactions, setTransactions] = useState37([]);
34143
34172
  const [loading, setLoading] = useState37(true);
34144
34173
  const [error, setError] = useState37(null);
34145
- useEffect59(() => {
34174
+ useEffect60(() => {
34146
34175
  const fetchTransactions2 = async () => {
34147
34176
  try {
34148
34177
  setLoading(true);