diff --git a/lib/articleMutations.ts b/lib/articleMutations.ts index 6da03c4..4312ee2 100644 --- a/lib/articleMutations.ts +++ b/lib/articleMutations.ts @@ -169,8 +169,8 @@ export async function publishSeries(params: { const {category} = params requireCategory(category) - // Map category to new system (not used but kept for future reference) - const _newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' + // Map category to new system + const newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' // Generate hash ID from series data const hashId = await generateSeriesHashId({ @@ -258,8 +258,8 @@ async function buildSeriesEvent( content: string tags: string[][] }> { - // Map category to new system (not used but kept for future reference) - const _newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' + // Map category to new system + const newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' // Generate hash ID from series data const hashId = await generateSeriesHashId({ @@ -324,8 +324,8 @@ export async function publishReview(params: { const {category} = params requireCategory(category) - // Map category to new system (not used but kept for future reference) - const _newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' + // Map category to new system + const newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' // Generate hash ID from review data const { generateReviewHashId } = await import('./hashIdGenerator') @@ -417,8 +417,8 @@ async function buildReviewEvent( content: string tags: string[][] }> { - // Map category to new system (not used but kept for future reference) - const _newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' + // Map category to new system + const newCategory = category === 'science-fiction' ? 'sciencefiction' : 'research' // Generate hash ID from review data const { generateReviewHashId } = await import('./hashIdGenerator') diff --git a/lib/paymentNotes.ts b/lib/paymentNotes.ts index 4dbf1ca..93fb9d8 100644 --- a/lib/paymentNotes.ts +++ b/lib/paymentNotes.ts @@ -4,7 +4,9 @@ import { PLATFORM_SERVICE } from './platformConfig' import { generatePurchaseHashId, generateReviewTipHashId, generateSponsoringHashId } from './hashIdGenerator' import { buildObjectId } from './urlGenerator' import type { Event, EventTemplate } from 'nostr-tools' -import type { Purchase } from '@/types/nostr' +import { finalizeEvent } from 'nostr-tools' +import { hexToBytes } from 'nostr-tools/utils' +import type { Purchase, ReviewTip, Sponsoring } from '@/types/nostr' import { writeOrchestrator } from './writeOrchestrator' /**