Skip to content

Commit

Permalink
update bucket lends in remove collateral
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed Aug 22, 2023
1 parent 8768993 commit 1ae859f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mappings/erc-721-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,12 @@ export function handleRemoveCollateral(event: RemoveCollateralEvent): void {
// splice the identified tokenIds out of pool.bucketTokenIds
pool.bucketTokenIds = findAndRemoveTokenIds(tokenIdsToRemove, pool.bucketTokenIds)

// update account's list of pools and lends if necessary
// update bucket and account's list of pools and lends if necessary
updateBucketLends(bucket, lend)
updateAccountPools(account, pool)
updateAccountLends(account, lend)
// remove lend from store if necessary

// remove lend from store if necessary
const isRemoved = removeLendFromStore(lend)
if (!isRemoved) lend.save()

Expand Down

0 comments on commit 1ae859f

Please sign in to comment.