global: fixes

This commit is contained in:
nym21
2026-04-29 16:51:01 +02:00
parent a7e41df1c6
commit 43f3be4924
101 changed files with 3074 additions and 2869 deletions

View File

@@ -1,6 +1,5 @@
import { explorerElement } from "../utils/elements.js";
import { brk } from "../utils/client.js";
import { createMapCache } from "../utils/cache.js";
import {
initChain,
goToCube,
@@ -30,7 +29,6 @@ import {
/** @type {number | undefined} */ let pollInterval;
let navController = new AbortController();
const txCache = createMapCache(50);
let lastLoadedUrl = "";
function navigate() {
@@ -134,7 +132,7 @@ async function load() {
if (kind === "tx" && value) {
const txid = await resolveTxid(value, { signal });
if (signal.aborted) return;
const tx = await txCache.fetch(txid, () => brk.getTx(txid, { signal }));
const tx = await brk.getTx(txid, { signal });
if (signal.aborted) return;
await goToCube(tx.status?.blockHash ?? tx.status?.blockHeight ?? null, { silent: true });
updateTx(tx);
@@ -178,7 +176,7 @@ async function navigateToTx(txidOrIndex) {
try {
const txid = await resolveTxid(txidOrIndex, { signal });
if (signal.aborted) return;
const tx = await txCache.fetch(txid, () => brk.getTx(txid, { signal }));
const tx = await brk.getTx(txid, { signal });
if (signal.aborted) return;
await goToCube(tx.status?.blockHash ?? tx.status?.blockHeight ?? null, { silent: true });
updateTx(tx);