Fix: Refresh Liquid icons every 15 seconds to match electrs.

This commit is contained in:
junderw 2024-03-07 02:21:38 +09:00
parent 31e320b2e2
commit 11a6d81a17
No known key found for this signature in database
GPG Key ID: B256185D3A971908

View File

@ -155,11 +155,17 @@ class Server {
}
if (Common.isLiquid()) {
const refreshIcons = () => {
try {
icons.loadIcons();
} catch (e) {
logger.err('Cannot load liquid icons. Ignoring. Reason: ' + (e instanceof Error ? e.message : e));
}
};
// Run once on startup.
refreshIcons();
// Matches electrs hard coded refresh interval for asset db.
setInterval(refreshIcons, 15000);
}
priceUpdater.$run();