feat(bridge-monitoring): show inventory shortfall for queued releases

Surface mission-control bridge_inventory scope, wei shortfall fields, and
relay card formatting for WETH display.

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-12 06:44:20 -07:00
parent ee71f098ab
commit 26b0f1bf48
2 changed files with 52 additions and 1 deletions

View File

@@ -16,6 +16,16 @@ export interface MissionControlRelayItemSummary {
export interface MissionControlRelaySnapshot {
status?: string
last_error?: {
scope?: string
message?: string
message_id?: string
target_bridge?: string
token?: string
available_amount?: string
required_amount?: string
shortfall?: string
}
monitoring?: {
delivery_enabled?: boolean
shedding?: boolean
@@ -135,6 +145,11 @@ function relativeAge(isoString?: string): string {
}
function describeRelayStatus(snapshot: MissionControlRelaySnapshot, status: string): string {
if (snapshot.last_error?.scope === 'bridge_inventory') {
return snapshot.queue?.size && snapshot.queue.size > 0
? 'underfunded queued release'
: 'underfunded release'
}
if (status === 'paused' && snapshot.monitoring?.delivery_enabled === false) {
return snapshot.queue?.size && snapshot.queue.size > 0 ? 'delivery paused (queueing)' : 'delivery paused'
}