mirror of
https://github.com/dergigi/boris.git
synced 2026-01-06 16:34:45 +01:00
fix: resolve lint and type errors
- Changed idToEvent from let to const (prefer-const) - Fixed TypeScript type narrowing issue by using direct regex test instead of isHexId type guard - Removed unused isHexId import All lint and type checks now pass for src directory.
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
dedupeNip51Events,
|
||||
hydrateItems,
|
||||
isAccountWithExtension,
|
||||
isHexId,
|
||||
hasNip04Decrypt,
|
||||
hasNip44Decrypt,
|
||||
dedupeBookmarksById,
|
||||
@@ -120,7 +119,8 @@ export const fetchBookmarks = async (
|
||||
const coordinates: string[] = []
|
||||
|
||||
allItems.forEach(i => {
|
||||
if (isHexId(i.id)) {
|
||||
// Check if it's a hex ID (64 character hex string)
|
||||
if (/^[0-9a-f]{64}$/i.test(i.id)) {
|
||||
noteIds.push(i.id)
|
||||
} else if (i.id.includes(':')) {
|
||||
// Coordinate format: kind:pubkey:identifier
|
||||
@@ -128,7 +128,7 @@ export const fetchBookmarks = async (
|
||||
}
|
||||
})
|
||||
|
||||
let idToEvent: Map<string, NostrEvent> = new Map()
|
||||
const idToEvent: Map<string, NostrEvent> = new Map()
|
||||
|
||||
// Fetch regular events by ID
|
||||
if (noteIds.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user