Skip to content

Commit

Permalink
feat: Add new privacy type (#1082)
Browse files Browse the repository at this point in the history
* feat: Add new privacy type

* add privacy to update-proposal

* Update src/schemas/space.json

* Update test/examples/space.json

* add back blind
  • Loading branch information
ChaituVR authored Nov 21, 2024
1 parent 6586e5b commit 23c27a7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/schemas/proposal.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
"type": "string",
"title": "app",
"maxLength": 128
},
"privacy": {
"type": "string",
"enum": ["", "shutter"]
}
},
"required": ["name", "body", "choices", "snapshot", "start", "end"],
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/space.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
},
"privacy": {
"type": "string",
"enum": ["", "shutter"]
"enum": ["", "shutter", "any"]
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions src/schemas/update-proposal.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
"metadata": {
"type": "object",
"title": "metadata"
},
"privacy": {
"type": "string",
"enum": ["", "shutter"]
}
},
"required": ["proposal", "name", "body", "discussion", "choices", "type", "metadata"],
Expand Down
4 changes: 3 additions & 1 deletion src/sign/hashedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@
"2ffbebcbd22ef48fd2f4a1182ff1feda7795b57689bd6f0dd73c89e925e7fefb": "profile",
"4288d50b713081aae77d60d596d75864bff7acf7791a00183401e58658ee9da5": "statement",
"d56782e3b50ac86c25ae292923da8c367e3c9e8e7ea9d8baa435051fe2f430fa": "proposal",
"df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal"
"df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal",
"beda1f464a6112f9ed6335c4614e32a97f0e18ef4ac10b4b1c8239c475f2d8e8": "proposal",
"ff74674f39ca59b60056ecddaada0cb513c4729e634e99cb778f53ee404ac806": "update-proposal"
}
4 changes: 3 additions & 1 deletion src/sign/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export const proposalTypes = {
{ name: 'end', type: 'uint64' },
{ name: 'snapshot', type: 'uint64' },
{ name: 'plugins', type: 'string' },
{ name: 'privacy', type: 'string' },
{ name: 'app', type: 'string' }
]
};
Expand All @@ -166,7 +167,8 @@ export const updateProposalTypes = {
{ name: 'discussion', type: 'string' },
{ name: 'choices', type: 'string[]' },
{ name: 'labels', type: 'string[]' },
{ name: 'plugins', type: 'string' }
{ name: 'plugins', type: 'string' },
{ name: 'privacy', type: 'string' }
]
};

Expand Down
1 change: 1 addition & 0 deletions test/examples/proposal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"end": 1620316800,
"snapshot": 12345167,
"discussion": "https://...",
"privacy": "shutter",
"metadata": {
"network": "1"
}
Expand Down
3 changes: 2 additions & 1 deletion test/examples/space.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"voting": {
"delay": 2592000,
"period": 15552000,
"quorum": 100
"quorum": 100,
"privacy": "any"
},
"treasuries": [
{
Expand Down

0 comments on commit 23c27a7

Please sign in to comment.