Skip to content

Commit

Permalink
Fix getApplications
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 committed Jul 20, 2024
1 parent 0d502e5 commit 721578b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
yarn clean
yarn compile
yarn check
yarn test
yarn clean
yarn compile
yarn check
yarn test
yarn ci
Binary file modified .yarn/install-state.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"./artifacts",
"./cache",
"./node_modules",
"./coverage"
"./coverage",
"./coverage.json"
]
}
}
3 changes: 1 addition & 2 deletions contracts/ApplicationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ contract ApplicationManager is IApplicationManager {
function applicationExists(uint id) internal view returns (bool) {
return applications[id].account != address(0);
}

function getNextApplicationId() external view returns (uint) {
return nextApplicationId;
}
Expand Down Expand Up @@ -79,7 +80,5 @@ contract ApplicationManager is IApplicationManager {
finalResult[i] = result[i];
}
return finalResult;

return result;
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test": "npx hardhat test",
"coverage": "SOLIDITY_COVERAGE=true npx hardhat coverage",
"ci": "npx biome ci",
"format": "npx biome check --write"
"format": "npx biome check --write",
"prepare": "husky"
}
}
2 changes: 1 addition & 1 deletion test/ApplicationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ describe("ApplicationManager", () => {

it("Should return no applications if all within range are deleted", async () => {
await contract.write.deleteApplication([parseUnits("0", 0)]);
await contract.write.deleteApplication([parseUnits("2", 0)]);
await contract.write.deleteApplication([parseUnits("1", 0)]);
await contract.write.deleteApplication([parseUnits("2", 0)]);
await contract.write.deleteApplication([parseUnits("3", 0)]);
await contract.write.deleteApplication([parseUnits("4", 0)]);
await contract.write.deleteApplication([parseUnits("5", 0)]);
Expand Down

0 comments on commit 721578b

Please sign in to comment.