Fix: Update orderbook rates.

- Update rates whenever new offer date is received via WebSocket.
- Ensure rates are updated when the offers table is refreshed.
- Keep profit/loss in sync.
This commit is contained in:
gerlofvanek 2025-04-01 22:52:31 +02:00
parent aa9babdc69
commit e1a6dbeaed

View file

@ -1062,6 +1062,7 @@ async function updateOffersTable() {
requestAnimationFrame(() => {
updateRowTimes();
updatePaginationControls(Math.ceil(validOffers.length / itemsPerPage));
updateProfitLossDisplays();
if (tableRateModule?.initializeTable) {
tableRateModule.initializeTable();
}
@ -2283,6 +2284,7 @@ document.addEventListener('DOMContentLoaded', async () => {
requestAnimationFrame(() => {
updateOffersTable();
updatePaginationInfo();
updateProfitLossDisplays();
});
} catch (error) {
console.error('[Debug] Error processing WebSocket message:', error);