From e43c1e7eefef6bb6c76941f8a8ed577789bf0639 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Jun 2026 15:08:12 +0100 Subject: [PATCH 1/3] fix(ci): unblock dependency audit npm installs Build shared api-schemas before backend/frontend npm ci and restore the missing local lockfile target so npm ci can resolve @yieldvault/api-schemas. --- .github/workflows/rust-security.yml | 5 +++++ backend/package-lock.json | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/rust-security.yml b/.github/workflows/rust-security.yml index 37636fb4..61ef5eda 100644 --- a/.github/workflows/rust-security.yml +++ b/.github/workflows/rust-security.yml @@ -31,10 +31,15 @@ jobs: cache-dependency-path: | backend/package-lock.json frontend/package-lock.json + packages/api-schemas/package-lock.json - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 + + - name: Build shared API schemas + run: npm ci && npm run build + working-directory: packages/api-schemas - name: Install backend dependencies run: npm ci working-directory: backend diff --git a/backend/package-lock.json b/backend/package-lock.json index 5acf1eab..66ac98e7 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -9949,6 +9949,17 @@ "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "../packages/api-schemas": { + "name": "@yieldvault/api-schemas", + "version": "1.0.0", + "dependencies": { + "zod": "^4.3.6" + }, + "devDependencies": { + "typescript": "~5.9.3", + "vitest": "^4.1.5" + } } } } From a39fca3009c1415bde46414aede73f55bac844e0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Jun 2026 15:15:57 +0100 Subject: [PATCH 2/3] fix(frontend): restore missing imports for production build Wire up symbols left undefined after recent merges so Monorepo CI frontend build and tsc pass again. --- frontend/src/components/VaultDashboard.tsx | 5 +++-- frontend/src/components/WalletConnect.tsx | 2 ++ frontend/src/components/icons.ts | 1 + frontend/src/hooks/useSharableViewState.ts | 2 +- frontend/src/hooks/useWalletHeartbeat.ts | 2 +- frontend/src/pages/Portfolio.tsx | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/VaultDashboard.tsx b/frontend/src/components/VaultDashboard.tsx index 117db10c..fdc102ef 100644 --- a/frontend/src/components/VaultDashboard.tsx +++ b/frontend/src/components/VaultDashboard.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useRef, useState } from "react"; import { Activity, AlertCircle, @@ -27,6 +27,7 @@ import { useTokenAllowance } from "../hooks/useTokenAllowance"; import { createDepositFormSchema, MIN_DEPOSIT_AMOUNT } from "../forms/schemas/depositFormSchema"; import { createWithdrawFormSchema } from "../forms/schemas/withdrawFormSchema"; import { mapServerError } from "../lib/errorMappers"; +import confetti from "canvas-confetti"; import CopyButton from "./CopyButton"; import { Button } from "./ui/Button"; import { copyTextToClipboard } from "../lib/clipboard"; @@ -45,7 +46,7 @@ import { useOfflineRetryCountdown } from "../hooks/useOfflineRetryCountdown"; import { useFormFocusFlow } from "../hooks/useFormFocusFlow"; import { useStaleSubmissionGuard } from "../hooks/useStaleSubmissionGuard"; import { useTransactionIntent } from "../hooks/useTransactionIntent"; -import { saveVaultFormDraft } from "../lib/formDraftStorage"; +import { saveVaultFormDraft, clearVaultFormDraft } from "../lib/formDraftStorage"; import { buildDepositSummary, buildWithdrawalSummary } from "../lib/transactionConfirmationBuilder"; import TransactionConflictResolver from "./TransactionConflictResolver"; import { diff --git a/frontend/src/components/WalletConnect.tsx b/frontend/src/components/WalletConnect.tsx index f844c0ae..f4c5045f 100644 --- a/frontend/src/components/WalletConnect.tsx +++ b/frontend/src/components/WalletConnect.tsx @@ -3,7 +3,9 @@ import { setAllowed, isAllowed, getAddress } from "@stellar/freighter-api"; import { LogOut, Wallet, AlertCircle } from "./icons"; import { hasCustomRpcConfig, networkConfig } from "../config/network"; import { useToast } from "../context/ToastContext"; +import { usePreferencesContext } from "../context/PreferencesContext"; import { useTranslation } from "../i18n"; +import { displayIdentifier } from "../lib/maskSensitiveValues"; import CopyButton from "./CopyButton"; import { discoverConnectedAddress, diff --git a/frontend/src/components/icons.ts b/frontend/src/components/icons.ts index 5de433e5..5a0475e7 100644 --- a/frontend/src/components/icons.ts +++ b/frontend/src/components/icons.ts @@ -2,6 +2,7 @@ export { Activity, AlertTriangle, ChevronRight, + Clock, AlertCircle, Check, Copy, diff --git a/frontend/src/hooks/useSharableViewState.ts b/frontend/src/hooks/useSharableViewState.ts index 9b1e4858..f6175623 100644 --- a/frontend/src/hooks/useSharableViewState.ts +++ b/frontend/src/hooks/useSharableViewState.ts @@ -97,7 +97,7 @@ export function useSharableViewState(options: UseSharableViewStateOptions = {}) const setState = useCallback( (updates: Partial) => { - setSearchParams((prev) => { + setSearchParams((_prev) => { const next = new URLSearchParams(); const merged = { ...state, ...updates }; diff --git a/frontend/src/hooks/useWalletHeartbeat.ts b/frontend/src/hooks/useWalletHeartbeat.ts index c2068b54..8662bfc1 100644 --- a/frontend/src/hooks/useWalletHeartbeat.ts +++ b/frontend/src/hooks/useWalletHeartbeat.ts @@ -44,7 +44,7 @@ export function useWalletHeartbeat( const elapsed = performance.now() - start; if (result?.isConnected) { - setHeartbeat((prev) => ({ + setHeartbeat((_prev) => ({ state: elapsed > DEGRADED_LATENCY_THRESHOLD_MS ? "degraded" : "healthy", latencyMs: Math.round(elapsed), lastChecked: new Date(), diff --git a/frontend/src/pages/Portfolio.tsx b/frontend/src/pages/Portfolio.tsx index 7ae9e0d6..0a064bfa 100644 --- a/frontend/src/pages/Portfolio.tsx +++ b/frontend/src/pages/Portfolio.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState, useEffect, useRef } from "react"; +import React, { useMemo, useState, useEffect, useRef, useCallback } from "react"; import { Activity, TrendingUp, DollarSign, Percent, Briefcase, Share2 } from "../components/icons"; import { useTranslation } from "../i18n"; import ApiStatusBanner from "../components/ApiStatusBanner"; From ad86969ed90fc4323f8bf15e0d8ae6be04a96f7d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Jun 2026 15:44:55 +0100 Subject: [PATCH 3/3] fix(frontend): complete tsc fixes for CI build Restore WalletReconnectPrompt import, remove unused Loader2, fix idle prefetch typing, and drop unused state updater params. Co-authored-by: Cursor --- frontend/src/App.tsx | 4 ++-- frontend/src/components/VaultDashboard.tsx | 1 - frontend/src/components/WalletConnect.tsx | 1 + frontend/src/hooks/useSharableViewState.ts | 2 +- frontend/src/hooks/useWalletHeartbeat.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 69cf9408..ab5f3235 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -75,8 +75,8 @@ function AppContent() { return () => window.cancelIdleCallback(idleId); } - const timeoutId = window.setTimeout(schedulePrefetch, 1500); - return () => window.clearTimeout(timeoutId); + const timeoutId = globalThis.setTimeout(schedulePrefetch, 1500); + return () => globalThis.clearTimeout(timeoutId); }, [location.pathname]); const handleConnect = useCallback((address: string) => { diff --git a/frontend/src/components/VaultDashboard.tsx b/frontend/src/components/VaultDashboard.tsx index fdc102ef..b427a849 100644 --- a/frontend/src/components/VaultDashboard.tsx +++ b/frontend/src/components/VaultDashboard.tsx @@ -4,7 +4,6 @@ import { AlertCircle, AlertTriangle, Check, - Loader2, Share2, ShieldCheck, TrendingUp, diff --git a/frontend/src/components/WalletConnect.tsx b/frontend/src/components/WalletConnect.tsx index f4c5045f..c39c946d 100644 --- a/frontend/src/components/WalletConnect.tsx +++ b/frontend/src/components/WalletConnect.tsx @@ -25,6 +25,7 @@ import { } from "../lib/walletSession"; import { Button } from "./ui/Button"; import WalletSessionIndicator from "./WalletSessionIndicator"; +import WalletReconnectPrompt from "./WalletReconnectPrompt"; const IS_AUTOMATED_TEST = typeof process !== "undefined" && diff --git a/frontend/src/hooks/useSharableViewState.ts b/frontend/src/hooks/useSharableViewState.ts index f6175623..547a1b99 100644 --- a/frontend/src/hooks/useSharableViewState.ts +++ b/frontend/src/hooks/useSharableViewState.ts @@ -97,7 +97,7 @@ export function useSharableViewState(options: UseSharableViewStateOptions = {}) const setState = useCallback( (updates: Partial) => { - setSearchParams((_prev) => { + setSearchParams(() => { const next = new URLSearchParams(); const merged = { ...state, ...updates }; diff --git a/frontend/src/hooks/useWalletHeartbeat.ts b/frontend/src/hooks/useWalletHeartbeat.ts index 8662bfc1..4f1eb628 100644 --- a/frontend/src/hooks/useWalletHeartbeat.ts +++ b/frontend/src/hooks/useWalletHeartbeat.ts @@ -44,7 +44,7 @@ export function useWalletHeartbeat( const elapsed = performance.now() - start; if (result?.isConnected) { - setHeartbeat((_prev) => ({ + setHeartbeat(() => ({ state: elapsed > DEGRADED_LATENCY_THRESHOLD_MS ? "degraded" : "healthy", latencyMs: Math.round(elapsed), lastChecked: new Date(),