iuna

iuna

iuna - experimental mainnet-candidate protocol
git clone https://getiuna.org/git/iuna.git
Log | Files | Refs | README | LICENSE

commit 67b99fb0b7e0d82e87cb096b753c43955193bdd2
parent 52e510ef8c8e1e11ac38e9c88f3acd0264676f1d
Author: Joris Hartog <jorishartog@hotmail.com>
Date:   Sat,  5 Sep 2026 00:19:33 +0200

Check for updates more often

Diffstat:
Mwww/assets/iuna-ui.js | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/www/assets/iuna-ui.js b/www/assets/iuna-ui.js @@ -1,5 +1,6 @@ const IUNA_DOWNLOADS_URL = "https://getiuna.org/downloads/"; const IUNA_RELEASE_METADATA_URL = "https://getiuna.org/downloads/latest.json"; +const IUNA_RELEASE_CHECK_INTERVAL_MS = 30 * 60 * 1000; window.iunaApp = function iunaApp() { return { @@ -124,6 +125,7 @@ window.iunaApp = function iunaApp() { showPowDifficultyInfo: false, lastUpdated: null, pollHandle: null, + releaseCheckTimer: null, refreshPromise: null, shellRefreshPromise: null, networkHealthPromise: null, @@ -166,6 +168,7 @@ window.iunaApp = function iunaApp() { } await this.refresh(); this.checkLatestRelease(); + this.scheduleReleaseCheck(); this.schedulePoll(); }, @@ -174,11 +177,28 @@ window.iunaApp = function iunaApp() { }, stopPolling() { + this.stopReleaseCheck(); if (!this.pollHandle) return; clearTimeout(this.pollHandle); this.pollHandle = null; }, + stopReleaseCheck() { + if (!this.releaseCheckTimer) return; + clearTimeout(this.releaseCheckTimer); + this.releaseCheckTimer = null; + }, + + scheduleReleaseCheck() { + if (this.releaseCheckTimer || !this.canUseProtectedApi()) return; + this.releaseCheckTimer = setTimeout(async () => { + this.releaseCheckTimer = null; + if (!this.canUseProtectedApi()) return; + await this.checkLatestRelease(); + this.scheduleReleaseCheck(); + }, IUNA_RELEASE_CHECK_INTERVAL_MS); + }, + schedulePoll() { if (this.pollHandle || !this.canUseProtectedApi()) return; const delay = this.syncingNode() ? 1000 : 5000;