Skip to content

Commit 402c872

Browse files
committed
fixed integration tests err
1 parent 077a93a commit 402c872

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

contracts/voting/dao-voting-cosmos-staked/src/tests/test_tube/integration_tests.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use osmosis_std::{
99
types::{
1010
cosmos::{
1111
authz::v1beta1::{Grant, MsgExec, MsgGrant},
12-
staking::v1beta1::{MsgCreateValidator, MsgDelegate},
12+
staking::v1beta1::{CommissionRates, Description, MsgCreateValidator, MsgDelegate},
1313
},
1414
cosmwasm::wasm::v1::{
1515
AcceptedMessageKeysFilter, ContractExecutionAuthorization, ContractGrant,
@@ -67,8 +67,18 @@ fn test_staked_voting_power_and_update() {
6767
staking
6868
.create_validator(
6969
MsgCreateValidator {
70-
description: None,
71-
commission: None,
70+
description: Some(Description {
71+
moniker: "validator".to_string(),
72+
identity: "validator".to_string(),
73+
website: "validator".to_string(),
74+
security_contact: "validator".to_string(),
75+
details: "validator".to_string(),
76+
}),
77+
commission: Some(CommissionRates {
78+
rate: "1".to_string(),
79+
max_rate: "1".to_string(),
80+
max_change_rate: "1".to_string(),
81+
}),
7282
min_self_delegation: "1".to_string(),
7383
delegator_address: validator.address(),
7484
validator_address: valoper.to_string(),
@@ -78,7 +88,7 @@ fn test_staked_voting_power_and_update() {
7888
}),
7989
value: Some(Coin::new(1, DENOM).into()),
8090
},
81-
&validator,
91+
validator,
8292
)
8393
.unwrap();
8494

@@ -89,7 +99,7 @@ fn test_staked_voting_power_and_update() {
8999
validator_address: valoper.to_string(),
90100
amount: Some(Coin::new(100, DENOM).into()),
91101
},
92-
&staker,
102+
staker,
93103
)
94104
.unwrap();
95105

contracts/voting/dao-voting-cosmos-staked/src/tests/test_tube/test_env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl TestEnvBuilder {
182182
};
183183

184184
// Instantiate DAO
185-
let dao = DaoCore::new(app, &msg, &accounts[0], &vec![]).unwrap();
185+
let dao = DaoCore::new(app, &msg, &accounts[0], &[]).unwrap();
186186

187187
// Get voting module address, setup vp_contract helper
188188
let vp_addr: Addr = dao.query(&DaoQueryMsg::VotingModule {}).unwrap();

0 commit comments

Comments
 (0)