Merge pull request #2483 from PR0M3TH3AN/fix-torch-dashboard-events-loading-8148177310068210665

Fix TORCH dashboard event loading for active locks
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-13 19:27:10 -05:00
commit e94d1d52e1
2 files changed
+4 -4

No files matched your search

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

+4 -4
View File
@@ -520,13 +520,13 @@
updateConnectionBadge();
// NIP-01 REQ: subscribe to TORCH lock events
// Since today is the start of the window, request from today
const sinceToday =
Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000);
// Request from 7 days ago to cover active locks created before midnight
// and recent history for weekly cadence
const since = Math.floor(Date.now() / 1000) - 7 * 24 * 60 * 60;
const filter = {
kinds: [LOCK_EVENT_KIND],
'#t': [HASHTAG],
since: sinceToday,
since: since,
};
ws.send(JSON.stringify(['REQ', subId, filter]));
});