From 5b9f84222b136a9abcec48a01ec8bdc69f04798e Mon Sep 17 00:00:00 2001 From: Cioclea Doru Octavian Date: Fri, 28 Jul 2023 15:49:15 +0300 Subject: [PATCH] feat(auction): start auction hash --- .../modules/auctionhistory/services/start.auction.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chainhook-subscriber/src/modules/auctionhistory/services/start.auction.service.ts b/chainhook-subscriber/src/modules/auctionhistory/services/start.auction.service.ts index 6ba1edc..a663649 100644 --- a/chainhook-subscriber/src/modules/auctionhistory/services/start.auction.service.ts +++ b/chainhook-subscriber/src/modules/auctionhistory/services/start.auction.service.ts @@ -62,6 +62,8 @@ export class StartAuctionService extends BaseService { auction.nftAsset = startAuctionModel["nft-asset-contract"].value; + auction.hash = this.calculateHash(auction); + await this.auctionRepository.save(auction); this.Logger.info('Auction Saved'); @@ -77,6 +79,7 @@ export class StartAuctionService extends BaseService { history.highestBidder = entity.highestBidder; history.nftAsset = entity.nftAsset; history.status = entity.status; + history.hash = entity.hash; }, (entity: AuctionHistoryEntity) => this.auctionHistoryRepository.save(entity)); } } \ No newline at end of file