From 84788132a7947b0b4bae7647d9a2e5edf0a325d2 Mon Sep 17 00:00:00 2001 From: topether21 Date: Tue, 25 Jul 2023 15:18:44 -0600 Subject: [PATCH] chore: add nostr event --- src/functions/auction/create.ts | 6 +----- src/functions/auctions-by-collection/handler.ts | 1 - src/functions/update-auction-status/handler.ts | 1 + src/types/index.ts | 1 + 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/functions/auction/create.ts b/src/functions/auction/create.ts index 9e5b7b7..1f6dc0e 100644 --- a/src/functions/auction/create.ts +++ b/src/functions/auction/create.ts @@ -2,11 +2,7 @@ import { v4 } from "uuid"; import { isSpent } from "@libs/inscriptions"; import { getAuctionsByInscriptionId, saveAuction } from "@libs/db"; -import { - createHttpResponse, - parseEventInput, - isWarmupRequest, -} from "@libs/api-gateway"; +import { createHttpResponse, parseEventInput } from "@libs/api-gateway"; import { errorAuctionIsRunning, diff --git a/src/functions/auctions-by-collection/handler.ts b/src/functions/auctions-by-collection/handler.ts index 1abee23..89cdeb6 100644 --- a/src/functions/auctions-by-collection/handler.ts +++ b/src/functions/auctions-by-collection/handler.ts @@ -1,5 +1,4 @@ import { internalServerError } from "@functions/errors"; -import { checkAuctionStatus } from "@functions/shared"; import { createHttpResponse, isWarmupRequest } from "@libs/api-gateway"; import { listAuctions } from "@libs/db"; import { APIGatewayEvent } from "aws-lambda"; diff --git a/src/functions/update-auction-status/handler.ts b/src/functions/update-auction-status/handler.ts index 0c1c164..429b2e8 100644 --- a/src/functions/update-auction-status/handler.ts +++ b/src/functions/update-auction-status/handler.ts @@ -75,6 +75,7 @@ export async function updateAuctionStatus(event: Auction) { auctionMetadata[currentMetadataIndex] = { ...scheduledEvent, nostrEventId: broadcastedEvent.id, + nostr: broadcastedEvent, }; await updateAuctionMetadata(id, auctionMetadata); } catch (error) { diff --git a/src/types/index.ts b/src/types/index.ts index 47d25a0..1ee3096 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -29,6 +29,7 @@ export interface AuctionMetadata { endTime: number; id: string; nostrEventId?: string; + nostr?: any; // TODO: type price: number; signedPsbt: string; index: number;