@embarkai/ui-kit 0.4.70 → 0.4.72
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +62 -57
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +166 -161
- package/package.json +1 -1
package/dist/iframe/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
|
|
16
16
|
<meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
|
|
17
17
|
|
|
18
|
-
<title>EmbarkAI Secure Wallet - iframe version 0.4.
|
|
18
|
+
<title>EmbarkAI Secure Wallet - iframe version 0.4.72</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
package/dist/iframe/main.js
CHANGED
|
@@ -6414,7 +6414,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
6414
6414
|
};
|
|
6415
6415
|
|
|
6416
6416
|
// src/iframe/main.ts
|
|
6417
|
-
var IFRAME_VERSION = "0.4.
|
|
6417
|
+
var IFRAME_VERSION = "0.4.72";
|
|
6418
6418
|
var IframeWallet = class {
|
|
6419
6419
|
constructor() {
|
|
6420
6420
|
__publicField(this, "messenger");
|
package/dist/index.cjs
CHANGED
|
@@ -875,31 +875,31 @@ var init_useLayoutDataStore = __esm({
|
|
|
875
875
|
"src/internal/hooks/useLayoutDataStore.ts"() {
|
|
876
876
|
import_zustand = require("zustand");
|
|
877
877
|
init_constants();
|
|
878
|
-
PageKey = /* @__PURE__ */ ((
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
return
|
|
878
|
+
PageKey = /* @__PURE__ */ ((PageKey3) => {
|
|
879
|
+
PageKey3["AUTH"] = "auth";
|
|
880
|
+
PageKey3["LANGUAGES"] = "languages";
|
|
881
|
+
PageKey3["TERMS_OF_SERVICE"] = "terms-of-service";
|
|
882
|
+
PageKey3["MAIN_MENU"] = "main-menu";
|
|
883
|
+
PageKey3["SETTINGS"] = "settings";
|
|
884
|
+
PageKey3["SEND"] = "send";
|
|
885
|
+
PageKey3["RECEIVE"] = "receive";
|
|
886
|
+
PageKey3["BUY"] = "buy";
|
|
887
|
+
PageKey3["KYC"] = "kyc";
|
|
888
|
+
PageKey3["TRANSACTIONS"] = "transactions";
|
|
889
|
+
PageKey3["ASSETS"] = "assets";
|
|
890
|
+
PageKey3["MANAGE_WALLET"] = "manage-wallet";
|
|
891
|
+
PageKey3["UNLINK_PROVIDER"] = "unlink-provider";
|
|
892
|
+
PageKey3["SECURITY"] = "security";
|
|
893
|
+
PageKey3["KEYSARE_BACKUP"] = "keysare-backup";
|
|
894
|
+
PageKey3["KEYSHARE_RESTORE"] = "keyshare-restore";
|
|
895
|
+
PageKey3["CHAIN"] = "chain";
|
|
896
|
+
PageKey3["CHAIN_SWITCH_REQUEST"] = "chain-switch-request";
|
|
897
|
+
PageKey3["NICKNAME_SETTINGS"] = "nickname-settings";
|
|
898
|
+
PageKey3["DEVICES"] = "devices";
|
|
899
|
+
PageKey3["DEVICE_LINK"] = "device-link";
|
|
900
|
+
PageKey3["DEVICE_MANAGE"] = "device-manage";
|
|
901
|
+
PageKey3["DEVICE_RESTORE"] = "device-restore";
|
|
902
|
+
return PageKey3;
|
|
903
903
|
})(PageKey || {});
|
|
904
904
|
useLayoutDataStore = (0, import_zustand.create)((set) => ({
|
|
905
905
|
page: null,
|
|
@@ -8488,7 +8488,9 @@ var init_onboarder = __esm({
|
|
|
8488
8488
|
useOnboardingStore = (0, import_zustand4.create)((set) => ({
|
|
8489
8489
|
elRect: { x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 },
|
|
8490
8490
|
tooltip: { title: "", description: "" },
|
|
8491
|
-
setStore: (tooltipStore) => set(tooltipStore)
|
|
8491
|
+
setStore: (tooltipStore) => set(tooltipStore),
|
|
8492
|
+
mountIntoNode: document.body,
|
|
8493
|
+
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode })
|
|
8492
8494
|
}));
|
|
8493
8495
|
Onboarder = class {
|
|
8494
8496
|
tour = null;
|
|
@@ -8560,22 +8562,27 @@ function OnboardingOverlay() {
|
|
|
8560
8562
|
const page = useLayoutDataStore((st) => st.page);
|
|
8561
8563
|
const isOnboarding = useLayoutDataStore((st) => st.isOnboarding);
|
|
8562
8564
|
const isMobileView = useLayoutStore((st) => st.isMobileView);
|
|
8563
|
-
const
|
|
8564
|
-
const
|
|
8565
|
-
|
|
8565
|
+
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
8566
|
+
const {
|
|
8567
|
+
elRect,
|
|
8568
|
+
tooltip,
|
|
8569
|
+
/** if embark is opened, onboard overlay has to be portaled into embark's dialog node to keep layers & pointer-events normal structure */
|
|
8570
|
+
mountIntoNode,
|
|
8571
|
+
setMountIntoNode
|
|
8572
|
+
} = useOnboardingStore();
|
|
8566
8573
|
(0, import_react20.useEffect)(() => {
|
|
8567
|
-
if (lastPageRef.current === page) return;
|
|
8568
8574
|
setTimeout(() => {
|
|
8569
|
-
if (lastPageRef.current === page) return;
|
|
8570
8575
|
if (!page) {
|
|
8571
|
-
|
|
8572
|
-
return
|
|
8576
|
+
setMountIntoNode(document.body);
|
|
8577
|
+
return;
|
|
8573
8578
|
}
|
|
8574
|
-
const
|
|
8575
|
-
|
|
8576
|
-
|
|
8579
|
+
const lastMountIntoNode = useOnboardingStore.getState().mountIntoNode;
|
|
8580
|
+
if (lastMountIntoNode?.dataset?.purpose === "embarkai-ui-container") {
|
|
8581
|
+
return;
|
|
8582
|
+
}
|
|
8583
|
+
const embarkUIContainer = document.querySelector('[data-purpose="embarkai-ui-container"]');
|
|
8584
|
+
setMountIntoNode(embarkUIContainer);
|
|
8577
8585
|
}, 0);
|
|
8578
|
-
return () => setMountIntoNode(null);
|
|
8579
8586
|
}, [page]);
|
|
8580
8587
|
if (!mountIntoNode) return null;
|
|
8581
8588
|
const frame = {
|
|
@@ -8594,17 +8601,15 @@ function OnboardingOverlay() {
|
|
|
8594
8601
|
"div",
|
|
8595
8602
|
{
|
|
8596
8603
|
"data-description": "onboarding-overlay",
|
|
8597
|
-
"data-aria-hidden": isOnboarding ? false : true,
|
|
8598
8604
|
"aria-hidden": isOnboarding ? false : true,
|
|
8605
|
+
"data-aria-hidden": isOnboarding ? false : true,
|
|
8606
|
+
"data-current-theme-mode": colorMode,
|
|
8599
8607
|
style: { zIndex: isOnboarding ? 1e4 : -9999 },
|
|
8600
|
-
onClick: (e) => e.stopPropagation(),
|
|
8601
8608
|
className: cn(
|
|
8602
|
-
|
|
8603
|
-
"overflow-hidden",
|
|
8604
|
-
"pointer-events-auto",
|
|
8609
|
+
"embarkai-ui-scope",
|
|
8610
|
+
"overflow-hidden pointer-events-auto",
|
|
8605
8611
|
"fixed left-0 top-0",
|
|
8606
|
-
isOnboarding ? "w-[100dvw] h-[100dvh]" : "w-0 h-0"
|
|
8607
|
-
{ "embarkai-ui-scope": !page }
|
|
8612
|
+
isOnboarding ? "w-[100dvw] h-[100dvh]" : "w-0 h-0"
|
|
8608
8613
|
),
|
|
8609
8614
|
children: [
|
|
8610
8615
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -8635,7 +8640,7 @@ function OnboardingOverlay() {
|
|
|
8635
8640
|
}
|
|
8636
8641
|
)
|
|
8637
8642
|
] }) }),
|
|
8638
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "100%", height: "100%", fill: "
|
|
8643
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "100%", height: "100%", fill: "rgba(0,0,0,0.8)", mask: "url(#onboradng-overlay-mask)" })
|
|
8639
8644
|
]
|
|
8640
8645
|
}
|
|
8641
8646
|
),
|
|
@@ -8643,16 +8648,17 @@ function OnboardingOverlay() {
|
|
|
8643
8648
|
"div",
|
|
8644
8649
|
{
|
|
8645
8650
|
className: cn(
|
|
8646
|
-
"absolute flex flex-col gap-1",
|
|
8647
|
-
"text-center text-sm
|
|
8648
|
-
"
|
|
8651
|
+
"absolute flex flex-col gap-1 p-[var(--ui-kit-pd)]",
|
|
8652
|
+
"text-center text-sm",
|
|
8653
|
+
"text-[var(--ui-kit-success)] bg-[var(--ui-kit-bg-success)]",
|
|
8654
|
+
""
|
|
8649
8655
|
),
|
|
8650
8656
|
style: {
|
|
8651
8657
|
transition: "top 0.3s ease",
|
|
8652
8658
|
width: tt.width,
|
|
8653
8659
|
top: tt.y,
|
|
8654
8660
|
left: tt.x,
|
|
8655
|
-
borderRadius: isMobileView ? "var(--ui-kit-bdrs)" : "
|
|
8661
|
+
borderRadius: isMobileView ? "var(--ui-kit-bdrs)" : "0 0 var(--ui-kit-bdrs) var(--ui-kit-bdrs)"
|
|
8656
8662
|
},
|
|
8657
8663
|
children: [
|
|
8658
8664
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: " font-bold", children: tooltip.title }),
|
|
@@ -8666,7 +8672,7 @@ function OnboardingOverlay() {
|
|
|
8666
8672
|
onClick: () => onboarder.next(),
|
|
8667
8673
|
children: [
|
|
8668
8674
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.ChevronRightIcon, { className: "h-4 w-4" }),
|
|
8669
|
-
t("passport:common.continue")
|
|
8675
|
+
String(t("passport:common.continue")).toUpperCase()
|
|
8670
8676
|
]
|
|
8671
8677
|
}
|
|
8672
8678
|
)
|
|
@@ -9750,12 +9756,10 @@ var init_components = __esm({
|
|
|
9750
9756
|
});
|
|
9751
9757
|
|
|
9752
9758
|
// src/internal/components/BuyMenu/onboarding.setup.ts
|
|
9753
|
-
function getBinanceOnboardingTour(preSteps = []) {
|
|
9754
|
-
return [...preSteps, ...BUY_MENU_BINANCE_TOUR];
|
|
9755
|
-
}
|
|
9756
9759
|
var BUY_MENU_BINANCE_TOUR;
|
|
9757
9760
|
var init_onboarding_setup = __esm({
|
|
9758
9761
|
"src/internal/components/BuyMenu/onboarding.setup.ts"() {
|
|
9762
|
+
init_useLayoutDataStore();
|
|
9759
9763
|
init_useBinanceStore();
|
|
9760
9764
|
init_useBuyMenuStore();
|
|
9761
9765
|
BUY_MENU_BINANCE_TOUR = [
|
|
@@ -9797,8 +9801,9 @@ var init_onboarding_setup = __esm({
|
|
|
9797
9801
|
title: "Confirm your purchase",
|
|
9798
9802
|
description: "Review the details of your purchase before confirming.",
|
|
9799
9803
|
onNext: () => {
|
|
9800
|
-
useBinanceStore.getState().setQuoteData(null);
|
|
9801
9804
|
useBuyMenuStore.getState().setIsProviderSummary(false);
|
|
9805
|
+
useLayoutDataStore.getState().setPage("buy" /* BUY */);
|
|
9806
|
+
useBinanceStore.getState().setQuoteData(null);
|
|
9802
9807
|
}
|
|
9803
9808
|
}
|
|
9804
9809
|
];
|
|
@@ -24987,7 +24992,7 @@ var init_package = __esm({
|
|
|
24987
24992
|
"package.json"() {
|
|
24988
24993
|
package_default = {
|
|
24989
24994
|
name: "@embarkai/ui-kit",
|
|
24990
|
-
version: "0.4.
|
|
24995
|
+
version: "0.4.72",
|
|
24991
24996
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24992
24997
|
type: "module",
|
|
24993
24998
|
main: "./dist/index.cjs",
|
|
@@ -28973,6 +28978,7 @@ var index_exports = {};
|
|
|
28973
28978
|
__export(index_exports, {
|
|
28974
28979
|
AccountAbstractionError: () => AccountAbstractionError,
|
|
28975
28980
|
Address: () => Address,
|
|
28981
|
+
BUY_MENU_BINANCE_TOUR: () => BUY_MENU_BINANCE_TOUR,
|
|
28976
28982
|
ConnectWalletButton: () => ConnectWalletButton,
|
|
28977
28983
|
ErrorCodes: () => ErrorCodes,
|
|
28978
28984
|
Hash: () => Hash,
|
|
@@ -29001,7 +29007,6 @@ __export(index_exports, {
|
|
|
29001
29007
|
getAllSmartAccounts: () => getAllSmartAccounts,
|
|
29002
29008
|
getAssetRate: () => getAssetRate,
|
|
29003
29009
|
getAvailableLanguages: () => getAvailableLanguages,
|
|
29004
|
-
getBinanceOnboardingTour: () => getBinanceOnboardingTour,
|
|
29005
29010
|
getExplorerUrl: () => getExplorerUrl,
|
|
29006
29011
|
getIframeManager: () => getIframeManager,
|
|
29007
29012
|
getInProgressOnrampTransactionsList: () => getInProgressOnrampTransactionsList,
|
|
@@ -30656,6 +30661,7 @@ autorun();
|
|
|
30656
30661
|
0 && (module.exports = {
|
|
30657
30662
|
AccountAbstractionError,
|
|
30658
30663
|
Address,
|
|
30664
|
+
BUY_MENU_BINANCE_TOUR,
|
|
30659
30665
|
ConnectWalletButton,
|
|
30660
30666
|
ErrorCodes,
|
|
30661
30667
|
Hash,
|
|
@@ -30684,7 +30690,6 @@ autorun();
|
|
|
30684
30690
|
getAllSmartAccounts,
|
|
30685
30691
|
getAssetRate,
|
|
30686
30692
|
getAvailableLanguages,
|
|
30687
|
-
getBinanceOnboardingTour,
|
|
30688
30693
|
getExplorerUrl,
|
|
30689
30694
|
getIframeManager,
|
|
30690
30695
|
getInProgressOnrampTransactionsList,
|
package/dist/index.d.cts
CHANGED
|
@@ -2268,7 +2268,7 @@ declare class Onboarder {
|
|
|
2268
2268
|
private resizeObserver;
|
|
2269
2269
|
/** TOUR */
|
|
2270
2270
|
startTour(tour: TourStep[]): void;
|
|
2271
|
-
endTour
|
|
2271
|
+
private endTour;
|
|
2272
2272
|
next(): void;
|
|
2273
2273
|
/**
|
|
2274
2274
|
* Registers an element with the onboarder.
|
|
@@ -2374,7 +2374,7 @@ declare function getInProgressOnrampTransactionsList(params: GetTransactionsList
|
|
|
2374
2374
|
inProgressTXs: (BinanceTransaction | FinchpayTransaction)[];
|
|
2375
2375
|
}>;
|
|
2376
2376
|
|
|
2377
|
-
declare
|
|
2377
|
+
declare const BUY_MENU_BINANCE_TOUR: TourStep[];
|
|
2378
2378
|
|
|
2379
2379
|
declare const NETWORKS_ICONS: Record<number, FC<SVGProps<SVGSVGElement>>>;
|
|
2380
2380
|
|
|
@@ -3431,4 +3431,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
|
|
|
3431
3431
|
|
|
3432
3432
|
declare const USER_PROFILE_QUERY_KEY: string;
|
|
3433
3433
|
|
|
3434
|
-
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages,
|
|
3434
|
+
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, BUY_MENU_BINANCE_TOUR, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|
package/dist/index.d.ts
CHANGED
|
@@ -2268,7 +2268,7 @@ declare class Onboarder {
|
|
|
2268
2268
|
private resizeObserver;
|
|
2269
2269
|
/** TOUR */
|
|
2270
2270
|
startTour(tour: TourStep[]): void;
|
|
2271
|
-
endTour
|
|
2271
|
+
private endTour;
|
|
2272
2272
|
next(): void;
|
|
2273
2273
|
/**
|
|
2274
2274
|
* Registers an element with the onboarder.
|
|
@@ -2374,7 +2374,7 @@ declare function getInProgressOnrampTransactionsList(params: GetTransactionsList
|
|
|
2374
2374
|
inProgressTXs: (BinanceTransaction | FinchpayTransaction)[];
|
|
2375
2375
|
}>;
|
|
2376
2376
|
|
|
2377
|
-
declare
|
|
2377
|
+
declare const BUY_MENU_BINANCE_TOUR: TourStep[];
|
|
2378
2378
|
|
|
2379
2379
|
declare const NETWORKS_ICONS: Record<number, FC<SVGProps<SVGSVGElement>>>;
|
|
2380
2380
|
|
|
@@ -3431,4 +3431,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
|
|
|
3431
3431
|
|
|
3432
3432
|
declare const USER_PROFILE_QUERY_KEY: string;
|
|
3433
3433
|
|
|
3434
|
-
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages,
|
|
3434
|
+
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, BUY_MENU_BINANCE_TOUR, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|
package/dist/index.js
CHANGED
|
@@ -864,31 +864,31 @@ var PageKey, useLayoutDataStore;
|
|
|
864
864
|
var init_useLayoutDataStore = __esm({
|
|
865
865
|
"src/internal/hooks/useLayoutDataStore.ts"() {
|
|
866
866
|
init_constants();
|
|
867
|
-
PageKey = /* @__PURE__ */ ((
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
return
|
|
867
|
+
PageKey = /* @__PURE__ */ ((PageKey3) => {
|
|
868
|
+
PageKey3["AUTH"] = "auth";
|
|
869
|
+
PageKey3["LANGUAGES"] = "languages";
|
|
870
|
+
PageKey3["TERMS_OF_SERVICE"] = "terms-of-service";
|
|
871
|
+
PageKey3["MAIN_MENU"] = "main-menu";
|
|
872
|
+
PageKey3["SETTINGS"] = "settings";
|
|
873
|
+
PageKey3["SEND"] = "send";
|
|
874
|
+
PageKey3["RECEIVE"] = "receive";
|
|
875
|
+
PageKey3["BUY"] = "buy";
|
|
876
|
+
PageKey3["KYC"] = "kyc";
|
|
877
|
+
PageKey3["TRANSACTIONS"] = "transactions";
|
|
878
|
+
PageKey3["ASSETS"] = "assets";
|
|
879
|
+
PageKey3["MANAGE_WALLET"] = "manage-wallet";
|
|
880
|
+
PageKey3["UNLINK_PROVIDER"] = "unlink-provider";
|
|
881
|
+
PageKey3["SECURITY"] = "security";
|
|
882
|
+
PageKey3["KEYSARE_BACKUP"] = "keysare-backup";
|
|
883
|
+
PageKey3["KEYSHARE_RESTORE"] = "keyshare-restore";
|
|
884
|
+
PageKey3["CHAIN"] = "chain";
|
|
885
|
+
PageKey3["CHAIN_SWITCH_REQUEST"] = "chain-switch-request";
|
|
886
|
+
PageKey3["NICKNAME_SETTINGS"] = "nickname-settings";
|
|
887
|
+
PageKey3["DEVICES"] = "devices";
|
|
888
|
+
PageKey3["DEVICE_LINK"] = "device-link";
|
|
889
|
+
PageKey3["DEVICE_MANAGE"] = "device-manage";
|
|
890
|
+
PageKey3["DEVICE_RESTORE"] = "device-restore";
|
|
891
|
+
return PageKey3;
|
|
892
892
|
})(PageKey || {});
|
|
893
893
|
useLayoutDataStore = create((set) => ({
|
|
894
894
|
page: null,
|
|
@@ -8459,7 +8459,9 @@ var init_onboarder = __esm({
|
|
|
8459
8459
|
useOnboardingStore = create4((set) => ({
|
|
8460
8460
|
elRect: { x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 },
|
|
8461
8461
|
tooltip: { title: "", description: "" },
|
|
8462
|
-
setStore: (tooltipStore) => set(tooltipStore)
|
|
8462
|
+
setStore: (tooltipStore) => set(tooltipStore),
|
|
8463
|
+
mountIntoNode: document.body,
|
|
8464
|
+
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode })
|
|
8463
8465
|
}));
|
|
8464
8466
|
Onboarder = class {
|
|
8465
8467
|
tour = null;
|
|
@@ -8527,7 +8529,7 @@ var init_onboarder = __esm({
|
|
|
8527
8529
|
|
|
8528
8530
|
// src/internal/components/Onboarding/OnboardingOverlay.tsx
|
|
8529
8531
|
import { ChevronRightIcon } from "lucide-react";
|
|
8530
|
-
import { useEffect as useEffect12
|
|
8532
|
+
import { useEffect as useEffect12 } from "react";
|
|
8531
8533
|
import { createPortal } from "react-dom";
|
|
8532
8534
|
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
8533
8535
|
function OnboardingOverlay() {
|
|
@@ -8535,22 +8537,27 @@ function OnboardingOverlay() {
|
|
|
8535
8537
|
const page = useLayoutDataStore((st) => st.page);
|
|
8536
8538
|
const isOnboarding = useLayoutDataStore((st) => st.isOnboarding);
|
|
8537
8539
|
const isMobileView = useLayoutStore((st) => st.isMobileView);
|
|
8538
|
-
const
|
|
8539
|
-
const
|
|
8540
|
-
|
|
8540
|
+
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
8541
|
+
const {
|
|
8542
|
+
elRect,
|
|
8543
|
+
tooltip,
|
|
8544
|
+
/** if embark is opened, onboard overlay has to be portaled into embark's dialog node to keep layers & pointer-events normal structure */
|
|
8545
|
+
mountIntoNode,
|
|
8546
|
+
setMountIntoNode
|
|
8547
|
+
} = useOnboardingStore();
|
|
8541
8548
|
useEffect12(() => {
|
|
8542
|
-
if (lastPageRef.current === page) return;
|
|
8543
8549
|
setTimeout(() => {
|
|
8544
|
-
if (lastPageRef.current === page) return;
|
|
8545
8550
|
if (!page) {
|
|
8546
|
-
|
|
8547
|
-
return
|
|
8551
|
+
setMountIntoNode(document.body);
|
|
8552
|
+
return;
|
|
8548
8553
|
}
|
|
8549
|
-
const
|
|
8550
|
-
|
|
8551
|
-
|
|
8554
|
+
const lastMountIntoNode = useOnboardingStore.getState().mountIntoNode;
|
|
8555
|
+
if (lastMountIntoNode?.dataset?.purpose === "embarkai-ui-container") {
|
|
8556
|
+
return;
|
|
8557
|
+
}
|
|
8558
|
+
const embarkUIContainer = document.querySelector('[data-purpose="embarkai-ui-container"]');
|
|
8559
|
+
setMountIntoNode(embarkUIContainer);
|
|
8552
8560
|
}, 0);
|
|
8553
|
-
return () => setMountIntoNode(null);
|
|
8554
8561
|
}, [page]);
|
|
8555
8562
|
if (!mountIntoNode) return null;
|
|
8556
8563
|
const frame = {
|
|
@@ -8569,17 +8576,15 @@ function OnboardingOverlay() {
|
|
|
8569
8576
|
"div",
|
|
8570
8577
|
{
|
|
8571
8578
|
"data-description": "onboarding-overlay",
|
|
8572
|
-
"data-aria-hidden": isOnboarding ? false : true,
|
|
8573
8579
|
"aria-hidden": isOnboarding ? false : true,
|
|
8580
|
+
"data-aria-hidden": isOnboarding ? false : true,
|
|
8581
|
+
"data-current-theme-mode": colorMode,
|
|
8574
8582
|
style: { zIndex: isOnboarding ? 1e4 : -9999 },
|
|
8575
|
-
onClick: (e) => e.stopPropagation(),
|
|
8576
8583
|
className: cn(
|
|
8577
|
-
|
|
8578
|
-
"overflow-hidden",
|
|
8579
|
-
"pointer-events-auto",
|
|
8584
|
+
"embarkai-ui-scope",
|
|
8585
|
+
"overflow-hidden pointer-events-auto",
|
|
8580
8586
|
"fixed left-0 top-0",
|
|
8581
|
-
isOnboarding ? "w-[100dvw] h-[100dvh]" : "w-0 h-0"
|
|
8582
|
-
{ "embarkai-ui-scope": !page }
|
|
8587
|
+
isOnboarding ? "w-[100dvw] h-[100dvh]" : "w-0 h-0"
|
|
8583
8588
|
),
|
|
8584
8589
|
children: [
|
|
8585
8590
|
/* @__PURE__ */ jsxs17(
|
|
@@ -8610,7 +8615,7 @@ function OnboardingOverlay() {
|
|
|
8610
8615
|
}
|
|
8611
8616
|
)
|
|
8612
8617
|
] }) }),
|
|
8613
|
-
/* @__PURE__ */ jsx21("rect", { width: "100%", height: "100%", fill: "
|
|
8618
|
+
/* @__PURE__ */ jsx21("rect", { width: "100%", height: "100%", fill: "rgba(0,0,0,0.8)", mask: "url(#onboradng-overlay-mask)" })
|
|
8614
8619
|
]
|
|
8615
8620
|
}
|
|
8616
8621
|
),
|
|
@@ -8618,16 +8623,17 @@ function OnboardingOverlay() {
|
|
|
8618
8623
|
"div",
|
|
8619
8624
|
{
|
|
8620
8625
|
className: cn(
|
|
8621
|
-
"absolute flex flex-col gap-1",
|
|
8622
|
-
"text-center text-sm
|
|
8623
|
-
"
|
|
8626
|
+
"absolute flex flex-col gap-1 p-[var(--ui-kit-pd)]",
|
|
8627
|
+
"text-center text-sm",
|
|
8628
|
+
"text-[var(--ui-kit-success)] bg-[var(--ui-kit-bg-success)]",
|
|
8629
|
+
""
|
|
8624
8630
|
),
|
|
8625
8631
|
style: {
|
|
8626
8632
|
transition: "top 0.3s ease",
|
|
8627
8633
|
width: tt.width,
|
|
8628
8634
|
top: tt.y,
|
|
8629
8635
|
left: tt.x,
|
|
8630
|
-
borderRadius: isMobileView ? "var(--ui-kit-bdrs)" : "
|
|
8636
|
+
borderRadius: isMobileView ? "var(--ui-kit-bdrs)" : "0 0 var(--ui-kit-bdrs) var(--ui-kit-bdrs)"
|
|
8631
8637
|
},
|
|
8632
8638
|
children: [
|
|
8633
8639
|
/* @__PURE__ */ jsx21("p", { className: " font-bold", children: tooltip.title }),
|
|
@@ -8641,7 +8647,7 @@ function OnboardingOverlay() {
|
|
|
8641
8647
|
onClick: () => onboarder.next(),
|
|
8642
8648
|
children: [
|
|
8643
8649
|
/* @__PURE__ */ jsx21(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
8644
|
-
t("passport:common.continue")
|
|
8650
|
+
String(t("passport:common.continue")).toUpperCase()
|
|
8645
8651
|
]
|
|
8646
8652
|
}
|
|
8647
8653
|
)
|
|
@@ -8678,7 +8684,7 @@ var init_Onboarding = __esm({
|
|
|
8678
8684
|
});
|
|
8679
8685
|
|
|
8680
8686
|
// src/internal/components/ui/switch.tsx
|
|
8681
|
-
import { forwardRef as forwardRef3, useState as
|
|
8687
|
+
import { forwardRef as forwardRef3, useState as useState5 } from "react";
|
|
8682
8688
|
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
8683
8689
|
var Switch;
|
|
8684
8690
|
var init_switch = __esm({
|
|
@@ -8688,7 +8694,7 @@ var init_switch = __esm({
|
|
|
8688
8694
|
Switch = forwardRef3((props, ref) => {
|
|
8689
8695
|
const { className, labels, ...inputProps } = props;
|
|
8690
8696
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
8691
|
-
const [labelW, setLabelW] =
|
|
8697
|
+
const [labelW, setLabelW] = useState5(0);
|
|
8692
8698
|
return /* @__PURE__ */ jsx22(
|
|
8693
8699
|
"div",
|
|
8694
8700
|
{
|
|
@@ -9266,7 +9272,7 @@ var init_useBuyMenuStore = __esm({
|
|
|
9266
9272
|
// src/internal/components/BuyMenu/components/CryptoSelector.tsx
|
|
9267
9273
|
import { debounce as debounce2, toPairs } from "lodash-es";
|
|
9268
9274
|
import { InfoIcon, PointerIcon, SearchIcon } from "lucide-react";
|
|
9269
|
-
import { useCallback as useCallback10, useMemo as useMemo2, useState as
|
|
9275
|
+
import { useCallback as useCallback10, useMemo as useMemo2, useState as useState6 } from "react";
|
|
9270
9276
|
import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9271
9277
|
function CryptoItem(props) {
|
|
9272
9278
|
const { symbol, network } = props;
|
|
@@ -9304,8 +9310,8 @@ function CryptoSelector(props) {
|
|
|
9304
9310
|
const { coins } = props;
|
|
9305
9311
|
const { t } = useT();
|
|
9306
9312
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
9307
|
-
const [searchValue, setSearchValue] =
|
|
9308
|
-
const [target, setTarget] =
|
|
9313
|
+
const [searchValue, setSearchValue] = useState6("");
|
|
9314
|
+
const [target, setTarget] = useState6("");
|
|
9309
9315
|
const setSearchDebounced = useCallback10(
|
|
9310
9316
|
debounce2((value) => {
|
|
9311
9317
|
setTarget(value);
|
|
@@ -9491,7 +9497,7 @@ var init_ResolvedFiatIcon = __esm({
|
|
|
9491
9497
|
// src/internal/components/BuyMenu/components/FiatSelector.tsx
|
|
9492
9498
|
import { debounce as debounce3 } from "lodash-es";
|
|
9493
9499
|
import { PointerIcon as PointerIcon2, SearchIcon as SearchIcon2 } from "lucide-react";
|
|
9494
|
-
import { useCallback as useCallback11, useMemo as useMemo3, useState as
|
|
9500
|
+
import { useCallback as useCallback11, useMemo as useMemo3, useState as useState7 } from "react";
|
|
9495
9501
|
import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9496
9502
|
function getCurrencyName(ticker, locale = "en") {
|
|
9497
9503
|
try {
|
|
@@ -9529,8 +9535,8 @@ function FiatSelector(props) {
|
|
|
9529
9535
|
const { fiats } = props;
|
|
9530
9536
|
const { t, i18n } = useT();
|
|
9531
9537
|
const locale = i18n.resolvedLanguage || "en";
|
|
9532
|
-
const [searchValue, setSearchValue] =
|
|
9533
|
-
const [target, setTarget] =
|
|
9538
|
+
const [searchValue, setSearchValue] = useState7("");
|
|
9539
|
+
const [target, setTarget] = useState7("");
|
|
9534
9540
|
const setSearchDebounced = useCallback11(
|
|
9535
9541
|
debounce3((value) => {
|
|
9536
9542
|
setTarget(value);
|
|
@@ -9716,12 +9722,10 @@ var init_components = __esm({
|
|
|
9716
9722
|
});
|
|
9717
9723
|
|
|
9718
9724
|
// src/internal/components/BuyMenu/onboarding.setup.ts
|
|
9719
|
-
function getBinanceOnboardingTour(preSteps = []) {
|
|
9720
|
-
return [...preSteps, ...BUY_MENU_BINANCE_TOUR];
|
|
9721
|
-
}
|
|
9722
9725
|
var BUY_MENU_BINANCE_TOUR;
|
|
9723
9726
|
var init_onboarding_setup = __esm({
|
|
9724
9727
|
"src/internal/components/BuyMenu/onboarding.setup.ts"() {
|
|
9728
|
+
init_useLayoutDataStore();
|
|
9725
9729
|
init_useBinanceStore();
|
|
9726
9730
|
init_useBuyMenuStore();
|
|
9727
9731
|
BUY_MENU_BINANCE_TOUR = [
|
|
@@ -9763,8 +9767,9 @@ var init_onboarding_setup = __esm({
|
|
|
9763
9767
|
title: "Confirm your purchase",
|
|
9764
9768
|
description: "Review the details of your purchase before confirming.",
|
|
9765
9769
|
onNext: () => {
|
|
9766
|
-
useBinanceStore.getState().setQuoteData(null);
|
|
9767
9770
|
useBuyMenuStore.getState().setIsProviderSummary(false);
|
|
9771
|
+
useLayoutDataStore.getState().setPage("buy" /* BUY */);
|
|
9772
|
+
useBinanceStore.getState().setQuoteData(null);
|
|
9768
9773
|
}
|
|
9769
9774
|
}
|
|
9770
9775
|
];
|
|
@@ -10414,10 +10419,10 @@ var init_BinanceTxHistory = __esm({
|
|
|
10414
10419
|
|
|
10415
10420
|
// src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
|
|
10416
10421
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
10417
|
-
import { useEffect as useEffect15, useRef as
|
|
10422
|
+
import { useEffect as useEffect15, useRef as useRef9 } from "react";
|
|
10418
10423
|
function useBinanceSseTxTracing(walletAddress) {
|
|
10419
10424
|
const qc = useQueryClient4();
|
|
10420
|
-
const debounceRef =
|
|
10425
|
+
const debounceRef = useRef9(null);
|
|
10421
10426
|
useEffect15(() => {
|
|
10422
10427
|
if (!walletAddress) return;
|
|
10423
10428
|
const iframeManager = getIframeManager();
|
|
@@ -10892,7 +10897,7 @@ var init_FinchPaySummary = __esm({
|
|
|
10892
10897
|
import { useInfiniteQuery as useInfiniteQuery2 } from "@tanstack/react-query";
|
|
10893
10898
|
import dayjs2 from "dayjs";
|
|
10894
10899
|
import { LoaderIcon as LoaderIcon4 } from "lucide-react";
|
|
10895
|
-
import { useCallback as useCallback13, useState as
|
|
10900
|
+
import { useCallback as useCallback13, useState as useState8 } from "react";
|
|
10896
10901
|
import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10897
10902
|
function getStatusVariant2(status) {
|
|
10898
10903
|
switch (status) {
|
|
@@ -10972,7 +10977,7 @@ function FinchPayTxHistoryItem(props) {
|
|
|
10972
10977
|
function FinchPayTxHistory() {
|
|
10973
10978
|
const { t } = useT();
|
|
10974
10979
|
const walletAddress = useSession((st) => st.address);
|
|
10975
|
-
const [cursor, setCursor] =
|
|
10980
|
+
const [cursor, setCursor] = useState8(1);
|
|
10976
10981
|
const {
|
|
10977
10982
|
data: txData,
|
|
10978
10983
|
isLoading: isTxDataLoading,
|
|
@@ -11079,10 +11084,10 @@ var init_networks = __esm({
|
|
|
11079
11084
|
|
|
11080
11085
|
// src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
|
|
11081
11086
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
11082
|
-
import { useEffect as useEffect17, useRef as
|
|
11087
|
+
import { useEffect as useEffect17, useRef as useRef10 } from "react";
|
|
11083
11088
|
function useFinchpaySseTxTracing(walletAddress) {
|
|
11084
11089
|
const qc = useQueryClient6();
|
|
11085
|
-
const debounceRef =
|
|
11090
|
+
const debounceRef = useRef10(null);
|
|
11086
11091
|
useEffect17(() => {
|
|
11087
11092
|
if (!walletAddress) return;
|
|
11088
11093
|
const iframeManager = getIframeManager();
|
|
@@ -11510,7 +11515,7 @@ var init_ProviderSelector = __esm({
|
|
|
11510
11515
|
});
|
|
11511
11516
|
|
|
11512
11517
|
// src/internal/components/BuyMenu/useHandleInputAmount.ts
|
|
11513
|
-
import { useEffect as useEffect19, useRef as
|
|
11518
|
+
import { useEffect as useEffect19, useRef as useRef11 } from "react";
|
|
11514
11519
|
var ON_INPUT_QUERY_DELAY, useHandleInputAmount;
|
|
11515
11520
|
var init_useHandleInputAmount = __esm({
|
|
11516
11521
|
"src/internal/components/BuyMenu/useHandleInputAmount.ts"() {
|
|
@@ -11518,11 +11523,11 @@ var init_useHandleInputAmount = __esm({
|
|
|
11518
11523
|
init_useBuyMenuStore();
|
|
11519
11524
|
ON_INPUT_QUERY_DELAY = 1500;
|
|
11520
11525
|
useHandleInputAmount = () => {
|
|
11521
|
-
const lastRampProviderRef =
|
|
11526
|
+
const lastRampProviderRef = useRef11(DEFAULT_PROVIDER2);
|
|
11522
11527
|
const rampProvider = useBuyMenuStore((st) => st.rampProvider);
|
|
11523
11528
|
const srcInputAmount = useBuyMenuStore((st) => st.srcInputAmount);
|
|
11524
11529
|
const minAmount = useBuyMenuStore((st) => st.minAmount);
|
|
11525
|
-
const queryAmountTimer =
|
|
11530
|
+
const queryAmountTimer = useRef11(null);
|
|
11526
11531
|
useEffect19(() => {
|
|
11527
11532
|
if (queryAmountTimer.current) clearTimeout(queryAmountTimer.current);
|
|
11528
11533
|
queryAmountTimer.current = setTimeout(() => {
|
|
@@ -12059,13 +12064,13 @@ import { PAYMASTER_CACHE_TTL_MS } from "@embarkai/core";
|
|
|
12059
12064
|
import { getChainConfig as getChainConfig8, SUPPORTED_MAINNETS as SUPPORTED_MAINNETS2 } from "@embarkai/core/read";
|
|
12060
12065
|
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
12061
12066
|
import { ArrowLeft as ArrowLeft4 } from "lucide-react";
|
|
12062
|
-
import { useMemo as useMemo5, useState as
|
|
12067
|
+
import { useMemo as useMemo5, useState as useState9 } from "react";
|
|
12063
12068
|
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
12064
12069
|
function ChainsMenu() {
|
|
12065
12070
|
const config = useProviderConfig().config;
|
|
12066
12071
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
12067
|
-
const [isTestnets, setIsTestnets] =
|
|
12068
|
-
const [nextChainId, setNextChainId] =
|
|
12072
|
+
const [isTestnets, setIsTestnets] = useState9(false);
|
|
12073
|
+
const [nextChainId, setNextChainId] = useState9(null);
|
|
12069
12074
|
const { t } = useT();
|
|
12070
12075
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
12071
12076
|
const visibleNetworks = useMemo5(() => {
|
|
@@ -12314,7 +12319,7 @@ var init_devices = __esm({
|
|
|
12314
12319
|
});
|
|
12315
12320
|
|
|
12316
12321
|
// src/internal/components/DevicesMenu/DeviceLinkScreen.tsx
|
|
12317
|
-
import { useState as
|
|
12322
|
+
import { useState as useState10 } from "react";
|
|
12318
12323
|
import { ArrowLeft as ArrowLeft6, Loader2 as Loader22 } from "lucide-react";
|
|
12319
12324
|
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
12320
12325
|
function getErrorMessage(err) {
|
|
@@ -12336,8 +12341,8 @@ function DeviceLinkScreen() {
|
|
|
12336
12341
|
const setPage = useLayoutDataStore((s) => s.setPage);
|
|
12337
12342
|
const maxScrollHeight = useLayoutStore((s) => s.maxScrollHeight);
|
|
12338
12343
|
const { mutate: link, isPending } = useLinkDevice();
|
|
12339
|
-
const [code, setCode] =
|
|
12340
|
-
const [error, setError] =
|
|
12344
|
+
const [code, setCode] = useState10("");
|
|
12345
|
+
const [error, setError] = useState10(null);
|
|
12341
12346
|
const isValid = code.length === 6 && VALID_CHARS.test(code);
|
|
12342
12347
|
function handleCodeChange(value) {
|
|
12343
12348
|
const upper = value.toUpperCase().slice(0, 6);
|
|
@@ -12926,7 +12931,7 @@ var init_guardian_backup = __esm({
|
|
|
12926
12931
|
});
|
|
12927
12932
|
|
|
12928
12933
|
// src/internal/components/DevicesMenu/DeviceManageScreen.tsx
|
|
12929
|
-
import { useCallback as useCallback14, useEffect as useEffect20, useRef as
|
|
12934
|
+
import { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef12, useState as useState11 } from "react";
|
|
12930
12935
|
import { ArrowLeft as ArrowLeft7, Cpu, Download, HardDrive, Loader2 as Loader23, Trash2, Upload } from "lucide-react";
|
|
12931
12936
|
import { Fragment as Fragment15, jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
12932
12937
|
function formatSize(bytes) {
|
|
@@ -12941,13 +12946,13 @@ function DeviceManageScreen() {
|
|
|
12941
12946
|
const userId = session?.mpcUserId || "";
|
|
12942
12947
|
const deviceId = pageParams?.deviceId;
|
|
12943
12948
|
const deviceName = pageParams?.deviceName;
|
|
12944
|
-
const guardianRef =
|
|
12945
|
-
const [screen, setScreen] =
|
|
12946
|
-
const [actionState, setActionState] =
|
|
12947
|
-
const [password, setPassword] =
|
|
12948
|
-
const [statusMessage, setStatusMessage] =
|
|
12949
|
-
const [errorMessage, setErrorMessage] =
|
|
12950
|
-
const [waitingConfirm, setWaitingConfirm] =
|
|
12949
|
+
const guardianRef = useRef12(null);
|
|
12950
|
+
const [screen, setScreen] = useState11({ step: "connecting" });
|
|
12951
|
+
const [actionState, setActionState] = useState11(null);
|
|
12952
|
+
const [password, setPassword] = useState11("");
|
|
12953
|
+
const [statusMessage, setStatusMessage] = useState11(null);
|
|
12954
|
+
const [errorMessage, setErrorMessage] = useState11(null);
|
|
12955
|
+
const [waitingConfirm, setWaitingConfirm] = useState11(false);
|
|
12951
12956
|
useEffect20(() => {
|
|
12952
12957
|
if (!statusMessage) return;
|
|
12953
12958
|
const t = setTimeout(() => setStatusMessage(null), 3e3);
|
|
@@ -13218,7 +13223,7 @@ var init_DeviceManageScreen = __esm({
|
|
|
13218
13223
|
});
|
|
13219
13224
|
|
|
13220
13225
|
// src/internal/components/DevicesMenu/DeviceRestoreScreen.tsx
|
|
13221
|
-
import { useCallback as useCallback15, useState as
|
|
13226
|
+
import { useCallback as useCallback15, useState as useState12 } from "react";
|
|
13222
13227
|
import { AlertTriangle as AlertTriangle3, ArrowLeft as ArrowLeft8, Download as Download2, Loader2 as Loader24 } from "lucide-react";
|
|
13223
13228
|
import { Fragment as Fragment16, jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
13224
13229
|
function DeviceRestoreScreen() {
|
|
@@ -13230,10 +13235,10 @@ function DeviceRestoreScreen() {
|
|
|
13230
13235
|
const keyshareId = pageParams?.keyshareId;
|
|
13231
13236
|
const deviceId = pageParams?.deviceId;
|
|
13232
13237
|
const deviceName = pageParams?.deviceName;
|
|
13233
|
-
const [password, setPassword] =
|
|
13234
|
-
const [isWorking, setIsWorking] =
|
|
13235
|
-
const [statusMessage, setStatusMessage] =
|
|
13236
|
-
const [errorMessage, setErrorMessage] =
|
|
13238
|
+
const [password, setPassword] = useState12("");
|
|
13239
|
+
const [isWorking, setIsWorking] = useState12(false);
|
|
13240
|
+
const [statusMessage, setStatusMessage] = useState12(null);
|
|
13241
|
+
const [errorMessage, setErrorMessage] = useState12(null);
|
|
13237
13242
|
const handleRestore = useCallback15(async () => {
|
|
13238
13243
|
if (!password || !keyshareId || !userId) return;
|
|
13239
13244
|
const iframe4 = getIframeManager();
|
|
@@ -13334,7 +13339,7 @@ var init_DeviceRestoreScreen = __esm({
|
|
|
13334
13339
|
});
|
|
13335
13340
|
|
|
13336
13341
|
// src/internal/components/DevicesMenu/DevicesMenu.tsx
|
|
13337
|
-
import { useState as
|
|
13342
|
+
import { useState as useState13 } from "react";
|
|
13338
13343
|
import { ArrowLeft as ArrowLeft9, Cpu as Cpu2, Monitor, CheckCircle, Trash2 as Trash22, Loader2 as Loader25, RefreshCw, HardDrive as HardDrive2 } from "lucide-react";
|
|
13339
13344
|
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
13340
13345
|
function DeviceIcon({ deviceType }) {
|
|
@@ -13346,8 +13351,8 @@ function truncateAddress(address) {
|
|
|
13346
13351
|
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
13347
13352
|
}
|
|
13348
13353
|
function DeviceRow({ device }) {
|
|
13349
|
-
const [confirmingUnlink, setConfirmingUnlink] =
|
|
13350
|
-
const [unlinkError, setUnlinkError] =
|
|
13354
|
+
const [confirmingUnlink, setConfirmingUnlink] = useState13(false);
|
|
13355
|
+
const [unlinkError, setUnlinkError] = useState13(null);
|
|
13351
13356
|
const { mutate: unlink, isPending } = useUnlinkDevice();
|
|
13352
13357
|
if (confirmingUnlink) {
|
|
13353
13358
|
return /* @__PURE__ */ jsxs53("div", { className: "flex flex-col gap-2 p-3 rounded-lg bg-[var(--ui-kit-bg)]", children: [
|
|
@@ -14521,7 +14526,7 @@ var init_MethodSelector = __esm({
|
|
|
14521
14526
|
|
|
14522
14527
|
// src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx
|
|
14523
14528
|
import { ChevronRight as ChevronRight2, Eye, EyeOff, Info as Info3, Key as Key4, Loader as Loader8, Plus } from "lucide-react";
|
|
14524
|
-
import { useEffect as useEffect23, useRef as
|
|
14529
|
+
import { useEffect as useEffect23, useRef as useRef13 } from "react";
|
|
14525
14530
|
import { Fragment as Fragment18, jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
14526
14531
|
function PasswordPasskey(props) {
|
|
14527
14532
|
const { t } = useT();
|
|
@@ -14536,7 +14541,7 @@ function PasswordPasskey(props) {
|
|
|
14536
14541
|
onCreatePasskey
|
|
14537
14542
|
} = props;
|
|
14538
14543
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
14539
|
-
const actionRef =
|
|
14544
|
+
const actionRef = useRef13(null);
|
|
14540
14545
|
const {
|
|
14541
14546
|
showPassword,
|
|
14542
14547
|
restorePassword,
|
|
@@ -15168,7 +15173,7 @@ var init_Cloud = __esm({
|
|
|
15168
15173
|
});
|
|
15169
15174
|
|
|
15170
15175
|
// src/internal/components/KeyshareRestoreMenu/methods/Guardian.tsx
|
|
15171
|
-
import { useState as
|
|
15176
|
+
import { useState as useState15 } from "react";
|
|
15172
15177
|
import { Cpu as Cpu4, Loader2 as Loader26 } from "lucide-react";
|
|
15173
15178
|
import { Fragment as Fragment23, jsx as jsx67, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
15174
15179
|
function Guardian(props) {
|
|
@@ -15177,8 +15182,8 @@ function Guardian(props) {
|
|
|
15177
15182
|
const session = useSession((st) => st.session);
|
|
15178
15183
|
const recoveryUserId = useSession((st) => st.recoveryUserId);
|
|
15179
15184
|
const { onRestoreSuccess } = useOnRestoreSuccess();
|
|
15180
|
-
const [isWorking, setIsWorking] =
|
|
15181
|
-
const [step, setStep] =
|
|
15185
|
+
const [isWorking, setIsWorking] = useState15(false);
|
|
15186
|
+
const [step, setStep] = useState15("idle");
|
|
15182
15187
|
const handleGuardianBackup = async () => {
|
|
15183
15188
|
if (!restorePassword) {
|
|
15184
15189
|
setError("Please enter a password");
|
|
@@ -15871,15 +15876,15 @@ var init_SumsubIframeManager = __esm({
|
|
|
15871
15876
|
});
|
|
15872
15877
|
|
|
15873
15878
|
// src/internal/components/KYC/useSumsubIframe.ts
|
|
15874
|
-
import { useEffect as useEffect29, useRef as
|
|
15879
|
+
import { useEffect as useEffect29, useRef as useRef14, useState as useState16 } from "react";
|
|
15875
15880
|
function useSumsubIframe({ iframeUrl }) {
|
|
15876
15881
|
const config = useProviderConfig().config;
|
|
15877
15882
|
const { colorMode } = useColorMode();
|
|
15878
|
-
const iframeRef =
|
|
15879
|
-
const [isLoading, setIsLoading] =
|
|
15880
|
-
const [error, setError] =
|
|
15881
|
-
const [height, setHeight] =
|
|
15882
|
-
const [status, setStatus] =
|
|
15883
|
+
const iframeRef = useRef14(null);
|
|
15884
|
+
const [isLoading, setIsLoading] = useState16(true);
|
|
15885
|
+
const [error, setError] = useState16(null);
|
|
15886
|
+
const [height, setHeight] = useState16(0);
|
|
15887
|
+
const [status, setStatus] = useState16("");
|
|
15883
15888
|
const levelName = config.current?.kyc?.options?.levelName;
|
|
15884
15889
|
useEffect29(() => {
|
|
15885
15890
|
setError(null);
|
|
@@ -16914,7 +16919,7 @@ var init_telegram2 = __esm({
|
|
|
16914
16919
|
|
|
16915
16920
|
// src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
|
|
16916
16921
|
import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
16917
|
-
import { useCallback as useCallback20, useEffect as useEffect32, useState as
|
|
16922
|
+
import { useCallback as useCallback20, useEffect as useEffect32, useState as useState17 } from "react";
|
|
16918
16923
|
function useLinkTelegram() {
|
|
16919
16924
|
const {
|
|
16920
16925
|
config: { current: config },
|
|
@@ -16972,7 +16977,7 @@ function useLinkTelegram() {
|
|
|
16972
16977
|
setLinkIsLoading(false);
|
|
16973
16978
|
}
|
|
16974
16979
|
}, [config.social?.providers]);
|
|
16975
|
-
const [telegramLinkStarted, setTelegramLinkStarted] =
|
|
16980
|
+
const [telegramLinkStarted, setTelegramLinkStarted] = useState17(false);
|
|
16976
16981
|
useEffect32(() => {
|
|
16977
16982
|
console.log("[useLinkTelegram] Effect triggered:", {
|
|
16978
16983
|
providerType,
|
|
@@ -17293,7 +17298,7 @@ var init_ManageWallet = __esm({
|
|
|
17293
17298
|
// src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx
|
|
17294
17299
|
import { useMutation as useMutation15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
17295
17300
|
import { Key as Key6, Loader as Loader14 } from "lucide-react";
|
|
17296
|
-
import { useState as
|
|
17301
|
+
import { useState as useState18 } from "react";
|
|
17297
17302
|
import { useDisconnect as useDisconnect2 } from "wagmi";
|
|
17298
17303
|
import { jsx as jsx80, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
17299
17304
|
function UnlinkProviderMenu() {
|
|
@@ -17305,7 +17310,7 @@ function UnlinkProviderMenu() {
|
|
|
17305
17310
|
const { t } = useT();
|
|
17306
17311
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
17307
17312
|
const { confirmUnlink, setConfirmUnlink, setAlert } = useManageWalletStore();
|
|
17308
|
-
const [confirmInput, setConfirmInput] =
|
|
17313
|
+
const [confirmInput, setConfirmInput] = useState18("");
|
|
17309
17314
|
const { mutate: handleUnlinkProvider, isPending: isProviderUnlinking } = useMutation15({
|
|
17310
17315
|
mutationFn: async () => {
|
|
17311
17316
|
if (!confirmUnlink) {
|
|
@@ -17566,7 +17571,7 @@ var init_useNicknameAvailability = __esm({
|
|
|
17566
17571
|
// src/internal/components/NicknameMenu/NicknameEditForm.tsx
|
|
17567
17572
|
import { useMutation as useMutation17, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
17568
17573
|
import { AtSignIcon, CheckIcon as CheckIcon2, CopyIcon, LoaderIcon as LoaderIcon7, SaveIcon } from "lucide-react";
|
|
17569
|
-
import { useCallback as useCallback22, useState as
|
|
17574
|
+
import { useCallback as useCallback22, useState as useState19 } from "react";
|
|
17570
17575
|
import { Fragment as Fragment29, jsx as jsx81, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
17571
17576
|
function NicknameEditForm(props) {
|
|
17572
17577
|
const { isInitialUser, nicknameInfo } = props;
|
|
@@ -17579,7 +17584,7 @@ function NicknameEditForm(props) {
|
|
|
17579
17584
|
const nicknameValue = useNicknameStore((st) => st.nicknameValue);
|
|
17580
17585
|
const nicknameAvailability = useNicknameStore((st) => st.availability);
|
|
17581
17586
|
const { isCheckingAvailability } = useNicknameAvailability(nicknameInfo ? nicknameInfo.handle : "");
|
|
17582
|
-
const [isNicknameCopied, setIsNicknameCopied] =
|
|
17587
|
+
const [isNicknameCopied, setIsNicknameCopied] = useState19(false);
|
|
17583
17588
|
const {
|
|
17584
17589
|
mutate: changeNickname2,
|
|
17585
17590
|
isError: isNicknameChangeError,
|
|
@@ -18163,7 +18168,7 @@ var init_utils8 = __esm({
|
|
|
18163
18168
|
// src/internal/hooks/useBlockscoutAssets/useBlockscoutAssets.ts
|
|
18164
18169
|
import { createBlockscoutClient as createBlockscoutClient2, nonBlockscoutClient } from "@embarkai/core";
|
|
18165
18170
|
import { useQuery as useQuery16, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
18166
|
-
import { useCallback as useCallback23, useMemo as useMemo10, useRef as
|
|
18171
|
+
import { useCallback as useCallback23, useMemo as useMemo10, useRef as useRef15 } from "react";
|
|
18167
18172
|
function useBlockscoutAssets(options) {
|
|
18168
18173
|
const { address, chainId, enabled = true, detectSecurityTokens = true } = options;
|
|
18169
18174
|
const qc = useQueryClient19();
|
|
@@ -18178,7 +18183,7 @@ function useBlockscoutAssets(options) {
|
|
|
18178
18183
|
() => blockscoutApiUrl ? createBlockscoutClient2({ baseUrl: blockscoutApiUrl }) : null,
|
|
18179
18184
|
[blockscoutApiUrl]
|
|
18180
18185
|
);
|
|
18181
|
-
const lastRefreshRef =
|
|
18186
|
+
const lastRefreshRef = useRef15(0);
|
|
18182
18187
|
const {
|
|
18183
18188
|
data: watchTokenAssets = [],
|
|
18184
18189
|
isLoading: watchTokensLoading,
|
|
@@ -18894,7 +18899,7 @@ var init_nickname_fingerprint = __esm({
|
|
|
18894
18899
|
// src/internal/components/ReceiveMenu/ReceiveMenu.tsx
|
|
18895
18900
|
import { ArrowLeft as ArrowLeft17, CheckCircle2 as CheckCircle23, Copy as Copy2, Info as Info5, Loader as Loader17, Shield } from "lucide-react";
|
|
18896
18901
|
import QRCode from "qrcode";
|
|
18897
|
-
import { useCallback as useCallback25, useEffect as useEffect34, useMemo as useMemo11, useState as
|
|
18902
|
+
import { useCallback as useCallback25, useEffect as useEffect34, useMemo as useMemo11, useState as useState20 } from "react";
|
|
18898
18903
|
import { Fragment as Fragment31, jsx as jsx86, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
18899
18904
|
function ReceiveMenu() {
|
|
18900
18905
|
const session = useSession((st) => st.session);
|
|
@@ -18905,9 +18910,9 @@ function ReceiveMenu() {
|
|
|
18905
18910
|
const { t } = useT();
|
|
18906
18911
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
18907
18912
|
const open = page === "receive";
|
|
18908
|
-
const [qrCodeUrl, setQrCodeUrl] =
|
|
18909
|
-
const [copied, setCopied] =
|
|
18910
|
-
const [fingerprintCopied, setFingerprintCopied] =
|
|
18913
|
+
const [qrCodeUrl, setQrCodeUrl] = useState20("");
|
|
18914
|
+
const [copied, setCopied] = useState20(false);
|
|
18915
|
+
const [fingerprintCopied, setFingerprintCopied] = useState20(false);
|
|
18911
18916
|
const fingerprint = useMemo11(() => {
|
|
18912
18917
|
if (!session?.ownerAddress) return null;
|
|
18913
18918
|
try {
|
|
@@ -19852,7 +19857,7 @@ var init_useBridgeStore = __esm({
|
|
|
19852
19857
|
// src/internal/components/SendMenu/hyperbridge/components/SenderSelector.tsx
|
|
19853
19858
|
import { useConnectModal } from "@rainbow-me/rainbowkit";
|
|
19854
19859
|
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
19855
|
-
import { useEffect as useEffect37, useRef as
|
|
19860
|
+
import { useEffect as useEffect37, useRef as useRef16, useState as useState21 } from "react";
|
|
19856
19861
|
import { useSignMessage } from "wagmi";
|
|
19857
19862
|
import { jsx as jsx93, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
19858
19863
|
function SenderSelector(props) {
|
|
@@ -19863,11 +19868,11 @@ function SenderSelector(props) {
|
|
|
19863
19868
|
const { openConnectModal } = useConnectModal();
|
|
19864
19869
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
19865
19870
|
const directWalletIsConnected = useExternalWalletStore((st) => st.isExternalConnected);
|
|
19866
|
-
const pendingWalletRef =
|
|
19871
|
+
const pendingWalletRef = useRef16(null);
|
|
19867
19872
|
const originChain = useBridgeStore((st) => st.originChain);
|
|
19868
19873
|
const bridgeSender = useBridgeStore((st) => st.bridgeSender);
|
|
19869
19874
|
const bridgeSenders = useBridgeStore((st) => st.bridgeSenders);
|
|
19870
|
-
const [walletMessage, setWalletMessage] =
|
|
19875
|
+
const [walletMessage, setWalletMessage] = useState21(null);
|
|
19871
19876
|
useEffect37(() => {
|
|
19872
19877
|
useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
|
|
19873
19878
|
}, [walletMessage]);
|
|
@@ -20097,11 +20102,11 @@ var init_wallets = __esm({
|
|
|
20097
20102
|
});
|
|
20098
20103
|
|
|
20099
20104
|
// src/internal/components/SendMenu/hyperbridge/hooks/useAvailableSenders.ts
|
|
20100
|
-
import { useEffect as useEffect38, useRef as
|
|
20105
|
+
import { useEffect as useEffect38, useRef as useRef17 } from "react";
|
|
20101
20106
|
function useAvailableSenders() {
|
|
20102
20107
|
const address = useSession((st) => st.address);
|
|
20103
20108
|
const { profiles } = useLinkedProfiles();
|
|
20104
|
-
const lastCalcedSenders =
|
|
20109
|
+
const lastCalcedSenders = useRef17([]);
|
|
20105
20110
|
useEffect38(() => {
|
|
20106
20111
|
const sendersAccumulator = [
|
|
20107
20112
|
{
|
|
@@ -21297,11 +21302,11 @@ var init_checkbox = __esm({
|
|
|
21297
21302
|
|
|
21298
21303
|
// src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx
|
|
21299
21304
|
import { LoaderIcon as LoaderIcon12 } from "lucide-react";
|
|
21300
|
-
import { useState as
|
|
21305
|
+
import { useState as useState22 } from "react";
|
|
21301
21306
|
import { jsx as jsx99, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
21302
21307
|
function ConfirmStep(props) {
|
|
21303
21308
|
const { isAssetBridging, bridgeAsset, hyperlaneWarpRoutes } = props;
|
|
21304
|
-
const [userConsent, setUserConsent] =
|
|
21309
|
+
const [userConsent, setUserConsent] = useState22(false);
|
|
21305
21310
|
const { t } = useT();
|
|
21306
21311
|
const address = useSession((st) => st.address);
|
|
21307
21312
|
const bridgeSender = useBridgeStore((st) => st.bridgeSenders.find((s) => s.type === st.bridgeSender));
|
|
@@ -21786,12 +21791,12 @@ var init_HistoryStep = __esm({
|
|
|
21786
21791
|
|
|
21787
21792
|
// src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx
|
|
21788
21793
|
import { ArrowLeftRightIcon as ArrowLeftRightIcon2 } from "lucide-react";
|
|
21789
|
-
import { useMemo as useMemo13, useState as
|
|
21794
|
+
import { useMemo as useMemo13, useState as useState23 } from "react";
|
|
21790
21795
|
import { Fragment as Fragment38, jsx as jsx102, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
21791
21796
|
function SelectAssetRoute(props) {
|
|
21792
21797
|
const { hyperlaneWarpRoutes } = props;
|
|
21793
21798
|
const { t } = useT();
|
|
21794
|
-
const [isTokenSymbolSelector, setIsTokenSymbolSelector] =
|
|
21799
|
+
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = useState23(false);
|
|
21795
21800
|
const selectedAssetSymbol = useBridgeStore((st) => st.bridgeAssetSymbol);
|
|
21796
21801
|
const tokenList = useMemo13(() => {
|
|
21797
21802
|
const tokens = hyperlaneWarpRoutes.map((route) => route.symbol);
|
|
@@ -21968,14 +21973,14 @@ var init_HyperlaneBridge = __esm({
|
|
|
21968
21973
|
});
|
|
21969
21974
|
|
|
21970
21975
|
// src/internal/components/SendMenu/hyperbridge/components/HistorySwitch.tsx
|
|
21971
|
-
import { useRef as
|
|
21976
|
+
import { useRef as useRef18 } from "react";
|
|
21972
21977
|
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
21973
21978
|
function BridgeHistorySwitch(props) {
|
|
21974
21979
|
const { disabled } = props;
|
|
21975
21980
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
21976
21981
|
const isUiLocked = useFlowSelectorStore((st) => st.isUiLocked);
|
|
21977
21982
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
21978
|
-
const lastBridgeStepRef =
|
|
21983
|
+
const lastBridgeStepRef = useRef18(null);
|
|
21979
21984
|
if (selectorFlow !== "bridge" || bridgeStep === "confirm" || bridgeStep === "success" || bridgeStep === "sender-selector" || bridgeStep === "select-token" || bridgeStep === "tx-history-details") {
|
|
21980
21985
|
return null;
|
|
21981
21986
|
}
|
|
@@ -22077,7 +22082,7 @@ var init_useErc3643Compliance = __esm({
|
|
|
22077
22082
|
|
|
22078
22083
|
// src/hooks/useNicknameResolve.ts
|
|
22079
22084
|
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
22080
|
-
import { useEffect as useEffect44, useMemo as useMemo14, useState as
|
|
22085
|
+
import { useEffect as useEffect44, useMemo as useMemo14, useState as useState24 } from "react";
|
|
22081
22086
|
function looksLikeNickname(input) {
|
|
22082
22087
|
if (!input) return false;
|
|
22083
22088
|
if (input.startsWith("0x")) return false;
|
|
@@ -22087,8 +22092,8 @@ function looksLikeNickname(input) {
|
|
|
22087
22092
|
}
|
|
22088
22093
|
function useNicknameResolve(input, options) {
|
|
22089
22094
|
const { enabled = true, chainId } = options;
|
|
22090
|
-
const [debouncedInput, setDebouncedInput] =
|
|
22091
|
-
const [isDebouncing, setIsDebouncing] =
|
|
22095
|
+
const [debouncedInput, setDebouncedInput] = useState24("");
|
|
22096
|
+
const [isDebouncing, setIsDebouncing] = useState24(false);
|
|
22092
22097
|
const normalized = normalizeNickname(input);
|
|
22093
22098
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
22094
22099
|
useEffect44(() => {
|
|
@@ -22151,14 +22156,14 @@ var init_useNicknameResolve = __esm({
|
|
|
22151
22156
|
});
|
|
22152
22157
|
|
|
22153
22158
|
// src/hooks/useSendTransaction.ts
|
|
22154
|
-
import { useCallback as useCallback29, useState as
|
|
22159
|
+
import { useCallback as useCallback29, useState as useState25 } from "react";
|
|
22155
22160
|
import { encodeFunctionData as encodeFunctionData2, isAddress, parseEther as parseEther2, parseUnits } from "viem";
|
|
22156
22161
|
function useSendTransaction() {
|
|
22157
22162
|
const session = useSession((st) => st.session);
|
|
22158
22163
|
const address = useSession((st) => st.address);
|
|
22159
|
-
const [isLoading, setIsLoading] =
|
|
22160
|
-
const [error, setError] =
|
|
22161
|
-
const [userOpHash, setUserOpHash] =
|
|
22164
|
+
const [isLoading, setIsLoading] = useState25(false);
|
|
22165
|
+
const [error, setError] = useState25(null);
|
|
22166
|
+
const [userOpHash, setUserOpHash] = useState25(null);
|
|
22162
22167
|
const sendTransaction = useCallback29(
|
|
22163
22168
|
async (params) => {
|
|
22164
22169
|
if (!session || !address) {
|
|
@@ -22411,10 +22416,10 @@ var init_AssetInputIcon = __esm({
|
|
|
22411
22416
|
|
|
22412
22417
|
// src/internal/components/SendMenu/send/components/NftDisplayCard.tsx
|
|
22413
22418
|
import { Image as ImageIcon2, Sparkles as Sparkles2 } from "lucide-react";
|
|
22414
|
-
import { useState as
|
|
22419
|
+
import { useState as useState26 } from "react";
|
|
22415
22420
|
import { jsx as jsx106, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
22416
22421
|
function NftDisplayCard({ asset }) {
|
|
22417
|
-
const [imageError, setImageError] =
|
|
22422
|
+
const [imageError, setImageError] = useState26(false);
|
|
22418
22423
|
const nftImage = asset.image || asset.nftMetadata?.image;
|
|
22419
22424
|
return /* @__PURE__ */ jsxs97("div", { className: "flex items-center gap-3 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
22420
22425
|
nftImage && !imageError ? /* @__PURE__ */ jsx106(
|
|
@@ -24532,7 +24537,7 @@ var init_TransactionsGroup = __esm({
|
|
|
24532
24537
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
24533
24538
|
import { useQuery as useQuery25, useQueryClient as useQueryClient25 } from "@tanstack/react-query";
|
|
24534
24539
|
import { ArrowLeft as ArrowLeft22, Loader as Loader28, RefreshCw as RefreshCw3, XCircle } from "lucide-react";
|
|
24535
|
-
import { useCallback as useCallback30, useState as
|
|
24540
|
+
import { useCallback as useCallback30, useState as useState27 } from "react";
|
|
24536
24541
|
import { jsx as jsx116, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
24537
24542
|
function TransactionsMenu() {
|
|
24538
24543
|
const qc = useQueryClient25();
|
|
@@ -24541,7 +24546,7 @@ function TransactionsMenu() {
|
|
|
24541
24546
|
const { t } = useT();
|
|
24542
24547
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24543
24548
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
24544
|
-
const [expandedGroups, setExpandedGroups] =
|
|
24549
|
+
const [expandedGroups, setExpandedGroups] = useState27({});
|
|
24545
24550
|
const historySupported = isTransactionHistorySupported(chainConfig?.id);
|
|
24546
24551
|
const {
|
|
24547
24552
|
data: txHistoryGroups = [],
|
|
@@ -24894,7 +24899,7 @@ var init_package = __esm({
|
|
|
24894
24899
|
"package.json"() {
|
|
24895
24900
|
package_default = {
|
|
24896
24901
|
name: "@embarkai/ui-kit",
|
|
24897
|
-
version: "0.4.
|
|
24902
|
+
version: "0.4.72",
|
|
24898
24903
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24899
24904
|
type: "module",
|
|
24900
24905
|
main: "./dist/index.cjs",
|
|
@@ -25137,7 +25142,7 @@ var init_Footer2 = __esm({
|
|
|
25137
25142
|
|
|
25138
25143
|
// src/internal/components/Header/Header.tsx
|
|
25139
25144
|
import { Copy as Copy4, Loader as Loader30 } from "lucide-react";
|
|
25140
|
-
import { useCallback as useCallback32, useRef as
|
|
25145
|
+
import { useCallback as useCallback32, useRef as useRef19, useState as useState28 } from "react";
|
|
25141
25146
|
import { Fragment as Fragment45, jsx as jsx119, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
25142
25147
|
function formatAddress2(addr) {
|
|
25143
25148
|
if (!addr) return "";
|
|
@@ -25149,10 +25154,10 @@ function Header() {
|
|
|
25149
25154
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
25150
25155
|
const { t } = useT();
|
|
25151
25156
|
const proMode = useProMode();
|
|
25152
|
-
const [proToast, setProToast] =
|
|
25153
|
-
const [copied, setCopied] =
|
|
25154
|
-
const clickCountRef =
|
|
25155
|
-
const clickTimerRef =
|
|
25157
|
+
const [proToast, setProToast] = useState28(false);
|
|
25158
|
+
const [copied, setCopied] = useState28(false);
|
|
25159
|
+
const clickCountRef = useRef19(0);
|
|
25160
|
+
const clickTimerRef = useRef19(null);
|
|
25156
25161
|
const handleAvatarClick = useCallback32(() => {
|
|
25157
25162
|
clickCountRef.current += 1;
|
|
25158
25163
|
if (clickTimerRef.current) {
|
|
@@ -28753,7 +28758,7 @@ import {
|
|
|
28753
28758
|
useContext,
|
|
28754
28759
|
useEffect as useEffect54,
|
|
28755
28760
|
useMemo as useMemo17,
|
|
28756
|
-
useRef as
|
|
28761
|
+
useRef as useRef20
|
|
28757
28762
|
} from "react";
|
|
28758
28763
|
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
28759
28764
|
function clearLegacyWagmiStorage() {
|
|
@@ -28773,9 +28778,9 @@ function clearLegacyWagmiStorage() {
|
|
|
28773
28778
|
}
|
|
28774
28779
|
function Provider(props) {
|
|
28775
28780
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
28776
|
-
const callbacksRef =
|
|
28781
|
+
const callbacksRef = useRef20(callbacks);
|
|
28777
28782
|
useEffect54(() => notifyNoProjetctId(projectId), [projectId]);
|
|
28778
|
-
const config =
|
|
28783
|
+
const config = useRef20(merge3({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
|
|
28779
28784
|
const updateConfig = useCallback35((updates) => {
|
|
28780
28785
|
const prev = config.current;
|
|
28781
28786
|
const next = { ...prev };
|
|
@@ -29590,12 +29595,12 @@ var Hash = ({
|
|
|
29590
29595
|
|
|
29591
29596
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29592
29597
|
init_base2();
|
|
29593
|
-
import { useEffect as useEffect57, useState as
|
|
29598
|
+
import { useEffect as useEffect57, useState as useState32 } from "react";
|
|
29594
29599
|
import { jsx as jsx133, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
29595
29600
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29596
|
-
const [transactions, setTransactions] =
|
|
29597
|
-
const [loading, setLoading] =
|
|
29598
|
-
const [error, setError] =
|
|
29601
|
+
const [transactions, setTransactions] = useState32([]);
|
|
29602
|
+
const [loading, setLoading] = useState32(true);
|
|
29603
|
+
const [error, setError] = useState32(null);
|
|
29599
29604
|
useEffect57(() => {
|
|
29600
29605
|
const fetchTransactions2 = async () => {
|
|
29601
29606
|
try {
|
|
@@ -29946,7 +29951,7 @@ function useDirectWallet() {
|
|
|
29946
29951
|
|
|
29947
29952
|
// src/hooks/useSendDirectTransaction.ts
|
|
29948
29953
|
init_useExternalWalletStore();
|
|
29949
|
-
import { useCallback as useCallback40, useState as
|
|
29954
|
+
import { useCallback as useCallback40, useState as useState34 } from "react";
|
|
29950
29955
|
import { isAddress as isAddress3, parseEther as parseEther3 } from "viem";
|
|
29951
29956
|
import { useSendTransaction as useWagmiSendTransaction, useSwitchChain as useSwitchChain3 } from "wagmi";
|
|
29952
29957
|
function useSendDirectTransaction() {
|
|
@@ -29954,9 +29959,9 @@ function useSendDirectTransaction() {
|
|
|
29954
29959
|
const externalChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
29955
29960
|
const { sendTransactionAsync } = useWagmiSendTransaction();
|
|
29956
29961
|
const { switchChainAsync } = useSwitchChain3();
|
|
29957
|
-
const [isPending, setIsPending] =
|
|
29958
|
-
const [error, setError] =
|
|
29959
|
-
const [txHash, setTxHash] =
|
|
29962
|
+
const [isPending, setIsPending] = useState34(false);
|
|
29963
|
+
const [error, setError] = useState34(null);
|
|
29964
|
+
const [txHash, setTxHash] = useState34(null);
|
|
29960
29965
|
const sendTransaction = useCallback40(
|
|
29961
29966
|
async (params) => {
|
|
29962
29967
|
if (!isConnected) {
|
|
@@ -30003,7 +30008,7 @@ function useSendDirectTransaction() {
|
|
|
30003
30008
|
init_SessionContext();
|
|
30004
30009
|
init_account2();
|
|
30005
30010
|
init_linkedProfiles();
|
|
30006
|
-
import { useCallback as useCallback41, useMemo as useMemo19, useState as
|
|
30011
|
+
import { useCallback as useCallback41, useMemo as useMemo19, useState as useState35 } from "react";
|
|
30007
30012
|
import { encodeFunctionData as encodeFunctionData3, isAddress as isAddress4, parseEther as parseEther4, parseUnits as parseUnits3 } from "viem";
|
|
30008
30013
|
var ERC20_TRANSFER_ABI2 = [
|
|
30009
30014
|
{
|
|
@@ -30019,9 +30024,9 @@ var ERC20_TRANSFER_ABI2 = [
|
|
|
30019
30024
|
function useTransferToLinkedWallet() {
|
|
30020
30025
|
const session = useSession((st) => st.session);
|
|
30021
30026
|
const { profiles } = useLinkedProfiles();
|
|
30022
|
-
const [isPending, setIsPending] =
|
|
30023
|
-
const [error, setError] =
|
|
30024
|
-
const [userOpHash, setUserOpHash] =
|
|
30027
|
+
const [isPending, setIsPending] = useState35(false);
|
|
30028
|
+
const [error, setError] = useState35(null);
|
|
30029
|
+
const [userOpHash, setUserOpHash] = useState35(null);
|
|
30025
30030
|
const linkedWallets = useMemo19(
|
|
30026
30031
|
() => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
|
|
30027
30032
|
[profiles]
|
|
@@ -30491,6 +30496,7 @@ autorun();
|
|
|
30491
30496
|
export {
|
|
30492
30497
|
AccountAbstractionError,
|
|
30493
30498
|
Address,
|
|
30499
|
+
BUY_MENU_BINANCE_TOUR,
|
|
30494
30500
|
ConnectWalletButton,
|
|
30495
30501
|
ErrorCodes,
|
|
30496
30502
|
Hash,
|
|
@@ -30519,7 +30525,6 @@ export {
|
|
|
30519
30525
|
getAllSmartAccounts,
|
|
30520
30526
|
getAssetRate,
|
|
30521
30527
|
getAvailableLanguages,
|
|
30522
|
-
getBinanceOnboardingTour,
|
|
30523
30528
|
getExplorerUrl,
|
|
30524
30529
|
getIframeManager,
|
|
30525
30530
|
getInProgressOnrampTransactionsList,
|