fix: resolve black-screen UI from stale CDN assets and API paths
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m16s
CI/CD Pipeline / Security Scanning (push) Successful in 2m23s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 24s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 26s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 39s
Validation / validate-genesis (push) Successful in 26s
Validation / validate-terraform (push) Failing after 24s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 9s
Validation / validate-security (push) Failing after 1m28s
Validation / validate-documentation (push) Failing after 20s
Verify Deployment / Verify Deployment (push) Failing after 54s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 19:31:33 -07:00
parent 3c7abd5a01
commit b17df7ef14
6 changed files with 123 additions and 42 deletions

View File

@@ -11,7 +11,7 @@ location /api/v1/ {
}
location /settlement/ {
proxy_pass http://omnl_settlement/api/v1/settlement/;
proxy_pass http://omnl_settlement/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -22,7 +22,7 @@ location /settlement/ {
}
location /exchange/ {
proxy_pass http://omnl_exchange/api/v1/exchange/;
proxy_pass http://omnl_exchange/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -43,4 +43,12 @@ location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}
location = /index.html {
proxy_pass http://omnl_frontend/index.html;
proxy_http_version 1.1;
proxy_set_header Host $host;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}

View File

@@ -4,10 +4,38 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bridge DApp - Chain 138</title>
<title>OMNL Mission Control — Chain 138</title>
<style>
html, body { margin: 0; min-height: 100%; background: #0f2847; color: #e8f4ff; }
#root { min-height: 100vh; }
.omnl-boot {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
font-family: Inter, system-ui, sans-serif;
background:
radial-gradient(ellipse at 20% 0%, rgba(45, 107, 184, 0.45) 0%, transparent 55%),
linear-gradient(180deg, #0f2847 0%, #0a1a30 100%);
}
.omnl-boot__title {
font-size: 1.1rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #00d4ff;
}
.omnl-boot__hint { color: #9bb8d4; font-size: 0.9rem; }
</style>
</head>
<body>
<div id="root"></div>
<div id="root">
<div class="omnl-boot" role="status" aria-live="polite">
<div class="omnl-boot__title">OMNL Mission Control</div>
<div class="omnl-boot__hint">Loading dashboard…</div>
</div>
</div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
{
"headers": [
{
"source": "/index.html",
"headers": [
{ "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" }
]
},
{
"source": "/",
"headers": [
{ "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" }
]
},
{
"source": "/assets/**",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
]
}
]
}

View File

@@ -37,38 +37,42 @@ const THIRDWEB_CLIENT_ID = import.meta.env.VITE_THIRDWEB_CLIENT_ID || '542981292
function App() {
return (
<ErrorBoundary>
<ThirdwebProvider clientId={THIRDWEB_CLIENT_ID}>
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<BrowserRouter
future={{
v7_startTransition: true,
v7_relativeSplatPath: true,
}}
>
<ToastProvider />
<AdminProvider>
<Routes>
<Route element={<OmnlProductLayout />}>
<Route path="/central-bank" element={<CentralBankPage />} />
<Route path="/office-24" element={<Office24Page />} />
<Route path="/trade" element={<TradePage />} />
<Route path="/swap" element={<SwapPage />} />
</Route>
<Route element={<Layout />}>
<Route path="/" element={<BridgePage />} />
<Route path="/reserve" element={<ReservePage />} />
<Route path="/history" element={<HistoryPage />} />
<Route path="/admin" element={<AdminPanel />} />
<Route path="/docs" element={<DocsPage />} />
<Route path="/wallets" element={<WalletsDemoPage />} />
</Route>
</Routes>
</AdminProvider>
</BrowserRouter>
</QueryClientProvider>
</WagmiProvider>
</ThirdwebProvider>
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<BrowserRouter
future={{
v7_startTransition: true,
v7_relativeSplatPath: true,
}}
>
<ToastProvider />
<AdminProvider>
<Routes>
<Route element={<OmnlProductLayout />}>
<Route path="/central-bank" element={<CentralBankPage />} />
<Route path="/office-24" element={<Office24Page />} />
<Route path="/trade" element={<TradePage />} />
<Route path="/swap" element={<SwapPage />} />
</Route>
<Route
element={
<ThirdwebProvider clientId={THIRDWEB_CLIENT_ID}>
<Layout />
</ThirdwebProvider>
}
>
<Route path="/" element={<BridgePage />} />
<Route path="/reserve" element={<ReservePage />} />
<Route path="/history" element={<HistoryPage />} />
<Route path="/admin" element={<AdminPanel />} />
<Route path="/docs" element={<DocsPage />} />
<Route path="/wallets" element={<WalletsDemoPage />} />
</Route>
</Routes>
</AdminProvider>
</BrowserRouter>
</QueryClientProvider>
</WagmiProvider>
</ErrorBoundary>
)
}

View File

@@ -1,11 +1,27 @@
/** DBIS Exchange — Chain 138 DEX addresses (Pancake/Uniswap V2 compatible) */
export const DBIS_EXCHANGE_CHAIN_ID = 138;
export const TOKEN_AGGREGATION_URL =
import.meta.env.VITE_TOKEN_AGGREGATION_URL || 'http://localhost:3000';
export const DBIS_EXCHANGE_URL =
import.meta.env.VITE_DBIS_EXCHANGE_URL || 'http://localhost:3012';
export const SETTLEMENT_MIDDLEWARE_URL =
import.meta.env.VITE_SETTLEMENT_MIDDLEWARE_URL || 'http://localhost:3011';
function prodOrLocal(envValue: string | undefined, prodPath: string, localUrl: string): string {
const trimmed = envValue?.trim();
if (trimmed) return trimmed;
return import.meta.env.PROD ? prodPath : localUrl;
}
export const TOKEN_AGGREGATION_URL = prodOrLocal(
import.meta.env.VITE_TOKEN_AGGREGATION_URL,
'/api/v1',
'http://localhost:3000',
);
export const DBIS_EXCHANGE_URL = prodOrLocal(
import.meta.env.VITE_DBIS_EXCHANGE_URL,
'/exchange',
'http://localhost:3012',
);
export const SETTLEMENT_MIDDLEWARE_URL = prodOrLocal(
import.meta.env.VITE_SETTLEMENT_MIDDLEWARE_URL,
'/settlement',
'http://localhost:3011',
);
export const ENHANCED_SWAP_ROUTER_V2 =
import.meta.env.VITE_ENHANCED_SWAP_ROUTER_V2 ||
'0xa421706768aeb7fafa2d912c5e10824ef3437ad4';

View File

@@ -57,6 +57,9 @@ done
log "Building frontend..."
cd "$REPO_DIR/frontend-dapp"
export VITE_TOKEN_AGGREGATION_URL="${VITE_TOKEN_AGGREGATION_URL:-/api/v1}"
export VITE_SETTLEMENT_MIDDLEWARE_URL="${VITE_SETTLEMENT_MIDDLEWARE_URL:-/settlement}"
export VITE_DBIS_EXCHANGE_URL="${VITE_DBIS_EXCHANGE_URL:-/exchange}"
if command -v pnpm >/dev/null 2>&1; then
pnpm install --frozen-lockfile 2>/dev/null || pnpm install
pnpm run build