diff --git a/contracts/provider/native-staking-proxy/src/contract.rs b/contracts/provider/native-staking-proxy/src/contract.rs index 8cbc9f9b..e362ee8c 100644 --- a/contracts/provider/native-staking-proxy/src/contract.rs +++ b/contracts/provider/native-staking-proxy/src/contract.rs @@ -294,7 +294,7 @@ impl NativeStakingProxyContract<'_> { ContractError::InvalidDenom(amount.denom) ); - let msg = ProviderMsg::Unstake { validator, amount }; + let msg = ProviderMsg::Unstake { delegator: ctx.info.sender.to_string(), validator, amount }; Ok(Response::new().add_message(msg)) } diff --git a/packages/bindings/src/msg.rs b/packages/bindings/src/msg.rs index 2b33bb3d..01381610 100644 --- a/packages/bindings/src/msg.rs +++ b/packages/bindings/src/msg.rs @@ -92,7 +92,7 @@ pub enum ProviderMsg { /// /// If these conditions are met, it will instantly unstake /// amount.amount tokens from the native staking proxy contract. - Unstake { validator: String, amount: Coin }, + Unstake { delegator: String, validator: String, amount: Coin }, } impl ProviderMsg { @@ -118,12 +118,13 @@ impl ProviderMsg { } } - pub fn unstake(denom: &str, validator: &str, amount: impl Into) -> ProviderMsg { + pub fn unstake(denom: &str, delegator:&str, validator: &str, amount: impl Into) -> ProviderMsg { let coin = Coin { amount: amount.into(), denom: denom.into(), }; ProviderMsg::Unstake { + delegator: delegator.to_string(), validator: validator.to_string(), amount: coin, }