diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ccd20c9..aebf234 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1204,6 +1204,8 @@ }, "node_modules/@playwright/test": { "version": "1.58.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz", + "integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4646,6 +4648,8 @@ }, "node_modules/playwright": { "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4663,6 +4667,8 @@ }, "node_modules/playwright-core": { "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4672,6 +4678,21 @@ "node": ">=18" } }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "license": "MIT", @@ -4792,6 +4813,8 @@ }, "node_modules/react-is": { "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "license": "MIT" }, "node_modules/react-redux": { diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e490f95..483cd26 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,12 +1,17 @@ -import { useEffect, useState, lazy, Suspense } from "react"; +import { lazy, Suspense, useEffect, useState } from "react"; import { BrowserRouter as Router, - Routes, - Route, Navigate, + Route, + Routes, } from "react-router-dom"; +import * as Sentry from "@sentry/react"; +import Navbar from "./components/Navbar"; +import ErrorFallback from "./components/ErrorFallback"; import { ThemeProvider } from "./context/ThemeContext"; import { VaultProvider } from "./context/VaultContext"; +import { fetchUsdcBalance } from "./lib/stellarAccount"; +import "./index.css"; import { KeyboardShortcutProvider } from "./context/KeyboardShortcutContext"; import Navbar from "./components/Navbar"; import ShortcutHelpModal from "./components/ShortcutHelpModal"; @@ -23,6 +28,11 @@ const Portfolio = lazy(() => import("./pages/Portfolio")); const Analytics = lazy(() => import("./pages/Analytics")); const UIPreview = lazy(() => import("./pages/UIPreview")); +const LoadingPage = () => ( +
+
+
Loading...
+
Securing RWA connection
const LoadingPage = () => { const { t } = useTranslation(); return ( @@ -59,7 +69,7 @@ function AppContent() { const [walletAddress, setWalletAddress] = useState(null); const [usdcBalance, setUsdcBalance] = useState(0); - const handleConnect = async (address: string) => { + const handleConnect = (address: string) => { setWalletAddress(address); }; @@ -76,17 +86,64 @@ function AppContent() { } try { - const discoveredBalance = await fetchUsdcBalance(walletAddress); - setUsdcBalance(discoveredBalance); + setUsdcBalance(await fetchUsdcBalance(walletAddress)); } catch { setUsdcBalance(0); } }; - loadBalance(); + void loadBalance(); }, [walletAddress]); return ( + ( + + )} + showDialog + > + + + + + + Skip to main content + +
+ +
+ }> + + + } + /> + } + /> + } /> + } + /> + } /> + + +
+
+
+
+
= ({ const { t } = useTranslation(); return (
+
+ Page {page} of {totalPages} +
+ {onPageSizeChange && (