mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-11-16 14:57:35 +00:00
feat: fetch exchange rates immediately on startup
Start fetching exchange rates immediately upon initialization, ensuring the most current data is available from the outset. This prevents potential inaccuracies during initial use if rates are only fetched after the interval delay.
This commit is contained in:
parent
31cadc232b
commit
a1ccf0b43b
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// Fetch updated exchange rates every 5 seconds
|
||||
// Fetch updated exchange rates immediately, then every 5 seconds
|
||||
fetchUpdatedExchangeRates();
|
||||
setInterval(fetchUpdatedExchangeRates, 5000);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue