Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Jul 24, 2023
1 parent 8068bc1 commit d94682f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
25 changes: 5 additions & 20 deletions contracts/provider/external-staking/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::contract::cross_staking::test_utils::CrossStakingApi;
use crate::contract::multitest_utils::{CodeId, ExternalStakingContractProxy};
use crate::error::ContractError;
use crate::msg::{AuthorizedEndpoint, ReceiveVirtualStake, StakeInfo, ValidatorPendingRewards};
use crate::state::Stake;

const OSMO: &str = "osmo";
const STAR: &str = "star";
Expand Down Expand Up @@ -286,33 +287,17 @@ fn staking() {
assert_eq!(
stakes.stakes,
[
StakeInfo {
owner: users[0].to_owned(),
validator: validators[0].to_owned(),
stake: 200u128.into()
},
StakeInfo {
owner: users[0].to_owned(),
validator: validators[1].to_owned(),
stake: 100u128.into()
},
StakeInfo::new(users[0], validators[0], &Stake::from_amount(200u128.into())),
StakeInfo::new(users[0], validators[1], &Stake::from_amount(100u128.into()))
]
);

let stakes = contract.stakes(users[1].to_owned(), None, None).unwrap();
assert_eq!(
stakes.stakes,
[
StakeInfo {
owner: users[1].to_owned(),
validator: validators[0].to_owned(),
stake: 100u128.into()
},
StakeInfo {
owner: users[1].to_owned(),
validator: validators[1].to_owned(),
stake: 200u128.into()
},
StakeInfo::new(users[1], validators[0], &Stake::from_amount(100u128.into())),
StakeInfo::new(users[1], validators[1], &Stake::from_amount(200u128.into()))
]
);
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/provider/native-staking/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ fn releasing_proxy_stake() {
let claims = vault.account_claims(user.to_owned(), None, None).unwrap();
assert_eq!(
claims.claims,
[mesh_vault::msg::LienResponse {
[mesh_vault::msg::MaybeLienResponse::Lien {
lienholder: staking_addr.to_owned(),
amount: Uint128::new(100)
}]
Expand Down Expand Up @@ -300,7 +300,7 @@ fn releasing_proxy_stake() {
let claims = vault.account_claims(user.to_owned(), None, None).unwrap();
assert_eq!(
claims.claims,
[mesh_vault::msg::LienResponse {
[mesh_vault::msg::MaybeLienResponse::Lien {
lienholder: staking_addr.to_owned(),
amount: Uint128::zero() // TODO? Clean-up empty liens
}]
Expand Down

0 comments on commit d94682f

Please sign in to comment.