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:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user