Compare commits

...
2 Commits
Author SHA1 Message Date
Laan Tungir 6d41680297 Increase walletRepublish timeout to 120s for large wallets
The 45s timeout was too short for wallets with many old 7375 token events —
each deletion requires a signing round-trip through the nos2x extension.
2026-06-25 14:01:01 -04:00
Laan Tungir b2a50376df Ensure nutzap privkey is always included in kind 17375 republish
- Added ensureDirectNutzapP2pk() call in publishDirectProofs before building wallet payload
- This auto-generates a privkey if one wasn't hydrated from the old 17375 event
- Bumped WORKER_REVISION to nip60-privkey-ensure-1
2026-06-25 13:48:34 -04:00
3 changed files with 14 additions and 5 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ export async function initNDKPage(options = {}) {
// All pages in www/ directory, so worker path is always the same.
// Include explicit worker revision token so updated SharedWorker code is guaranteed to restart.
const WORKER_REVISION = 'nip60-republish-1';
const WORKER_REVISION = 'nip60-privkey-ensure-1';
const workerPath = `./ndk-worker.js?v=${encodeURIComponent(VERSION)}&wr=${encodeURIComponent(WORKER_REVISION)}`;
// Initialize NDK SharedWorker (shared across all tabs/pages)
@@ -1426,7 +1426,7 @@ export function walletShutdown() {
}
export function walletRepublish() {
return sendWorkerRequest('walletRepublish', {}, 45000, 'walletRepublish timeout');
return sendWorkerRequest('walletRepublish', {}, 120000, 'walletRepublish timeout');
}
export function walletPublishMintList(relays = [], receiveMints = []) {
+3 -3
View File
@@ -1,5 +1,5 @@
{
"VERSION": "v0.7.21",
"VERSION_NUMBER": "0.7.21",
"BUILD_DATE": "2026-06-25T17:39:32.779Z"
"VERSION": "v0.7.23",
"VERSION_NUMBER": "0.7.23",
"BUILD_DATE": "2026-06-25T18:01:01.940Z"
}
+9
View File
@@ -2843,6 +2843,15 @@ async function publishDirectProofs(debugContext = null) {
}
log('delete old 7375 done');
// Ensure a nutzap privkey exists before building the wallet payload.
// If the user's old 17375 didn't have one (or hydration failed),
// this auto-generates one so it's always included in the republish.
try {
ensureDirectNutzapP2pk();
} catch (err) {
log('ensureDirectNutzapP2pk failed during publish', { error: err?.message || String(err) });
}
// NIP-60 standard: public "mint" tags are visible on the event;
// the privkey lives in the encrypted content as a "privkey" tag.
// The "pubkey" tag does NOT belong on kind 17375 (it belongs on