Skip to content

Commit

Permalink
congress: all_hook_permissions query to return all hook permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Dec 28, 2023
1 parent b798e26 commit 58e14b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions congress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Change log entries are to be added to the Unreleased section. Example entry:

## v1.2.0 (2023-12-28)

### Features

- `all_hook_permissions` query to return all hook permissions.

### Improvements

- Remove temporal `add_tc_dismiss_perm` and gas adjustments in the `execute` method related to the wrong Gas settings in the TC proposals (and missing checks mentioned in the v1.1.2 release).
Expand Down
2 changes: 1 addition & 1 deletion congress/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "congress"
version = "1.1.2"
version = "1.2.0"
authors = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
Expand Down
5 changes: 5 additions & 0 deletions congress/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ impl Contract {
hooks.remove(&user).unwrap_or(vec![])
}

/// Returns all hook permissions
pub fn all_hook_permissions(&self) -> HashMap<AccountId, Vec<HookPerm>> {
self.hook_auth.get().unwrap()
}

pub fn config(&self) -> ConfigOutput {
ConfigOutput {
threshold: self.threshold,
Expand Down

0 comments on commit 58e14b9

Please sign in to comment.