Skip to content

Commit

Permalink
add minFill in handleListingUpdated (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
psparacino committed Feb 25, 2024
1 parent 4a53d82 commit 43eef48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions carbonmark/src/Carbonmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43eef48

Please sign in to comment.