Skip to content

Commit

Permalink
chore: add nostr event
Browse files Browse the repository at this point in the history
  • Loading branch information
topether21 committed Jul 25, 2023
1 parent 7082586 commit 8478813
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/functions/auction/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/functions/auctions-by-collection/handler.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
1 change: 1 addition & 0 deletions src/functions/update-auction-status/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export async function updateAuctionStatus(event: Auction) {
auctionMetadata[currentMetadataIndex] = {
...scheduledEvent,
nostrEventId: broadcastedEvent.id,
nostr: broadcastedEvent,
};
await updateAuctionMetadata(id, auctionMetadata);
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface AuctionMetadata {
endTime: number;
id: string;
nostrEventId?: string;
nostr?: any; // TODO: type
price: number;
signedPsbt: string;
index: number;
Expand Down

0 comments on commit 8478813

Please sign in to comment.