Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarlycow committed Apr 11, 2024
1 parent 8789434 commit a7d554a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/hardhat/pcsv3_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ describe("Pool lens test with PCSV3 on BSC", () => {

it("Test getting all positions by owner", async () => {
const totalSupply = await npm.read.totalSupply({ blockNumber });
const owner = await npm.read.ownerOf([totalSupply - 1n], { blockNumber });
const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber });
const owner = await npm.read.ownerOf([tokenId], { blockNumber });
const posArr = await getAllPositionsByOwner(PCSV3_NPM, owner, publicClient, blockNumber);
await verifyPositionDetails(posArr);
});
Expand Down
3 changes: 2 additions & 1 deletion test/hardhat/univ3_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ describe("Pool lens test with UniV3 on mainnet", () => {

it("Test getting all positions by owner", async () => {
const totalSupply = await npm.read.totalSupply({ blockNumber });
const owner = await npm.read.ownerOf([totalSupply - 1n], { blockNumber });
const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber });
const owner = await npm.read.ownerOf([tokenId], { blockNumber });
const posArr = await getAllPositionsByOwner(UNIV3_NPM, owner, publicClient, blockNumber);
await verifyPositionDetails(posArr);
});
Expand Down

0 comments on commit a7d554a

Please sign in to comment.