try to fix chart udates - wip

This commit is contained in:
Dobromir Popov
2025-12-10 11:58:53 +02:00
parent 1d49269301
commit c7a37bf5f0
9 changed files with 364 additions and 170 deletions

View File

@@ -219,8 +219,13 @@ document.addEventListener('DOMContentLoaded', function() {
window.liveUpdatesWS.onChartUpdate = function(data) {
// Update chart with new candle
// data structure: { symbol, timeframe, candle: {...}, is_confirmed: true/false }
if (window.appState && window.appState.chartManager) {
window.appState.chartManager.updateLatestCandle(data.symbol, data.timeframe, data.candle);
// Pass the full update object so is_confirmed is available
window.appState.chartManager.updateLatestCandle(data.symbol, data.timeframe, {
...data.candle,
is_confirmed: data.is_confirmed
});
}
};