Skip to content

Commit

Permalink
fix daoAddress comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarinas committed Jan 9, 2024
1 parent 049c223 commit 319d86b
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 319d86b

Please sign in to comment.