From 24ae5810a844e0099910cf70b1a18158f82891e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 20 Jun 2023 13:06:33 +0200 Subject: =?UTF-8?q?=C5=BE:=20cache=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "prog/\305\276/app.html" | 4 ++-- "prog/\305\276/gen.html" | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'prog/ΕΎ') diff --git "a/prog/\305\276/app.html" "b/prog/\305\276/app.html" index f5601e1..544db56 100644 --- "a/prog/\305\276/app.html" +++ "b/prog/\305\276/app.html" @@ -231,8 +231,8 @@ async function sync_transactions () { for (let i = 0; i < server_transactions.length/tx_len; i++) if (await try_import_tx(server_transactions.slice(tx_len*i, tx_len*i+tx_len))) count++; - window.lsh = a2hex(new Uint8Array(await crypto.subtle.digest("SHA-256", server_transactions.slice(-tx_len)))); - localStorage.setItem("last_sync_hash", lsh); + if (server_transactions.length) + localStorage.setItem("last_sync_hash", a2hex(new Uint8Array(await crypto.subtle.digest("SHA-256", server_transactions.slice(-tx_len))))); if (count) rendertxsbal(); return count; diff --git "a/prog/\305\276/gen.html" "b/prog/\305\276/gen.html" index 47fe749..8a5342a 100644 --- "a/prog/\305\276/gen.html" +++ "b/prog/\305\276/gen.html" @@ -27,7 +27,7 @@ function a2hex (a) { return r; } async function main () { - while (!pubsec1.innerText.startsWith("02aa") && !pubsec1.innerText.startsWith("03aa")) { + while (!pubsec1.innerText.startsWith("0200") && !pubsec1.innerText.startsWith("0300")) { window.keyobj = await crypto.subtle.generateKey( { name: "ECDSA", -- cgit v1.2.3