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: wrong root permission check #319

Merged
merged 4 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions modules/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ TEMPLATE:
-->

## [UPCOMING]
### Fixed
- Compare with dao address in `validatePluginUpdateProposal`

## [1.21.1]

### Changed
- Chore: Changed voters and approvers count to 1000 from the default value of 100 in Proposal Queries
Expand Down
2 changes: 1 addition & 1 deletion modules/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aragon/sdk-client",
"author": "Aragon Association",
"version": "1.21.1",
"version": "1.21.2",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/sdk-client.esm.js",
Expand Down
5 changes: 4 additions & 1 deletion modules/client/src/internal/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,13 +1033,16 @@ export function validateGrantRootPermissionAction(
);
}
// The action should be sent to the DAO
// both come from subgraph so they are already lowercase
if (action.to !== daoAddress) {
causes.push(
PluginUpdateProposalInValidityCause
.INVALID_GRANT_ROOT_PERMISSION_TO_ADDRESS,
);
}
if (decodedPermission.where !== daoAddress) {
// decodedPermission.where is checksummed so we need to lowercase it
// to compare it with the daoAddress because it comes from the subgraph
if (decodedPermission.where.toLowerCase() !== daoAddress) {
causes.push(
PluginUpdateProposalInValidityCause
.INVALID_GRANT_ROOT_PERMISSION_WHERE_ADDRESS,
Expand Down