Fix zap hang from dead outbox relay, add note preview to zap history

Override NDK default outbox relays (purplepag.es DNS failure was stalling
getZapInfo), add 45s zap timeout, disable outbox on NWC instance, fix
follower notification dedup in poller. Zap history rows now show a
clickable preview of the original zapped note.
This commit is contained in:
Jure
2026-03-30 20:23:32 +02:00
parent 1d86023779
commit 383634fb56
5 changed files with 80 additions and 7 deletions

View File

@@ -78,7 +78,12 @@ export const useLightningStore = create<LightningState>(() => ({
});
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error("Zap timed out after 45 seconds"));
}, 45000);
zapper.on("complete", (results) => {
clearTimeout(timeout);
const errors = Array.from(results.values()).filter((r) => r instanceof Error);
if (errors.length > 0) {
reject(errors[0]);
@@ -87,7 +92,12 @@ export const useLightningStore = create<LightningState>(() => ({
}
});
zapper.zap().catch(reject);
zapper.zap().then(() => {
// zap() resolved but "complete" event handles the result
}).catch((err) => {
clearTimeout(timeout);
reject(err);
});
});
},
}));