Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getApplications #5

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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