Browse Source

bug-fixes

imwald
Silberengel 3 days ago
parent
commit
77d0a8dc35
  1. 4
      src/components/KindFilter/index.tsx
  2. 6
      src/lib/event.ts

4
src/components/KindFilter/index.tsx

@ -54,9 +54,7 @@ export default function KindFilter({
showKinds: savedShowKinds, showKinds: savedShowKinds,
showKind1OPs: savedShowKind1OPs, showKind1OPs: savedShowKind1OPs,
showRepliesAndComments: savedShowRepliesAndComments, showRepliesAndComments: savedShowRepliesAndComments,
updateShowKinds, updateShowKinds
updateShowKind1OPs,
updateShowRepliesAndComments
} = useKindFilter() } = useKindFilter()
const [open, setOpen] = useState(false) const [open, setOpen] = useState(false)
const [temporaryShowKinds, setTemporaryShowKinds] = useState(showKinds) const [temporaryShowKinds, setTemporaryShowKinds] = useState(showKinds)

6
src/lib/event.ts

@ -2,8 +2,8 @@ import { EMBEDDED_MENTION_REGEX, ExtendedKind } from '@/constants'
import client from '@/services/client.service' import client from '@/services/client.service'
import { TImetaInfo } from '@/types' import { TImetaInfo } from '@/types'
import { LRUCache } from 'lru-cache' import { LRUCache } from 'lru-cache'
import { Event, kinds, nip19, UnsignedEvent } from 'nostr-tools' import { Event, getEventHash, kinds, nip19, UnsignedEvent } from 'nostr-tools'
import { fastEventHash, getPow } from 'nostr-tools/nip13' import { getPow } from 'nostr-tools/nip13'
import { import {
generateBech32IdFromATag, generateBech32IdFromATag,
generateBech32IdFromETag, generateBech32IdFromETag,
@ -303,7 +303,7 @@ export async function minePow(
} }
tag[1] = (++count).toString() tag[1] = (++count).toString()
event.id = fastEventHash(event) event.id = getEventHash(event)
if (getPow(event.id) >= difficulty) { if (getPow(event.id) >= difficulty) {
resolve(event) resolve(event)

Loading…
Cancel
Save