fix: history_ready event — frontend refetch apos replay completo

This commit is contained in:
rufinomec-afk
2026-06-07 23:09:29 -03:00
parent 310c1f52bd
commit c74b411404
3 changed files with 20 additions and 3 deletions
+3 -1
View File
@@ -78,7 +78,9 @@ export default function App() {
if (msg.type === 'init') {
setActiveCluster(msg.active);
fetchHistory(); // Sync history on connection
fetchHistory();
} else if (msg.type === 'history_ready') {
fetchHistory(); // Replay completo — busca histórico atualizado
} else if (msg.type === 'tick') {
setActiveCluster(msg.active);
if (msg.active?.bid) setLastBid(msg.active.bid);