feat(trade): wait on colleague order until status is final
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -560,6 +560,16 @@ function bindStreamEvents(source: AuthPriceStream) {
|
||||
}
|
||||
})
|
||||
|
||||
source.addEventListener('colleague_order', (event) => {
|
||||
try {
|
||||
void import('@/composables/useColleagueOrderWait').then(({ emitColleagueOrderFromStream }) => {
|
||||
emitColleagueOrderFromStream(JSON.parse(event.data))
|
||||
})
|
||||
} catch (error) {
|
||||
console.warn('Colleague order SSE parse failed', error)
|
||||
}
|
||||
})
|
||||
|
||||
source.addEventListener('ping', () => {
|
||||
touchStreamActivity()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user