From 43eef485a36235fa643a8fed1456841efa9ff1c6 Mon Sep 17 00:00:00 2001 From: p_sparacino <72105234+psparacino@users.noreply.github.com> Date: Sun, 25 Feb 2024 17:21:31 -0500 Subject: [PATCH] add minFill in handleListingUpdated (#119) --- carbonmark/src/Carbonmark.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/carbonmark/src/Carbonmark.ts b/carbonmark/src/Carbonmark.ts index 777629a1..84368b4d 100644 --- a/carbonmark/src/Carbonmark.ts +++ b/carbonmark/src/Carbonmark.ts @@ -70,6 +70,9 @@ export function handleListingUpdated(event: ListingUpdated): void { let listing = loadOrCreateListing(event.params.id.toHexString()) let activity = loadOrCreateActivity(event.transaction.hash.toHexString().concat('ListingUpdated')) + // always ensure the minFillAmount is updated + listing.minFillAmount = event.params.newMinFillAmount + if (event.params.oldAmount != event.params.newAmount) { listing.totalAmountToSell = event.params.newAmount listing.leftToSell = event.params.newAmount