Skip to content

Commit

Permalink
Fix merge collateral (#73)
Browse files Browse the repository at this point in the history
* assign pool in mergeOrRemove entity

* remove calldata logging
  • Loading branch information
EdNoepel authored Oct 5, 2023
1 parent 9d75106 commit 5a5c222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mappings/erc-721-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ export function handleMergeOrRemoveCollateralNFT(
pool.bucketTokenIds = findAndRemoveTokenIds(tokenIdsToRemove, pool.bucketTokenIds)
}

mergeOrRemove.pool = pool.id
updateAccountPools(account, pool)

// save entities to store
Expand Down
1 change: 1 addition & 0 deletions tests/erc-721-pool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,7 @@ describe("Describe entity assertions", () => {
})

// TODO: finish implementing once a mergeOrRemoveCollateralNFT calldata becomes available
// example mergeOrRemoveCollateral event.transaction.input: 0x47f6fe64000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000b7500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000b750000000000000000000000000000000000000000000000000000000000000b740000000000000000000000000000000000000000000000000000000000000b730000000000000000000000000000000000000000000000000000000000000b72,
test("MergeOrRemoveCollateralNFT", () => {
// check entity is unavailable prior to storage
assert.entityCount("MergeOrRemoveCollateralNFT", 0)
Expand Down

0 comments on commit 5a5c222

Please sign in to comment.