Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Aug 30, 2024
1 parent 5d9d7f9 commit c77d510
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion contracts/provider/native-staking-proxy/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ impl NativeStakingProxyContract<'_> {
ContractError::InvalidDenom(amount.denom)
);

let msg = ProviderMsg::Unstake { delegator: ctx.info.sender.to_string(), validator, amount };
let msg = ProviderMsg::Unstake {
delegator: ctx.info.sender.to_string(),
validator,
amount,
};
Ok(Response::new().add_message(msg))
}

Expand Down
13 changes: 11 additions & 2 deletions packages/bindings/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ pub enum ProviderMsg {
///
/// If these conditions are met, it will instantly unstake
/// amount.amount tokens from the native staking proxy contract.
Unstake { delegator: String, validator: String, amount: Coin },
Unstake {
delegator: String,
validator: String,
amount: Coin,
},
}

impl ProviderMsg {
Expand All @@ -118,7 +122,12 @@ impl ProviderMsg {
}
}

pub fn unstake(denom: &str, delegator:&str, validator: &str, amount: impl Into<Uint128>) -> ProviderMsg {
pub fn unstake(
denom: &str,
delegator: &str,
validator: &str,
amount: impl Into<Uint128>,
) -> ProviderMsg {
let coin = Coin {
amount: amount.into(),
denom: denom.into(),
Expand Down

0 comments on commit c77d510

Please sign in to comment.