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

6
src/lib/event.ts

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

Loading…
Cancel
Save