Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/rust-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/VaultDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useEffect, useState } from "react";
import React, { useEffect, useRef, useState } from "react";
import {
Activity,
AlertCircle,
AlertTriangle,
Check,
Loader2,
Share2,
ShieldCheck,
TrendingUp,
Expand All @@ -27,6 +26,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";
Expand All @@ -45,7 +45,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 {
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/WalletConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -23,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" &&
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export {
Activity,
AlertTriangle,
ChevronRight,
Clock,
AlertCircle,
Check,
Copy,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useSharableViewState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

const setState = useCallback(
(updates: Partial<SharableViewState>) => {
setSearchParams((prev) => {
setSearchParams(() => {
const next = new URLSearchParams();

const merged = { ...state, ...updates };
Expand All @@ -119,7 +119,7 @@
return params;
});
},
[setSearchParams, state, defaultPage, defaultPageSize, defaultSortBy, defaultSortDirection],

Check warning on line 122 in frontend/src/hooks/useSharableViewState.ts

View workflow job for this annotation

GitHub Actions / Frontend lint + test

React Hook useCallback has an unnecessary dependency: 'defaultSortBy'. Either exclude it or remove the dependency array
);

const setPage = useCallback((page: number) => setState({ page }), [setState]);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useWalletHeartbeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Portfolio.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -314,7 +314,7 @@
</span>
),
},
], [formatSensitiveCurrency, t]);

Check warning on line 317 in frontend/src/pages/Portfolio.tsx

View workflow job for this annotation

GitHub Actions / Frontend lint + test

React Hook useMemo has a missing dependency: 'locale'. Either include it or remove the dependency array

// Compute trend values
const totalNetValueTrend = useMemo(() => {
Expand Down
Loading