feat: align fee summary, special pricing and support chat with modular

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 17:57:22 +03:30
co-authored by Cursor
parent e9c5830d4e
commit e01192fb5e
11 changed files with 292 additions and 49 deletions
+13 -1
View File
@@ -9,6 +9,10 @@ import {
priceStreamLifecycle,
priceWssEnabled,
} from '@/utils/priceSocketState'
import {
applyBoardSpecialToLastPayload,
setSpecialPricingPayload,
} from '@/utils/specialPricing'
export {
priceSocketConnected,
@@ -326,7 +330,7 @@ function handleLastPayload(payload: unknown) {
return
}
const last = payload as Price
const last = applyBoardSpecialToLastPayload(payload as Price)
if (last.price_last == null && last.price == null && last.buy == null) {
return
}
@@ -413,6 +417,14 @@ function bindStreamEvents(source: EventSource) {
}
})
source.addEventListener('special-pricing', (event) => {
try {
setSpecialPricingPayload(JSON.parse(event.data))
} catch (error) {
console.warn('Special-pricing SSE parse failed', error)
}
})
source.addEventListener('ping', () => {
touchStreamActivity()
})