Skip to content

Commit

Permalink
Merge pull request #137 from DA0-DA0/update-multisig-with-empty-struct
Browse files Browse the repository at this point in the history
Add code for muilti-sig contract to have empty bracket
  • Loading branch information
JakeHartnell authored Jan 13, 2022
2 parents 92f4f24 + 434ef2a commit 9b005dd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
19 changes: 13 additions & 6 deletions contracts/cw3-multisig/schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"oneOf": [
{
"type": "string",
"enum": [
"get_config"
]
},
{
"description": "Return ThresholdResponse",
"type": "object",
Expand Down Expand Up @@ -256,6 +250,19 @@
},
"additionalProperties": false
},
{
"description": "Get the multisig's current config. Returns type `ConfigResponse`.",
"type": "object",
"required": [
"get_config"
],
"properties": {
"get_config": {
"type": "object"
}
},
"additionalProperties": false
},
{
"description": "Returns All DAO Cw20 Balances",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion contracts/cw3-multisig/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
QueryMsg::ListVoters { start_after, limit } => {
to_binary(&query_list_voters(deps, start_after, limit)?)
}
QueryMsg::GetConfig => to_binary(&query_config(deps)?),
QueryMsg::GetConfig {} => to_binary(&query_config(deps)?),
QueryMsg::Tally { proposal_id } => {
to_binary(&query_proposal_tally(deps, env, proposal_id)?)
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/cw3-multisig/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub enum QueryMsg {
Tally { proposal_id: u64 },
/// Get the multisig's current config. Returns type
/// `ConfigResponse`.
GetConfig,
GetConfig {},
/// Returns All DAO Cw20 Balances
Cw20Balances {
start_after: Option<String>,
Expand Down
4 changes: 2 additions & 2 deletions contracts/cw3-multisig/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ fn test_instantiate_works() {
// Verify contract config set properly.
let config: ConfigResponse = app
.wrap()
.query_wasm_smart(&multisig_addr, &QueryMsg::GetConfig)
.query_wasm_smart(&multisig_addr, &QueryMsg::GetConfig {})
.unwrap();

assert_eq!(
Expand Down Expand Up @@ -488,7 +488,7 @@ fn test_update_config() {
// Verify contract config set properly.
let config: ConfigResponse = app
.wrap()
.query_wasm_smart(&multisig_addr, &QueryMsg::GetConfig)
.query_wasm_smart(&multisig_addr, &QueryMsg::GetConfig {})
.unwrap();

assert_eq!(
Expand Down

0 comments on commit 9b005dd

Please sign in to comment.