@embarkai/ui-kit 0.4.32 → 0.4.33
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/_headers +3 -3
- package/dist/iframe/index.html +2 -2
- package/dist/iframe/main.js +69 -64
- package/dist/index.cjs +402 -286
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +319 -203
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -80,19 +80,22 @@ function getServiceUrls() {
|
|
|
80
80
|
const config = DEFAULT_PROVIDER_CONFIG;
|
|
81
81
|
const globalOverride = typeof window !== "undefined" && window.__EMBARK_SERVICES__ || {};
|
|
82
82
|
const searchParams = typeof window !== "undefined" ? new URLSearchParams(window.location.search) : void 0;
|
|
83
|
+
const paramAssetApi = searchParams?.get("assetApiUrl") || void 0;
|
|
83
84
|
const paramTss = searchParams?.get("tssUrl") || void 0;
|
|
84
85
|
const paramVault = searchParams?.get("shareVaultUrl") || void 0;
|
|
85
86
|
const paramDashboard = searchParams?.get("dashboardApiUrl") || void 0;
|
|
86
|
-
const
|
|
87
|
-
const
|
|
87
|
+
const buildAssetApi = "https://api.embarkai.io/on-ramp/api";
|
|
88
|
+
const buildTss = "https://api.embarkai.io/tss";
|
|
89
|
+
const buildVault = "https://api.embarkai.io/vault";
|
|
88
90
|
const buildRequireWasm = false;
|
|
89
91
|
const buildWasmDebug = false;
|
|
90
92
|
const defaultTss = "/tss";
|
|
91
93
|
const defaultVault = "/vault";
|
|
92
94
|
const result = {
|
|
95
|
+
assetApiUrl: paramAssetApi || globalOverride.assetApiUrl || buildAssetApi || config.services.assetApiUrl,
|
|
93
96
|
tssUrl: paramTss || globalOverride.tssUrl || buildTss || config.services.tssUrl || defaultTss,
|
|
94
97
|
shareVaultUrl: paramVault || globalOverride.shareVaultUrl || buildVault || config.services.shareVaultUrl || defaultVault,
|
|
95
|
-
dashboardApiUrl: paramDashboard || globalOverride.dashboardApiUrl || config.services.dashboardApiUrl || "https://dashboard.
|
|
98
|
+
dashboardApiUrl: paramDashboard || globalOverride.dashboardApiUrl || config.services.dashboardApiUrl || "https://dashboard.embarkai.io/api",
|
|
96
99
|
tssRequireWasm: globalOverride.tssRequireWasm ?? buildRequireWasm ?? config.services.tssRequireWasm ?? false,
|
|
97
100
|
tssWasmDebug: globalOverride.tssWasmDebug ?? buildWasmDebug ?? config.services.tssWasmDebug ?? false
|
|
98
101
|
};
|
|
@@ -100,8 +103,8 @@ function getServiceUrls() {
|
|
|
100
103
|
}
|
|
101
104
|
function getIframeUrl() {
|
|
102
105
|
const config = DEFAULT_PROVIDER_CONFIG;
|
|
103
|
-
const buildIframeUrl = "https://auth.
|
|
104
|
-
const iframeUrl = buildIframeUrl || config.services.iframeUrl || "https://auth.
|
|
106
|
+
const buildIframeUrl = "https://auth.embarkai.io";
|
|
107
|
+
const iframeUrl = buildIframeUrl || config.services.iframeUrl || "https://auth.embarkai.io";
|
|
105
108
|
return iframeUrl;
|
|
106
109
|
}
|
|
107
110
|
function getBlockscoutApiUrl(chainConfig) {
|
|
@@ -134,7 +137,7 @@ var init_initial = __esm({
|
|
|
134
137
|
icon: TelegramIcon,
|
|
135
138
|
comingSoon: false,
|
|
136
139
|
meta: {
|
|
137
|
-
botUsername: "
|
|
140
|
+
botUsername: "embark_ai_bot",
|
|
138
141
|
salt: "demo"
|
|
139
142
|
}
|
|
140
143
|
}
|
|
@@ -168,8 +171,8 @@ var init_initial = __esm({
|
|
|
168
171
|
// Will fallback to build-time env vars
|
|
169
172
|
shareVaultUrl: "",
|
|
170
173
|
// Will fallback to build-time env vars
|
|
171
|
-
iframeUrl:
|
|
172
|
-
// Secure iframe for MPC operations
|
|
174
|
+
// iframeUrl: '',
|
|
175
|
+
// iframeUrl: 'https://auth.embarkai.io', // Secure iframe for MPC operations
|
|
173
176
|
tssRequireWasm: false,
|
|
174
177
|
tssWasmDebug: false
|
|
175
178
|
},
|
|
@@ -5153,7 +5156,7 @@ var init_button = __esm({
|
|
|
5153
5156
|
buttonVariants = cva(
|
|
5154
5157
|
cn(
|
|
5155
5158
|
"cursor-pointer py-0",
|
|
5156
|
-
"inline-flex items-center justify-center
|
|
5159
|
+
"inline-flex items-center justify-center",
|
|
5157
5160
|
"transition-all duration-200",
|
|
5158
5161
|
"disabled:cursor-default disabled:opacity-50",
|
|
5159
5162
|
"whitespace-nowrap text-sm font-semibold font-sans",
|
|
@@ -5181,9 +5184,9 @@ var init_button = __esm({
|
|
|
5181
5184
|
)
|
|
5182
5185
|
},
|
|
5183
5186
|
size: {
|
|
5184
|
-
small: "h-6 px-2",
|
|
5185
|
-
medium: "h-8 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)]",
|
|
5186
|
-
large: "h-12 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)]",
|
|
5187
|
+
small: "h-6 px-2 gap-2",
|
|
5188
|
+
medium: "h-8 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] gap-2",
|
|
5189
|
+
large: "h-12 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] gap-[var(--ui-kit-gap)]",
|
|
5187
5190
|
icon: "h-8 w-8 p-0"
|
|
5188
5191
|
}
|
|
5189
5192
|
},
|
|
@@ -5386,7 +5389,7 @@ var init_en = __esm({
|
|
|
5386
5389
|
sender: "Sender",
|
|
5387
5390
|
bridgeAsset: "Bridge {{asset}}",
|
|
5388
5391
|
selectTokenAndRoute: "Select Token & Route",
|
|
5389
|
-
selectToken: "Select
|
|
5392
|
+
selectToken: "Select Asset",
|
|
5390
5393
|
estimations: "Estimations",
|
|
5391
5394
|
estimatedFee: "Estimated Fee",
|
|
5392
5395
|
availableChainPairs: "Available Chain Pairs",
|
|
@@ -7106,7 +7109,7 @@ function Social(props) {
|
|
|
7106
7109
|
};
|
|
7107
7110
|
let authConfig = provider?.meta || {};
|
|
7108
7111
|
if (normalizedProviderId === "telegram" && !authConfig.botUsername) {
|
|
7109
|
-
const defaultBotUsername = "
|
|
7112
|
+
const defaultBotUsername = "embark_ai_bot";
|
|
7110
7113
|
if (defaultBotUsername) {
|
|
7111
7114
|
authConfig = { ...authConfig, botUsername: defaultBotUsername };
|
|
7112
7115
|
}
|
|
@@ -10212,11 +10215,8 @@ async function getEstimates(payload) {
|
|
|
10212
10215
|
}
|
|
10213
10216
|
async function createWidgetUrlMutation(payload) {
|
|
10214
10217
|
const { iframeManager, accessToken } = iframe2();
|
|
10215
|
-
const
|
|
10216
|
-
|
|
10217
|
-
accessToken
|
|
10218
|
-
});
|
|
10219
|
-
return widgetUrlData;
|
|
10218
|
+
const response = await iframeManager.sendMessage("FINCHPAY_GET_WIDGET_URL_QUERY", { accessToken, payload });
|
|
10219
|
+
return response;
|
|
10220
10220
|
}
|
|
10221
10221
|
async function getTransactionList2(payload) {
|
|
10222
10222
|
const { iframeManager, accessToken } = iframe2();
|
|
@@ -13511,13 +13511,26 @@ async function beginPasskeyLinking() {
|
|
|
13511
13511
|
const begin2 = await res.json();
|
|
13512
13512
|
const options2 = {
|
|
13513
13513
|
rp: begin2.rp,
|
|
13514
|
-
user: {
|
|
13514
|
+
user: {
|
|
13515
|
+
id: base64urlToUint8Array(begin2.user.id),
|
|
13516
|
+
name: begin2.user.name,
|
|
13517
|
+
displayName: begin2.user.displayName
|
|
13518
|
+
},
|
|
13515
13519
|
challenge: base64urlToUint8Array(begin2.challenge),
|
|
13516
13520
|
pubKeyCredParams: begin2.pubKeyCredParams,
|
|
13517
13521
|
timeout: begin2.timeout,
|
|
13518
13522
|
attestation: begin2.attestation,
|
|
13519
|
-
authenticatorSelection: {
|
|
13520
|
-
|
|
13523
|
+
authenticatorSelection: {
|
|
13524
|
+
...begin2.authenticatorSelection,
|
|
13525
|
+
residentKey: begin2.authenticatorSelection?.residentKey ?? "preferred",
|
|
13526
|
+
requireResidentKey: begin2.authenticatorSelection?.requireResidentKey ?? false,
|
|
13527
|
+
userVerification: begin2.authenticatorSelection?.userVerification ?? "preferred"
|
|
13528
|
+
},
|
|
13529
|
+
excludeCredentials: begin2.excludeCredentials?.map((cred) => ({
|
|
13530
|
+
type: cred.type,
|
|
13531
|
+
id: base64urlToUint8Array(cred.id),
|
|
13532
|
+
transports: cred.transports
|
|
13533
|
+
})) || void 0
|
|
13521
13534
|
};
|
|
13522
13535
|
return { challengeId: begin2.challengeId, options: options2 };
|
|
13523
13536
|
}
|
|
@@ -13526,13 +13539,26 @@ async function beginPasskeyLinking() {
|
|
|
13526
13539
|
const begin = await res.json();
|
|
13527
13540
|
const options = {
|
|
13528
13541
|
rp: begin.rp,
|
|
13529
|
-
user: {
|
|
13542
|
+
user: {
|
|
13543
|
+
id: base64urlToUint8Array(begin.user.id),
|
|
13544
|
+
name: begin.user.name,
|
|
13545
|
+
displayName: begin.user.displayName
|
|
13546
|
+
},
|
|
13530
13547
|
challenge: base64urlToUint8Array(begin.challenge),
|
|
13531
13548
|
pubKeyCredParams: begin.pubKeyCredParams,
|
|
13532
13549
|
timeout: begin.timeout,
|
|
13533
13550
|
attestation: begin.attestation,
|
|
13534
|
-
authenticatorSelection: {
|
|
13535
|
-
|
|
13551
|
+
authenticatorSelection: {
|
|
13552
|
+
...begin.authenticatorSelection,
|
|
13553
|
+
residentKey: "preferred",
|
|
13554
|
+
requireResidentKey: false,
|
|
13555
|
+
userVerification: "preferred"
|
|
13556
|
+
},
|
|
13557
|
+
excludeCredentials: begin.excludeCredentials?.map((cred) => ({
|
|
13558
|
+
type: cred.type,
|
|
13559
|
+
id: base64urlToUint8Array(cred.id),
|
|
13560
|
+
transports: cred.transports
|
|
13561
|
+
})) || void 0
|
|
13536
13562
|
};
|
|
13537
13563
|
return { challengeId: begin.challengeId, options };
|
|
13538
13564
|
}
|
|
@@ -13570,7 +13596,7 @@ async function linkPasskeyWithWebAuthn(optionsOverride) {
|
|
|
13570
13596
|
try {
|
|
13571
13597
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
13572
13598
|
const friendlyDisplay = `EmbarkAI Wallet (${ts})`;
|
|
13573
|
-
const friendlyName = `
|
|
13599
|
+
const friendlyName = `embarkai.${ts}`;
|
|
13574
13600
|
const originalUser = publicKeyOptions.user;
|
|
13575
13601
|
publicKeyOptions = {
|
|
13576
13602
|
...publicKeyOptions,
|
|
@@ -13600,7 +13626,9 @@ async function linkPasskeyWithWebAuthn(optionsOverride) {
|
|
|
13600
13626
|
timeout: publicKeyOptions.timeout,
|
|
13601
13627
|
attestation: publicKeyOptions.attestation
|
|
13602
13628
|
});
|
|
13603
|
-
const credential = await navigator.credentials.create({
|
|
13629
|
+
const credential = await navigator.credentials.create({
|
|
13630
|
+
publicKey: { ...publicKeyOptions, ...optionsOverride }
|
|
13631
|
+
});
|
|
13604
13632
|
if (!credential) throw new Error("Passkey creation was cancelled");
|
|
13605
13633
|
const attestationPayload = credentialToAttestationPayload(credential);
|
|
13606
13634
|
const cid = challengeId || "local-" + Date.now();
|
|
@@ -13610,8 +13638,8 @@ async function linkPasskeyWithWebAuthn(optionsOverride) {
|
|
|
13610
13638
|
}
|
|
13611
13639
|
var init_passkey2 = __esm({
|
|
13612
13640
|
"src/internal/auth/providers/passkey.ts"() {
|
|
13613
|
-
init_auth();
|
|
13614
13641
|
init_base64url();
|
|
13642
|
+
init_auth();
|
|
13615
13643
|
init_webauthn();
|
|
13616
13644
|
init_types();
|
|
13617
13645
|
}
|
|
@@ -15515,12 +15543,11 @@ async function fetchToken(params = {}) {
|
|
|
15515
15543
|
if (!token) throw new Error("Invalid Sumsub token response");
|
|
15516
15544
|
return token;
|
|
15517
15545
|
}
|
|
15518
|
-
var DEFAULT_TTL_SECONDS
|
|
15546
|
+
var DEFAULT_TTL_SECONDS;
|
|
15519
15547
|
var init_sumsub = __esm({
|
|
15520
15548
|
"src/internal/components/KYC/api/sumsub.ts"() {
|
|
15521
15549
|
init_httpClient();
|
|
15522
15550
|
DEFAULT_TTL_SECONDS = 600;
|
|
15523
|
-
QUERY_KEYS3 = { sumsubToken: "sumsub-token" };
|
|
15524
15551
|
}
|
|
15525
15552
|
});
|
|
15526
15553
|
|
|
@@ -15592,11 +15619,9 @@ var init_SumsubIframeManager = __esm({
|
|
|
15592
15619
|
});
|
|
15593
15620
|
|
|
15594
15621
|
// src/internal/components/KYC/useSumsubIframe.ts
|
|
15595
|
-
import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
15596
15622
|
import { useEffect as useEffect29, useRef as useRef15, useState as useState16 } from "react";
|
|
15597
15623
|
function useSumsubIframe({ iframeUrl }) {
|
|
15598
15624
|
const config = useProviderConfig().config;
|
|
15599
|
-
const qc = useQueryClient12();
|
|
15600
15625
|
const { colorMode } = useColorMode();
|
|
15601
15626
|
const iframeRef = useRef15(null);
|
|
15602
15627
|
const [isLoading, setIsLoading] = useState16(true);
|
|
@@ -15617,15 +15642,9 @@ function useSumsubIframe({ iframeUrl }) {
|
|
|
15617
15642
|
iframeOrigin,
|
|
15618
15643
|
getToken: () => {
|
|
15619
15644
|
setStatus("Authenticating...");
|
|
15620
|
-
return
|
|
15621
|
-
queryKey: [QUERY_KEYS3.sumsubToken, levelName],
|
|
15622
|
-
queryFn: () => fetchToken({ levelName })
|
|
15623
|
-
});
|
|
15624
|
-
},
|
|
15625
|
-
refreshToken: async () => {
|
|
15626
|
-
const queryKey = [QUERY_KEYS3.sumsubToken, levelName];
|
|
15627
|
-
return qc.fetchQuery({ queryKey, queryFn: () => fetchToken({ levelName }) });
|
|
15645
|
+
return fetchToken({ levelName });
|
|
15628
15646
|
},
|
|
15647
|
+
refreshToken: () => fetchToken({ levelName }),
|
|
15629
15648
|
onSdkBuilt: () => setStatus("Loading verification form..."),
|
|
15630
15649
|
sendMessage: (msg) => iframeRef.current?.contentWindow?.postMessage(msg, iframeOrigin),
|
|
15631
15650
|
onReady: () => {
|
|
@@ -15973,7 +15992,7 @@ var init_MainMenu2 = __esm({
|
|
|
15973
15992
|
});
|
|
15974
15993
|
|
|
15975
15994
|
// src/modules/linkedProfiles.ts
|
|
15976
|
-
import { useQuery as useQuery12, useQueryClient as
|
|
15995
|
+
import { useQuery as useQuery12, useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
15977
15996
|
import { useCallback as useCallback16 } from "react";
|
|
15978
15997
|
async function getLinkProfilesData() {
|
|
15979
15998
|
const list = await getLinkedProviders();
|
|
@@ -15990,7 +16009,7 @@ async function getLinkProfilesData() {
|
|
|
15990
16009
|
return { profiles: loadedProfiles, avatar };
|
|
15991
16010
|
}
|
|
15992
16011
|
function useLinkedProfiles() {
|
|
15993
|
-
const qc =
|
|
16012
|
+
const qc = useQueryClient12();
|
|
15994
16013
|
const address = useSession((st) => st.address);
|
|
15995
16014
|
const {
|
|
15996
16015
|
data,
|
|
@@ -16223,10 +16242,10 @@ var init_useSendVerificationCode = __esm({
|
|
|
16223
16242
|
});
|
|
16224
16243
|
|
|
16225
16244
|
// src/internal/components/ManageWalletMenu/hooks/useVerifyCode.ts
|
|
16226
|
-
import { useMutation as useMutation14, useQueryClient as
|
|
16245
|
+
import { useMutation as useMutation14, useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
16227
16246
|
function useVerifyCode() {
|
|
16228
16247
|
const { callbacksRef } = useProviderConfig();
|
|
16229
|
-
const qc =
|
|
16248
|
+
const qc = useQueryClient13();
|
|
16230
16249
|
const address = useSession((st) => st.address);
|
|
16231
16250
|
const setIsLoading = useSession((st) => st.setIsLoading);
|
|
16232
16251
|
const {
|
|
@@ -16290,7 +16309,7 @@ var init_useVerifyCode = __esm({
|
|
|
16290
16309
|
});
|
|
16291
16310
|
|
|
16292
16311
|
// src/internal/components/ManageWalletMenu/AddProvider.tsx
|
|
16293
|
-
import { useQueryClient as
|
|
16312
|
+
import { useQueryClient as useQueryClient14 } from "@tanstack/react-query";
|
|
16294
16313
|
import { Fragment as Fragment28, jsx as jsx72, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
16295
16314
|
function normalizePasskeyLinkError(msg) {
|
|
16296
16315
|
const lower = msg.toLowerCase();
|
|
@@ -16303,7 +16322,7 @@ function normalizePasskeyLinkError(msg) {
|
|
|
16303
16322
|
return msg;
|
|
16304
16323
|
}
|
|
16305
16324
|
function AddProvider() {
|
|
16306
|
-
const qc =
|
|
16325
|
+
const qc = useQueryClient14();
|
|
16307
16326
|
const { callbacksRef } = useProviderConfig();
|
|
16308
16327
|
const address = useSession((st) => st.address);
|
|
16309
16328
|
const { t } = useT();
|
|
@@ -16480,7 +16499,7 @@ var init_EmailNotConnectedWarning = __esm({
|
|
|
16480
16499
|
});
|
|
16481
16500
|
|
|
16482
16501
|
// src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts
|
|
16483
|
-
import { useQueryClient as
|
|
16502
|
+
import { useQueryClient as useQueryClient15 } from "@tanstack/react-query";
|
|
16484
16503
|
import React6, { useEffect as useEffect31 } from "react";
|
|
16485
16504
|
function normalizeSocialLinkError(message) {
|
|
16486
16505
|
if (message === "X_ALREADY_LINKED") {
|
|
@@ -16489,7 +16508,7 @@ function normalizeSocialLinkError(message) {
|
|
|
16489
16508
|
return message;
|
|
16490
16509
|
}
|
|
16491
16510
|
function useLinkSocial() {
|
|
16492
|
-
const qc =
|
|
16511
|
+
const qc = useQueryClient15();
|
|
16493
16512
|
const address = useSession((st) => st.address);
|
|
16494
16513
|
const {
|
|
16495
16514
|
config: { current: config },
|
|
@@ -16639,14 +16658,14 @@ var init_telegram2 = __esm({
|
|
|
16639
16658
|
});
|
|
16640
16659
|
|
|
16641
16660
|
// src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
|
|
16642
|
-
import { useQueryClient as
|
|
16661
|
+
import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
16643
16662
|
import { useCallback as useCallback17, useEffect as useEffect32, useState as useState17 } from "react";
|
|
16644
16663
|
function useLinkTelegram() {
|
|
16645
16664
|
const {
|
|
16646
16665
|
config: { current: config },
|
|
16647
16666
|
callbacksRef
|
|
16648
16667
|
} = useProviderConfig();
|
|
16649
|
-
const qc =
|
|
16668
|
+
const qc = useQueryClient16();
|
|
16650
16669
|
const address = useSession((st) => st.address);
|
|
16651
16670
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
16652
16671
|
const { providerType, linkIsLoading, setLinkIsLoading, setProviderType, setAlert } = useManageWalletStore();
|
|
@@ -16665,7 +16684,7 @@ function useLinkTelegram() {
|
|
|
16665
16684
|
);
|
|
16666
16685
|
let botUsername = telegramProvider?.meta?.botUsername;
|
|
16667
16686
|
if (!botUsername) {
|
|
16668
|
-
botUsername = "
|
|
16687
|
+
botUsername = "embark_ai_bot";
|
|
16669
16688
|
}
|
|
16670
16689
|
if (!botUsername) {
|
|
16671
16690
|
throw new Error("Telegram bot username not configured");
|
|
@@ -17017,12 +17036,12 @@ var init_ManageWallet = __esm({
|
|
|
17017
17036
|
});
|
|
17018
17037
|
|
|
17019
17038
|
// src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx
|
|
17020
|
-
import { useMutation as useMutation15, useQueryClient as
|
|
17039
|
+
import { useMutation as useMutation15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
17021
17040
|
import { Key as Key6, Loader as Loader17 } from "lucide-react";
|
|
17022
17041
|
import { useState as useState18 } from "react";
|
|
17023
17042
|
import { jsx as jsx76, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
17024
17043
|
function UnlinkProviderMenu() {
|
|
17025
|
-
const qc =
|
|
17044
|
+
const qc = useQueryClient17();
|
|
17026
17045
|
const address = useSession((st) => st.address);
|
|
17027
17046
|
const { callbacksRef } = useProviderConfig();
|
|
17028
17047
|
const { t } = useT();
|
|
@@ -17247,7 +17266,7 @@ var init_nickname_validation = __esm({
|
|
|
17247
17266
|
});
|
|
17248
17267
|
|
|
17249
17268
|
// src/internal/components/NicknameMenu/NicknameEditForm.tsx
|
|
17250
|
-
import { useMutation as useMutation16, useQueryClient as
|
|
17269
|
+
import { useMutation as useMutation16, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
17251
17270
|
import { AtSign, Check as Check2, ChevronRight as ChevronRight5, Copy as Copy2, Loader as Loader19 } from "lucide-react";
|
|
17252
17271
|
import { useCallback as useCallback18, useState as useState19 } from "react";
|
|
17253
17272
|
import { Fragment as Fragment30, jsx as jsx78, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
@@ -17264,7 +17283,7 @@ function NicknameEditForm(props) {
|
|
|
17264
17283
|
info
|
|
17265
17284
|
} = props;
|
|
17266
17285
|
const { handle: currentNickname, canChange } = info || { handle: "", canChange: false };
|
|
17267
|
-
const qc =
|
|
17286
|
+
const qc = useQueryClient18();
|
|
17268
17287
|
const { t } = useT();
|
|
17269
17288
|
const passportWalletAddress = useSession((st) => st.address);
|
|
17270
17289
|
const { callbacksRef } = useProviderConfig();
|
|
@@ -18118,7 +18137,7 @@ var init_BalanceView2 = __esm({
|
|
|
18118
18137
|
});
|
|
18119
18138
|
|
|
18120
18139
|
// src/internal/components/PortfolioMenu/PortfolioItem.tsx
|
|
18121
|
-
import { useQuery as useQuery17, useQueryClient as
|
|
18140
|
+
import { useQuery as useQuery17, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
18122
18141
|
import { Image as ImageIcon, Loader as Loader21, ShieldAlert, Sparkles } from "lucide-react";
|
|
18123
18142
|
import { useState as useState22 } from "react";
|
|
18124
18143
|
import { formatUnits as formatUnits5 } from "viem";
|
|
@@ -18215,7 +18234,7 @@ function PortfolioItem(props) {
|
|
|
18215
18234
|
const { assets: projectAssets, showBalanceAs: showBalanceAsSymbol } = providerConfig.projectAssets || {};
|
|
18216
18235
|
const customAssetRateQuery = providerConfig.portfolio?.assetRateQuery;
|
|
18217
18236
|
const customAssetRateQueryKey = providerConfig.portfolio?.assetRateQueryKey;
|
|
18218
|
-
const qc =
|
|
18237
|
+
const qc = useQueryClient19();
|
|
18219
18238
|
const { balanceQueryKey } = projectAssets?.find((a) => a.symbol === showBalanceAsSymbol) || {};
|
|
18220
18239
|
const projectAssetBalance = !!balanceQueryKey ? qc.getQueryData(balanceQueryKey) : null;
|
|
18221
18240
|
const isNft = isNftAsset(asset);
|
|
@@ -18309,14 +18328,14 @@ var init_PortfolioItem = __esm({
|
|
|
18309
18328
|
});
|
|
18310
18329
|
|
|
18311
18330
|
// src/internal/components/PortfolioMenu/PortfolioMenu.tsx
|
|
18312
|
-
import { useQueryClient as
|
|
18331
|
+
import { useQueryClient as useQueryClient20 } from "@tanstack/react-query";
|
|
18313
18332
|
import { AlertCircle as AlertCircle4, ArrowLeft as ArrowLeft16, Gem, Loader as Loader27, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
18314
18333
|
import { useCallback as useCallback20 } from "react";
|
|
18315
18334
|
import { jsx as jsx82, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
18316
18335
|
function PortfolioMenu() {
|
|
18317
18336
|
const { assets: projectAssets = [] } = useProviderConfig().config.current?.projectAssets || {};
|
|
18318
18337
|
const { t } = useT();
|
|
18319
|
-
const qc =
|
|
18338
|
+
const qc = useQueryClient20();
|
|
18320
18339
|
const address = useSession((st) => st.address);
|
|
18321
18340
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
18322
18341
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
@@ -19054,12 +19073,12 @@ var init_UntrustApplication = __esm({
|
|
|
19054
19073
|
});
|
|
19055
19074
|
|
|
19056
19075
|
// src/internal/components/SecurityMenu/SecurityMenu.tsx
|
|
19057
|
-
import { useMutation as useMutation17, useQueryClient as
|
|
19076
|
+
import { useMutation as useMutation17, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
|
|
19058
19077
|
import { ArrowLeft as ArrowLeft18 } from "lucide-react";
|
|
19059
19078
|
import { useState as useState24 } from "react";
|
|
19060
19079
|
import { jsx as jsx90, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
19061
19080
|
function SecurityMenu() {
|
|
19062
|
-
const qc =
|
|
19081
|
+
const qc = useQueryClient21();
|
|
19063
19082
|
const { t } = useT();
|
|
19064
19083
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
19065
19084
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
@@ -19250,7 +19269,7 @@ var init_wallet = __esm({
|
|
|
19250
19269
|
init_projectId();
|
|
19251
19270
|
init_auth();
|
|
19252
19271
|
init_types();
|
|
19253
|
-
METADATA_API_URL = "https://dashboard.
|
|
19272
|
+
METADATA_API_URL = "https://dashboard.embarkai.io/api/public/project";
|
|
19254
19273
|
METADATA_CACHE_TTL = 36e5;
|
|
19255
19274
|
metadataCache = null;
|
|
19256
19275
|
}
|
|
@@ -20048,7 +20067,7 @@ function useMenuTitle(warpRoutes) {
|
|
|
20048
20067
|
updateMenuTitle(t("passport:bridgeMenu.labels.sender"));
|
|
20049
20068
|
break;
|
|
20050
20069
|
case bridgeStep === "select-token":
|
|
20051
|
-
updateMenuTitle(t("passport:bridgeMenu.labels.
|
|
20070
|
+
updateMenuTitle(t("passport:bridgeMenu.labels.selectToken"));
|
|
20052
20071
|
break;
|
|
20053
20072
|
case bridgeStep === "confirm":
|
|
20054
20073
|
updateMenuTitle(t("passport:bridgeMenu.labels.confirm"));
|
|
@@ -20106,6 +20125,10 @@ function MetaMaskIcon(props) {
|
|
|
20106
20125
|
x: "0px",
|
|
20107
20126
|
y: "0px",
|
|
20108
20127
|
viewBox: "0 0 142 136.878",
|
|
20128
|
+
style: {
|
|
20129
|
+
// enableBackground: 'new 0 0 142 136.878',
|
|
20130
|
+
flexShrink: 0
|
|
20131
|
+
},
|
|
20109
20132
|
xmlSpace: "preserve",
|
|
20110
20133
|
children: [
|
|
20111
20134
|
/* @__PURE__ */ jsx93(
|
|
@@ -20229,12 +20252,12 @@ var init_useAvailableSenders = __esm({
|
|
|
20229
20252
|
});
|
|
20230
20253
|
|
|
20231
20254
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
|
|
20232
|
-
import { useQuery as useQuery21, useQueryClient as
|
|
20255
|
+
import { useQuery as useQuery21, useQueryClient as useQueryClient22 } from "@tanstack/react-query";
|
|
20233
20256
|
import { useCallback as useCallback23, useEffect as useEffect39 } from "react";
|
|
20234
20257
|
import { createPublicClient as createPublicClient2, erc20Abi as erc20Abi2, formatUnits as formatUnits7, http as http3 } from "viem";
|
|
20235
20258
|
import { useBalance, useSwitchChain as useSwitchChain2 } from "wagmi";
|
|
20236
20259
|
function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
20237
|
-
const qc =
|
|
20260
|
+
const qc = useQueryClient22();
|
|
20238
20261
|
const { t } = useT();
|
|
20239
20262
|
const address = useSession((st) => st.address);
|
|
20240
20263
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
@@ -20927,7 +20950,7 @@ var init_useHyperlaneHistory = __esm({
|
|
|
20927
20950
|
});
|
|
20928
20951
|
|
|
20929
20952
|
// src/internal/components/SendMenu/hyperbridge/steps/HistoryStep.tsx
|
|
20930
|
-
import { useQueryClient as
|
|
20953
|
+
import { useQueryClient as useQueryClient23 } from "@tanstack/react-query";
|
|
20931
20954
|
import dayjs7 from "dayjs";
|
|
20932
20955
|
import { ArrowRightIcon, ExternalLinkIcon as ExternalLinkIcon2, LoaderIcon as LoaderIcon12 } from "lucide-react";
|
|
20933
20956
|
import { jsx as jsx99, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
@@ -21044,7 +21067,7 @@ function HistoryItem(props) {
|
|
|
21044
21067
|
updatedAt,
|
|
21045
21068
|
txStatus
|
|
21046
21069
|
} = props;
|
|
21047
|
-
const qc =
|
|
21070
|
+
const qc = useQueryClient23();
|
|
21048
21071
|
const address = useSession((st) => st.address);
|
|
21049
21072
|
const warpRoutes = qc.getQueryData([HYPERLANE_WARP_ROUTES_QUERY_KEY, address]);
|
|
21050
21073
|
const assetWarpRoute = warpRoutes?.find((route) => {
|
|
@@ -21194,11 +21217,11 @@ function SelectAssetRoute(props) {
|
|
|
21194
21217
|
}));
|
|
21195
21218
|
}, [hyperlaneWarpRoutes]);
|
|
21196
21219
|
if (isTokenSymbolSelector) {
|
|
21197
|
-
return /* @__PURE__ */ jsx100("div", { className: "w-full
|
|
21220
|
+
return /* @__PURE__ */ jsx100("div", { className: "w-full grid grid-cols-1 gap-[var(--ui-kit-gap)]", children: tokenList.map((asset, assetIdx) => /* @__PURE__ */ jsxs90(
|
|
21198
21221
|
Button,
|
|
21199
21222
|
{
|
|
21200
21223
|
variant: selectedAssetSymbol === asset.symbol ? "default" : "outline",
|
|
21201
|
-
className: "w-full",
|
|
21224
|
+
className: "w-full justify-start",
|
|
21202
21225
|
onClick: () => {
|
|
21203
21226
|
useBridgeStore.getState().setBridgeAssetSymbol(asset.symbol);
|
|
21204
21227
|
setIsTokenSymbolSelector(false);
|
|
@@ -23909,12 +23932,12 @@ var init_TransactionsGroup = __esm({
|
|
|
23909
23932
|
});
|
|
23910
23933
|
|
|
23911
23934
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
23912
|
-
import { useQuery as useQuery25, useQueryClient as
|
|
23935
|
+
import { useQuery as useQuery25, useQueryClient as useQueryClient24 } from "@tanstack/react-query";
|
|
23913
23936
|
import { ArrowLeft as ArrowLeft22, Loader as Loader34, RefreshCw as RefreshCw3, XCircle } from "lucide-react";
|
|
23914
23937
|
import { useCallback as useCallback25, useState as useState32 } from "react";
|
|
23915
23938
|
import { jsx as jsx116, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
23916
23939
|
function TransactionsMenu() {
|
|
23917
|
-
const qc =
|
|
23940
|
+
const qc = useQueryClient24();
|
|
23918
23941
|
const address = useSession((st) => st.address);
|
|
23919
23942
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
23920
23943
|
const { t } = useT();
|
|
@@ -24281,7 +24304,7 @@ var init_package = __esm({
|
|
|
24281
24304
|
"package.json"() {
|
|
24282
24305
|
package_default = {
|
|
24283
24306
|
name: "@embarkai/ui-kit",
|
|
24284
|
-
version: "0.4.
|
|
24307
|
+
version: "0.4.33",
|
|
24285
24308
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24286
24309
|
type: "module",
|
|
24287
24310
|
main: "./dist/index.cjs",
|
|
@@ -24379,11 +24402,11 @@ var init_package = __esm({
|
|
|
24379
24402
|
});
|
|
24380
24403
|
|
|
24381
24404
|
// src/internal/components/Footer/Footer.tsx
|
|
24382
|
-
import { useMutation as useMutation20, useQueryClient as
|
|
24405
|
+
import { useMutation as useMutation20, useQueryClient as useQueryClient25 } from "@tanstack/react-query";
|
|
24383
24406
|
import { Loader as Loader35, LogOut } from "lucide-react";
|
|
24384
24407
|
import { jsx as jsx118, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
24385
24408
|
function Footer() {
|
|
24386
|
-
const qc =
|
|
24409
|
+
const qc = useQueryClient25();
|
|
24387
24410
|
const { callbacksRef } = useProviderConfig();
|
|
24388
24411
|
const { address, setSession, setAddress, setStatus, setError, setIsLoading } = useSession();
|
|
24389
24412
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -24950,11 +24973,11 @@ var init_TssManager = __esm({
|
|
|
24950
24973
|
|
|
24951
24974
|
// src/internal/components/WalletConnectHandler.tsx
|
|
24952
24975
|
import { useConnectModal as useConnectModal2 } from "@rainbow-me/rainbowkit";
|
|
24953
|
-
import { useMutation as useMutation21, useQueryClient as
|
|
24976
|
+
import { useMutation as useMutation21, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
|
|
24954
24977
|
import React10, { useCallback as useCallback29, useEffect as useEffect48 } from "react";
|
|
24955
24978
|
import { useAccount, useDisconnect, useSignMessage as useSignMessage2 } from "wagmi";
|
|
24956
24979
|
function WalletConnectHandler() {
|
|
24957
|
-
const qc =
|
|
24980
|
+
const qc = useQueryClient26();
|
|
24958
24981
|
const { callbacksRef } = useProviderConfig();
|
|
24959
24982
|
const passportWalletAddress = useSession((st) => st.address);
|
|
24960
24983
|
const { address: walletAddress, isConnected, chain, connector } = useAccount();
|
|
@@ -25464,7 +25487,7 @@ function getDashboardApiUrl() {
|
|
|
25464
25487
|
const serviceUrls = getServiceUrls();
|
|
25465
25488
|
const paramUrl = typeof window !== "undefined" ? new URLSearchParams(window.location.search).get("dashboardApiUrl") || void 0 : void 0;
|
|
25466
25489
|
const envUrl = getEnvVar("VITE_LUMIA_DASHBOARD_API_URL") || getEnvVar("LUMIA_DASHBOARD_API_URL");
|
|
25467
|
-
return paramUrl || serviceUrls.dashboardApiUrl || envUrl || "https://dashboard.
|
|
25490
|
+
return paramUrl || serviceUrls.dashboardApiUrl || envUrl || "https://dashboard.embarkai.io/api";
|
|
25468
25491
|
}
|
|
25469
25492
|
function getSelectedNetwork() {
|
|
25470
25493
|
const paramNet = typeof window !== "undefined" ? (new URLSearchParams(window.location.search).get("network") || "").toLowerCase() : "";
|
|
@@ -28281,6 +28304,99 @@ init_ProviderContext();
|
|
|
28281
28304
|
|
|
28282
28305
|
// src/components/ConnectWalletButton.tsx
|
|
28283
28306
|
init_LumiaIcon3();
|
|
28307
|
+
|
|
28308
|
+
// src/internal/assets/wallets/EmbarkAiIcon.tsx
|
|
28309
|
+
import { jsx as jsx127, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
28310
|
+
function EmbarkAiIcon(props) {
|
|
28311
|
+
const { width = "24", height = "24", ...svgProps } = props;
|
|
28312
|
+
return /* @__PURE__ */ jsxs110(
|
|
28313
|
+
"svg",
|
|
28314
|
+
{
|
|
28315
|
+
...svgProps,
|
|
28316
|
+
width,
|
|
28317
|
+
height,
|
|
28318
|
+
viewBox: "0 0 26 25",
|
|
28319
|
+
fill: "none",
|
|
28320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28321
|
+
style: { flexShrink: 0 },
|
|
28322
|
+
children: [
|
|
28323
|
+
/* @__PURE__ */ jsx127(
|
|
28324
|
+
"path",
|
|
28325
|
+
{
|
|
28326
|
+
d: "M12.7045 5.8037H25.6717C25.6717 2.60055 23.1024 0 19.9298 0H6.96264C6.96264 3.20316 9.53194 5.8037 12.7045 5.8037Z",
|
|
28327
|
+
fill: "url(#paint0_radial_877_49)"
|
|
28328
|
+
}
|
|
28329
|
+
),
|
|
28330
|
+
/* @__PURE__ */ jsx127(
|
|
28331
|
+
"path",
|
|
28332
|
+
{
|
|
28333
|
+
d: "M19.9333 9.59513H7.06557C7.06557 6.39197 4.49627 3.79143 1.32368 3.79143H0V9.59513H6.96265C6.96265 12.7983 9.53195 15.3988 12.7045 15.3988H25.6717C25.6717 12.1957 23.1024 9.59513 19.9298 9.59513H19.9333Z",
|
|
28334
|
+
fill: "url(#paint1_radial_877_49)"
|
|
28335
|
+
}
|
|
28336
|
+
),
|
|
28337
|
+
/* @__PURE__ */ jsx127(
|
|
28338
|
+
"path",
|
|
28339
|
+
{
|
|
28340
|
+
d: "M19.9333 19.1938H7.06202C7.03008 16.0193 4.47498 13.4547 1.32368 13.4547H0V19.2584H6.9662C6.99814 22.4328 9.55324 24.9975 12.7045 24.9975H25.6717C25.6717 21.7943 23.1024 19.1938 19.9298 19.1938H19.9333Z",
|
|
28341
|
+
fill: "url(#paint2_radial_877_49)"
|
|
28342
|
+
}
|
|
28343
|
+
),
|
|
28344
|
+
/* @__PURE__ */ jsxs110("defs", { children: [
|
|
28345
|
+
/* @__PURE__ */ jsxs110(
|
|
28346
|
+
"radialGradient",
|
|
28347
|
+
{
|
|
28348
|
+
id: "paint0_radial_877_49",
|
|
28349
|
+
cx: "0",
|
|
28350
|
+
cy: "0",
|
|
28351
|
+
r: "1",
|
|
28352
|
+
gradientUnits: "userSpaceOnUse",
|
|
28353
|
+
gradientTransform: "translate(25.2529 -0.939785) scale(26.7789 27.0672)",
|
|
28354
|
+
children: [
|
|
28355
|
+
/* @__PURE__ */ jsx127("stop", { stopColor: "#CCFFF8" }),
|
|
28356
|
+
/* @__PURE__ */ jsx127("stop", { offset: "0.36", stopColor: "#0DE4B3" }),
|
|
28357
|
+
/* @__PURE__ */ jsx127("stop", { offset: "1", stopColor: "#D13AFF" })
|
|
28358
|
+
]
|
|
28359
|
+
}
|
|
28360
|
+
),
|
|
28361
|
+
/* @__PURE__ */ jsxs110(
|
|
28362
|
+
"radialGradient",
|
|
28363
|
+
{
|
|
28364
|
+
id: "paint1_radial_877_49",
|
|
28365
|
+
cx: "0",
|
|
28366
|
+
cy: "0",
|
|
28367
|
+
r: "1",
|
|
28368
|
+
gradientUnits: "userSpaceOnUse",
|
|
28369
|
+
gradientTransform: "translate(23.6134 -2.08401) scale(30.1644 30.4892)",
|
|
28370
|
+
children: [
|
|
28371
|
+
/* @__PURE__ */ jsx127("stop", { stopColor: "#CCFFF8" }),
|
|
28372
|
+
/* @__PURE__ */ jsx127("stop", { offset: "0.36", stopColor: "#0DE4B3" }),
|
|
28373
|
+
/* @__PURE__ */ jsx127("stop", { offset: "1", stopColor: "#D13AFF" })
|
|
28374
|
+
]
|
|
28375
|
+
}
|
|
28376
|
+
),
|
|
28377
|
+
/* @__PURE__ */ jsxs110(
|
|
28378
|
+
"radialGradient",
|
|
28379
|
+
{
|
|
28380
|
+
id: "paint2_radial_877_49",
|
|
28381
|
+
cx: "0",
|
|
28382
|
+
cy: "0",
|
|
28383
|
+
r: "1",
|
|
28384
|
+
gradientUnits: "userSpaceOnUse",
|
|
28385
|
+
gradientTransform: "translate(16.0794 5.81084) scale(22.4849 22.727)",
|
|
28386
|
+
children: [
|
|
28387
|
+
/* @__PURE__ */ jsx127("stop", { stopColor: "#CCFFF8" }),
|
|
28388
|
+
/* @__PURE__ */ jsx127("stop", { offset: "0.36", stopColor: "#0DE4B3" }),
|
|
28389
|
+
/* @__PURE__ */ jsx127("stop", { offset: "1", stopColor: "#D13AFF" })
|
|
28390
|
+
]
|
|
28391
|
+
}
|
|
28392
|
+
)
|
|
28393
|
+
] })
|
|
28394
|
+
]
|
|
28395
|
+
}
|
|
28396
|
+
);
|
|
28397
|
+
}
|
|
28398
|
+
|
|
28399
|
+
// src/components/ConnectWalletButton.tsx
|
|
28284
28400
|
init_SessionContext();
|
|
28285
28401
|
init_auth();
|
|
28286
28402
|
init_profile();
|
|
@@ -28294,7 +28410,7 @@ init_utils2();
|
|
|
28294
28410
|
import { useQuery as useQuery28 } from "@tanstack/react-query";
|
|
28295
28411
|
import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader37, Shield as Shield3 } from "lucide-react";
|
|
28296
28412
|
import { useEffect as useEffect51, useMemo as useMemo13 } from "react";
|
|
28297
|
-
import { Fragment as Fragment48, jsx as
|
|
28413
|
+
import { Fragment as Fragment48, jsx as jsx128, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
28298
28414
|
function getFormattedStatus(label, status, showStatus) {
|
|
28299
28415
|
const isStatus = showStatus && status && status !== "idle" && status !== "ready";
|
|
28300
28416
|
if (!isStatus) return label;
|
|
@@ -28330,20 +28446,20 @@ function ConnectWalletButton(props) {
|
|
|
28330
28446
|
}, [session, address, hasServerVault]);
|
|
28331
28447
|
const proMode = useProMode();
|
|
28332
28448
|
const isConnecting = connectButtonLabel !== label || isLoading;
|
|
28333
|
-
return /* @__PURE__ */
|
|
28449
|
+
return /* @__PURE__ */ jsx128("div", { "data-current-theme-mode": colorMode, className: cn("embarkai-ui-scope w-fit h-fit", className), children: !address ? (
|
|
28334
28450
|
/** external Buttons can be provided */
|
|
28335
|
-
/* @__PURE__ */
|
|
28451
|
+
/* @__PURE__ */ jsx128(Fragment48, { children: ConnectButton ? /* @__PURE__ */ jsxs111(
|
|
28336
28452
|
ConnectButton,
|
|
28337
28453
|
{
|
|
28338
28454
|
type: "button",
|
|
28339
28455
|
disabled: isConnecting,
|
|
28340
28456
|
onClick: () => setPage("auth" /* AUTH */),
|
|
28341
28457
|
children: [
|
|
28342
|
-
isConnecting
|
|
28458
|
+
isConnecting ? /* @__PURE__ */ jsx128("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx128(Loader37, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ jsx128(EmbarkAiIcon, { className: "w-6 h-6" }),
|
|
28343
28459
|
connectButtonLabel
|
|
28344
28460
|
]
|
|
28345
28461
|
}
|
|
28346
|
-
) : /* @__PURE__ */
|
|
28462
|
+
) : /* @__PURE__ */ jsxs111(
|
|
28347
28463
|
Button,
|
|
28348
28464
|
{
|
|
28349
28465
|
type: "button",
|
|
@@ -28353,19 +28469,19 @@ function ConnectWalletButton(props) {
|
|
|
28353
28469
|
onClick: () => setPage("auth" /* AUTH */),
|
|
28354
28470
|
className: cn(
|
|
28355
28471
|
"account-connect-button w-fit h-16 px-8",
|
|
28356
|
-
|
|
28472
|
+
"rounded-[var(--ui-kit-bdrs)]",
|
|
28357
28473
|
"border-0 border-transparent",
|
|
28358
28474
|
// to override button appearance bd, which case to case might drop black border
|
|
28359
28475
|
"bg-[var(--ui-kit-bg)] hover:bg-[var(--ui-kit-bg)] active:bg-[var(--ui-kit-bg)] text-[var(--ui-kit-fg)]",
|
|
28360
28476
|
"disabled:hover:bg-[var(--ui-kit-bg)] disabled:active:bg-[var(--ui-kit-bg)]"
|
|
28361
28477
|
),
|
|
28362
28478
|
children: [
|
|
28363
|
-
isConnecting
|
|
28479
|
+
isConnecting ? /* @__PURE__ */ jsx128("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx128(Loader37, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ jsx128(EmbarkAiIcon, { className: "w-6 h-6" }),
|
|
28364
28480
|
connectButtonLabel.toUpperCase()
|
|
28365
28481
|
]
|
|
28366
28482
|
}
|
|
28367
28483
|
) })
|
|
28368
|
-
) : /* @__PURE__ */
|
|
28484
|
+
) : /* @__PURE__ */ jsxs111(
|
|
28369
28485
|
"button",
|
|
28370
28486
|
{
|
|
28371
28487
|
type: "button",
|
|
@@ -28378,26 +28494,26 @@ function ConnectWalletButton(props) {
|
|
|
28378
28494
|
"rounded-[var(--ui-kit-bdrs)] p-4 max-w-sm min-w-[256px]"
|
|
28379
28495
|
),
|
|
28380
28496
|
children: [
|
|
28381
|
-
/* @__PURE__ */
|
|
28382
|
-
proMode && /* @__PURE__ */
|
|
28383
|
-
profile?.avatar ? /* @__PURE__ */
|
|
28497
|
+
/* @__PURE__ */ jsxs111("div", { className: "relative w-12 h-12 rounded-full bg-[var(--ui-kit-fg)] flex items-center justify-center flex-shrink-0", children: [
|
|
28498
|
+
proMode && /* @__PURE__ */ jsx128("span", { className: "absolute -top-1 -right-1 text-[8px] font-bold px-1 rounded bg-[var(--ui-kit-primary)] text-[var(--ui-kit-fg-inverted)] leading-3 z-10", children: "PRO" }),
|
|
28499
|
+
profile?.avatar ? /* @__PURE__ */ jsx128("img", { src: profile.avatar, alt: "User avatar", className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsx128(LumiaIcon3, { width: 48, height: 48 })
|
|
28384
28500
|
] }),
|
|
28385
|
-
/* @__PURE__ */
|
|
28386
|
-
/* @__PURE__ */
|
|
28387
|
-
isProfileLoading ? /* @__PURE__ */
|
|
28388
|
-
!isProfileLoading && /* @__PURE__ */
|
|
28501
|
+
/* @__PURE__ */ jsxs111("div", { className: "text-left flex-1 min-w-0 text-[var(--ui-kit-fg)]", children: [
|
|
28502
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
28503
|
+
isProfileLoading ? /* @__PURE__ */ jsx128(Loader37, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx128("span", { className: "w-fit text-[14px] leading-4 truncate max-w-[144px] text-[var(--ui-kit-fg)]", children: displayName }),
|
|
28504
|
+
!isProfileLoading && /* @__PURE__ */ jsx128(KYCStatus, {})
|
|
28389
28505
|
] }),
|
|
28390
|
-
/* @__PURE__ */
|
|
28506
|
+
/* @__PURE__ */ jsx128(BalanceView, {})
|
|
28391
28507
|
] }),
|
|
28392
|
-
/* @__PURE__ */
|
|
28393
|
-
/* @__PURE__ */
|
|
28394
|
-
/* @__PURE__ */
|
|
28508
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex items-center space-x-1", children: [
|
|
28509
|
+
/* @__PURE__ */ jsxs111("div", { className: "group relative", children: [
|
|
28510
|
+
/* @__PURE__ */ jsx128(
|
|
28395
28511
|
Cloud4,
|
|
28396
28512
|
{
|
|
28397
28513
|
className: `w-3 h-3 ${indicators.server ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28398
28514
|
}
|
|
28399
28515
|
),
|
|
28400
|
-
/* @__PURE__ */
|
|
28516
|
+
/* @__PURE__ */ jsxs111(
|
|
28401
28517
|
"div",
|
|
28402
28518
|
{
|
|
28403
28519
|
className: cn(
|
|
@@ -28412,14 +28528,14 @@ function ConnectWalletButton(props) {
|
|
|
28412
28528
|
}
|
|
28413
28529
|
)
|
|
28414
28530
|
] }),
|
|
28415
|
-
/* @__PURE__ */
|
|
28416
|
-
/* @__PURE__ */
|
|
28531
|
+
/* @__PURE__ */ jsxs111("div", { className: "group relative", children: [
|
|
28532
|
+
/* @__PURE__ */ jsx128(
|
|
28417
28533
|
Laptop2,
|
|
28418
28534
|
{
|
|
28419
28535
|
className: `w-3 h-3 ${indicators.local ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28420
28536
|
}
|
|
28421
28537
|
),
|
|
28422
|
-
/* @__PURE__ */
|
|
28538
|
+
/* @__PURE__ */ jsxs111(
|
|
28423
28539
|
"div",
|
|
28424
28540
|
{
|
|
28425
28541
|
className: cn(
|
|
@@ -28434,14 +28550,14 @@ function ConnectWalletButton(props) {
|
|
|
28434
28550
|
}
|
|
28435
28551
|
)
|
|
28436
28552
|
] }),
|
|
28437
|
-
/* @__PURE__ */
|
|
28438
|
-
/* @__PURE__ */
|
|
28553
|
+
/* @__PURE__ */ jsxs111("div", { className: "group relative", children: [
|
|
28554
|
+
/* @__PURE__ */ jsx128(
|
|
28439
28555
|
Shield3,
|
|
28440
28556
|
{
|
|
28441
28557
|
className: `w-3 h-3 ${indicators.backup ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-warning)]"}`
|
|
28442
28558
|
}
|
|
28443
28559
|
),
|
|
28444
|
-
/* @__PURE__ */
|
|
28560
|
+
/* @__PURE__ */ jsxs111(
|
|
28445
28561
|
"div",
|
|
28446
28562
|
{
|
|
28447
28563
|
className: cn(
|
|
@@ -28457,7 +28573,7 @@ function ConnectWalletButton(props) {
|
|
|
28457
28573
|
)
|
|
28458
28574
|
] })
|
|
28459
28575
|
] }),
|
|
28460
|
-
!!settingsNotifications.length && /* @__PURE__ */
|
|
28576
|
+
!!settingsNotifications.length && /* @__PURE__ */ jsx128(
|
|
28461
28577
|
"div",
|
|
28462
28578
|
{
|
|
28463
28579
|
className: cn(
|
|
@@ -28535,24 +28651,24 @@ init_useColorMode();
|
|
|
28535
28651
|
init_button();
|
|
28536
28652
|
init_utils2();
|
|
28537
28653
|
import { Moon, Sun } from "lucide-react";
|
|
28538
|
-
import { jsx as
|
|
28654
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
28539
28655
|
function ThemeToggle(props) {
|
|
28540
28656
|
const { className, ...btnProps } = props;
|
|
28541
28657
|
const { colorMode, setColorMode } = useColorMode();
|
|
28542
|
-
return /* @__PURE__ */
|
|
28658
|
+
return /* @__PURE__ */ jsx129(
|
|
28543
28659
|
"div",
|
|
28544
28660
|
{
|
|
28545
28661
|
className: cn("embarkai-ui-scope", className),
|
|
28546
28662
|
"data-current-theme-mode": colorMode,
|
|
28547
28663
|
style: { width: "fit-content", height: "fit-content" },
|
|
28548
|
-
children: /* @__PURE__ */
|
|
28664
|
+
children: /* @__PURE__ */ jsx129(
|
|
28549
28665
|
Button,
|
|
28550
28666
|
{
|
|
28551
28667
|
...btnProps,
|
|
28552
28668
|
variant: "ghost",
|
|
28553
28669
|
onClick: () => setColorMode(colorMode === "light" ? "dark" : "light"),
|
|
28554
28670
|
title: `Current theme: ${colorMode}. Click to switch.`,
|
|
28555
|
-
children: colorMode === "dark" ? /* @__PURE__ */
|
|
28671
|
+
children: colorMode === "dark" ? /* @__PURE__ */ jsx129(Sun, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx129(Moon, { className: "w-4 h-4" })
|
|
28556
28672
|
}
|
|
28557
28673
|
)
|
|
28558
28674
|
}
|
|
@@ -28564,18 +28680,18 @@ init_i18n();
|
|
|
28564
28680
|
init_button();
|
|
28565
28681
|
init_useLayoutDataStore();
|
|
28566
28682
|
init_utils2();
|
|
28567
|
-
import { jsx as
|
|
28683
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
28568
28684
|
function LangToggle(props) {
|
|
28569
28685
|
const { className, ...btnProps } = props;
|
|
28570
28686
|
const { i18n } = useT();
|
|
28571
28687
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
28572
|
-
return /* @__PURE__ */
|
|
28688
|
+
return /* @__PURE__ */ jsx130(
|
|
28573
28689
|
"div",
|
|
28574
28690
|
{
|
|
28575
28691
|
className: cn("embarkai-ui-scope", className),
|
|
28576
28692
|
"data-mbark-language": i18n.resolvedLanguage || "en",
|
|
28577
28693
|
style: { width: "fit-content", height: "fit-content" },
|
|
28578
|
-
children: /* @__PURE__ */
|
|
28694
|
+
children: /* @__PURE__ */ jsx130(
|
|
28579
28695
|
Button,
|
|
28580
28696
|
{
|
|
28581
28697
|
...btnProps,
|
|
@@ -28680,7 +28796,7 @@ init_cn();
|
|
|
28680
28796
|
init_button();
|
|
28681
28797
|
import { Copy as Copy6, ExternalLink as ExternalLink2 } from "lucide-react";
|
|
28682
28798
|
import * as React11 from "react";
|
|
28683
|
-
import { jsx as
|
|
28799
|
+
import { jsx as jsx131, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
28684
28800
|
function toExplorerAddressUrl(address, chain) {
|
|
28685
28801
|
const base2 = chain?.blockExplorers?.default?.url;
|
|
28686
28802
|
if (!base2) return null;
|
|
@@ -28702,11 +28818,11 @@ var Address = ({
|
|
|
28702
28818
|
const addr = address || "";
|
|
28703
28819
|
const explorer = toExplorerAddressUrl(addr, chain || void 0);
|
|
28704
28820
|
const [copied, setCopied] = React11.useState(false);
|
|
28705
|
-
if (!addr) return /* @__PURE__ */
|
|
28706
|
-
return /* @__PURE__ */
|
|
28707
|
-
label && /* @__PURE__ */
|
|
28708
|
-
/* @__PURE__ */
|
|
28709
|
-
showCopy && /* @__PURE__ */
|
|
28821
|
+
if (!addr) return /* @__PURE__ */ jsx131("span", { className: cn2("text-muted-foreground", className), children: "\u2014" });
|
|
28822
|
+
return /* @__PURE__ */ jsxs112("div", { className: cn2("flex items-center gap-2", className), style: { listStyle: "none" }, children: [
|
|
28823
|
+
label && /* @__PURE__ */ jsx131("span", { className: "text-sm font-medium", children: label }),
|
|
28824
|
+
/* @__PURE__ */ jsx131("code", { className: "text-xs bg-background px-2 py-1 rounded select-all", children: truncate ? short(addr) : addr }),
|
|
28825
|
+
showCopy && /* @__PURE__ */ jsx131(
|
|
28710
28826
|
Button,
|
|
28711
28827
|
{
|
|
28712
28828
|
variant: "ghost",
|
|
@@ -28720,10 +28836,10 @@ var Address = ({
|
|
|
28720
28836
|
} catch {
|
|
28721
28837
|
}
|
|
28722
28838
|
},
|
|
28723
|
-
children: /* @__PURE__ */
|
|
28839
|
+
children: /* @__PURE__ */ jsx131(Copy6, { className: "h-4 w-4" })
|
|
28724
28840
|
}
|
|
28725
28841
|
),
|
|
28726
|
-
showExplorer && explorer && /* @__PURE__ */
|
|
28842
|
+
showExplorer && explorer && /* @__PURE__ */ jsx131(
|
|
28727
28843
|
"a",
|
|
28728
28844
|
{
|
|
28729
28845
|
href: explorer,
|
|
@@ -28731,7 +28847,7 @@ var Address = ({
|
|
|
28731
28847
|
rel: "noreferrer noopener",
|
|
28732
28848
|
className: "inline-flex items-center justify-center h-10 w-10 rounded-md hover:bg-accent text-foreground",
|
|
28733
28849
|
title: "Open in explorer",
|
|
28734
|
-
children: /* @__PURE__ */
|
|
28850
|
+
children: /* @__PURE__ */ jsx131(ExternalLink2, { className: "h-4 w-4" })
|
|
28735
28851
|
}
|
|
28736
28852
|
)
|
|
28737
28853
|
] });
|
|
@@ -28740,7 +28856,7 @@ var Address = ({
|
|
|
28740
28856
|
// src/internal/components/UserOpStatus.tsx
|
|
28741
28857
|
init_badge();
|
|
28742
28858
|
init_button();
|
|
28743
|
-
import { jsx as
|
|
28859
|
+
import { jsx as jsx132, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
28744
28860
|
var UserOpStatus = ({
|
|
28745
28861
|
userOpHash,
|
|
28746
28862
|
chain,
|
|
@@ -28855,35 +28971,35 @@ var UserOpStatus = ({
|
|
|
28855
28971
|
const stateBadge = () => {
|
|
28856
28972
|
if (receipt) {
|
|
28857
28973
|
const ok = !!receipt.success;
|
|
28858
|
-
return /* @__PURE__ */
|
|
28859
|
-
ok ? /* @__PURE__ */
|
|
28974
|
+
return /* @__PURE__ */ jsxs113(Badge, { variant: ok ? "success" : "destructive", children: [
|
|
28975
|
+
ok ? /* @__PURE__ */ jsx132(CheckCircle27, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx132(AlertCircle8, { className: "h-3 w-3" }),
|
|
28860
28976
|
ok ? "Included" : "Failed"
|
|
28861
28977
|
] });
|
|
28862
28978
|
}
|
|
28863
28979
|
if (rejected) {
|
|
28864
|
-
return /* @__PURE__ */
|
|
28865
|
-
/* @__PURE__ */
|
|
28980
|
+
return /* @__PURE__ */ jsxs113(Badge, { variant: "destructive", children: [
|
|
28981
|
+
/* @__PURE__ */ jsx132(AlertCircle8, { className: "h-3 w-3" }),
|
|
28866
28982
|
" Rejected by bundler"
|
|
28867
28983
|
] });
|
|
28868
28984
|
}
|
|
28869
28985
|
if (timedOut) {
|
|
28870
|
-
return /* @__PURE__ */
|
|
28871
|
-
/* @__PURE__ */
|
|
28986
|
+
return /* @__PURE__ */ jsxs113(Badge, { variant: "warning", children: [
|
|
28987
|
+
/* @__PURE__ */ jsx132(AlertCircle8, { className: "h-3 w-3" }),
|
|
28872
28988
|
" Timeout - may be rejected"
|
|
28873
28989
|
] });
|
|
28874
28990
|
}
|
|
28875
28991
|
if (mempool) {
|
|
28876
|
-
return /* @__PURE__ */
|
|
28877
|
-
/* @__PURE__ */
|
|
28992
|
+
return /* @__PURE__ */ jsxs113(Badge, { variant: "outline", children: [
|
|
28993
|
+
/* @__PURE__ */ jsx132(Clock2, { className: "h-3 w-3" }),
|
|
28878
28994
|
" Pending in bundler"
|
|
28879
28995
|
] });
|
|
28880
28996
|
}
|
|
28881
|
-
return /* @__PURE__ */
|
|
28882
|
-
/* @__PURE__ */
|
|
28997
|
+
return /* @__PURE__ */ jsxs113(Badge, { variant: "secondary", children: [
|
|
28998
|
+
/* @__PURE__ */ jsx132(Clock2, { className: "h-3 w-3" }),
|
|
28883
28999
|
" Waiting"
|
|
28884
29000
|
] });
|
|
28885
29001
|
};
|
|
28886
|
-
return /* @__PURE__ */
|
|
29002
|
+
return /* @__PURE__ */ jsxs113(
|
|
28887
29003
|
"div",
|
|
28888
29004
|
{
|
|
28889
29005
|
className: cn2(
|
|
@@ -28892,20 +29008,20 @@ var UserOpStatus = ({
|
|
|
28892
29008
|
),
|
|
28893
29009
|
style: { textAlign: "left", listStyle: "none" },
|
|
28894
29010
|
children: [
|
|
28895
|
-
/* @__PURE__ */
|
|
28896
|
-
/* @__PURE__ */
|
|
29011
|
+
/* @__PURE__ */ jsxs113("div", { className: "flex items-center justify-between mb-3", children: [
|
|
29012
|
+
/* @__PURE__ */ jsxs113("div", { className: "flex items-center gap-2", children: [
|
|
28897
29013
|
stateBadge(),
|
|
28898
|
-
/* @__PURE__ */
|
|
29014
|
+
/* @__PURE__ */ jsx132("span", { className: "text-xs text-muted-foreground", children: "This is a UserOperation hash (EIP-4337), not a L2 tx hash." })
|
|
28899
29015
|
] }),
|
|
28900
|
-
/* @__PURE__ */
|
|
28901
|
-
/* @__PURE__ */
|
|
28902
|
-
/* @__PURE__ */
|
|
29016
|
+
/* @__PURE__ */ jsxs113(Button, { variant: "ghost", size: "small", onClick: () => tick(), disabled: refreshing, className: "h-8", children: [
|
|
29017
|
+
/* @__PURE__ */ jsx132(RefreshCw4, { className: cn2("h-3.5 w-3.5 mr-1", refreshing && "animate-spin") }),
|
|
29018
|
+
/* @__PURE__ */ jsx132("span", { className: "text-xs", children: "Refresh" })
|
|
28903
29019
|
] })
|
|
28904
29020
|
] }),
|
|
28905
|
-
/* @__PURE__ */
|
|
28906
|
-
/* @__PURE__ */
|
|
28907
|
-
/* @__PURE__ */
|
|
28908
|
-
/* @__PURE__ */
|
|
29021
|
+
/* @__PURE__ */ jsxs113("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
29022
|
+
/* @__PURE__ */ jsx132("span", { className: "text-sm font-medium min-w-16 shrink-0", children: "UO Hash" }),
|
|
29023
|
+
/* @__PURE__ */ jsx132("code", { className: "text-xs font-mono flex-1 select-all", children: userOpHash }),
|
|
29024
|
+
/* @__PURE__ */ jsx132(
|
|
28909
29025
|
Button,
|
|
28910
29026
|
{
|
|
28911
29027
|
variant: "ghost",
|
|
@@ -28917,14 +29033,14 @@ var UserOpStatus = ({
|
|
|
28917
29033
|
} catch {
|
|
28918
29034
|
}
|
|
28919
29035
|
},
|
|
28920
|
-
children: /* @__PURE__ */
|
|
29036
|
+
children: /* @__PURE__ */ jsx132(Copy7, { className: "h-3.5 w-3.5" })
|
|
28921
29037
|
}
|
|
28922
29038
|
)
|
|
28923
29039
|
] }),
|
|
28924
|
-
receipt && receipt.receipt?.transactionHash && /* @__PURE__ */
|
|
28925
|
-
/* @__PURE__ */
|
|
28926
|
-
/* @__PURE__ */
|
|
28927
|
-
/* @__PURE__ */
|
|
29040
|
+
receipt && receipt.receipt?.transactionHash && /* @__PURE__ */ jsxs113("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
29041
|
+
/* @__PURE__ */ jsx132("span", { className: "text-sm font-medium min-w-16 shrink-0", children: "Tx Hash" }),
|
|
29042
|
+
/* @__PURE__ */ jsx132("code", { className: "text-xs font-mono flex-1 select-all", children: receipt.receipt.transactionHash }),
|
|
29043
|
+
/* @__PURE__ */ jsx132(
|
|
28928
29044
|
Button,
|
|
28929
29045
|
{
|
|
28930
29046
|
variant: "ghost",
|
|
@@ -28936,10 +29052,10 @@ var UserOpStatus = ({
|
|
|
28936
29052
|
} catch {
|
|
28937
29053
|
}
|
|
28938
29054
|
},
|
|
28939
|
-
children: /* @__PURE__ */
|
|
29055
|
+
children: /* @__PURE__ */ jsx132(Copy7, { className: "h-3.5 w-3.5" })
|
|
28940
29056
|
}
|
|
28941
29057
|
),
|
|
28942
|
-
chain?.blockExplorers?.default?.url && /* @__PURE__ */
|
|
29058
|
+
chain?.blockExplorers?.default?.url && /* @__PURE__ */ jsx132(
|
|
28943
29059
|
"a",
|
|
28944
29060
|
{
|
|
28945
29061
|
href: `${chain.blockExplorers.default.url}/tx/${receipt.receipt.transactionHash}`,
|
|
@@ -28947,11 +29063,11 @@ var UserOpStatus = ({
|
|
|
28947
29063
|
rel: "noreferrer noopener",
|
|
28948
29064
|
className: "inline-flex items-center justify-center h-8 w-8 rounded-md hover:bg-accent text-foreground",
|
|
28949
29065
|
title: "Open in explorer",
|
|
28950
|
-
children: /* @__PURE__ */
|
|
29066
|
+
children: /* @__PURE__ */ jsx132(ExternalLink3, { className: "h-3.5 w-3.5" })
|
|
28951
29067
|
}
|
|
28952
29068
|
)
|
|
28953
29069
|
] }),
|
|
28954
|
-
receipt && /* @__PURE__ */
|
|
29070
|
+
receipt && /* @__PURE__ */ jsxs113("div", { className: "text-xs text-muted-foreground mb-3", children: [
|
|
28955
29071
|
"Block ",
|
|
28956
29072
|
parseInt(receipt.receipt?.blockNumber || "0x0", 16),
|
|
28957
29073
|
" \u2022 Gas Used",
|
|
@@ -28960,32 +29076,32 @@ var UserOpStatus = ({
|
|
|
28960
29076
|
" \u2022 Success ",
|
|
28961
29077
|
String(!!receipt.success)
|
|
28962
29078
|
] }),
|
|
28963
|
-
/* @__PURE__ */
|
|
29079
|
+
/* @__PURE__ */ jsx132("div", { className: "text-xs text-muted-foreground", children: !receipt && !timedOut && !rejected && /* @__PURE__ */ jsxs113("span", { className: "ml-2", children: [
|
|
28964
29080
|
"\u2022 Polling for ",
|
|
28965
29081
|
Math.round((Date.now() - startTimeRef.current) / 1e3),
|
|
28966
29082
|
"s"
|
|
28967
29083
|
] }) }),
|
|
28968
|
-
mempool && /* @__PURE__ */
|
|
28969
|
-
/* @__PURE__ */
|
|
29084
|
+
mempool && /* @__PURE__ */ jsxs113("div", { className: "text-sm text-muted-foreground mt-2", style: { listStyle: "none" }, children: [
|
|
29085
|
+
/* @__PURE__ */ jsxs113("div", { children: [
|
|
28970
29086
|
"Seen by bundler at ",
|
|
28971
|
-
/* @__PURE__ */
|
|
29087
|
+
/* @__PURE__ */ jsx132(Address, { address: mempool.entryPoint, chain, showExplorer: true, truncate: false })
|
|
28972
29088
|
] }),
|
|
28973
|
-
/* @__PURE__ */
|
|
29089
|
+
/* @__PURE__ */ jsxs113("div", { children: [
|
|
28974
29090
|
"sender ",
|
|
28975
|
-
/* @__PURE__ */
|
|
29091
|
+
/* @__PURE__ */ jsx132(Address, { address: mempool.sender, chain, truncate: false })
|
|
28976
29092
|
] })
|
|
28977
29093
|
] }),
|
|
28978
|
-
error && /* @__PURE__ */
|
|
28979
|
-
/* @__PURE__ */
|
|
29094
|
+
error && /* @__PURE__ */ jsxs113("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29095
|
+
/* @__PURE__ */ jsx132(AlertCircle8, { className: "h-4 w-4" }),
|
|
28980
29096
|
" ",
|
|
28981
29097
|
error
|
|
28982
29098
|
] }),
|
|
28983
|
-
rejected && /* @__PURE__ */
|
|
28984
|
-
/* @__PURE__ */
|
|
29099
|
+
rejected && /* @__PURE__ */ jsxs113("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29100
|
+
/* @__PURE__ */ jsx132(AlertCircle8, { className: "h-4 w-4" }),
|
|
28985
29101
|
"UserOperation was dropped from bundler mempool. This usually means it was invalid or replaced."
|
|
28986
29102
|
] }),
|
|
28987
|
-
timedOut && /* @__PURE__ */
|
|
28988
|
-
/* @__PURE__ */
|
|
29103
|
+
timedOut && /* @__PURE__ */ jsxs113("div", { className: "text-sm text-destructive flex items-center gap-1 mt-4", children: [
|
|
29104
|
+
/* @__PURE__ */ jsx132(AlertCircle8, { className: "h-4 w-4" }),
|
|
28989
29105
|
"Stopped polling after ",
|
|
28990
29106
|
Math.round(maxPollTimeMs / 1e3),
|
|
28991
29107
|
"s. UserOperation may have been rejected by the bundler."
|
|
@@ -29000,7 +29116,7 @@ init_cn();
|
|
|
29000
29116
|
init_button();
|
|
29001
29117
|
import { Copy as Copy8, ExternalLink as ExternalLink4 } from "lucide-react";
|
|
29002
29118
|
import * as React13 from "react";
|
|
29003
|
-
import { jsx as
|
|
29119
|
+
import { jsx as jsx133, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
29004
29120
|
function toExplorerUrl(kind, value, chain) {
|
|
29005
29121
|
const base2 = chain?.blockExplorers?.default?.url;
|
|
29006
29122
|
if (!base2) return null;
|
|
@@ -29024,11 +29140,11 @@ var Hash = ({
|
|
|
29024
29140
|
const value = hash || "";
|
|
29025
29141
|
const explorer = toExplorerUrl(kind, value, chain || void 0);
|
|
29026
29142
|
const [copied, setCopied] = React13.useState(false);
|
|
29027
|
-
if (!value) return /* @__PURE__ */
|
|
29028
|
-
return /* @__PURE__ */
|
|
29029
|
-
label && /* @__PURE__ */
|
|
29030
|
-
/* @__PURE__ */
|
|
29031
|
-
showCopy && /* @__PURE__ */
|
|
29143
|
+
if (!value) return /* @__PURE__ */ jsx133("span", { className: cn2("text-muted-foreground", className), children: "\u2014" });
|
|
29144
|
+
return /* @__PURE__ */ jsxs114("div", { className: cn2("flex items-center gap-2", className), children: [
|
|
29145
|
+
label && /* @__PURE__ */ jsx133("span", { className: "text-sm font-medium", children: label }),
|
|
29146
|
+
/* @__PURE__ */ jsx133("code", { className: "text-xs bg-background px-2 py-1 rounded break-all", children: truncate ? short2(value) : value }),
|
|
29147
|
+
showCopy && /* @__PURE__ */ jsx133(
|
|
29032
29148
|
Button,
|
|
29033
29149
|
{
|
|
29034
29150
|
variant: "ghost",
|
|
@@ -29042,10 +29158,10 @@ var Hash = ({
|
|
|
29042
29158
|
} catch {
|
|
29043
29159
|
}
|
|
29044
29160
|
},
|
|
29045
|
-
children: /* @__PURE__ */
|
|
29161
|
+
children: /* @__PURE__ */ jsx133(Copy8, { className: "h-4 w-4" })
|
|
29046
29162
|
}
|
|
29047
29163
|
),
|
|
29048
|
-
showExplorer && explorer && /* @__PURE__ */
|
|
29164
|
+
showExplorer && explorer && /* @__PURE__ */ jsx133(
|
|
29049
29165
|
"a",
|
|
29050
29166
|
{
|
|
29051
29167
|
href: explorer,
|
|
@@ -29053,7 +29169,7 @@ var Hash = ({
|
|
|
29053
29169
|
rel: "noreferrer noopener",
|
|
29054
29170
|
className: "inline-flex items-center justify-center h-10 w-10 rounded-md hover:bg-accent text-foreground",
|
|
29055
29171
|
title: "Open in explorer",
|
|
29056
|
-
children: /* @__PURE__ */
|
|
29172
|
+
children: /* @__PURE__ */ jsx133(ExternalLink4, { className: "h-4 w-4" })
|
|
29057
29173
|
}
|
|
29058
29174
|
)
|
|
29059
29175
|
] });
|
|
@@ -29062,7 +29178,7 @@ var Hash = ({
|
|
|
29062
29178
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29063
29179
|
init_base();
|
|
29064
29180
|
import { useEffect as useEffect53, useState as useState37 } from "react";
|
|
29065
|
-
import { jsx as
|
|
29181
|
+
import { jsx as jsx134, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
29066
29182
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29067
29183
|
const [transactions, setTransactions] = useState37([]);
|
|
29068
29184
|
const [loading, setLoading] = useState37(true);
|
|
@@ -29113,31 +29229,31 @@ var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
|
29113
29229
|
window.open(`${explorerUrl}/tx/${txHash}`, "_blank");
|
|
29114
29230
|
};
|
|
29115
29231
|
if (loading) {
|
|
29116
|
-
return /* @__PURE__ */
|
|
29117
|
-
/* @__PURE__ */
|
|
29118
|
-
/* @__PURE__ */
|
|
29232
|
+
return /* @__PURE__ */ jsxs115("div", { className: "p-4 text-center", children: [
|
|
29233
|
+
/* @__PURE__ */ jsx134("div", { className: "animate-spin inline-block w-6 h-6 border-2 border-current border-t-transparent rounded-full" }),
|
|
29234
|
+
/* @__PURE__ */ jsx134("p", { className: "mt-2 text-sm text-gray-600", children: "Loading transactions..." })
|
|
29119
29235
|
] });
|
|
29120
29236
|
}
|
|
29121
29237
|
if (error) {
|
|
29122
|
-
return /* @__PURE__ */
|
|
29123
|
-
/* @__PURE__ */
|
|
29124
|
-
/* @__PURE__ */
|
|
29238
|
+
return /* @__PURE__ */ jsxs115("div", { className: "p-4 text-center", children: [
|
|
29239
|
+
/* @__PURE__ */ jsx134("p", { className: "text-red-600 text-sm", children: error }),
|
|
29240
|
+
/* @__PURE__ */ jsx134("button", { onClick: () => window.location.reload(), className: "mt-2 text-blue-600 text-sm hover:underline", children: "Retry" })
|
|
29125
29241
|
] });
|
|
29126
29242
|
}
|
|
29127
29243
|
if (transactions.length === 0) {
|
|
29128
|
-
return /* @__PURE__ */
|
|
29244
|
+
return /* @__PURE__ */ jsx134("div", { className: "p-4 text-center", children: /* @__PURE__ */ jsx134("p", { className: "text-gray-600 text-sm", children: "No transactions found" }) });
|
|
29129
29245
|
}
|
|
29130
|
-
return /* @__PURE__ */
|
|
29246
|
+
return /* @__PURE__ */ jsx134("div", { className: "max-h-96 overflow-y-auto", children: /* @__PURE__ */ jsx134("div", { className: "space-y-2 p-2", children: transactions.map((tx) => /* @__PURE__ */ jsxs115(
|
|
29131
29247
|
"div",
|
|
29132
29248
|
{
|
|
29133
29249
|
className: "border rounded-lg p-3 hover:bg-gray-50 cursor-pointer transition-colors",
|
|
29134
29250
|
onClick: () => openTransaction(tx.hash),
|
|
29135
29251
|
children: [
|
|
29136
|
-
/* @__PURE__ */
|
|
29137
|
-
/* @__PURE__ */
|
|
29138
|
-
/* @__PURE__ */
|
|
29139
|
-
/* @__PURE__ */
|
|
29140
|
-
/* @__PURE__ */
|
|
29252
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex justify-between items-start mb-2", children: [
|
|
29253
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex-1", children: [
|
|
29254
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex items-center space-x-2 mb-1", children: [
|
|
29255
|
+
/* @__PURE__ */ jsx134("span", { className: "text-xs font-mono bg-gray-100 px-2 py-1 rounded", children: formatAddress3(tx.hash) }),
|
|
29256
|
+
/* @__PURE__ */ jsx134(
|
|
29141
29257
|
"span",
|
|
29142
29258
|
{
|
|
29143
29259
|
className: `text-xs px-2 py-1 rounded ${tx.status === "ok" ? "bg-green-100 text-green-800" : "bg-red-100 text-red-800"}`,
|
|
@@ -29145,40 +29261,40 @@ var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
|
29145
29261
|
}
|
|
29146
29262
|
)
|
|
29147
29263
|
] }),
|
|
29148
|
-
/* @__PURE__ */
|
|
29149
|
-
/* @__PURE__ */
|
|
29150
|
-
/* @__PURE__ */
|
|
29151
|
-
/* @__PURE__ */
|
|
29264
|
+
/* @__PURE__ */ jsxs115("div", { className: "text-sm space-y-1", children: [
|
|
29265
|
+
/* @__PURE__ */ jsxs115("div", { children: [
|
|
29266
|
+
/* @__PURE__ */ jsx134("span", { className: "text-gray-600", children: "From:" }),
|
|
29267
|
+
/* @__PURE__ */ jsxs115("span", { className: "font-mono ml-1", children: [
|
|
29152
29268
|
formatAddress3(tx.from.hash),
|
|
29153
|
-
tx.from.is_contract && /* @__PURE__ */
|
|
29269
|
+
tx.from.is_contract && /* @__PURE__ */ jsx134("span", { className: "text-xs text-blue-600 ml-1", children: "(Contract)" })
|
|
29154
29270
|
] })
|
|
29155
29271
|
] }),
|
|
29156
|
-
/* @__PURE__ */
|
|
29157
|
-
/* @__PURE__ */
|
|
29158
|
-
/* @__PURE__ */
|
|
29272
|
+
/* @__PURE__ */ jsxs115("div", { children: [
|
|
29273
|
+
/* @__PURE__ */ jsx134("span", { className: "text-gray-600", children: "To:" }),
|
|
29274
|
+
/* @__PURE__ */ jsxs115("span", { className: "font-mono ml-1", children: [
|
|
29159
29275
|
formatAddress3(tx.to.hash),
|
|
29160
|
-
tx.to.is_contract && /* @__PURE__ */
|
|
29276
|
+
tx.to.is_contract && /* @__PURE__ */ jsx134("span", { className: "text-xs text-blue-600 ml-1", children: "(Contract)" })
|
|
29161
29277
|
] })
|
|
29162
29278
|
] }),
|
|
29163
|
-
/* @__PURE__ */
|
|
29164
|
-
/* @__PURE__ */
|
|
29165
|
-
/* @__PURE__ */
|
|
29279
|
+
/* @__PURE__ */ jsxs115("div", { children: [
|
|
29280
|
+
/* @__PURE__ */ jsx134("span", { className: "text-gray-600", children: "Value:" }),
|
|
29281
|
+
/* @__PURE__ */ jsxs115("span", { className: "font-semibold ml-1", children: [
|
|
29166
29282
|
formatValue3(tx.value),
|
|
29167
29283
|
" LUMIA"
|
|
29168
29284
|
] })
|
|
29169
29285
|
] })
|
|
29170
29286
|
] })
|
|
29171
29287
|
] }),
|
|
29172
|
-
/* @__PURE__ */
|
|
29173
|
-
/* @__PURE__ */
|
|
29174
|
-
/* @__PURE__ */
|
|
29288
|
+
/* @__PURE__ */ jsxs115("div", { className: "text-right text-xs text-gray-500", children: [
|
|
29289
|
+
/* @__PURE__ */ jsx134("div", { children: formatDate2(tx.timestamp) }),
|
|
29290
|
+
/* @__PURE__ */ jsxs115("div", { className: "mt-1", children: [
|
|
29175
29291
|
"Gas: ",
|
|
29176
29292
|
parseInt(tx.gas_used).toLocaleString()
|
|
29177
29293
|
] }),
|
|
29178
|
-
tx.method && /* @__PURE__ */
|
|
29294
|
+
tx.method && /* @__PURE__ */ jsx134("div", { className: "mt-1 text-blue-600", children: tx.method })
|
|
29179
29295
|
] })
|
|
29180
29296
|
] }),
|
|
29181
|
-
tx.transaction_types.length > 0 && /* @__PURE__ */
|
|
29297
|
+
tx.transaction_types.length > 0 && /* @__PURE__ */ jsx134("div", { className: "flex flex-wrap gap-1 mt-2", children: tx.transaction_types.map((type, idx) => /* @__PURE__ */ jsx134("span", { className: "text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded-full", children: type.replace("_", " ") }, idx)) })
|
|
29182
29298
|
]
|
|
29183
29299
|
},
|
|
29184
29300
|
tx.hash
|