Skip to content

Commit

Permalink
Fix: Add toLowerCase in plugin address comparison (#311)
Browse files Browse the repository at this point in the history
* add toLowerCase

* fix tests
  • Loading branch information
josemarinas authored Nov 30, 2023
1 parent 1a4657d commit e8e3b6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions modules/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ TEMPLATE:

## [UPCOMING]

- Fixed pluginAddress comparison in `validatePluginUpdateProposal`

## [1.20.0]

### Fixed

- Added missing security check that checks that the `to` address in the permission actions is the DAO address
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.20.0",
"version": "1.20.1",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/sdk-client.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/client/src/internal/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ export async function validateApplyUpdateFunction(
// find the plugin with the same address
const plugin = dao.plugins.find((plugin) =>
plugin.appliedPreparation?.pluginAddress ===
decodedParams.pluginAddress
decodedParams.pluginAddress.toLowerCase()
);
if (!plugin) {
causes.push(PluginUpdateProposalInValidityCause.PLUGIN_NOT_INSTALLED);
Expand Down
2 changes: 1 addition & 1 deletion modules/client/test/integration/client/methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ describe("Client", () => {
createdAt: "1234567890",
plugins: [{
appliedPreparation: {
pluginAddress: pluginAddress,
pluginAddress: pluginAddress.toLowerCase(),
},
appliedPluginRepo: {
subdomain: SupportedPluginRepo.TOKEN_VOTING,
Expand Down

0 comments on commit e8e3b6d

Please sign in to comment.