Skip to content

Commit

Permalink
Update bid timestamp on top up (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshiwarab authored Aug 19, 2024
1 parent 241b072 commit 09b63ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ram-lib-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ export function handleBidToppedUp(event: BidToppedUp): void {
// Update slot index and value
bid.slotIndex = event.params.newSlotIndex;
bid.value = bidValue;
bid.timestamp = event.block.timestamp;
bid.updatedAt = event.block.timestamp;
bid.save();
}
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/runner/__tests__/minter-suite-v2/ram-lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ describe("RAMLib event handling", () => {
expect(toppedUpBidRes.isRemoved).toBe(false);
expect(toppedUpBidRes.value).toBe(slot12price.toString());
expect(toppedUpBidRes.updatedAt).toBe(auctionBid2Timestamp.toString());
expect(toppedUpBidRes.timestamp).toBe(auctionBid2Timestamp.toString());
});
});

Expand Down

0 comments on commit 09b63ab

Please sign in to comment.