From 66d41d1aa1f5c60cd63b1691ba6bf70e88cf78fa Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 16:34:55 -0700 Subject: The standalone wallet opened from a disk shows its avatars, font and languages. With no files beside it, relative punks/, locales/, nip46.js and jsqr.js looked on the disk. From file:// they now come from v3.coinos.io (images and scripts need no CORS; /locales/ now sends Access-Control-Allow-Origin on the server), and standalone.html carries Public Sans inline. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog --- src/nostr-login.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nostr-login.js') diff --git a/src/nostr-login.js b/src/nostr-login.js index d6cb978..fe60261 100644 --- a/src/nostr-login.js +++ b/src/nostr-login.js @@ -40,6 +40,7 @@ import { getPublicKey, finalizeEvent, nip44 } from './nostr.js'; import { SimplePool } from 'nostr-tools/pool'; import { generateSecretKey } from 'nostr-tools/pure'; import { decode as nip19decode } from 'nostr-tools/nip19'; +import { assetUrl } from './asset-url.js'; // NIP-46 loads lazily from dist/nip46.js (same pattern as the QR decoder): // bunker logins are rare, and the module is heavy. Tests running outside a @@ -50,7 +51,7 @@ function loadNip46() { if (typeof globalThis !== 'undefined' && globalThis.__nip46) return (_nip46 = Promise.resolve(globalThis.__nip46)); _nip46 = new Promise((resolve, reject) => { const s = document.createElement('script'); - s.src = 'nip46.js'; + s.src = assetUrl('nip46.js'); s.onload = () => (window.__nip46 ? resolve(window.__nip46) : reject(new Error('signer module unavailable'))); s.onerror = () => { _nip46 = null; reject(new Error('could not load the remote-signer module')); }; document.head.appendChild(s); -- cgit v1.2.3