diff options
| author | Adam Soltys <[email protected]> | 2026-07-06 10:38:26 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-06 10:38:26 -0700 |
| commit | f8708f5472b7fa9ee6f0a248a0d6461ff259cb94 (patch) | |
| tree | 77a3bba233d479b16c83e44dcd4d9000fb36bd3c /src | |
| parent | 9c4c828bfbf50db7dfa61f1b9ae4cc0ffc7cac5b (diff) | |
| download | coinosv3-f8708f5472b7fa9ee6f0a248a0d6461ff259cb94.tar.gz coinosv3-f8708f5472b7fa9ee6f0a248a0d6461ff259cb94.zip | |
tmp: log publish result (debug)
Diffstat (limited to 'src')
| -rw-r--r-- | src/nostr.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nostr.js b/src/nostr.js index e73aa5d..a1d6cc4 100644 --- a/src/nostr.js +++ b/src/nostr.js @@ -163,8 +163,9 @@ export class NostrSync { try { const content = nip44.encrypt(JSON.stringify(stateObj), this.ck); evt = finalizeEvent({ kind: 30078, created_at: Math.floor(Date.now() / 1000), tags: [['d', dtag]], content }, this.sk); - } catch { return; } - await Promise.allSettled(pool.publish(this.relays, evt)); + } catch (e) { console.log('[pubdbg] finalize threw', e.message); return; } + const res = await Promise.allSettled(pool.publish(this.relays, evt)); + console.log('[pubdbg] publish', dtag, 'bytes', evt.content.length, '->', JSON.stringify(res.map((r) => r.status === 'fulfilled' ? 'ok' : ('rej:' + String(r.reason).slice(0, 80))))); } // Deliver an encrypted DM (a locked gift's claim code) as a NIP-17 gift wrap |
