Add WalletConnect stub, track surfaces, legacy SPA retirement, and dual-domain checks.
Publish walletconnect config endpoints, Track 3/4 notes on analytics/operator pages, legacy SPA at /legacy/index.html with root redirect, and a parity verifier for explorer.d-bis.org vs blockscout.defi-oracle.io. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { Card } from '@/libs/frontend-ui-primitives'
|
||||
import type { ExplorerFeaturePage } from '@/data/explorerOperations'
|
||||
import OperationsSurfaceNav from './OperationsSurfaceNav'
|
||||
import OperationsActionGrid from './OperationsActionGrid'
|
||||
import OperationsTrackNote from './OperationsTrackNote'
|
||||
|
||||
export type StatusTone = 'normal' | 'warning' | 'danger'
|
||||
|
||||
@@ -108,6 +109,10 @@ export default function OperationsPageShell({
|
||||
</Card>
|
||||
) : null}
|
||||
|
||||
{page.accessTrack && page.accessNote ? (
|
||||
<OperationsTrackNote track={page.accessTrack} note={page.accessNote} />
|
||||
) : null}
|
||||
|
||||
<OperationsSurfaceNav />
|
||||
|
||||
{children}
|
||||
|
||||
20
frontend/src/components/explorer/OperationsTrackNote.tsx
Normal file
20
frontend/src/components/explorer/OperationsTrackNote.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Card } from '@/libs/frontend-ui-primitives'
|
||||
|
||||
export default function OperationsTrackNote({
|
||||
track,
|
||||
note,
|
||||
className,
|
||||
}: {
|
||||
track: number
|
||||
note: string
|
||||
className?: string
|
||||
}) {
|
||||
return (
|
||||
<Card className={className ?? 'mb-6 border border-violet-200 bg-violet-50/70 dark:border-violet-900/50 dark:bg-violet-950/20'}>
|
||||
<div className="text-xs font-semibold uppercase tracking-[0.2em] text-violet-700 dark:text-violet-200">
|
||||
Track {track} public surface
|
||||
</div>
|
||||
<p className="mt-2 text-sm leading-6 text-violet-950 dark:text-violet-100">{note}</p>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
@@ -11,6 +11,8 @@ export interface ExplorerFeaturePage {
|
||||
title: string
|
||||
description: string
|
||||
note?: string
|
||||
accessTrack?: number
|
||||
accessNote?: string
|
||||
actions: ExplorerFeatureAction[]
|
||||
}
|
||||
|
||||
@@ -141,6 +143,9 @@ export const explorerFeaturePages = {
|
||||
description:
|
||||
'Use the public explorer pages and live monitoring endpoints as the visible analytics surface for chain activity, recent blocks, and transaction flow.',
|
||||
note: sharedOperationsNote,
|
||||
accessTrack: 3,
|
||||
accessNote:
|
||||
'This page is the public Track 3 analytics surface. Wallet-authenticated Track 3 APIs remain available after browser wallet sign-in.',
|
||||
actions: [
|
||||
{
|
||||
title: 'Blocks',
|
||||
@@ -175,6 +180,9 @@ export const explorerFeaturePages = {
|
||||
description:
|
||||
'Expose the public operator surface for bridge checks, route validation, planner providers, liquidity entry points, and documentation.',
|
||||
note: sharedOperationsNote,
|
||||
accessTrack: 4,
|
||||
accessNote:
|
||||
'This page is the public Track 4 operator surface. Sensitive operator write APIs remain gated behind wallet auth and operator policy.',
|
||||
actions: [
|
||||
{
|
||||
title: 'Bridge monitoring',
|
||||
@@ -334,6 +342,16 @@ export const explorerOperationsSurfaces: ExplorerOperationsSurface[] = [
|
||||
label: 'System',
|
||||
description: 'Networks, RPC methods, and topology inventory.',
|
||||
},
|
||||
{
|
||||
href: '/analytics',
|
||||
label: 'Analytics',
|
||||
description: 'Track 3 activity summaries, trends, and freshness context.',
|
||||
},
|
||||
{
|
||||
href: '/operator',
|
||||
label: 'Operator',
|
||||
description: 'Track 4 relay, route, and planner shortcuts.',
|
||||
},
|
||||
]
|
||||
|
||||
export const explorerPublicApiLinks = [
|
||||
@@ -357,4 +375,9 @@ export const explorerPublicApiLinks = [
|
||||
label: 'Wallet networks',
|
||||
description: 'Published chain metadata for wallet onboarding.',
|
||||
},
|
||||
{
|
||||
href: '/explorer-api/v1/walletconnect/config',
|
||||
label: 'WalletConnect config',
|
||||
description: 'Published WalletConnect v2 posture and browser-auth fallback.',
|
||||
},
|
||||
] as const
|
||||
|
||||
24
frontend/src/services/api/walletConnect.ts
Normal file
24
frontend/src/services/api/walletConnect.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { fetchPublicJson } from '@/utils/publicExplorer'
|
||||
|
||||
const WALLETCONNECT_CONFIG_PATH = '/explorer-api/v1/walletconnect/config'
|
||||
|
||||
export interface WalletConnectConfigResponse {
|
||||
status: 'stub' | 'disabled' | string
|
||||
enabled: boolean
|
||||
projectId: string
|
||||
relayUrl: string
|
||||
metadataUrl: string
|
||||
requiredNamespaces: string[]
|
||||
supportedChains: number[]
|
||||
fallbackAuth: string
|
||||
message: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export async function getWalletConnectConfig(): Promise<WalletConnectConfigResponse | null> {
|
||||
try {
|
||||
return await fetchPublicJson<WalletConnectConfigResponse>(WALLETCONNECT_CONFIG_PATH)
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user