From 139a4f1747ca6464636bec8548e7732bf9021d9d Mon Sep 17 00:00:00 2001 From: Dodecahedr0x Date: Mon, 4 May 2026 13:23:41 +0200 Subject: [PATCH 1/3] feat: restore auth panel --- components/one/net-worth-panel.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/one/net-worth-panel.tsx b/components/one/net-worth-panel.tsx index 6910966..10f940c 100644 --- a/components/one/net-worth-panel.tsx +++ b/components/one/net-worth-panel.tsx @@ -147,9 +147,6 @@ export function NetWorthPanel() { return null; } - // TEMP: hide the authenticate card. Delete this line to restore it. - if (needsAuthOverlay) return null; - const balanceLabel = (mint: string, decimals: number) => { if (!authToken) return "—"; if (balanceLoading) return "…"; From 4b2370c089bfc91fa37093d7e374021dedc2fb44 Mon Sep 17 00:00:00 2001 From: Dodecahedr0x Date: Mon, 4 May 2026 15:14:38 +0200 Subject: [PATCH 2/3] feat: centralize mock tee def --- lib/payments.ts | 8 ++++++-- lib/spl-private-balance.ts | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/payments.ts b/lib/payments.ts index 299d181..9d34dab 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -46,7 +46,9 @@ export const PAYMENTS_API_BASE_URL = ( configuredPaymentsApiBaseUrl || DEFAULT_PAYMENTS_API_BASE_URL ).replace(/\/+$/, ""); -export const PAYMENTS_CLUSTER = normalizePaymentsCluster(configuredPaymentsCluster); +export const PAYMENTS_CLUSTER = normalizePaymentsCluster( + configuredPaymentsCluster, +); export const PAYMENTS_DEFAULT_USDC_MINT = configuredPaymentsTestUsdcMint || USDC_MINT; @@ -69,7 +71,7 @@ export function getPaymentsTimeoutSignal(timeoutMs = 15_000) { export function getPaymentsExplorerTransactionUrl(signature: string) { const explorerUrl = new URL( `/tx/${encodeURIComponent(signature)}`, - "https://explorer.solana.com" + "https://explorer.solana.com", ); if (PAYMENTS_CLUSTER === "devnet" || PAYMENTS_CLUSTER === "testnet") { @@ -78,3 +80,5 @@ export function getPaymentsExplorerTransactionUrl(signature: string) { return explorerUrl.toString(); } + +export const MOCK_TEE = process.env.NEXT_PUBLIC_MOCK_TEE === "true"; diff --git a/lib/spl-private-balance.ts b/lib/spl-private-balance.ts index 9a919e4..663f4b4 100644 --- a/lib/spl-private-balance.ts +++ b/lib/spl-private-balance.ts @@ -1,4 +1,4 @@ -import { getPaymentsApiUrl, PAYMENTS_CLUSTER } from "@/lib/payments"; +import { getPaymentsApiUrl, PAYMENTS_CLUSTER, MOCK_TEE } from "@/lib/payments"; const STORAGE_PREFIX = "magicblock:spl-private-auth-token"; @@ -22,7 +22,7 @@ export function clearStoredPrivateAuthToken(pubkeyBase58: string) { export async function fetchSplChallenge(pubkeyBase58: string): Promise { const params = new URLSearchParams({ pubkey: pubkeyBase58, - mock: process.env.NEXT_PUBLIC_MOCK_TEE ?? "false", + mock: String(MOCK_TEE), }); const res = await fetch(getPaymentsApiUrl(`/v1/spl/challenge?${params}`)); if (!res.ok) { @@ -47,7 +47,7 @@ export async function loginSplPrivate(params: { challenge: params.challenge, signature: params.signature, cluster: PAYMENTS_CLUSTER, - mock: process.env.NEXT_PUBLIC_MOCK_TEE === "true", + mock: MOCK_TEE, }), }); if (!res.ok) { From 33325dcd4bca7b5b1813851ccc22b09b141a8550 Mon Sep 17 00:00:00 2001 From: Dodecahedr0x Date: Mon, 4 May 2026 17:14:02 +0200 Subject: [PATCH 3/3] feat: remove mock --- lib/payments.ts | 2 -- lib/spl-private-balance.ts | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/payments.ts b/lib/payments.ts index 9d34dab..9490d8d 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -80,5 +80,3 @@ export function getPaymentsExplorerTransactionUrl(signature: string) { return explorerUrl.toString(); } - -export const MOCK_TEE = process.env.NEXT_PUBLIC_MOCK_TEE === "true"; diff --git a/lib/spl-private-balance.ts b/lib/spl-private-balance.ts index 663f4b4..9e8c94c 100644 --- a/lib/spl-private-balance.ts +++ b/lib/spl-private-balance.ts @@ -1,4 +1,4 @@ -import { getPaymentsApiUrl, PAYMENTS_CLUSTER, MOCK_TEE } from "@/lib/payments"; +import { getPaymentsApiUrl, PAYMENTS_CLUSTER } from "@/lib/payments"; const STORAGE_PREFIX = "magicblock:spl-private-auth-token"; @@ -22,7 +22,6 @@ export function clearStoredPrivateAuthToken(pubkeyBase58: string) { export async function fetchSplChallenge(pubkeyBase58: string): Promise { const params = new URLSearchParams({ pubkey: pubkeyBase58, - mock: String(MOCK_TEE), }); const res = await fetch(getPaymentsApiUrl(`/v1/spl/challenge?${params}`)); if (!res.ok) { @@ -47,7 +46,6 @@ export async function loginSplPrivate(params: { challenge: params.challenge, signature: params.signature, cluster: PAYMENTS_CLUSTER, - mock: MOCK_TEE, }), }); if (!res.ok) {