From 5a5c22236ed7365edcc168abfb6fb9fa0b5872b6 Mon Sep 17 00:00:00 2001 From: Ed Noepel <46749157+EdNoepel@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:34:46 -0400 Subject: [PATCH] Fix merge collateral (#73) * assign pool in mergeOrRemove entity * remove calldata logging --- src/mappings/erc-721-pool.ts | 1 + tests/erc-721-pool.test.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mappings/erc-721-pool.ts b/src/mappings/erc-721-pool.ts index ab2ec73..c595f9b 100644 --- a/src/mappings/erc-721-pool.ts +++ b/src/mappings/erc-721-pool.ts @@ -405,6 +405,7 @@ export function handleMergeOrRemoveCollateralNFT( pool.bucketTokenIds = findAndRemoveTokenIds(tokenIdsToRemove, pool.bucketTokenIds) } + mergeOrRemove.pool = pool.id updateAccountPools(account, pool) // save entities to store diff --git a/tests/erc-721-pool.test.ts b/tests/erc-721-pool.test.ts index 786fcdf..fb9559e 100644 --- a/tests/erc-721-pool.test.ts +++ b/tests/erc-721-pool.test.ts @@ -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)