Import
Usage
Parameters
Return Type
Behavior
- Fetches the settlement on mount and whenever
settlementIdchanges. - Subscribes to real-time updates via the event bus (polling in Phase 1, SSE in Phase 2).
- When a
state_changedevent is received, the settlement object updates automatically. - Passing
nullassettlementIdclears the settlement and stops subscriptions.
Settlement Object
The returnedsettlement includes parties and legs: