@embarkai/ui-kit 0.4.58 → 0.4.59
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 +96 -89
- package/dist/index.cjs +299 -278
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +103 -84
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -207,6 +207,9 @@ var init_initial = __esm({
|
|
|
207
207
|
});
|
|
208
208
|
|
|
209
209
|
// src/lib/errors.ts
|
|
210
|
+
function isSessionExpiredError(error) {
|
|
211
|
+
return typeof error === "object" && error !== null && error.code === ErrorCodes.SESSION_EXPIRED;
|
|
212
|
+
}
|
|
210
213
|
function createAccountAbstractionError(params) {
|
|
211
214
|
const { message, code } = params;
|
|
212
215
|
if (!code) {
|
|
@@ -215,11 +218,13 @@ function createAccountAbstractionError(params) {
|
|
|
215
218
|
switch (code) {
|
|
216
219
|
case UserRejectedError.CODE:
|
|
217
220
|
return new UserRejectedError(message);
|
|
221
|
+
case SessionExpiredError.CODE:
|
|
222
|
+
return new SessionExpiredError(message);
|
|
218
223
|
default:
|
|
219
224
|
return new AccountAbstractionError(message, code);
|
|
220
225
|
}
|
|
221
226
|
}
|
|
222
|
-
var AccountAbstractionError, UserRejectedError, ErrorCodes;
|
|
227
|
+
var AccountAbstractionError, UserRejectedError, SessionExpiredError, ErrorCodes;
|
|
223
228
|
var init_errors = __esm({
|
|
224
229
|
"src/lib/errors.ts"() {
|
|
225
230
|
AccountAbstractionError = class _AccountAbstractionError extends Error {
|
|
@@ -241,9 +246,19 @@ var init_errors = __esm({
|
|
|
241
246
|
this.name = "UserRejectedError";
|
|
242
247
|
}
|
|
243
248
|
};
|
|
249
|
+
SessionExpiredError = class _SessionExpiredError extends AccountAbstractionError {
|
|
250
|
+
static {
|
|
251
|
+
this.CODE = "SESSION_EXPIRED";
|
|
252
|
+
}
|
|
253
|
+
constructor(message = "Session expired, please log in again") {
|
|
254
|
+
super(message, _SessionExpiredError.CODE);
|
|
255
|
+
this.name = "SessionExpiredError";
|
|
256
|
+
}
|
|
257
|
+
};
|
|
244
258
|
ErrorCodes = {
|
|
245
259
|
MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR",
|
|
246
|
-
USER_REJECTED: UserRejectedError.CODE
|
|
260
|
+
USER_REJECTED: UserRejectedError.CODE,
|
|
261
|
+
SESSION_EXPIRED: SessionExpiredError.CODE
|
|
247
262
|
};
|
|
248
263
|
}
|
|
249
264
|
});
|
|
@@ -669,7 +684,10 @@ async function ensureDkgAndGetOwner(userId, _clientSeedHex) {
|
|
|
669
684
|
};
|
|
670
685
|
}
|
|
671
686
|
await iframeManager.authenticate(userId);
|
|
672
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
687
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
688
|
+
if (await ensureFreshSession2(jwtTokenManager4) === "session_dead") {
|
|
689
|
+
throw new SessionExpiredError();
|
|
690
|
+
}
|
|
673
691
|
let accessToken = jwtTokenManager4.getAccessToken();
|
|
674
692
|
if (!accessToken) {
|
|
675
693
|
console.warn("[iframe-mpc-client] No access token available for DKG, attempting cookie-based session");
|
|
@@ -701,8 +719,12 @@ async function signDigestWithMpc(userId, digest32, userOpDetails) {
|
|
|
701
719
|
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
|
|
702
720
|
try {
|
|
703
721
|
const iframeManager = getIframeManager();
|
|
704
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
722
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
723
|
+
const session = await ensureFreshSession2(jwtTokenManager4);
|
|
705
724
|
const accessToken = jwtTokenManager4.getAccessToken();
|
|
725
|
+
if (session === "session_dead") {
|
|
726
|
+
throw new SessionExpiredError();
|
|
727
|
+
}
|
|
706
728
|
if (!accessToken) {
|
|
707
729
|
throw new Error("No access token available for signing");
|
|
708
730
|
}
|
|
@@ -761,8 +783,12 @@ async function signTypedDataWithMpc(userId, digest32, typedData) {
|
|
|
761
783
|
digest32
|
|
762
784
|
});
|
|
763
785
|
const iframeManager = getIframeManager();
|
|
764
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
786
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
787
|
+
const session = await ensureFreshSession2(jwtTokenManager4);
|
|
765
788
|
const accessToken = jwtTokenManager4.getAccessToken();
|
|
789
|
+
if (session === "session_dead") {
|
|
790
|
+
throw new SessionExpiredError();
|
|
791
|
+
}
|
|
766
792
|
if (!accessToken) {
|
|
767
793
|
console.error("[signTypedDataWithMpc] No access token available");
|
|
768
794
|
throw new Error("No access token available for signing");
|
|
@@ -15607,17 +15633,29 @@ var init_KycMenu = __esm({
|
|
|
15607
15633
|
}
|
|
15608
15634
|
});
|
|
15609
15635
|
|
|
15610
|
-
// src/internal/
|
|
15611
|
-
function
|
|
15636
|
+
// src/internal/hooks/useUserProfile.ts
|
|
15637
|
+
function useUserProfile() {
|
|
15612
15638
|
const address = useSession((st) => st.address);
|
|
15613
|
-
|
|
15614
|
-
retry: false,
|
|
15615
|
-
enabled: !!address,
|
|
15639
|
+
return (0, import_react_query23.useQuery)({
|
|
15616
15640
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
15617
|
-
queryFn: getUserProfile
|
|
15641
|
+
queryFn: getUserProfile,
|
|
15642
|
+
enabled: !!address,
|
|
15643
|
+
retry: false
|
|
15618
15644
|
});
|
|
15619
|
-
|
|
15620
|
-
|
|
15645
|
+
}
|
|
15646
|
+
var import_react_query23;
|
|
15647
|
+
var init_useUserProfile = __esm({
|
|
15648
|
+
"src/internal/hooks/useUserProfile.ts"() {
|
|
15649
|
+
init_SessionContext();
|
|
15650
|
+
import_react_query23 = require("@tanstack/react-query");
|
|
15651
|
+
init_profile();
|
|
15652
|
+
}
|
|
15653
|
+
});
|
|
15654
|
+
|
|
15655
|
+
// src/internal/components/KYC/KYCStatus.tsx
|
|
15656
|
+
function KYCStatus() {
|
|
15657
|
+
const { data: userProfile = null, isLoading: isUserProfileLoading } = useUserProfile();
|
|
15658
|
+
const isKycVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
15621
15659
|
if (!isKycVerified) return null;
|
|
15622
15660
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "group relative flex flex-shrink-0", children: [
|
|
15623
15661
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PositiveIcon, {}),
|
|
@@ -15636,14 +15674,11 @@ function KYCStatus() {
|
|
|
15636
15674
|
)
|
|
15637
15675
|
] });
|
|
15638
15676
|
}
|
|
15639
|
-
var
|
|
15677
|
+
var import_jsx_runtime70;
|
|
15640
15678
|
var init_KYCStatus = __esm({
|
|
15641
15679
|
"src/internal/components/KYC/KYCStatus.tsx"() {
|
|
15642
|
-
init_SessionContext();
|
|
15643
|
-
import_react_query23 = require("@tanstack/react-query");
|
|
15644
|
-
import_lucide_react39 = require("lucide-react");
|
|
15645
15680
|
init_icons();
|
|
15646
|
-
|
|
15681
|
+
init_useUserProfile();
|
|
15647
15682
|
init_utils2();
|
|
15648
15683
|
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15649
15684
|
}
|
|
@@ -15675,7 +15710,7 @@ function LanguagesMenu() {
|
|
|
15675
15710
|
className: "list-scrollbar-y w-full p-[var(--ui-kit-pd)]",
|
|
15676
15711
|
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
15677
15712
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
15678
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage(langOpenedFromMenu), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15713
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage(langOpenedFromMenu), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react39.ArrowLeft, { className: "h-4 w-4" }) }),
|
|
15679
15714
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-xl font-semibold", children: t("passport:common.language") })
|
|
15680
15715
|
] }),
|
|
15681
15716
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)] py-[var(--ui-kit-pd)]", children: languageList.map((langKey) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
@@ -15700,12 +15735,12 @@ function LanguagesMenu() {
|
|
|
15700
15735
|
}
|
|
15701
15736
|
);
|
|
15702
15737
|
}
|
|
15703
|
-
var
|
|
15738
|
+
var import_lucide_react39, import_jsx_runtime71;
|
|
15704
15739
|
var init_LanguagesMenu = __esm({
|
|
15705
15740
|
"src/internal/components/LanguagesMenu/LanguagesMenu.tsx"() {
|
|
15706
15741
|
init_ProviderContext();
|
|
15707
15742
|
init_i18n();
|
|
15708
|
-
|
|
15743
|
+
import_lucide_react39 = require("lucide-react");
|
|
15709
15744
|
init_useLayoutDataStore();
|
|
15710
15745
|
init_useLayoutStore();
|
|
15711
15746
|
init_Expandable2();
|
|
@@ -15810,12 +15845,12 @@ function MainMenu() {
|
|
|
15810
15845
|
id
|
|
15811
15846
|
)) }) });
|
|
15812
15847
|
}
|
|
15813
|
-
var
|
|
15848
|
+
var import_lucide_react40, import_react49, import_jsx_runtime72, MAIN_MENU_BUTTONS;
|
|
15814
15849
|
var init_MainMenu = __esm({
|
|
15815
15850
|
"src/internal/components/MainMenu/MainMenu.tsx"() {
|
|
15816
15851
|
init_SessionContext();
|
|
15817
15852
|
init_useT();
|
|
15818
|
-
|
|
15853
|
+
import_lucide_react40 = require("lucide-react");
|
|
15819
15854
|
import_react49 = require("react");
|
|
15820
15855
|
init_constants();
|
|
15821
15856
|
init_useLayoutDataStore();
|
|
@@ -15823,10 +15858,10 @@ var init_MainMenu = __esm({
|
|
|
15823
15858
|
init_button();
|
|
15824
15859
|
import_jsx_runtime72 = require("react/jsx-runtime");
|
|
15825
15860
|
MAIN_MENU_BUTTONS = [
|
|
15826
|
-
{ id: "send" /* SEND */, label: "passport:main.send", icon:
|
|
15827
|
-
{ id: "receive" /* RECEIVE */, label: "passport:main.receive", icon:
|
|
15828
|
-
{ id: "buy" /* BUY */, label: "passport:main.buy", icon:
|
|
15829
|
-
{ id: "assets" /* ASSETS */, label: "passport:main.assets", icon:
|
|
15861
|
+
{ id: "send" /* SEND */, label: "passport:main.send", icon: import_lucide_react40.ChevronRight },
|
|
15862
|
+
{ id: "receive" /* RECEIVE */, label: "passport:main.receive", icon: import_lucide_react40.ChevronLeft },
|
|
15863
|
+
{ id: "buy" /* BUY */, label: "passport:main.buy", icon: import_lucide_react40.DollarSign },
|
|
15864
|
+
{ id: "assets" /* ASSETS */, label: "passport:main.assets", icon: import_lucide_react40.Wallet2 }
|
|
15830
15865
|
];
|
|
15831
15866
|
}
|
|
15832
15867
|
});
|
|
@@ -15978,7 +16013,7 @@ function EmailForm() {
|
|
|
15978
16013
|
Input,
|
|
15979
16014
|
{
|
|
15980
16015
|
name: "signin-email",
|
|
15981
|
-
Icon:
|
|
16016
|
+
Icon: import_lucide_react41.Mail,
|
|
15982
16017
|
type: "email",
|
|
15983
16018
|
autoComplete: "off",
|
|
15984
16019
|
placeholder: t("passport:profilesMenu.email.placeholder"),
|
|
@@ -15995,12 +16030,12 @@ function EmailForm() {
|
|
|
15995
16030
|
size: "large",
|
|
15996
16031
|
disabled: !email || isLoading,
|
|
15997
16032
|
onClick: () => onSendVerificationCode(),
|
|
15998
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
16033
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react41.Loader, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react41.ChevronRight, { className: "w-4 h-4" })
|
|
15999
16034
|
}
|
|
16000
16035
|
)
|
|
16001
16036
|
] });
|
|
16002
16037
|
}
|
|
16003
|
-
var import_react_query26,
|
|
16038
|
+
var import_react_query26, import_lucide_react41, import_jsx_runtime73;
|
|
16004
16039
|
var init_EmailForm = __esm({
|
|
16005
16040
|
"src/internal/components/ManageWalletMenu/EmailForm.tsx"() {
|
|
16006
16041
|
init_initial();
|
|
@@ -16008,7 +16043,7 @@ var init_EmailForm = __esm({
|
|
|
16008
16043
|
init_SessionContext();
|
|
16009
16044
|
init_i18n();
|
|
16010
16045
|
import_react_query26 = require("@tanstack/react-query");
|
|
16011
|
-
|
|
16046
|
+
import_lucide_react41 = require("lucide-react");
|
|
16012
16047
|
init_projectId();
|
|
16013
16048
|
init_button();
|
|
16014
16049
|
init_input();
|
|
@@ -16327,18 +16362,18 @@ function EmailNotConnectedWarning() {
|
|
|
16327
16362
|
if (!isShown) return null;
|
|
16328
16363
|
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Highlight, { type: "warning", className: "flex flex-col gap-[var(--ui-kit-gap)] items-center text-center", children: [
|
|
16329
16364
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "flex items-center gap-[var(--ui-kit-gap)] text-lg font-bold", children: [
|
|
16330
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16365
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_lucide_react42.Mail, { className: "w-5 h-5" }),
|
|
16331
16366
|
t("passport:profilesMenu.email.warningTitle")
|
|
16332
16367
|
] }),
|
|
16333
16368
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "font-medium", children: t("passport:profilesMenu.email.warningMsg") })
|
|
16334
16369
|
] });
|
|
16335
16370
|
}
|
|
16336
|
-
var
|
|
16371
|
+
var import_lucide_react42, import_jsx_runtime75;
|
|
16337
16372
|
var init_EmailNotConnectedWarning = __esm({
|
|
16338
16373
|
"src/internal/components/ManageWalletMenu/EmailNotConnectedWarning.tsx"() {
|
|
16339
16374
|
init_ProviderContext();
|
|
16340
16375
|
init_i18n();
|
|
16341
|
-
|
|
16376
|
+
import_lucide_react42 = require("lucide-react");
|
|
16342
16377
|
init_auth();
|
|
16343
16378
|
init_highlight();
|
|
16344
16379
|
import_jsx_runtime75 = require("react/jsx-runtime");
|
|
@@ -16654,7 +16689,7 @@ function ProviderCard(props) {
|
|
|
16654
16689
|
)
|
|
16655
16690
|
] }),
|
|
16656
16691
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "w-fit flex items-center gap-[var(--ui-kit-gap)] flex-none", children: [
|
|
16657
|
-
props.verified ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16692
|
+
props.verified ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_lucide_react43.CheckCircle, { className: `w-4 h-4 text-[var(--ui-kit-bg-success)]` }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_lucide_react43.Clock, { className: "w-4 h-4 text-[var(--ui-kit-bg-warning)]" }),
|
|
16658
16693
|
allowUnlink && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16659
16694
|
Button,
|
|
16660
16695
|
{
|
|
@@ -16666,18 +16701,18 @@ function ProviderCard(props) {
|
|
|
16666
16701
|
setConfirmUnlink({ provider: props.provider, providerName: info.name, externalId: props.externalId });
|
|
16667
16702
|
setPage("unlink-provider" /* UNLINK_PROVIDER */);
|
|
16668
16703
|
},
|
|
16669
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_lucide_react43.Trash2, { className: "w-4 h-4 text-[var(--ui-kit-bg-error)]" })
|
|
16670
16705
|
}
|
|
16671
16706
|
)
|
|
16672
16707
|
] })
|
|
16673
16708
|
] });
|
|
16674
16709
|
}
|
|
16675
|
-
var
|
|
16710
|
+
var import_lucide_react43, import_jsx_runtime76;
|
|
16676
16711
|
var init_ProviderCard = __esm({
|
|
16677
16712
|
"src/internal/components/ManageWalletMenu/ProviderCard.tsx"() {
|
|
16678
16713
|
init_useLayoutDataStore();
|
|
16679
16714
|
init_useT();
|
|
16680
|
-
|
|
16715
|
+
import_lucide_react43 = require("lucide-react");
|
|
16681
16716
|
init_types();
|
|
16682
16717
|
init_button();
|
|
16683
16718
|
init_useProvidersList();
|
|
@@ -16826,17 +16861,17 @@ function ManageWalletMenu() {
|
|
|
16826
16861
|
if (!providerType) setPage("settings" /* SETTINGS */);
|
|
16827
16862
|
setProviderType(null);
|
|
16828
16863
|
},
|
|
16829
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16864
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react44.ArrowLeft, { className: "h-4 w-4" })
|
|
16830
16865
|
}
|
|
16831
16866
|
),
|
|
16832
16867
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-xl font-semibold", children: t("passport:profilesMenu.title") })
|
|
16833
16868
|
] }),
|
|
16834
|
-
isProvidersLoading && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex items-center justify-center p-4 text-[var(--ui-kit-fg-muted)]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16869
|
+
isProvidersLoading && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex items-center justify-center p-4 text-[var(--ui-kit-fg-muted)]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react44.Loader, { className: "w-4 h-4 animate-spin" }) }),
|
|
16835
16870
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EmailNotConnectedWarning, {}),
|
|
16836
16871
|
showCurrentProviders && renderProviders.map((node) => node),
|
|
16837
16872
|
showExtraProvidersUi && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(AddProvider, {}),
|
|
16838
16873
|
combinedAlertMessage && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
16839
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16874
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react44.AlertTriangle, { className: "w-4 h-4 shrink-0" }),
|
|
16840
16875
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "break-words whitespace-pre-wrap", children: [
|
|
16841
16876
|
alert2?.title && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
16842
16877
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("strong", { children: alert2.title }),
|
|
@@ -16849,7 +16884,7 @@ function ManageWalletMenu() {
|
|
|
16849
16884
|
}
|
|
16850
16885
|
);
|
|
16851
16886
|
}
|
|
16852
|
-
var import_lodash_es9,
|
|
16887
|
+
var import_lodash_es9, import_lucide_react44, import_react53, import_jsx_runtime77, POSSIBLE_PROVIDERS, MULTI_PROVIDERS;
|
|
16853
16888
|
var init_ManageWallet = __esm({
|
|
16854
16889
|
"src/internal/components/ManageWalletMenu/ManageWallet.tsx"() {
|
|
16855
16890
|
init_useLayoutDataStore();
|
|
@@ -16857,7 +16892,7 @@ var init_ManageWallet = __esm({
|
|
|
16857
16892
|
init_ProviderContext();
|
|
16858
16893
|
init_i18n();
|
|
16859
16894
|
import_lodash_es9 = require("lodash-es");
|
|
16860
|
-
|
|
16895
|
+
import_lucide_react44 = require("lucide-react");
|
|
16861
16896
|
import_react53 = require("react");
|
|
16862
16897
|
init_constants();
|
|
16863
16898
|
init_telegramBrowser();
|
|
@@ -16938,7 +16973,7 @@ function UnlinkProviderMenu() {
|
|
|
16938
16973
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
16939
16974
|
Input,
|
|
16940
16975
|
{
|
|
16941
|
-
Icon:
|
|
16976
|
+
Icon: import_lucide_react45.Key,
|
|
16942
16977
|
value: confirmInput,
|
|
16943
16978
|
onChange: (e) => setConfirmInput(e.target.value),
|
|
16944
16979
|
placeholder: t("passport:profilesMenu.unlinkPlaceholder")
|
|
@@ -16969,7 +17004,7 @@ function UnlinkProviderMenu() {
|
|
|
16969
17004
|
disabled: !!isProviderUnlinking || !confirmUnlink || confirmInput !== confirmUnlink.externalId,
|
|
16970
17005
|
className: "w-full flex-1",
|
|
16971
17006
|
children: [
|
|
16972
|
-
isProviderUnlinking && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
17007
|
+
isProviderUnlinking && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react45.Loader, { className: "animate-spin h-4 w-4" }),
|
|
16973
17008
|
t("passport:common.delete")
|
|
16974
17009
|
]
|
|
16975
17010
|
}
|
|
@@ -16977,7 +17012,7 @@ function UnlinkProviderMenu() {
|
|
|
16977
17012
|
] })
|
|
16978
17013
|
] });
|
|
16979
17014
|
}
|
|
16980
|
-
var import_react_query32,
|
|
17015
|
+
var import_react_query32, import_lucide_react45, import_react54, import_wagmi2, import_jsx_runtime78;
|
|
16981
17016
|
var init_UnlinkProviderMenu = __esm({
|
|
16982
17017
|
"src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx"() {
|
|
16983
17018
|
init_useLayoutDataStore();
|
|
@@ -16986,7 +17021,7 @@ var init_UnlinkProviderMenu = __esm({
|
|
|
16986
17021
|
init_useT();
|
|
16987
17022
|
init_linkedProfiles();
|
|
16988
17023
|
import_react_query32 = require("@tanstack/react-query");
|
|
16989
|
-
|
|
17024
|
+
import_lucide_react45 = require("lucide-react");
|
|
16990
17025
|
import_react54 = require("react");
|
|
16991
17026
|
import_wagmi2 = require("wagmi");
|
|
16992
17027
|
init_auth();
|
|
@@ -17246,7 +17281,7 @@ function NicknameEditForm(props) {
|
|
|
17246
17281
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17247
17282
|
Input,
|
|
17248
17283
|
{
|
|
17249
|
-
Icon:
|
|
17284
|
+
Icon: import_lucide_react46.AtSignIcon,
|
|
17250
17285
|
value: nicknameValue,
|
|
17251
17286
|
onChange: handleNicknameInputChange,
|
|
17252
17287
|
placeholder: t("passport:nicknameMenu.placeholder"),
|
|
@@ -17264,7 +17299,7 @@ function NicknameEditForm(props) {
|
|
|
17264
17299
|
className: cn("w-12", {
|
|
17265
17300
|
"bg-[var(--ui-kit-bg-success)] text-[var(--ui-kit-success)]": isNicknameAvailalable
|
|
17266
17301
|
}),
|
|
17267
|
-
children: isCheckingAvailability || isNicknameChanging ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17302
|
+
children: isCheckingAvailability || isNicknameChanging ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react46.LoaderIcon, { className: "w-4 h-4 animate-spin" }) : isNicknameChangeSuccess ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react46.CheckIcon, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react46.SaveIcon, { className: "w-4 h-4" })
|
|
17268
17303
|
}
|
|
17269
17304
|
)
|
|
17270
17305
|
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "w-full flex items-center justify-between px-[var(--ui-kit-pd)] h-12 bg-[var(--ui-kit-secondary)] rounded-[var(--ui-kit-el-bdrs)]", children: [
|
|
@@ -17291,21 +17326,21 @@ function NicknameEditForm(props) {
|
|
|
17291
17326
|
setIsNicknameCopied(true);
|
|
17292
17327
|
setTimeout(() => setIsNicknameCopied(false), 2e3);
|
|
17293
17328
|
},
|
|
17294
|
-
children: isNicknameCopied ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PositiveIcon, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17329
|
+
children: isNicknameCopied ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PositiveIcon, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react46.CopyIcon, { className: "w-4 h-4" })
|
|
17295
17330
|
}
|
|
17296
17331
|
)
|
|
17297
17332
|
] }),
|
|
17298
17333
|
!!canChange && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "w-full flex items-center leadding-4 text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:nicknameMenu.hint") })
|
|
17299
17334
|
] });
|
|
17300
17335
|
}
|
|
17301
|
-
var import_react_query34,
|
|
17336
|
+
var import_react_query34, import_lucide_react46, import_react56, import_jsx_runtime79;
|
|
17302
17337
|
var init_NicknameEditForm = __esm({
|
|
17303
17338
|
"src/internal/components/NicknameMenu/NicknameEditForm.tsx"() {
|
|
17304
17339
|
init_ProviderContext();
|
|
17305
17340
|
init_SessionContext();
|
|
17306
17341
|
init_i18n();
|
|
17307
17342
|
import_react_query34 = require("@tanstack/react-query");
|
|
17308
|
-
|
|
17343
|
+
import_lucide_react46 = require("lucide-react");
|
|
17309
17344
|
import_react56 = require("react");
|
|
17310
17345
|
init_icons();
|
|
17311
17346
|
init_nickname();
|
|
@@ -17356,18 +17391,18 @@ function NicknameMenu() {
|
|
|
17356
17391
|
size: "icon",
|
|
17357
17392
|
title: t("passport:common.back"),
|
|
17358
17393
|
onClick: () => useLayoutDataStore.getState().setPage("settings" /* SETTINGS */),
|
|
17359
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react47.ArrowLeft, { className: "h-4 w-4 flex-none" })
|
|
17360
17395
|
}
|
|
17361
17396
|
),
|
|
17362
17397
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex gap-[var(--ui-kit-gap)] items-center w-fit", children: [
|
|
17363
17398
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "text-xl font-semibold", children: t("passport:nicknameMenu.title") }),
|
|
17364
|
-
isNicknameInfoLoading && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17399
|
+
isNicknameInfoLoading && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react47.Loader, { className: "w-4 h-4 animate-spin" })
|
|
17365
17400
|
] })
|
|
17366
17401
|
] }),
|
|
17367
17402
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:nicknameMenu.yourNickname") }),
|
|
17368
17403
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(NicknameEditForm, { nicknameInfo, isInitialUser }),
|
|
17369
17404
|
!nicknameInfo?.canChange && nicknameInfo?.cooldownEndsAt && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
17370
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17405
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react47.Info, { className: "w-4 h-4 flex-none" }),
|
|
17371
17406
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: t("passport:nicknameMenu.cooldownMessage", {
|
|
17372
17407
|
canChangeAt: (0, import_dayjs4.default)(nicknameInfo.cooldownEndsAt).format("MMM D, YYYY"),
|
|
17373
17408
|
days: String(getDaysRemaining(nicknameInfo.cooldownEndsAt))
|
|
@@ -17416,7 +17451,7 @@ function NicknameMenu() {
|
|
|
17416
17451
|
}
|
|
17417
17452
|
);
|
|
17418
17453
|
}
|
|
17419
|
-
var import_react_query35, import_dayjs4,
|
|
17454
|
+
var import_react_query35, import_dayjs4, import_lucide_react47, import_jsx_runtime80;
|
|
17420
17455
|
var init_NicknameMenu = __esm({
|
|
17421
17456
|
"src/internal/components/NicknameMenu/NicknameMenu.tsx"() {
|
|
17422
17457
|
init_SessionContext();
|
|
@@ -17424,7 +17459,7 @@ var init_NicknameMenu = __esm({
|
|
|
17424
17459
|
init_i18n();
|
|
17425
17460
|
import_react_query35 = require("@tanstack/react-query");
|
|
17426
17461
|
import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
17427
|
-
|
|
17462
|
+
import_lucide_react47 = require("lucide-react");
|
|
17428
17463
|
init_nickname();
|
|
17429
17464
|
init_profile();
|
|
17430
17465
|
init_useLayoutDataStore();
|
|
@@ -18102,7 +18137,7 @@ function PortfolioItemImage(props) {
|
|
|
18102
18137
|
}
|
|
18103
18138
|
}
|
|
18104
18139
|
),
|
|
18105
|
-
isNft && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
18140
|
+
isNft && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react48.SparklesIcon, { className: "absolute top-0 right-0 w-4 h-4 text-[var(--ui-kit-bg-success)]" }),
|
|
18106
18141
|
!isNft && !!LocalImage && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LocalImage, { className: "w-12 h-12 rounded-full" }),
|
|
18107
18142
|
!isNft && !LocalImage && asset.logo && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
18108
18143
|
"img",
|
|
@@ -18116,7 +18151,7 @@ function PortfolioItemImage(props) {
|
|
|
18116
18151
|
}
|
|
18117
18152
|
}
|
|
18118
18153
|
),
|
|
18119
|
-
isSecurity && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "absolute top-0 right-0", title: "Security Token (ERC-3643)", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
18154
|
+
isSecurity && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "absolute top-0 right-0", title: "Security Token (ERC-3643)", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react48.ShieldAlertIcon, { className: "w-4 h-4 text-[var(--ui-kit-bg-error)] fill-[var(--ui-kit-bg-warning)]" }) })
|
|
18120
18155
|
] });
|
|
18121
18156
|
}
|
|
18122
18157
|
function PortfolioItem(props) {
|
|
@@ -18198,7 +18233,7 @@ function PortfolioItem(props) {
|
|
|
18198
18233
|
asset.symbol
|
|
18199
18234
|
] })
|
|
18200
18235
|
] }),
|
|
18201
|
-
isRateLoading && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
18236
|
+
isRateLoading && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react48.LoaderIcon, { className: "h-4 w-4 animate-spin" }),
|
|
18202
18237
|
!isRateLoading && !!usdRenderBalance && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "text-xs", children: [
|
|
18203
18238
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: "$" }),
|
|
18204
18239
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: formatPrice(usdRenderBalance) })
|
|
@@ -18209,13 +18244,13 @@ function PortfolioItem(props) {
|
|
|
18209
18244
|
}
|
|
18210
18245
|
);
|
|
18211
18246
|
}
|
|
18212
|
-
var import_react_query38,
|
|
18247
|
+
var import_react_query38, import_lucide_react48, import_viem9, import_jsx_runtime82, SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
|
|
18213
18248
|
var init_PortfolioItem = __esm({
|
|
18214
18249
|
"src/internal/components/PortfolioMenu/PortfolioItem.tsx"() {
|
|
18215
18250
|
init_ProviderContext();
|
|
18216
18251
|
init_constants();
|
|
18217
18252
|
import_react_query38 = require("@tanstack/react-query");
|
|
18218
|
-
|
|
18253
|
+
import_lucide_react48 = require("lucide-react");
|
|
18219
18254
|
import_viem9 = require("viem");
|
|
18220
18255
|
init_no_image();
|
|
18221
18256
|
init_tokens();
|
|
@@ -18271,7 +18306,7 @@ function PortfolioMenu() {
|
|
|
18271
18306
|
size: "icon",
|
|
18272
18307
|
title: "Back",
|
|
18273
18308
|
onClick: () => useLayoutDataStore.getState().setPage("main-menu" /* MAIN_MENU */),
|
|
18274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
18309
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react49.ArrowLeft, { className: "h-4 w-4" })
|
|
18275
18310
|
}
|
|
18276
18311
|
),
|
|
18277
18312
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-xl font-semibold", children: t("passport:portfolioMenu.title") }),
|
|
@@ -18283,13 +18318,13 @@ function PortfolioMenu() {
|
|
|
18283
18318
|
size: "icon",
|
|
18284
18319
|
onClick: refreshAllAssetsBalances,
|
|
18285
18320
|
disabled: isBlockscoutLoading || isBlockscoutFetching,
|
|
18286
|
-
children: isBlockscoutLoading || isBlockscoutFetching ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
18321
|
+
children: isBlockscoutLoading || isBlockscoutFetching ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react49.Loader, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react49.RefreshCw, { className: "h-4 w-4" })
|
|
18287
18322
|
}
|
|
18288
18323
|
)
|
|
18289
18324
|
] }),
|
|
18290
|
-
isBlockscoutLoading && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "w-full flex items-center justify-center gap-[var(--ui-kit-gap)] p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
18325
|
+
isBlockscoutLoading && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "w-full flex items-center justify-center gap-[var(--ui-kit-gap)] p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react49.Loader, { className: "w-4 h-4 animate-spin" }) }),
|
|
18291
18326
|
!isBlockscoutLoading && blockscoutAssets?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Highlight, { type: "info", className: "flex flex-col items-center justify-center gap-[var(--ui-kit-gap)]", children: [
|
|
18292
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
18327
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react49.Gem, { className: "w-8 h-8" }),
|
|
18293
18328
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "block", children: t("passport:portfolioMenu.noAssets") })
|
|
18294
18329
|
] }),
|
|
18295
18330
|
!isBlockscoutLoading && shownProjectAssets?.map((asset, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PortfolioItem, { isProjectAsset: true, address, asset }, `project-${asset.symbol}-${index}`)),
|
|
@@ -18311,14 +18346,14 @@ function PortfolioMenu() {
|
|
|
18311
18346
|
}
|
|
18312
18347
|
);
|
|
18313
18348
|
}
|
|
18314
|
-
var import_react_query39,
|
|
18349
|
+
var import_react_query39, import_lucide_react49, import_react60, import_jsx_runtime83;
|
|
18315
18350
|
var init_PortfolioMenu = __esm({
|
|
18316
18351
|
"src/internal/components/PortfolioMenu/PortfolioMenu.tsx"() {
|
|
18317
18352
|
init_ProviderContext();
|
|
18318
18353
|
init_SessionContext();
|
|
18319
18354
|
init_i18n();
|
|
18320
18355
|
import_react_query39 = require("@tanstack/react-query");
|
|
18321
|
-
|
|
18356
|
+
import_lucide_react49 = require("lucide-react");
|
|
18322
18357
|
import_react60 = require("react");
|
|
18323
18358
|
init_useBlockscoutAssets();
|
|
18324
18359
|
init_useLayoutDataStore();
|
|
@@ -18482,20 +18517,20 @@ function ReceiveMenu() {
|
|
|
18482
18517
|
className: "list-scrollbar-y w-full p-[var(--ui-kit-pd)] flex flex-col gap-[var(--ui-kit-gap)]",
|
|
18483
18518
|
children: [
|
|
18484
18519
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "w-full flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
18485
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("main-menu" /* MAIN_MENU */), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18520
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("main-menu" /* MAIN_MENU */), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.ArrowLeft, { className: "h-4 w-4" }) }),
|
|
18486
18521
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-xl font-semibold", children: t("passport:receiveMenu.title") })
|
|
18487
18522
|
] }),
|
|
18488
18523
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Highlight, { className: "text-center", type: "warning", children: [
|
|
18489
18524
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("strong", { className: "block w-full", children: `${t("passport:common.network")}: ${chainConfig.name}` }),
|
|
18490
18525
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "block w-full", children: t("passport:receiveMenu.warning") })
|
|
18491
18526
|
] }),
|
|
18492
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-center justify-center p-[var(--ui-kit-pd)]", style: { minHeight: "216px" }, children: qrCodeUrl ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("img", { src: qrCodeUrl, alt: "Wallet QR Code", className: "w-48 h-48" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18527
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-center justify-center p-[var(--ui-kit-pd)]", style: { minHeight: "216px" }, children: qrCodeUrl ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("img", { src: qrCodeUrl, alt: "Wallet QR Code", className: "w-48 h-48" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.Loader, { className: "w-4 h-4 animate-spin" }) }),
|
|
18493
18528
|
fingerprint && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center justify-center gap-2 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
18494
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18529
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.Shield, { className: "w-4 h-4 text-[var(--ui-kit-bg-success)]" }),
|
|
18495
18530
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm text-[var(--ui-kit-fg-muted)]", children: t("passport:common.fingerprint") }),
|
|
18496
18531
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "font-mono text-sm font-semibold text-[var(--ui-kit-fg)]", children: fingerprint }),
|
|
18497
18532
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "relative group", children: [
|
|
18498
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18533
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.Info, { className: "w-3.5 h-3.5 text-[var(--ui-kit-fg-muted)] cursor-help" }),
|
|
18499
18534
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-xs bg-[var(--ui-kit-bg)] text-[var(--ui-kit-fg)] rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-10", children: "Share this to verify your identity" })
|
|
18500
18535
|
] }),
|
|
18501
18536
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
@@ -18504,17 +18539,17 @@ function ReceiveMenu() {
|
|
|
18504
18539
|
onClick: handleCopyFingerprint,
|
|
18505
18540
|
className: "p-1 rounded hover:bg-[var(--ui-kit-bg)] transition-colors",
|
|
18506
18541
|
title: "Copy fingerprint",
|
|
18507
|
-
children: fingerprintCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18542
|
+
children: fingerprintCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.CheckCircle2, { className: "w-3.5 h-3.5 text-[var(--ui-kit-bg-success)]" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.Copy, { className: "w-3.5 h-3.5 text-[var(--ui-kit-fg-muted)]" })
|
|
18508
18543
|
}
|
|
18509
18544
|
)
|
|
18510
18545
|
] }),
|
|
18511
18546
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Highlight, { type: "info", children: [
|
|
18512
18547
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "block w-full text-center font-mono text-[10px] break-all mb-2", children: address }),
|
|
18513
18548
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { onClick: handleCopy, className: "w-full", size: "large", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
18514
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18549
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.CheckCircle2, { className: "h-4 w-4" }),
|
|
18515
18550
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: "Copied!" })
|
|
18516
18551
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
18517
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
18552
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react50.Copy, { className: "h-4 w-4" }),
|
|
18518
18553
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: t("passport:receiveMenu.copyAddress") })
|
|
18519
18554
|
] }) })
|
|
18520
18555
|
] }),
|
|
@@ -18523,12 +18558,12 @@ function ReceiveMenu() {
|
|
|
18523
18558
|
}
|
|
18524
18559
|
);
|
|
18525
18560
|
}
|
|
18526
|
-
var
|
|
18561
|
+
var import_lucide_react50, import_qrcode, import_react61, import_jsx_runtime84;
|
|
18527
18562
|
var init_ReceiveMenu = __esm({
|
|
18528
18563
|
"src/internal/components/ReceiveMenu/ReceiveMenu.tsx"() {
|
|
18529
18564
|
init_SessionContext();
|
|
18530
18565
|
init_i18n();
|
|
18531
|
-
|
|
18566
|
+
import_lucide_react50 = require("lucide-react");
|
|
18532
18567
|
import_qrcode = __toESM(require("qrcode"), 1);
|
|
18533
18568
|
import_react61 = require("react");
|
|
18534
18569
|
init_useLayoutDataStore();
|
|
@@ -18642,7 +18677,7 @@ function Application(props) {
|
|
|
18642
18677
|
"rounded-[8px]"
|
|
18643
18678
|
),
|
|
18644
18679
|
children: [
|
|
18645
|
-
logo ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full h-full p-1", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("img", { src: logo, alt: name, className: "w-full h-full object-contain" }) }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18680
|
+
logo ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full h-full p-1", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("img", { src: logo, alt: name, className: "w-full h-full object-contain" }) }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.AppWindowMac, { className: "w-6 h-6 text-[var(--ui-kit-fg)]" }),
|
|
18646
18681
|
!!trustedAuthorizedApp && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18647
18682
|
"div",
|
|
18648
18683
|
{
|
|
@@ -18650,7 +18685,7 @@ function Application(props) {
|
|
|
18650
18685
|
"flex items-center justify-center",
|
|
18651
18686
|
"absolute -top-1 -right-1 h-5 w-5 rounded-full bg-[var(--ui-kit-bg-success)]"
|
|
18652
18687
|
),
|
|
18653
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.ShieldCheckIcon, { className: "w-4 h-4 text-black" })
|
|
18654
18689
|
}
|
|
18655
18690
|
)
|
|
18656
18691
|
]
|
|
@@ -18660,7 +18695,7 @@ function Application(props) {
|
|
|
18660
18695
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex flex-col", children: [
|
|
18661
18696
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm font-semibold truncate", children: name }),
|
|
18662
18697
|
appUrl && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
18663
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18698
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.ExternalLinkIcon, { className: "w-3 h-3 flex-none", strokeWidth: 1 }),
|
|
18664
18699
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "flex-1 truncate", children: new URL(appUrl).hostname })
|
|
18665
18700
|
] })
|
|
18666
18701
|
] }),
|
|
@@ -18690,7 +18725,7 @@ function Application(props) {
|
|
|
18690
18725
|
appLogo: logo
|
|
18691
18726
|
});
|
|
18692
18727
|
},
|
|
18693
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.ShieldBanIcon, { className: "h-4 w-4" })
|
|
18694
18729
|
}
|
|
18695
18730
|
)
|
|
18696
18731
|
]
|
|
@@ -18706,24 +18741,24 @@ function ConnectedApps() {
|
|
|
18706
18741
|
}, [connectedApps, isConnectedAppsLoading]);
|
|
18707
18742
|
if (!isConnectedAppsLoading && connectedApps.length === 0)
|
|
18708
18743
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)] ", children: [
|
|
18709
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18744
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.InfoIcon, { className: "w-4 h-4" }),
|
|
18710
18745
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: t("passport:securityMenu.connectedApps.noConnectedApps") })
|
|
18711
18746
|
] });
|
|
18712
18747
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
18713
18748
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
18714
18749
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "leading-4 text-xs", children: t("passport:securityMenu.connectedApps.connectedApps") }),
|
|
18715
|
-
isConnectedAppsLoading && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
18750
|
+
isConnectedAppsLoading && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react51.LoaderIcon, { className: "h-4 w-4 animate-spin" })
|
|
18716
18751
|
] }),
|
|
18717
18752
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: connectedApps.map((app, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Application, { ...app }, index)) })
|
|
18718
18753
|
] });
|
|
18719
18754
|
}
|
|
18720
|
-
var import_dayjs5,
|
|
18755
|
+
var import_dayjs5, import_lucide_react51, import_react62, import_jsx_runtime85;
|
|
18721
18756
|
var init_ConnectedApps = __esm({
|
|
18722
18757
|
"src/internal/components/SecurityMenu/ConnectedApps/ConnectedApps.tsx"() {
|
|
18723
18758
|
init_utils2();
|
|
18724
18759
|
init_i18n();
|
|
18725
18760
|
import_dayjs5 = __toESM(require("dayjs"), 1);
|
|
18726
|
-
|
|
18761
|
+
import_lucide_react51 = require("lucide-react");
|
|
18727
18762
|
import_react62 = require("react");
|
|
18728
18763
|
init_button();
|
|
18729
18764
|
init_highlight();
|
|
@@ -18768,7 +18803,7 @@ function UntrustApplication() {
|
|
|
18768
18803
|
"?"
|
|
18769
18804
|
] }),
|
|
18770
18805
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "w-full flex items-center justify-center gap-[var(--ui-kit-gap)]", children: [
|
|
18771
|
-
appToUntrust.appLogo ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-12 h-12 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg)] flex-shrink-0 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("img", { src: appToUntrust.appLogo, alt: appToUntrust.appName, className: "w-full h-full object-contain" }) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-12 h-12 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
18806
|
+
appToUntrust.appLogo ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-12 h-12 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg)] flex-shrink-0 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("img", { src: appToUntrust.appLogo, alt: appToUntrust.appName, className: "w-full h-full object-contain" }) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-12 h-12 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react52.AppWindowMac, { className: "w-6 h-6" }) }),
|
|
18772
18807
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex-1 text-left", children: [
|
|
18773
18808
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "font-medium", children: appToUntrust.appName }),
|
|
18774
18809
|
appToUntrust.hostname && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "text-[10px]", children: [
|
|
@@ -18809,19 +18844,19 @@ function UntrustApplication() {
|
|
|
18809
18844
|
className: "flex-1",
|
|
18810
18845
|
onClick: () => handleUntrustApp(),
|
|
18811
18846
|
disabled: isUntrustingApp,
|
|
18812
|
-
children: isUntrustingApp ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
18847
|
+
children: isUntrustingApp ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react52.Loader, { className: "h-4 w-4 animate-spin" }) : t("passport:common.delete")
|
|
18813
18848
|
}
|
|
18814
18849
|
)
|
|
18815
18850
|
] })
|
|
18816
18851
|
] });
|
|
18817
18852
|
}
|
|
18818
|
-
var import_react_query41,
|
|
18853
|
+
var import_react_query41, import_lucide_react52, import_jsx_runtime86;
|
|
18819
18854
|
var init_UntrustApplication = __esm({
|
|
18820
18855
|
"src/internal/components/SecurityMenu/ConnectedApps/UntrustApplication.tsx"() {
|
|
18821
18856
|
init_SessionContext();
|
|
18822
18857
|
init_i18n();
|
|
18823
18858
|
import_react_query41 = require("@tanstack/react-query");
|
|
18824
|
-
|
|
18859
|
+
import_lucide_react52 = require("lucide-react");
|
|
18825
18860
|
init_iframe_manager();
|
|
18826
18861
|
init_button();
|
|
18827
18862
|
init_highlight();
|
|
@@ -18843,7 +18878,7 @@ var init_ConnectedApps2 = __esm({
|
|
|
18843
18878
|
// src/internal/components/SecurityMenu/Keyshare/KeyshareStatus.tsx
|
|
18844
18879
|
function KeyshareStatus(props) {
|
|
18845
18880
|
const { isLoading, content, icon: Icon2, children } = props;
|
|
18846
|
-
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
18881
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react53.Loader, { className: "w-4 h-4 animate-spin" });
|
|
18847
18882
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "group relative w-full h-full", children: [
|
|
18848
18883
|
children,
|
|
18849
18884
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
@@ -18873,10 +18908,10 @@ function KeyshareStatus(props) {
|
|
|
18873
18908
|
)
|
|
18874
18909
|
] });
|
|
18875
18910
|
}
|
|
18876
|
-
var
|
|
18911
|
+
var import_lucide_react53, import_jsx_runtime87;
|
|
18877
18912
|
var init_KeyshareStatus = __esm({
|
|
18878
18913
|
"src/internal/components/SecurityMenu/Keyshare/KeyshareStatus.tsx"() {
|
|
18879
|
-
|
|
18914
|
+
import_lucide_react53 = require("lucide-react");
|
|
18880
18915
|
init_utils2();
|
|
18881
18916
|
import_jsx_runtime87 = require("react/jsx-runtime");
|
|
18882
18917
|
}
|
|
@@ -18910,7 +18945,7 @@ function LastBackup(props) {
|
|
|
18910
18945
|
if (!hasBackupData || !createdRecoveryStats) return null;
|
|
18911
18946
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Highlight, { type: "info", className: "text-[10px] leading-4", children: [
|
|
18912
18947
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
18913
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
18948
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_lucide_react54.DatabaseBackup, { className: "w-4 h-4 flex-none" }),
|
|
18914
18949
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "font-medium text-xs", children: t("passport:securityMenu.lastBackup") })
|
|
18915
18950
|
] }),
|
|
18916
18951
|
recoveryCreatedAt && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
@@ -18923,12 +18958,12 @@ function LastBackup(props) {
|
|
|
18923
18958
|
] })
|
|
18924
18959
|
] });
|
|
18925
18960
|
}
|
|
18926
|
-
var import_dayjs6,
|
|
18961
|
+
var import_dayjs6, import_lucide_react54, import_jsx_runtime88;
|
|
18927
18962
|
var init_LastBackup = __esm({
|
|
18928
18963
|
"src/internal/components/SecurityMenu/Keyshare/LastBackup.tsx"() {
|
|
18929
18964
|
init_useT();
|
|
18930
18965
|
import_dayjs6 = __toESM(require("dayjs"), 1);
|
|
18931
|
-
|
|
18966
|
+
import_lucide_react54 = require("lucide-react");
|
|
18932
18967
|
init_highlight();
|
|
18933
18968
|
import_jsx_runtime88 = require("react/jsx-runtime");
|
|
18934
18969
|
{
|
|
@@ -18988,7 +19023,7 @@ function Keyshare() {
|
|
|
18988
19023
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
18989
19024
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
18990
19025
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-xs leading-4", children: t("passport:securityMenu.keyshareStatus.title") }),
|
|
18991
|
-
isRecoveryLoading && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
19026
|
+
isRecoveryLoading && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react55.LoaderIcon, { className: "h-4 w-4 animate-spin" })
|
|
18992
19027
|
] }),
|
|
18993
19028
|
!isRecoveryLoading && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
18994
19029
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "grid grid-cols-3 gap-[var(--ui-kit-gap)] px-[var(--ui-kit-gap)]", children: [
|
|
@@ -19003,7 +19038,7 @@ function Keyshare() {
|
|
|
19003
19038
|
type: serverHasKeyshare ? "success" : "warning",
|
|
19004
19039
|
className: "w-full h-full flex flex-col items-center gap-0",
|
|
19005
19040
|
children: [
|
|
19006
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
19041
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react55.Cloud, { className: "h-6 w-6" }),
|
|
19007
19042
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-[10px] font-medium leading-4", children: "Server Share" })
|
|
19008
19043
|
]
|
|
19009
19044
|
}
|
|
@@ -19021,7 +19056,7 @@ function Keyshare() {
|
|
|
19021
19056
|
type: localInfo?.hasKeyshare ? "success" : "warning",
|
|
19022
19057
|
className: "w-full h-full flex flex-col items-center gap-0",
|
|
19023
19058
|
children: [
|
|
19024
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
19059
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react55.Laptop, { className: "h-6 w-6" }),
|
|
19025
19060
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-[10px] font-medium leading-4", children: "Local Share" })
|
|
19026
19061
|
]
|
|
19027
19062
|
}
|
|
@@ -19039,7 +19074,7 @@ function Keyshare() {
|
|
|
19039
19074
|
type: hasServerBackup ? "success" : "warning",
|
|
19040
19075
|
className: "w-full h-full flex flex-col items-center gap-0",
|
|
19041
19076
|
children: [
|
|
19042
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
19077
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react55.Server, { className: "h-6 w-6" }),
|
|
19043
19078
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-[10px] font-medium leading-4", children: "Vault Backup" })
|
|
19044
19079
|
]
|
|
19045
19080
|
}
|
|
@@ -19051,12 +19086,12 @@ function Keyshare() {
|
|
|
19051
19086
|
] })
|
|
19052
19087
|
] });
|
|
19053
19088
|
}
|
|
19054
|
-
var
|
|
19089
|
+
var import_lucide_react55, import_react63, import_jsx_runtime89;
|
|
19055
19090
|
var init_Keyshare = __esm({
|
|
19056
19091
|
"src/internal/components/SecurityMenu/Keyshare/Keyshare.tsx"() {
|
|
19057
19092
|
init_SessionContext();
|
|
19058
19093
|
init_useT();
|
|
19059
|
-
|
|
19094
|
+
import_lucide_react55 = require("lucide-react");
|
|
19060
19095
|
import_react63 = require("react");
|
|
19061
19096
|
init_icons();
|
|
19062
19097
|
init_auth();
|
|
@@ -19112,7 +19147,7 @@ function SecurityMenu() {
|
|
|
19112
19147
|
useLayoutDataStore.getState().setPage("settings" /* SETTINGS */);
|
|
19113
19148
|
}
|
|
19114
19149
|
},
|
|
19115
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react56.ArrowLeft, { className: "h-4 w-4" })
|
|
19116
19151
|
}
|
|
19117
19152
|
),
|
|
19118
19153
|
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-xl font-semibold", children: t("passport:securityMenu.title") })
|
|
@@ -19127,11 +19162,11 @@ function SecurityMenu() {
|
|
|
19127
19162
|
}
|
|
19128
19163
|
);
|
|
19129
19164
|
}
|
|
19130
|
-
var
|
|
19165
|
+
var import_lucide_react56, import_jsx_runtime90;
|
|
19131
19166
|
var init_SecurityMenu = __esm({
|
|
19132
19167
|
"src/internal/components/SecurityMenu/SecurityMenu.tsx"() {
|
|
19133
19168
|
init_i18n();
|
|
19134
|
-
|
|
19169
|
+
import_lucide_react56 = require("lucide-react");
|
|
19135
19170
|
init_useLayoutDataStore();
|
|
19136
19171
|
init_useLayoutStore();
|
|
19137
19172
|
init_Expandable2();
|
|
@@ -19619,16 +19654,16 @@ var init_metamask = __esm({
|
|
|
19619
19654
|
});
|
|
19620
19655
|
|
|
19621
19656
|
// src/internal/assets/wallets/index.ts
|
|
19622
|
-
var
|
|
19657
|
+
var import_lucide_react57, WALLET_ICONS;
|
|
19623
19658
|
var init_wallets = __esm({
|
|
19624
19659
|
"src/internal/assets/wallets/index.ts"() {
|
|
19625
|
-
|
|
19660
|
+
import_lucide_react57 = require("lucide-react");
|
|
19626
19661
|
init_embarkAI2();
|
|
19627
19662
|
init_metamask();
|
|
19628
19663
|
WALLET_ICONS = {
|
|
19629
19664
|
metamask: metamask_default,
|
|
19630
19665
|
embarkai: embarkAI_default2,
|
|
19631
|
-
default:
|
|
19666
|
+
default: import_lucide_react57.Wallet2Icon
|
|
19632
19667
|
};
|
|
19633
19668
|
}
|
|
19634
19669
|
});
|
|
@@ -20577,7 +20612,7 @@ function SelectStep(props) {
|
|
|
20577
20612
|
const SelectedWarpRoteIcon = TOKENS_ICONS[(selectedWarpRoute?.symbol || "null_icon").toUpperCase()] || TOKENS_ICONS.EMBARKAI;
|
|
20578
20613
|
const isError = useFlowSelectorStore((st) => !!st.error);
|
|
20579
20614
|
if (isLoadingWarpRoutes) {
|
|
20580
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.LoaderIcon, { className: "w-4 h-4 animate-spin" }) });
|
|
20581
20616
|
}
|
|
20582
20617
|
const isBalanceInsufficient = !routeTokenBalance || Number(amount || 0) > Number(routeTokenBalance || 0);
|
|
20583
20618
|
const isFalsyAmount = !amount || !Number(amount) || Number(amount) <= 0;
|
|
@@ -20625,7 +20660,7 @@ function SelectStep(props) {
|
|
|
20625
20660
|
t("passport:common.balance"),
|
|
20626
20661
|
": "
|
|
20627
20662
|
] }),
|
|
20628
|
-
isRouteTokenBalanceLoading && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20663
|
+
isRouteTokenBalanceLoading && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.LoaderIcon, { className: "w-4 h-4 animate-spin text-[var(--ui-kit-fg-muted)]" }),
|
|
20629
20664
|
!isRouteTokenBalanceLoading && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: cn("font-semibold", { "text-[var(--ui-kit-bg-error)]": isBalanceInsufficient }), children: [
|
|
20630
20665
|
formatPrice(Number(routeTokenBalance || 0)),
|
|
20631
20666
|
" ",
|
|
@@ -20648,7 +20683,7 @@ function SelectStep(props) {
|
|
|
20648
20683
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectedWarpRoteIcon, { className: "w-6 h-6" }),
|
|
20649
20684
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: selectedWarpRoute.symbol })
|
|
20650
20685
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
20651
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20686
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.ArrowLeftRightIcon, { className: "w-6 h-6" }),
|
|
20652
20687
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: hyperlaneWarpRoutes.length ? t("passport:bridgeMenu.labels.selectToken") : t("passport:bridgeMenu.errors.noWarpRoutes") })
|
|
20653
20688
|
] }),
|
|
20654
20689
|
!!selectedWarpRoute?.chainPair && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
@@ -20658,7 +20693,7 @@ function SelectStep(props) {
|
|
|
20658
20693
|
size: "medium",
|
|
20659
20694
|
className: "bg-[var(--ui-kit-bg)] flex items-center gap-[var(--ui-kit-gap)]",
|
|
20660
20695
|
children: selectedWarpRoute.chainPair.map((chain, chIdx) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react71.Fragment, { children: [
|
|
20661
|
-
chIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20696
|
+
chIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.ArrowLeftRightIcon, { className: "w-4 h-4 " }),
|
|
20662
20697
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ResolveChainIcon, { chainName: chain.chainName, className: "w-4 h-4" })
|
|
20663
20698
|
] }, `${selectedWarpRoute.id}-icon-${chain.chainID}-${chIdx}`))
|
|
20664
20699
|
}
|
|
@@ -20691,7 +20726,7 @@ function SelectStep(props) {
|
|
|
20691
20726
|
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
20692
20727
|
variant: "ghost",
|
|
20693
20728
|
onClick: swapChains,
|
|
20694
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.ArrowRightLeftIcon, { className: "w-4 h-4 " })
|
|
20695
20730
|
}
|
|
20696
20731
|
),
|
|
20697
20732
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Badge, { variant: "outline", size: "large", className: "block flex-1 flex gap-[var(--ui-kit-gap)] justify-center", children: destinationChain ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
@@ -20752,7 +20787,7 @@ function SelectStep(props) {
|
|
|
20752
20787
|
disabled: isQuoteEstimating || !originChain || !destinationChain || !hyperRoute,
|
|
20753
20788
|
placeholder: t("passport:bridgeMenu.labels.optionalRecipient") + " (ex: 0x...)",
|
|
20754
20789
|
value: recipient || "",
|
|
20755
|
-
Icon:
|
|
20790
|
+
Icon: import_lucide_react58.Wallet2Icon,
|
|
20756
20791
|
onChange: (e) => {
|
|
20757
20792
|
useFlowSelectorStore.getState().setError(null);
|
|
20758
20793
|
useBridgeStore.getState().setRecipient(e.target.value);
|
|
@@ -20767,7 +20802,7 @@ function SelectStep(props) {
|
|
|
20767
20802
|
e.stopPropagation();
|
|
20768
20803
|
useBridgeStore.getState().setRecipient(null);
|
|
20769
20804
|
},
|
|
20770
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.XIcon, { className: "w-4 h-4" })
|
|
20771
20806
|
}
|
|
20772
20807
|
)
|
|
20773
20808
|
}
|
|
@@ -20785,19 +20820,19 @@ function SelectStep(props) {
|
|
|
20785
20820
|
onClick: () => handleQuoteEstimation(amount),
|
|
20786
20821
|
disabled: isQuoteEstimationDisabled,
|
|
20787
20822
|
children: [
|
|
20788
|
-
isQuoteEstimating && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
20823
|
+
isQuoteEstimating && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react58.LoaderIcon, { className: "h-4 w-4 animate-spin" }),
|
|
20789
20824
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: isBalanceInsufficient ? t("passport:bridgeMenu.statuses.balanceInsufficient").toUpperCase() : t("passport:bridgeMenu.actions.estimateQuote").toUpperCase() })
|
|
20790
20825
|
]
|
|
20791
20826
|
}
|
|
20792
20827
|
)
|
|
20793
20828
|
] });
|
|
20794
20829
|
}
|
|
20795
|
-
var
|
|
20830
|
+
var import_lucide_react58, import_react71, import_jsx_runtime95;
|
|
20796
20831
|
var init_SelectStep = __esm({
|
|
20797
20832
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectStep.tsx"() {
|
|
20798
20833
|
init_tokens();
|
|
20799
20834
|
init_i18n();
|
|
20800
|
-
|
|
20835
|
+
import_lucide_react58 = require("lucide-react");
|
|
20801
20836
|
import_react71 = require("react");
|
|
20802
20837
|
init_priceFormatter();
|
|
20803
20838
|
init_utils2();
|
|
@@ -20830,16 +20865,16 @@ function Checkbox({ className, ...props }) {
|
|
|
20830
20865
|
className
|
|
20831
20866
|
),
|
|
20832
20867
|
...props,
|
|
20833
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center transition-none", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
20868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center transition-none", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react59.CheckIcon, { className: "w-4 h-4 text-[var(--ui-kit-fg)]" }) })
|
|
20834
20869
|
}
|
|
20835
20870
|
);
|
|
20836
20871
|
}
|
|
20837
|
-
var CheckboxPrimitive,
|
|
20872
|
+
var CheckboxPrimitive, import_lucide_react59, import_jsx_runtime96;
|
|
20838
20873
|
var init_checkbox = __esm({
|
|
20839
20874
|
"src/internal/components/ui/checkbox.tsx"() {
|
|
20840
20875
|
init_utils2();
|
|
20841
20876
|
CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
20842
|
-
|
|
20877
|
+
import_lucide_react59 = require("lucide-react");
|
|
20843
20878
|
import_jsx_runtime96 = require("react/jsx-runtime");
|
|
20844
20879
|
}
|
|
20845
20880
|
});
|
|
@@ -20949,19 +20984,19 @@ function ConfirmStep(props) {
|
|
|
20949
20984
|
onClick: () => bridgeAsset(),
|
|
20950
20985
|
className: "w-full",
|
|
20951
20986
|
children: [
|
|
20952
|
-
isAssetBridging && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20987
|
+
isAssetBridging && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react60.LoaderIcon, { className: "h-4 w-4 animate-spin" }),
|
|
20953
20988
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: (bridgeTxStatus || t("passport:common.continue")).toUpperCase() })
|
|
20954
20989
|
]
|
|
20955
20990
|
}
|
|
20956
20991
|
)
|
|
20957
20992
|
] });
|
|
20958
20993
|
}
|
|
20959
|
-
var
|
|
20994
|
+
var import_lucide_react60, import_react72, import_jsx_runtime97, P_CN;
|
|
20960
20995
|
var init_ConfirmStep = __esm({
|
|
20961
20996
|
"src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx"() {
|
|
20962
20997
|
init_SessionContext();
|
|
20963
20998
|
init_i18n();
|
|
20964
|
-
|
|
20999
|
+
import_lucide_react60 = require("lucide-react");
|
|
20965
21000
|
import_react72 = require("react");
|
|
20966
21001
|
init_priceFormatter();
|
|
20967
21002
|
init_utils2();
|
|
@@ -21135,7 +21170,7 @@ function HistoryDetailsStep() {
|
|
|
21135
21170
|
disabled: !txHash,
|
|
21136
21171
|
onClick: () => window.open(`${CHAINS_UI_META[item.originChain].explorerUrl}/tx/${txHash}`, "_blank", "noopener,noreferrer"),
|
|
21137
21172
|
children: [
|
|
21138
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
21173
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.ExternalLinkIcon, { className: "w-4 h-4" }),
|
|
21139
21174
|
txHash ? `Explore TX: ${txHash.slice(0, 8)}...${txHash.slice(-4)}` : "N/A"
|
|
21140
21175
|
]
|
|
21141
21176
|
},
|
|
@@ -21236,7 +21271,7 @@ function HistoryItem(props) {
|
|
|
21236
21271
|
]
|
|
21237
21272
|
}
|
|
21238
21273
|
),
|
|
21239
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
21274
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.ArrowRightIcon, { className: "w-4 h-4 flex-none" }),
|
|
21240
21275
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
21241
21276
|
"div",
|
|
21242
21277
|
{
|
|
@@ -21272,7 +21307,7 @@ function HistoryItem(props) {
|
|
|
21272
21307
|
setBridgeStep("tx-history-details");
|
|
21273
21308
|
},
|
|
21274
21309
|
children: [
|
|
21275
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
21310
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.InfoIcon, { className: "w-4 h-4" }),
|
|
21276
21311
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-xs leading-5", children: t("passport:common.details") })
|
|
21277
21312
|
]
|
|
21278
21313
|
}
|
|
@@ -21291,7 +21326,7 @@ function HistoryStep() {
|
|
|
21291
21326
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Highlight, { type: "info", className: "w-full text-center text-[10px] text-[var(--ui-kit-fg-muted)] leading-4", children: t("passport:bridgeMenu.errors.noHistory") });
|
|
21292
21327
|
}
|
|
21293
21328
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
21294
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
21329
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.LoaderIcon, { className: "w-4 h-4 animate-spin" }) }),
|
|
21295
21330
|
!isLoading && txList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(HistoryItem, { ...item }, item.id)),
|
|
21296
21331
|
hasNextPage && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
21297
21332
|
Button,
|
|
@@ -21302,21 +21337,21 @@ function HistoryStep() {
|
|
|
21302
21337
|
className: "w-full",
|
|
21303
21338
|
onClick: () => fetchNextPage(),
|
|
21304
21339
|
children: [
|
|
21305
|
-
isTxDataFetching ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
21340
|
+
isTxDataFetching ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.LoaderIcon, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react61.DownloadIcon, { className: "w-4 h-4" }),
|
|
21306
21341
|
t("passport:common.loadMore")
|
|
21307
21342
|
]
|
|
21308
21343
|
}
|
|
21309
21344
|
)
|
|
21310
21345
|
] });
|
|
21311
21346
|
}
|
|
21312
|
-
var import_react_query48, import_dayjs7,
|
|
21347
|
+
var import_react_query48, import_dayjs7, import_lucide_react61, import_jsx_runtime99, P_CN3;
|
|
21313
21348
|
var init_HistoryStep = __esm({
|
|
21314
21349
|
"src/internal/components/SendMenu/hyperbridge/steps/HistoryStep.tsx"() {
|
|
21315
21350
|
init_SessionContext();
|
|
21316
21351
|
init_i18n();
|
|
21317
21352
|
import_react_query48 = require("@tanstack/react-query");
|
|
21318
21353
|
import_dayjs7 = __toESM(require("dayjs"), 1);
|
|
21319
|
-
|
|
21354
|
+
import_lucide_react61 = require("lucide-react");
|
|
21320
21355
|
init_tokens();
|
|
21321
21356
|
init_priceFormatter();
|
|
21322
21357
|
init_utils2();
|
|
@@ -21424,7 +21459,7 @@ function SelectAssetRoute(props) {
|
|
|
21424
21459
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ResolveChainIcon, { chainName: fromChain.chainName, className: "w-6 h-6 flex-none" }),
|
|
21425
21460
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "max-w-[100px] truncate", children: fromChain.chainLabel })
|
|
21426
21461
|
] }),
|
|
21427
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
21462
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react62.ArrowLeftRightIcon, { className: "w-4 h-4 flex-none" }),
|
|
21428
21463
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("span", { className: "flex items-center flex-1 gap-[var(--ui-kit-gap)] justify-between", children: [
|
|
21429
21464
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "max-w-[100px] truncate", children: toChain.chainLabel }),
|
|
21430
21465
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ResolveChainIcon, { chainName: toChain.chainName, className: "w-6 h-6 flex-none" })
|
|
@@ -21436,12 +21471,12 @@ function SelectAssetRoute(props) {
|
|
|
21436
21471
|
] })
|
|
21437
21472
|
] });
|
|
21438
21473
|
}
|
|
21439
|
-
var
|
|
21474
|
+
var import_lucide_react62, import_react73, import_jsx_runtime100;
|
|
21440
21475
|
var init_SelectAssetRoute = __esm({
|
|
21441
21476
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx"() {
|
|
21442
21477
|
init_tokens();
|
|
21443
21478
|
init_i18n();
|
|
21444
|
-
|
|
21479
|
+
import_lucide_react62 = require("lucide-react");
|
|
21445
21480
|
import_react73 = require("react");
|
|
21446
21481
|
init_button();
|
|
21447
21482
|
init_useFlowSelector();
|
|
@@ -21894,7 +21929,7 @@ var init_utils9 = __esm({
|
|
|
21894
21929
|
function AssetInputIcon({ asset, size = "small" }) {
|
|
21895
21930
|
const iconSizeClass = size === "small" ? "w-6 h-6" : "w-12 h-12";
|
|
21896
21931
|
const subiconSizeClass = size === "small" ? "w-4 h-4" : "w-5 h-5";
|
|
21897
|
-
if (!asset) return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
21932
|
+
if (!asset) return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react63.Coins, { className: iconSizeClass, strokeWidth: 1 });
|
|
21898
21933
|
const isNft = isNftAsset3(asset);
|
|
21899
21934
|
if (isNft) {
|
|
21900
21935
|
return asset.image || asset.nftMetadata?.image ? /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: cn(iconSizeClass, "flex-none relative"), children: [
|
|
@@ -21911,10 +21946,10 @@ function AssetInputIcon({ asset, size = "small" }) {
|
|
|
21911
21946
|
}
|
|
21912
21947
|
}
|
|
21913
21948
|
),
|
|
21914
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
21949
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react63.Sparkles, { className: cn(subiconSizeClass, "absolute -top-1 -right-1") })
|
|
21915
21950
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: cn(iconSizeClass, "relative flex-none"), children: [
|
|
21916
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
21917
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
21951
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react63.Image, { className: cn(iconSizeClass, "flex-none") }),
|
|
21952
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react63.Sparkles, { className: cn(subiconSizeClass, "absolute -top-1 -right-1 text-[var(--ui-kit-bg-success)]") })
|
|
21918
21953
|
] });
|
|
21919
21954
|
}
|
|
21920
21955
|
const isSecurity = isSecurityToken2(asset);
|
|
@@ -21941,7 +21976,7 @@ function AssetInputIcon({ asset, size = "small" }) {
|
|
|
21941
21976
|
children: [
|
|
21942
21977
|
!!CommonAssetIcon ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CommonAssetIcon, { className: iconSizeClass }) : targetAssetIcon,
|
|
21943
21978
|
isSecurity && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
21944
|
-
|
|
21979
|
+
import_lucide_react63.ShieldCheck,
|
|
21945
21980
|
{
|
|
21946
21981
|
style: { fill: "var(--ui-kit-bg-warning)" },
|
|
21947
21982
|
className: cn(subiconSizeClass, "absolute -top-1 -right-1 text-[var(--ui-kit-bg-error)]")
|
|
@@ -21951,10 +21986,10 @@ function AssetInputIcon({ asset, size = "small" }) {
|
|
|
21951
21986
|
}
|
|
21952
21987
|
);
|
|
21953
21988
|
}
|
|
21954
|
-
var
|
|
21989
|
+
var import_lucide_react63, import_jsx_runtime103;
|
|
21955
21990
|
var init_AssetInputIcon = __esm({
|
|
21956
21991
|
"src/internal/components/SendMenu/send/components/AssetInputIcon.tsx"() {
|
|
21957
|
-
|
|
21992
|
+
import_lucide_react63 = require("lucide-react");
|
|
21958
21993
|
init_tokens();
|
|
21959
21994
|
init_no_image();
|
|
21960
21995
|
init_utils2();
|
|
@@ -21976,7 +22011,7 @@ function NftDisplayCard({ asset }) {
|
|
|
21976
22011
|
className: "w-16 h-16 rounded-[var(--ui-kit-el-bdrs)] object-cover",
|
|
21977
22012
|
onError: () => setImageError(true)
|
|
21978
22013
|
}
|
|
21979
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "w-16 h-16 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-fg)] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
22014
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "w-16 h-16 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-fg)] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react64.Image, { className: "w-8 h-8 text-[var(--ui-kit-fg-inverted)]" }) }),
|
|
21980
22015
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
21981
22016
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "font-semibold text-[var(--ui-kit-fg)] truncate", children: asset.nftMetadata?.name || asset.name }),
|
|
21982
22017
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "text-sm text-[var(--ui-kit-fg-muted)]", children: [
|
|
@@ -21987,16 +22022,16 @@ function NftDisplayCard({ asset }) {
|
|
|
21987
22022
|
] })
|
|
21988
22023
|
] }),
|
|
21989
22024
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "text-xs text-[var(--ui-kit-fg-muted)] mt-1 flex items-center gap-1", children: [
|
|
21990
|
-
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
22025
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react64.Sparkles, { className: "w-3 h-3" }),
|
|
21991
22026
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: asset.type === "erc721" ? "ERC-721" : "ERC-1155" })
|
|
21992
22027
|
] })
|
|
21993
22028
|
] })
|
|
21994
22029
|
] });
|
|
21995
22030
|
}
|
|
21996
|
-
var
|
|
22031
|
+
var import_lucide_react64, import_react78, import_jsx_runtime104;
|
|
21997
22032
|
var init_NftDisplayCard = __esm({
|
|
21998
22033
|
"src/internal/components/SendMenu/send/components/NftDisplayCard.tsx"() {
|
|
21999
|
-
|
|
22034
|
+
import_lucide_react64 = require("lucide-react");
|
|
22000
22035
|
import_react78 = require("react");
|
|
22001
22036
|
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
22002
22037
|
}
|
|
@@ -22192,10 +22227,10 @@ function NicknameData(props) {
|
|
|
22192
22227
|
e.currentTarget.src = no_image_default;
|
|
22193
22228
|
}
|
|
22194
22229
|
}
|
|
22195
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
22230
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react65.AtSign, { className: "w-5 h-5" }) }),
|
|
22196
22231
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
22197
22232
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[10px] text-[var(--ui-kit-bg-success)]", children: [
|
|
22198
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
22233
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react65.CheckCircle2, { className: "w-4 h-4 flex-shrink-0" }),
|
|
22199
22234
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: nicknameData.handle })
|
|
22200
22235
|
] }),
|
|
22201
22236
|
nicknameData.fingerprint && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
@@ -22206,7 +22241,7 @@ function NicknameData(props) {
|
|
|
22206
22241
|
isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
|
|
22207
22242
|
),
|
|
22208
22243
|
children: [
|
|
22209
|
-
isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
22244
|
+
isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react65.ShieldCheck, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react65.ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
|
|
22210
22245
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` }),
|
|
22211
22246
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
|
|
22212
22247
|
]
|
|
@@ -22215,10 +22250,10 @@ function NicknameData(props) {
|
|
|
22215
22250
|
] })
|
|
22216
22251
|
] });
|
|
22217
22252
|
}
|
|
22218
|
-
var
|
|
22253
|
+
var import_lucide_react65, import_react79, import_jsx_runtime106;
|
|
22219
22254
|
var init_NicknameData = __esm({
|
|
22220
22255
|
"src/internal/components/SendMenu/send/components/NicknameData.tsx"() {
|
|
22221
|
-
|
|
22256
|
+
import_lucide_react65 = require("lucide-react");
|
|
22222
22257
|
import_react79 = require("react");
|
|
22223
22258
|
init_no_image();
|
|
22224
22259
|
init_utils2();
|
|
@@ -22433,7 +22468,7 @@ function InputSendStep(props) {
|
|
|
22433
22468
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(AssetInputIcon, { asset: selectedAsset }),
|
|
22434
22469
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: (isNft ? selectedAsset.nftMetadata?.name || selectedAsset.symbol : selectedAsset.name).toUpperCase() })
|
|
22435
22470
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "No Asset Selected" }),
|
|
22436
|
-
isAssetsLoading && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22471
|
+
isAssetsLoading && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.Loader, { className: "w-4 h-4 animate-spin" })
|
|
22437
22472
|
]
|
|
22438
22473
|
}
|
|
22439
22474
|
),
|
|
@@ -22441,13 +22476,13 @@ function InputSendStep(props) {
|
|
|
22441
22476
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22442
22477
|
Input,
|
|
22443
22478
|
{
|
|
22444
|
-
Icon: isNicknameInput ?
|
|
22479
|
+
Icon: isNicknameInput ? import_lucide_react66.AtSign : import_lucide_react66.Wallet2,
|
|
22445
22480
|
type: "text",
|
|
22446
22481
|
value: recipient,
|
|
22447
22482
|
disabled: isAssetsLoading,
|
|
22448
22483
|
onChange: (e) => setRecipient(e.target.value),
|
|
22449
22484
|
placeholder: "0x... or @nickname",
|
|
22450
|
-
element: isNicknameInput && isResolving ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22485
|
+
element: isNicknameInput && isResolving ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.Loader, { className: "w-4 h-4 animate-spin text-[var(--ui-kit-fg-muted)]" }) : null
|
|
22451
22486
|
}
|
|
22452
22487
|
),
|
|
22453
22488
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(NicknameData, { resolvedNicknameData, isNicknameInput }),
|
|
@@ -22456,7 +22491,7 @@ function InputSendStep(props) {
|
|
|
22456
22491
|
!isNft && selectedAsset && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("span", { className: "block text-[10px]", children: [
|
|
22457
22492
|
t("passport:common.balance"),
|
|
22458
22493
|
" ",
|
|
22459
|
-
isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22494
|
+
isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.Loader, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("span", { className: "text-[var(--ui-kit-fg)] font-semibold", children: [
|
|
22460
22495
|
formatPrice(balanceData.formatted),
|
|
22461
22496
|
" ",
|
|
22462
22497
|
balanceData.symbol
|
|
@@ -22483,13 +22518,13 @@ function InputSendStep(props) {
|
|
|
22483
22518
|
type: isComplianceLoading ? "info" : erc3643CanTransfer ? "success" : "error",
|
|
22484
22519
|
className: "flex gap-[var(--ui-kit-gap)]",
|
|
22485
22520
|
children: isComplianceLoading ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
22486
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22521
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.Loader, { className: "h-4 w-4 animate-spin" }),
|
|
22487
22522
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "Checking compliance..." })
|
|
22488
22523
|
] }) : erc3643CanTransfer ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
22489
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22524
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.CheckCircle2, { className: "h-4 w-4" }),
|
|
22490
22525
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "Transfer compliant" })
|
|
22491
22526
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
22492
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
22527
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react66.AlertCircle, { className: "h-4 w-4" }),
|
|
22493
22528
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: complianceError || "Transfer not allowed" })
|
|
22494
22529
|
] })
|
|
22495
22530
|
}
|
|
@@ -22509,12 +22544,12 @@ function InputSendStep(props) {
|
|
|
22509
22544
|
)
|
|
22510
22545
|
] });
|
|
22511
22546
|
}
|
|
22512
|
-
var
|
|
22547
|
+
var import_lucide_react66, import_viem18, import_jsx_runtime107;
|
|
22513
22548
|
var init_InputSendStep = __esm({
|
|
22514
22549
|
"src/internal/components/SendMenu/send/sendSteps/InputSendStep.tsx"() {
|
|
22515
22550
|
init_SessionContext();
|
|
22516
22551
|
init_useT();
|
|
22517
|
-
|
|
22552
|
+
import_lucide_react66 = require("lucide-react");
|
|
22518
22553
|
import_viem18 = require("viem");
|
|
22519
22554
|
init_priceFormatter();
|
|
22520
22555
|
init_button();
|
|
@@ -22568,11 +22603,11 @@ function ConfirmSendStep(props) {
|
|
|
22568
22603
|
});
|
|
22569
22604
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
22570
22605
|
isNicknameInput && isFrozen && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
22571
|
-
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
22606
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.AlertTriangle, { className: "h-4 w-4" }),
|
|
22572
22607
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { children: "This handle is frozen. Proceed with caution." })
|
|
22573
22608
|
] }),
|
|
22574
22609
|
isSecurity && erc3643CanTransfer && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Highlight, { type: "success", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
22575
|
-
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
22610
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.Shield, { className: "h-4 w-4 flex-shrink-0" }),
|
|
22576
22611
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { children: "Security token compliance verified" })
|
|
22577
22612
|
] }),
|
|
22578
22613
|
!isNft && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex justify-between leading-5", children: [
|
|
@@ -22595,7 +22630,7 @@ function ConfirmSendStep(props) {
|
|
|
22595
22630
|
alt: nicknameData.handle,
|
|
22596
22631
|
className: "w-12 h-12 rounded-full object-cover flex-shrink-0"
|
|
22597
22632
|
}
|
|
22598
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
22633
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.AtSign, { className: "w-6 h-6" }) }),
|
|
22599
22634
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
22600
22635
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "font-medium text-[14px] leading-4 truncate", children: nicknameData.handle }),
|
|
22601
22636
|
nicknameData.fingerprint && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
@@ -22606,7 +22641,7 @@ function ConfirmSendStep(props) {
|
|
|
22606
22641
|
isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
|
|
22607
22642
|
),
|
|
22608
22643
|
children: [
|
|
22609
|
-
isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
22644
|
+
isFingerprintVerified ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.ShieldCheck, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.ShieldAlert, { className: "w-4 h-4 flex-shrink-0" }),
|
|
22610
22645
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { children: [
|
|
22611
22646
|
"Fingerprint: ",
|
|
22612
22647
|
nicknameData.fingerprint
|
|
@@ -22688,20 +22723,20 @@ function ConfirmSendStep(props) {
|
|
|
22688
22723
|
className: "w-full",
|
|
22689
22724
|
size: "large",
|
|
22690
22725
|
children: [
|
|
22691
|
-
isTransactionPending && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
22726
|
+
isTransactionPending && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react67.Loader, { className: "h-4 w-4 animate-spin" }),
|
|
22692
22727
|
t("passport:common.confirm")
|
|
22693
22728
|
]
|
|
22694
22729
|
}
|
|
22695
22730
|
)
|
|
22696
22731
|
] });
|
|
22697
22732
|
}
|
|
22698
|
-
var import_react_query51,
|
|
22733
|
+
var import_react_query51, import_lucide_react67, import_jsx_runtime108;
|
|
22699
22734
|
var init_ConfirmSendStep = __esm({
|
|
22700
22735
|
"src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx"() {
|
|
22701
22736
|
init_SessionContext();
|
|
22702
22737
|
init_i18n();
|
|
22703
22738
|
import_react_query51 = require("@tanstack/react-query");
|
|
22704
|
-
|
|
22739
|
+
import_lucide_react67 = require("lucide-react");
|
|
22705
22740
|
init_priceFormatter();
|
|
22706
22741
|
init_utils2();
|
|
22707
22742
|
init_button();
|
|
@@ -22840,7 +22875,7 @@ function SendMenu() {
|
|
|
22840
22875
|
}
|
|
22841
22876
|
),
|
|
22842
22877
|
txStep === "pending" && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
22843
|
-
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
22878
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react68.Loader, { className: "h-4 w-4 animate-spin" }),
|
|
22844
22879
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { className: "flex-1", children: [
|
|
22845
22880
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "block leading-4 font-semibold", children: t("passport:sendMenu.pendingStep") }),
|
|
22846
22881
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { children: t("passport:sendMenu.pendingStepMsg") })
|
|
@@ -22848,7 +22883,7 @@ function SendMenu() {
|
|
|
22848
22883
|
] }),
|
|
22849
22884
|
txStep === "success" && userOpHash && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_jsx_runtime109.Fragment, { children: [
|
|
22850
22885
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Highlight, { type: "success", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
22851
|
-
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
22886
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react68.CheckCircle2, { className: "h-4 w-4" }),
|
|
22852
22887
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { className: "flex-1", children: [
|
|
22853
22888
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "block leading-4 font-semibold", children: "Transaction Initiated" }),
|
|
22854
22889
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { children: "Your transaction is being processed and might take some time to accomplish. Visit your transaction history for details." })
|
|
@@ -22866,7 +22901,7 @@ function SendMenu() {
|
|
|
22866
22901
|
] })
|
|
22867
22902
|
] });
|
|
22868
22903
|
}
|
|
22869
|
-
var
|
|
22904
|
+
var import_lucide_react68, import_react80, import_viem19, import_jsx_runtime109;
|
|
22870
22905
|
var init_SendMenu = __esm({
|
|
22871
22906
|
"src/internal/components/SendMenu/send/SendMenu.tsx"() {
|
|
22872
22907
|
init_SessionContext();
|
|
@@ -22874,7 +22909,7 @@ var init_SendMenu = __esm({
|
|
|
22874
22909
|
init_useNicknameResolve();
|
|
22875
22910
|
init_useSendTransaction();
|
|
22876
22911
|
init_useT();
|
|
22877
|
-
|
|
22912
|
+
import_lucide_react68 = require("lucide-react");
|
|
22878
22913
|
import_react80 = require("react");
|
|
22879
22914
|
import_viem19 = require("viem");
|
|
22880
22915
|
init_useBlockscoutAssets();
|
|
@@ -22926,7 +22961,7 @@ function SelectorFlowButtons() {
|
|
|
22926
22961
|
useFlowSelectorStore.getState().setFlow("send");
|
|
22927
22962
|
},
|
|
22928
22963
|
children: [
|
|
22929
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
22964
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react69.ArrowRightIcon, { className: "h-4 w-4" }),
|
|
22930
22965
|
t("passport:sendMenu.actions.send")
|
|
22931
22966
|
]
|
|
22932
22967
|
}
|
|
@@ -22942,7 +22977,7 @@ function SelectorFlowButtons() {
|
|
|
22942
22977
|
useFlowSelectorStore.getState().setFlow("bridge");
|
|
22943
22978
|
},
|
|
22944
22979
|
children: [
|
|
22945
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
22980
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react69.ArrowRightLeftIcon, { className: "h-4 w-4" }),
|
|
22946
22981
|
t("passport:bridgeMenu.actions.bridge")
|
|
22947
22982
|
]
|
|
22948
22983
|
}
|
|
@@ -23007,7 +23042,7 @@ function SendFlowSelector() {
|
|
|
23007
23042
|
}
|
|
23008
23043
|
}
|
|
23009
23044
|
},
|
|
23010
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
23045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react69.ArrowLeft, { className: "h-4 w-4" })
|
|
23011
23046
|
}
|
|
23012
23047
|
),
|
|
23013
23048
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-xl font-semibold", children: menuTitle })
|
|
@@ -23018,7 +23053,7 @@ function SendFlowSelector() {
|
|
|
23018
23053
|
SELECTOR_FLOW[selectorFlow],
|
|
23019
23054
|
error && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Highlight, { type: "error", className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
23020
23055
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "w-full flex gap-[var(--ui-kit-gap)]", children: [
|
|
23021
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
23056
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react69.InfoIcon, { className: "h-4 w-4 flex-none" }),
|
|
23022
23057
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: error })
|
|
23023
23058
|
] }),
|
|
23024
23059
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
@@ -23037,11 +23072,11 @@ function SendFlowSelector() {
|
|
|
23037
23072
|
}
|
|
23038
23073
|
);
|
|
23039
23074
|
}
|
|
23040
|
-
var
|
|
23075
|
+
var import_lucide_react69, import_react81, import_jsx_runtime110, SELECTOR_FLOW;
|
|
23041
23076
|
var init_SendFlowSelector = __esm({
|
|
23042
23077
|
"src/internal/components/SendMenu/SendFlowSelector.tsx"() {
|
|
23043
23078
|
init_i18n();
|
|
23044
|
-
|
|
23079
|
+
import_lucide_react69 = require("lucide-react");
|
|
23045
23080
|
import_react81 = require("react");
|
|
23046
23081
|
init_useLayoutDataStore();
|
|
23047
23082
|
init_useLayoutStore();
|
|
@@ -23109,19 +23144,19 @@ var init_pro_mode = __esm({
|
|
|
23109
23144
|
});
|
|
23110
23145
|
|
|
23111
23146
|
// src/internal/components/SettingsMenu/constants.ts
|
|
23112
|
-
var
|
|
23147
|
+
var import_lucide_react70, NAV_BUTTONS;
|
|
23113
23148
|
var init_constants6 = __esm({
|
|
23114
23149
|
"src/internal/components/SettingsMenu/constants.ts"() {
|
|
23115
|
-
|
|
23150
|
+
import_lucide_react70 = require("lucide-react");
|
|
23116
23151
|
init_icons();
|
|
23117
23152
|
NAV_BUTTONS = [
|
|
23118
|
-
{ id: "transactions" /* TRANSACTIONS */, name: "passport:transactionsMenu.title", Icon:
|
|
23153
|
+
{ id: "transactions" /* TRANSACTIONS */, name: "passport:transactionsMenu.title", Icon: import_lucide_react70.ArrowLeftRight },
|
|
23119
23154
|
{ id: "kyc" /* KYC */, name: "passport:kycMenu.title", Icon: kyc_default },
|
|
23120
|
-
{ id: "nickname-settings" /* NICKNAME_SETTINGS */, name: "passport:nicknameMenu.title", Icon:
|
|
23121
|
-
{ id: "manage-wallet" /* MANAGE_WALLET */, name: "passport:profilesMenu.title", Icon:
|
|
23122
|
-
{ id: "security" /* SECURITY */, name: "passport:securityMenu.title", Icon:
|
|
23123
|
-
{ id: "keysare-backup" /* KEYSARE_BACKUP */, name: "passport:backupMenu.title", Icon:
|
|
23124
|
-
{ id: "chain" /* CHAIN */, name: "passport:chainMenu.title", Icon:
|
|
23155
|
+
{ id: "nickname-settings" /* NICKNAME_SETTINGS */, name: "passport:nicknameMenu.title", Icon: import_lucide_react70.AtSign },
|
|
23156
|
+
{ id: "manage-wallet" /* MANAGE_WALLET */, name: "passport:profilesMenu.title", Icon: import_lucide_react70.UsersRound },
|
|
23157
|
+
{ id: "security" /* SECURITY */, name: "passport:securityMenu.title", Icon: import_lucide_react70.LockKeyhole },
|
|
23158
|
+
{ id: "keysare-backup" /* KEYSARE_BACKUP */, name: "passport:backupMenu.title", Icon: import_lucide_react70.DatabaseBackup },
|
|
23159
|
+
{ id: "chain" /* CHAIN */, name: "passport:chainMenu.title", Icon: import_lucide_react70.Link2 }
|
|
23125
23160
|
];
|
|
23126
23161
|
}
|
|
23127
23162
|
});
|
|
@@ -23142,7 +23177,7 @@ function useSettingsButtons() {
|
|
|
23142
23177
|
}
|
|
23143
23178
|
});
|
|
23144
23179
|
if (proMode) {
|
|
23145
|
-
settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon:
|
|
23180
|
+
settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: import_lucide_react71.HardDrive });
|
|
23146
23181
|
}
|
|
23147
23182
|
(0, import_react83.useEffect)(() => {
|
|
23148
23183
|
const cssvEl = document.querySelector(".embarkai-ui-scope");
|
|
@@ -23183,7 +23218,7 @@ function SettingsMenu() {
|
|
|
23183
23218
|
className: "list-scrollbar-y w-full p-[var(--ui-kit-pd)] flex flex-col gap-[var(--ui-kit-gap)]",
|
|
23184
23219
|
children: [
|
|
23185
23220
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
23186
|
-
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("main-menu" /* MAIN_MENU */), children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
23221
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("main-menu" /* MAIN_MENU */), children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_lucide_react71.ArrowLeft, { className: "h-4 w-4" }) }),
|
|
23187
23222
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "text-xl font-semibold", children: t("passport:common.settings") })
|
|
23188
23223
|
] }),
|
|
23189
23224
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: settingsButtons.map((el) => ({ ...el, onClick: () => setPage(el.id) })).map(({ id, name, Icon: Icon2, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
@@ -23208,14 +23243,14 @@ function SettingsMenu() {
|
|
|
23208
23243
|
}
|
|
23209
23244
|
);
|
|
23210
23245
|
}
|
|
23211
|
-
var import_react_query52,
|
|
23246
|
+
var import_react_query52, import_lucide_react71, import_react83, import_jsx_runtime111;
|
|
23212
23247
|
var init_SettingsMenu = __esm({
|
|
23213
23248
|
"src/internal/components/SettingsMenu/SettingsMenu.tsx"() {
|
|
23214
23249
|
init_ProviderContext();
|
|
23215
23250
|
init_SessionContext();
|
|
23216
23251
|
init_i18n();
|
|
23217
23252
|
import_react_query52 = require("@tanstack/react-query");
|
|
23218
|
-
|
|
23253
|
+
import_lucide_react71 = require("lucide-react");
|
|
23219
23254
|
import_react83 = require("react");
|
|
23220
23255
|
init_nickname();
|
|
23221
23256
|
init_profile();
|
|
@@ -23250,7 +23285,7 @@ function TermsOfService() {
|
|
|
23250
23285
|
size: "icon",
|
|
23251
23286
|
title: "Back",
|
|
23252
23287
|
onClick: () => setPage(!!address ? "settings" /* SETTINGS */ : "auth" /* AUTH */),
|
|
23253
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
23288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_lucide_react72.ArrowLeft, { className: "h-4 w-4" })
|
|
23254
23289
|
}
|
|
23255
23290
|
),
|
|
23256
23291
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "text-xl font-semibold", children: "Terms of Service" })
|
|
@@ -23261,11 +23296,11 @@ function TermsOfService() {
|
|
|
23261
23296
|
] })
|
|
23262
23297
|
] });
|
|
23263
23298
|
}
|
|
23264
|
-
var
|
|
23299
|
+
var import_lucide_react72, import_jsx_runtime112;
|
|
23265
23300
|
var init_TermsOfService = __esm({
|
|
23266
23301
|
"src/internal/components/TermsOfService.tsx"() {
|
|
23267
23302
|
init_SessionContext();
|
|
23268
|
-
|
|
23303
|
+
import_lucide_react72 = require("lucide-react");
|
|
23269
23304
|
init_useLayoutDataStore();
|
|
23270
23305
|
init_button();
|
|
23271
23306
|
init_highlight();
|
|
@@ -23992,7 +24027,7 @@ function TransactionsGroup(props) {
|
|
|
23992
24027
|
children: [
|
|
23993
24028
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
23994
24029
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center gap-1 flex-0 w-fit", children: [
|
|
23995
|
-
parent.direction === "in" ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24030
|
+
parent.direction === "in" ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react73.ChevronLeft, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react73.ChevronRight, { className: "w-4 h-4" }),
|
|
23996
24031
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "text-[10px] uppercase", children: isIncoming ? t("passport:common.received") : t("passport:common.sent") }),
|
|
23997
24032
|
parent.status === "ok" ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(PositiveIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(NegativeIcon, {})
|
|
23998
24033
|
] }),
|
|
@@ -24020,7 +24055,7 @@ function TransactionsGroup(props) {
|
|
|
24020
24055
|
onClick: (e) => {
|
|
24021
24056
|
e.stopPropagation();
|
|
24022
24057
|
},
|
|
24023
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react73.Copy, { className: "w-4 h-4" })
|
|
24024
24059
|
}
|
|
24025
24060
|
) })
|
|
24026
24061
|
] }),
|
|
@@ -24046,7 +24081,7 @@ function TransactionsGroup(props) {
|
|
|
24046
24081
|
internalsToRender.length,
|
|
24047
24082
|
")"
|
|
24048
24083
|
] }),
|
|
24049
|
-
expanded ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24084
|
+
expanded ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react73.ChevronUp, { className: "w-4 h-4 text-[var(--ui-kit-fg-muted)]" }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react73.ChevronDown, { className: "w-4 h-4 text-[var(--ui-kit-fg-muted)]" })
|
|
24050
24085
|
]
|
|
24051
24086
|
}
|
|
24052
24087
|
),
|
|
@@ -24067,11 +24102,11 @@ function TransactionsGroup(props) {
|
|
|
24067
24102
|
}
|
|
24068
24103
|
);
|
|
24069
24104
|
}
|
|
24070
|
-
var
|
|
24105
|
+
var import_lucide_react73, import_jsx_runtime113;
|
|
24071
24106
|
var init_TransactionsGroup = __esm({
|
|
24072
24107
|
"src/internal/components/TransactionsMenu/TransactionsGroup.tsx"() {
|
|
24073
24108
|
init_i18n();
|
|
24074
|
-
|
|
24109
|
+
import_lucide_react73 = require("lucide-react");
|
|
24075
24110
|
init_icons();
|
|
24076
24111
|
init_utils2();
|
|
24077
24112
|
init_button();
|
|
@@ -24116,7 +24151,7 @@ function TransactionsMenu() {
|
|
|
24116
24151
|
className: "list-scrollbar-y w-full p-[var(--ui-kit-pd)]",
|
|
24117
24152
|
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
24118
24153
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
24119
|
-
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24154
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react74.ArrowLeft, { className: "h-4 w-4" }) }),
|
|
24120
24155
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "text-xl font-semibold", children: t("passport:transactionsMenu.title") }),
|
|
24121
24156
|
historySupported && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24122
24157
|
Button,
|
|
@@ -24126,14 +24161,14 @@ function TransactionsMenu() {
|
|
|
24126
24161
|
onClick: refreshTxHistory,
|
|
24127
24162
|
disabled: isTxHistoryFetching,
|
|
24128
24163
|
title: "Refresh transactions",
|
|
24129
|
-
children: isTxHistoryFetching ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24164
|
+
children: isTxHistoryFetching ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react74.Loader, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react74.RefreshCw, { className: "h-4 w-4" })
|
|
24130
24165
|
}
|
|
24131
24166
|
)
|
|
24132
24167
|
] }),
|
|
24133
24168
|
!historySupported && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Highlight, { type: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { children: t("passport:transactionsMenu.comingSoon") }) }),
|
|
24134
|
-
historySupported && isTxHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24169
|
+
historySupported && isTxHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react74.Loader, { className: "w-4 h-4 animate-spin" }) }),
|
|
24135
24170
|
historySupported && !isTxHistoryLoading && txHistoryResolvedError && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
24136
|
-
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24171
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react74.XCircle, { className: "w-4 h-4 flex-none" }),
|
|
24137
24172
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "block w-full flex-1 text-center text-xs", children: txHistoryResolvedError })
|
|
24138
24173
|
] }),
|
|
24139
24174
|
historySupported && !isTxHistoryLoading && !txHistoryResolvedError && txHistoryGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Highlight, { type: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { children: t("passport:transactionsMenu.noTransactions") }) }),
|
|
@@ -24150,13 +24185,13 @@ function TransactionsMenu() {
|
|
|
24150
24185
|
}
|
|
24151
24186
|
);
|
|
24152
24187
|
}
|
|
24153
|
-
var import_react_query53,
|
|
24188
|
+
var import_react_query53, import_lucide_react74, import_react84, import_jsx_runtime114;
|
|
24154
24189
|
var init_TransactionsMenu = __esm({
|
|
24155
24190
|
"src/internal/components/TransactionsMenu/TransactionsMenu.tsx"() {
|
|
24156
24191
|
init_SessionContext();
|
|
24157
24192
|
init_i18n();
|
|
24158
24193
|
import_react_query53 = require("@tanstack/react-query");
|
|
24159
|
-
|
|
24194
|
+
import_lucide_react74 = require("lucide-react");
|
|
24160
24195
|
import_react84 = require("react");
|
|
24161
24196
|
init_useLayoutDataStore();
|
|
24162
24197
|
init_useLayoutStore();
|
|
@@ -24402,16 +24437,10 @@ var init_usePageMapper = __esm({
|
|
|
24402
24437
|
|
|
24403
24438
|
// src/internal/hooks/useSettingsNotifications.ts
|
|
24404
24439
|
function useSettingsNotifications() {
|
|
24405
|
-
const address = useSession((st) => st.address);
|
|
24406
24440
|
const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
|
|
24407
24441
|
const providers = import_auth23.jwtTokenManager.getProviders();
|
|
24408
24442
|
const hasEmail = providers.includes("email");
|
|
24409
|
-
const { data: userProfile = null } = (
|
|
24410
|
-
retry: false,
|
|
24411
|
-
enabled: !!address,
|
|
24412
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24413
|
-
queryFn: getUserProfile
|
|
24414
|
-
});
|
|
24443
|
+
const { data: userProfile = null } = useUserProfile();
|
|
24415
24444
|
(0, import_react86.useEffect)(() => {
|
|
24416
24445
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
24417
24446
|
setSettingsNotifications({
|
|
@@ -24426,15 +24455,13 @@ function useSettingsNotifications() {
|
|
|
24426
24455
|
});
|
|
24427
24456
|
}, [hasEmail, setSettingsNotifications]);
|
|
24428
24457
|
}
|
|
24429
|
-
var
|
|
24458
|
+
var import_react86, EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
|
|
24430
24459
|
var init_useSettingsNotifications = __esm({
|
|
24431
24460
|
"src/internal/hooks/useSettingsNotifications.ts"() {
|
|
24432
|
-
init_SessionContext();
|
|
24433
|
-
import_react_query54 = require("@tanstack/react-query");
|
|
24434
24461
|
import_react86 = require("react");
|
|
24435
24462
|
init_auth();
|
|
24436
|
-
init_profile();
|
|
24437
24463
|
init_useLayoutDataStore();
|
|
24464
|
+
init_useUserProfile();
|
|
24438
24465
|
EMAIL_NOT_CONNECTED_NOTIFICATION = {
|
|
24439
24466
|
id: "email-not-connected",
|
|
24440
24467
|
target: "manage-wallet" /* MANAGE_WALLET */,
|
|
@@ -24454,7 +24481,7 @@ var init_package = __esm({
|
|
|
24454
24481
|
"package.json"() {
|
|
24455
24482
|
package_default = {
|
|
24456
24483
|
name: "@embarkai/ui-kit",
|
|
24457
|
-
version: "0.4.
|
|
24484
|
+
version: "0.4.59",
|
|
24458
24485
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24459
24486
|
type: "module",
|
|
24460
24487
|
main: "./dist/index.cjs",
|
|
@@ -24556,7 +24583,7 @@ var init_package = __esm({
|
|
|
24556
24583
|
|
|
24557
24584
|
// src/internal/components/Footer/Footer.tsx
|
|
24558
24585
|
function Footer() {
|
|
24559
|
-
const qc = (0,
|
|
24586
|
+
const qc = (0, import_react_query54.useQueryClient)();
|
|
24560
24587
|
const { callbacksRef } = useProviderConfig();
|
|
24561
24588
|
const { t } = useT();
|
|
24562
24589
|
const address = useSession((st) => st.address);
|
|
@@ -24573,7 +24600,7 @@ function Footer() {
|
|
|
24573
24600
|
}
|
|
24574
24601
|
}
|
|
24575
24602
|
});
|
|
24576
|
-
const { mutate: disconnect, isPending: isDisconnecting } = (0,
|
|
24603
|
+
const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query54.useMutation)({
|
|
24577
24604
|
mutationFn: async (disconnectAddress) => {
|
|
24578
24605
|
if (!disconnectAddress) throw new Error("No address to disconnect");
|
|
24579
24606
|
const { setError, setStatus, setIsLoading } = useSession.getState();
|
|
@@ -24640,7 +24667,7 @@ function Footer() {
|
|
|
24640
24667
|
disabled: isDisconnecting,
|
|
24641
24668
|
children: [
|
|
24642
24669
|
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: t("passport:auth.logout") }),
|
|
24643
|
-
isDisconnecting ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
24670
|
+
isDisconnecting ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react75.Loader, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react75.LogOut, { className: "w-4 h-4" })
|
|
24644
24671
|
]
|
|
24645
24672
|
}
|
|
24646
24673
|
) : null
|
|
@@ -24659,7 +24686,7 @@ function Footer() {
|
|
|
24659
24686
|
}
|
|
24660
24687
|
);
|
|
24661
24688
|
}
|
|
24662
|
-
var
|
|
24689
|
+
var import_react_query54, import_lucide_react75, import_wagmi7, import_jsx_runtime116;
|
|
24663
24690
|
var init_Footer = __esm({
|
|
24664
24691
|
"src/internal/components/Footer/Footer.tsx"() {
|
|
24665
24692
|
init_package();
|
|
@@ -24667,8 +24694,8 @@ var init_Footer = __esm({
|
|
|
24667
24694
|
init_ProviderContext();
|
|
24668
24695
|
init_SessionContext();
|
|
24669
24696
|
init_i18n();
|
|
24670
|
-
|
|
24671
|
-
|
|
24697
|
+
import_react_query54 = require("@tanstack/react-query");
|
|
24698
|
+
import_lucide_react75 = require("lucide-react");
|
|
24672
24699
|
import_wagmi7 = require("wagmi");
|
|
24673
24700
|
init_auth();
|
|
24674
24701
|
init_base2();
|
|
@@ -24722,12 +24749,7 @@ function Header() {
|
|
|
24722
24749
|
}, 1e3);
|
|
24723
24750
|
}
|
|
24724
24751
|
}, []);
|
|
24725
|
-
const { data: profile, isLoading: isProfileLoading } = (
|
|
24726
|
-
retry: false,
|
|
24727
|
-
enabled: !!address,
|
|
24728
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24729
|
-
queryFn: getUserProfile
|
|
24730
|
-
});
|
|
24752
|
+
const { data: profile, isLoading: isProfileLoading } = useUserProfile();
|
|
24731
24753
|
const avatar = profile?.avatar || import_auth23.jwtTokenManager.getAvatar();
|
|
24732
24754
|
const displayName = profile?.nicknameDisplay || profile?.displayName || import_auth23.jwtTokenManager.getDisplayName();
|
|
24733
24755
|
const ChainIcon = NETWORK_OPTIONS.find((net) => net.chainId === chainConfig.id)?.Icon || (() => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "flex-none w-4 h-4 rounded-full flex items-center justify-center bg-[var(--ui-kit-primary)]", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "text-[var(--ui-kit-fg-inverted)] text-xs font-bold", children: chainConfig.name.charAt(0) }) }));
|
|
@@ -24755,7 +24777,7 @@ function Header() {
|
|
|
24755
24777
|
style: { width: "calc(100% - 48px - var(--ui-kit-gap))" },
|
|
24756
24778
|
className: "flex-1 flex flex-col justify-center gap-1",
|
|
24757
24779
|
children: [
|
|
24758
|
-
isProfileLoading && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24780
|
+
isProfileLoading && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react76.Loader, { className: "w-4 h-4 animate-spin" }),
|
|
24759
24781
|
!!address && !isProfileLoading && !!profile && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
|
|
24760
24782
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "w-full flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
24761
24783
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
@@ -24793,7 +24815,7 @@ function Header() {
|
|
|
24793
24815
|
setTimeout(() => setCopied(false), 1500);
|
|
24794
24816
|
},
|
|
24795
24817
|
children: [
|
|
24796
|
-
copied ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(PositiveIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24818
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(PositiveIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react76.Copy, { className: "w-4 h-4" }),
|
|
24797
24819
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "uppercase", children: t("passport:common.copy") })
|
|
24798
24820
|
]
|
|
24799
24821
|
}
|
|
@@ -24804,7 +24826,7 @@ function Header() {
|
|
|
24804
24826
|
}
|
|
24805
24827
|
);
|
|
24806
24828
|
}
|
|
24807
|
-
var
|
|
24829
|
+
var import_lucide_react76, import_react87, import_jsx_runtime117;
|
|
24808
24830
|
var init_Header = __esm({
|
|
24809
24831
|
"src/internal/components/Header/Header.tsx"() {
|
|
24810
24832
|
init_lumia2();
|
|
@@ -24812,12 +24834,11 @@ var init_Header = __esm({
|
|
|
24812
24834
|
init_ProviderContext();
|
|
24813
24835
|
init_SessionContext();
|
|
24814
24836
|
init_useT();
|
|
24815
|
-
|
|
24816
|
-
import_lucide_react77 = require("lucide-react");
|
|
24837
|
+
import_lucide_react76 = require("lucide-react");
|
|
24817
24838
|
import_react87 = require("react");
|
|
24818
24839
|
init_icons();
|
|
24819
24840
|
init_auth();
|
|
24820
|
-
|
|
24841
|
+
init_useUserProfile();
|
|
24821
24842
|
init_pro_mode();
|
|
24822
24843
|
init_utils2();
|
|
24823
24844
|
init_BalanceView2();
|
|
@@ -24845,7 +24866,7 @@ function useDecideContentStyles() {
|
|
|
24845
24866
|
style: (0, import_lodash_es13.merge)({}, mobileStyles)
|
|
24846
24867
|
};
|
|
24847
24868
|
}
|
|
24848
|
-
var DialogPrimitive, import_lodash_es13,
|
|
24869
|
+
var DialogPrimitive, import_lodash_es13, import_lucide_react77, import_react88, import_jsx_runtime118, Dialog, DialogPortal, DialogOverlay, CONTENT_BG_SETUP, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription;
|
|
24849
24870
|
var init_dialog = __esm({
|
|
24850
24871
|
"src/internal/components/ui/dialog.tsx"() {
|
|
24851
24872
|
init_utils2();
|
|
@@ -24853,7 +24874,7 @@ var init_dialog = __esm({
|
|
|
24853
24874
|
init_i18n();
|
|
24854
24875
|
DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
24855
24876
|
import_lodash_es13 = require("lodash-es");
|
|
24856
|
-
|
|
24877
|
+
import_lucide_react77 = require("lucide-react");
|
|
24857
24878
|
import_react88 = require("react");
|
|
24858
24879
|
init_useLayoutDataStore();
|
|
24859
24880
|
init_useLayoutStore();
|
|
@@ -24951,7 +24972,7 @@ var init_dialog = __esm({
|
|
|
24951
24972
|
onClick: () => setPage("settings" /* SETTINGS */),
|
|
24952
24973
|
children: [
|
|
24953
24974
|
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "sr-only", children: t("passport:common.settings") }),
|
|
24954
|
-
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24975
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react77.SlidersHorizontal, { className: "w-4 h-4" }),
|
|
24955
24976
|
!!settingsNotifications.length && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24956
24977
|
"div",
|
|
24957
24978
|
{
|
|
@@ -24967,7 +24988,7 @@ var init_dialog = __esm({
|
|
|
24967
24988
|
}
|
|
24968
24989
|
),
|
|
24969
24990
|
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Button, { variant: "ghost", size: "icon", className: "w-4 h-4", children: [
|
|
24970
|
-
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24991
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react77.X, { className: "h-4 w-4" }),
|
|
24971
24992
|
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "sr-only", children: t("passport:common.close") })
|
|
24972
24993
|
] }) })
|
|
24973
24994
|
]
|
|
@@ -25145,7 +25166,7 @@ var init_TssManager = __esm({
|
|
|
25145
25166
|
|
|
25146
25167
|
// src/internal/components/WalletConnectHandler.tsx
|
|
25147
25168
|
function WalletConnectHandler() {
|
|
25148
|
-
const qc = (0,
|
|
25169
|
+
const qc = (0, import_react_query55.useQueryClient)();
|
|
25149
25170
|
const { callbacksRef } = useProviderConfig();
|
|
25150
25171
|
const passportWalletAddress = useSession((st) => st.address);
|
|
25151
25172
|
const { address: walletAddress, isConnected, chain, connector } = (0, import_wagmi8.useAccount)();
|
|
@@ -25273,7 +25294,7 @@ function WalletConnectHandler() {
|
|
|
25273
25294
|
}
|
|
25274
25295
|
}, [isWalletLinking, setIsWalletLinking, disconnect]);
|
|
25275
25296
|
const isAuthFlow = !passportWalletAddress;
|
|
25276
|
-
const { mutate: handleWalletSign, isPending: isWalletSigning } = (0,
|
|
25297
|
+
const { mutate: handleWalletSign, isPending: isWalletSigning } = (0, import_react_query55.useMutation)({
|
|
25277
25298
|
mutationFn: async (payload) => {
|
|
25278
25299
|
const { chainId, signingWalletAddress } = payload;
|
|
25279
25300
|
if (!signingWalletAddress || !chainId) {
|
|
@@ -25406,14 +25427,14 @@ function WalletConnectHandler() {
|
|
|
25406
25427
|
]);
|
|
25407
25428
|
return null;
|
|
25408
25429
|
}
|
|
25409
|
-
var import_rainbowkit2,
|
|
25430
|
+
var import_rainbowkit2, import_react_query55, import_react91, import_wagmi8;
|
|
25410
25431
|
var init_WalletConnectHandler = __esm({
|
|
25411
25432
|
"src/internal/components/WalletConnectHandler.tsx"() {
|
|
25412
25433
|
init_ProviderContext();
|
|
25413
25434
|
init_SessionContext();
|
|
25414
25435
|
init_linkedProfiles();
|
|
25415
25436
|
import_rainbowkit2 = require("@rainbow-me/rainbowkit");
|
|
25416
|
-
|
|
25437
|
+
import_react_query55 = require("@tanstack/react-query");
|
|
25417
25438
|
import_react91 = __toESM(require("react"), 1);
|
|
25418
25439
|
import_wagmi8 = require("wagmi");
|
|
25419
25440
|
init_wallet();
|
|
@@ -26588,6 +26609,7 @@ __export(auth_exports, {
|
|
|
26588
26609
|
createPasskeyHelpers: () => createPasskeyHelpers,
|
|
26589
26610
|
createSignatureMessage: () => createSignatureMessage,
|
|
26590
26611
|
deriveDemoPrivateKey: () => deriveDemoPrivateKey,
|
|
26612
|
+
ensureFreshSession: () => import_auth23.ensureFreshSession,
|
|
26591
26613
|
ensureKeyshare: () => ensureKeyshare,
|
|
26592
26614
|
ensureValidToken: () => import_auth23.ensureValidToken,
|
|
26593
26615
|
fetchProjectName: () => fetchProjectName,
|
|
@@ -26955,8 +26977,8 @@ var init_iframe_manager = __esm({
|
|
|
26955
26977
|
async handleTokenRefreshRequest(message) {
|
|
26956
26978
|
try {
|
|
26957
26979
|
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
26958
|
-
const
|
|
26959
|
-
if (
|
|
26980
|
+
const outcome = await jwtTokenManager4.refreshTokens();
|
|
26981
|
+
if (outcome === "refreshed") {
|
|
26960
26982
|
const newAccessToken = jwtTokenManager4.getAccessToken();
|
|
26961
26983
|
if (this.iframe && this.iframe.contentWindow) {
|
|
26962
26984
|
const iframeOrigin = new URL(this.iframeUrl).origin;
|
|
@@ -26978,6 +27000,7 @@ var init_iframe_manager = __esm({
|
|
|
26978
27000
|
type: "IFRAME_MSG_TOKEN_REFRESHED",
|
|
26979
27001
|
messageId: message.messageId,
|
|
26980
27002
|
error: "Token refresh failed",
|
|
27003
|
+
sessionDead: outcome === "session_dead",
|
|
26981
27004
|
timestamp: Date.now()
|
|
26982
27005
|
},
|
|
26983
27006
|
iframeOrigin
|
|
@@ -28427,6 +28450,7 @@ __export(index_exports, {
|
|
|
28427
28450
|
PASSPORT_TRANSLATIONS: () => PASSPORT_TRANSLATIONS,
|
|
28428
28451
|
PageKey: () => PageKey,
|
|
28429
28452
|
Provider: () => Provider,
|
|
28453
|
+
SessionExpiredError: () => SessionExpiredError,
|
|
28430
28454
|
TOKENS_ICONS: () => TOKENS_ICONS,
|
|
28431
28455
|
ThemeToggle: () => ThemeToggle,
|
|
28432
28456
|
TransactionsList: () => TransactionsList,
|
|
@@ -28453,6 +28477,7 @@ __export(index_exports, {
|
|
|
28453
28477
|
getUserOperationReceipt: () => getUserOperationReceipt,
|
|
28454
28478
|
getUserProfile: () => getUserProfile,
|
|
28455
28479
|
getValidTokens: () => import_auth23.getValidTokens,
|
|
28480
|
+
isSessionExpiredError: () => isSessionExpiredError,
|
|
28456
28481
|
jwtTokenManager: () => import_auth23.jwtTokenManager,
|
|
28457
28482
|
logout: () => import_auth23.logout,
|
|
28458
28483
|
looksLikeNickname: () => looksLikeNickname,
|
|
@@ -28515,16 +28540,15 @@ init_ProviderContext();
|
|
|
28515
28540
|
// src/components/ConnectWalletButton.tsx
|
|
28516
28541
|
init_lumia2();
|
|
28517
28542
|
init_embarkAI2();
|
|
28518
|
-
var
|
|
28519
|
-
var import_lucide_react79 = require("lucide-react");
|
|
28543
|
+
var import_lucide_react78 = require("lucide-react");
|
|
28520
28544
|
var import_react96 = require("react");
|
|
28521
28545
|
init_SessionContext();
|
|
28522
28546
|
init_auth();
|
|
28523
|
-
init_profile();
|
|
28524
28547
|
init_BalanceView2();
|
|
28525
28548
|
init_KYC();
|
|
28526
28549
|
init_button();
|
|
28527
28550
|
init_useLayoutDataStore();
|
|
28551
|
+
init_useUserProfile();
|
|
28528
28552
|
init_useLayoutStore();
|
|
28529
28553
|
init_pro_mode();
|
|
28530
28554
|
init_utils2();
|
|
@@ -28551,12 +28575,7 @@ function ConnectWalletButton(props) {
|
|
|
28551
28575
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
|
|
28552
28576
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
28553
28577
|
(0, import_react96.useEffect)(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
28554
|
-
const { data: profile, isLoading: isProfileLoading } = (
|
|
28555
|
-
retry: false,
|
|
28556
|
-
enabled: !!address,
|
|
28557
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
28558
|
-
queryFn: getUserProfile
|
|
28559
|
-
});
|
|
28578
|
+
const { data: profile, isLoading: isProfileLoading } = useUserProfile();
|
|
28560
28579
|
const displayName = profile?.nicknameDisplay || profile?.displayName || import_auth23.jwtTokenManager.getDisplayName();
|
|
28561
28580
|
const indicators = (0, import_react96.useMemo)(() => {
|
|
28562
28581
|
const userId = session?.mpcUserId;
|
|
@@ -28574,7 +28593,7 @@ function ConnectWalletButton(props) {
|
|
|
28574
28593
|
disabled: isConnecting,
|
|
28575
28594
|
onClick: () => setPage("auth" /* AUTH */),
|
|
28576
28595
|
children: [
|
|
28577
|
-
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28596
|
+
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react78.Loader, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(embarkAI_default2, { className: "w-6 h-6" }),
|
|
28578
28597
|
connectButtonLabel
|
|
28579
28598
|
]
|
|
28580
28599
|
}
|
|
@@ -28595,7 +28614,7 @@ function ConnectWalletButton(props) {
|
|
|
28595
28614
|
"disabled:hover:bg-[var(--ui-kit-bg)] disabled:active:bg-[var(--ui-kit-bg)]"
|
|
28596
28615
|
),
|
|
28597
28616
|
children: [
|
|
28598
|
-
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28617
|
+
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react78.Loader, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(embarkAI_default2, { className: "w-6 h-6" }),
|
|
28599
28618
|
connectButtonLabel.toUpperCase()
|
|
28600
28619
|
]
|
|
28601
28620
|
}
|
|
@@ -28618,15 +28637,15 @@ function ConnectWalletButton(props) {
|
|
|
28618
28637
|
] }),
|
|
28619
28638
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "text-left flex-1 min-w-0 text-[var(--ui-kit-fg)]", children: [
|
|
28620
28639
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
28621
|
-
isProfileLoading ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28622
|
-
|
|
28640
|
+
isProfileLoading ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react78.Loader, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "w-fit text-[14px] leading-4 truncate max-w-[144px] text-[var(--ui-kit-fg)]", children: displayName }),
|
|
28641
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(KYCStatus, {})
|
|
28623
28642
|
] }),
|
|
28624
28643
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(BalanceView, {})
|
|
28625
28644
|
] }),
|
|
28626
28645
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
28627
28646
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "group relative", children: [
|
|
28628
28647
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28629
|
-
|
|
28648
|
+
import_lucide_react78.Cloud,
|
|
28630
28649
|
{
|
|
28631
28650
|
className: `w-3 h-3 ${indicators.server ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28632
28651
|
}
|
|
@@ -28648,7 +28667,7 @@ function ConnectWalletButton(props) {
|
|
|
28648
28667
|
] }),
|
|
28649
28668
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "group relative", children: [
|
|
28650
28669
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28651
|
-
|
|
28670
|
+
import_lucide_react78.Laptop,
|
|
28652
28671
|
{
|
|
28653
28672
|
className: `w-3 h-3 ${indicators.local ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28654
28673
|
}
|
|
@@ -28670,7 +28689,7 @@ function ConnectWalletButton(props) {
|
|
|
28670
28689
|
] }),
|
|
28671
28690
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "group relative", children: [
|
|
28672
28691
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28673
|
-
|
|
28692
|
+
import_lucide_react78.Shield,
|
|
28674
28693
|
{
|
|
28675
28694
|
className: `w-3 h-3 ${indicators.backup ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28676
28695
|
}
|
|
@@ -28744,7 +28763,7 @@ init_useOpenPage();
|
|
|
28744
28763
|
init_useColorMode();
|
|
28745
28764
|
|
|
28746
28765
|
// src/components/ThemeToggle.tsx
|
|
28747
|
-
var
|
|
28766
|
+
var import_lucide_react79 = require("lucide-react");
|
|
28748
28767
|
init_useColorMode();
|
|
28749
28768
|
init_button();
|
|
28750
28769
|
init_utils2();
|
|
@@ -28765,7 +28784,7 @@ function ThemeToggle(props) {
|
|
|
28765
28784
|
variant: "ghost",
|
|
28766
28785
|
onClick: () => setColorMode(colorMode === "light" ? "dark" : "light"),
|
|
28767
28786
|
title: `Current theme: ${colorMode}. Click to switch.`,
|
|
28768
|
-
children: colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
28787
|
+
children: colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react79.Sun, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react79.Moon, { className: "w-4 h-4" })
|
|
28769
28788
|
}
|
|
28770
28789
|
)
|
|
28771
28790
|
}
|
|
@@ -28806,14 +28825,14 @@ function LangToggle(props) {
|
|
|
28806
28825
|
init_useLayoutDataStore();
|
|
28807
28826
|
|
|
28808
28827
|
// src/internal/components/UserOpStatus.tsx
|
|
28809
|
-
var
|
|
28828
|
+
var import_lucide_react81 = require("lucide-react");
|
|
28810
28829
|
var React29 = __toESM(require("react"), 1);
|
|
28811
28830
|
init_getUserOperationByHash();
|
|
28812
28831
|
init_getUserOperationReceipt();
|
|
28813
28832
|
init_cn();
|
|
28814
28833
|
|
|
28815
28834
|
// src/internal/components/Address.tsx
|
|
28816
|
-
var
|
|
28835
|
+
var import_lucide_react80 = require("lucide-react");
|
|
28817
28836
|
var React28 = __toESM(require("react"), 1);
|
|
28818
28837
|
init_cn();
|
|
28819
28838
|
init_button();
|
|
@@ -28857,7 +28876,7 @@ var Address = ({
|
|
|
28857
28876
|
} catch {
|
|
28858
28877
|
}
|
|
28859
28878
|
},
|
|
28860
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
28879
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_lucide_react80.Copy, { className: "h-4 w-4" })
|
|
28861
28880
|
}
|
|
28862
28881
|
),
|
|
28863
28882
|
showExplorer && explorer && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
@@ -28868,7 +28887,7 @@ var Address = ({
|
|
|
28868
28887
|
rel: "noreferrer noopener",
|
|
28869
28888
|
className: "inline-flex items-center justify-center h-10 w-10 rounded-md hover:bg-accent text-foreground",
|
|
28870
28889
|
title: "Open in explorer",
|
|
28871
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
28890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_lucide_react80.ExternalLink, { className: "h-4 w-4" })
|
|
28872
28891
|
}
|
|
28873
28892
|
)
|
|
28874
28893
|
] });
|
|
@@ -28993,30 +29012,30 @@ var UserOpStatus = ({
|
|
|
28993
29012
|
if (receipt) {
|
|
28994
29013
|
const ok = !!receipt.success;
|
|
28995
29014
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Badge, { variant: ok ? "success" : "destructive", children: [
|
|
28996
|
-
ok ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29015
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.CheckCircle2, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-3 w-3" }),
|
|
28997
29016
|
ok ? "Included" : "Failed"
|
|
28998
29017
|
] });
|
|
28999
29018
|
}
|
|
29000
29019
|
if (rejected) {
|
|
29001
29020
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Badge, { variant: "destructive", children: [
|
|
29002
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29021
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-3 w-3" }),
|
|
29003
29022
|
" Rejected by bundler"
|
|
29004
29023
|
] });
|
|
29005
29024
|
}
|
|
29006
29025
|
if (timedOut) {
|
|
29007
29026
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Badge, { variant: "warning", children: [
|
|
29008
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29027
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-3 w-3" }),
|
|
29009
29028
|
" Timeout - may be rejected"
|
|
29010
29029
|
] });
|
|
29011
29030
|
}
|
|
29012
29031
|
if (mempool) {
|
|
29013
29032
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Badge, { variant: "outline", children: [
|
|
29014
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29033
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.Clock, { className: "h-3 w-3" }),
|
|
29015
29034
|
" Pending in bundler"
|
|
29016
29035
|
] });
|
|
29017
29036
|
}
|
|
29018
29037
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Badge, { variant: "secondary", children: [
|
|
29019
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29038
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.Clock, { className: "h-3 w-3" }),
|
|
29020
29039
|
" Waiting"
|
|
29021
29040
|
] });
|
|
29022
29041
|
};
|
|
@@ -29035,7 +29054,7 @@ var UserOpStatus = ({
|
|
|
29035
29054
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs text-muted-foreground", children: "This is a UserOperation hash (EIP-4337), not a L2 tx hash." })
|
|
29036
29055
|
] }),
|
|
29037
29056
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Button, { variant: "ghost", size: "small", onClick: () => tick(), disabled: refreshing, className: "h-8", children: [
|
|
29038
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29057
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.RefreshCw, { className: cn2("h-3.5 w-3.5 mr-1", refreshing && "animate-spin") }),
|
|
29039
29058
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs", children: "Refresh" })
|
|
29040
29059
|
] })
|
|
29041
29060
|
] }),
|
|
@@ -29054,7 +29073,7 @@ var UserOpStatus = ({
|
|
|
29054
29073
|
} catch {
|
|
29055
29074
|
}
|
|
29056
29075
|
},
|
|
29057
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29076
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.Copy, { className: "h-3.5 w-3.5" })
|
|
29058
29077
|
}
|
|
29059
29078
|
)
|
|
29060
29079
|
] }),
|
|
@@ -29073,7 +29092,7 @@ var UserOpStatus = ({
|
|
|
29073
29092
|
} catch {
|
|
29074
29093
|
}
|
|
29075
29094
|
},
|
|
29076
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.Copy, { className: "h-3.5 w-3.5" })
|
|
29077
29096
|
}
|
|
29078
29097
|
),
|
|
29079
29098
|
chain?.blockExplorers?.default?.url && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
@@ -29084,7 +29103,7 @@ var UserOpStatus = ({
|
|
|
29084
29103
|
rel: "noreferrer noopener",
|
|
29085
29104
|
className: "inline-flex items-center justify-center h-8 w-8 rounded-md hover:bg-accent text-foreground",
|
|
29086
29105
|
title: "Open in explorer",
|
|
29087
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.ExternalLink, { className: "h-3.5 w-3.5" })
|
|
29088
29107
|
}
|
|
29089
29108
|
)
|
|
29090
29109
|
] }),
|
|
@@ -29113,16 +29132,16 @@ var UserOpStatus = ({
|
|
|
29113
29132
|
] })
|
|
29114
29133
|
] }),
|
|
29115
29134
|
error && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29116
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29135
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-4 w-4" }),
|
|
29117
29136
|
" ",
|
|
29118
29137
|
error
|
|
29119
29138
|
] }),
|
|
29120
29139
|
rejected && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29121
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29140
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-4 w-4" }),
|
|
29122
29141
|
"UserOperation was dropped from bundler mempool. This usually means it was invalid or replaced."
|
|
29123
29142
|
] }),
|
|
29124
29143
|
timedOut && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29125
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
29144
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react81.AlertCircle, { className: "h-4 w-4" }),
|
|
29126
29145
|
"Stopped polling after ",
|
|
29127
29146
|
Math.round(maxPollTimeMs / 1e3),
|
|
29128
29147
|
"s. UserOperation may have been rejected by the bundler."
|
|
@@ -29133,7 +29152,7 @@ var UserOpStatus = ({
|
|
|
29133
29152
|
};
|
|
29134
29153
|
|
|
29135
29154
|
// src/internal/components/Hash.tsx
|
|
29136
|
-
var
|
|
29155
|
+
var import_lucide_react82 = require("lucide-react");
|
|
29137
29156
|
var React30 = __toESM(require("react"), 1);
|
|
29138
29157
|
init_cn();
|
|
29139
29158
|
init_button();
|
|
@@ -29179,7 +29198,7 @@ var Hash = ({
|
|
|
29179
29198
|
} catch {
|
|
29180
29199
|
}
|
|
29181
29200
|
},
|
|
29182
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
29201
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react82.Copy, { className: "h-4 w-4" })
|
|
29183
29202
|
}
|
|
29184
29203
|
),
|
|
29185
29204
|
showExplorer && explorer && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
@@ -29190,7 +29209,7 @@ var Hash = ({
|
|
|
29190
29209
|
rel: "noreferrer noopener",
|
|
29191
29210
|
className: "inline-flex items-center justify-center h-10 w-10 rounded-md hover:bg-accent text-foreground",
|
|
29192
29211
|
title: "Open in explorer",
|
|
29193
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
29212
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react82.ExternalLink, { className: "h-4 w-4" })
|
|
29194
29213
|
}
|
|
29195
29214
|
)
|
|
29196
29215
|
] });
|
|
@@ -30110,6 +30129,7 @@ autorun();
|
|
|
30110
30129
|
PASSPORT_TRANSLATIONS,
|
|
30111
30130
|
PageKey,
|
|
30112
30131
|
Provider,
|
|
30132
|
+
SessionExpiredError,
|
|
30113
30133
|
TOKENS_ICONS,
|
|
30114
30134
|
ThemeToggle,
|
|
30115
30135
|
TransactionsList,
|
|
@@ -30136,6 +30156,7 @@ autorun();
|
|
|
30136
30156
|
getUserOperationReceipt,
|
|
30137
30157
|
getUserProfile,
|
|
30138
30158
|
getValidTokens,
|
|
30159
|
+
isSessionExpiredError,
|
|
30139
30160
|
jwtTokenManager,
|
|
30140
30161
|
logout,
|
|
30141
30162
|
looksLikeNickname,
|