Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded tx_id from Stake / Unstake Ack packets #80

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contracts/consumer/converter/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ pub fn ibc_packet_receive(
ProviderPacket::Stake {
validator,
stake,
tx_id,
tx_id: _,
} => {
let response = contract.stake(deps, validator, stake)?;
let ack = ack_success(&StakeAck { tx_id })?;
let ack = ack_success(&StakeAck {})?;
IbcReceiveResponse::new()
.set_ack(ack)
.add_submessages(response.messages)
Expand All @@ -165,10 +165,10 @@ pub fn ibc_packet_receive(
ProviderPacket::Unstake {
validator,
unstake,
tx_id,
tx_id: _,
} => {
let response = contract.unstake(deps, validator, unstake)?;
let ack = ack_success(&UnstakeAck { tx_id })?;
let ack = ack_success(&UnstakeAck {})?;
IbcReceiveResponse::new()
.set_ack(ack)
.add_submessages(response.messages)
Expand Down
10 changes: 2 additions & 8 deletions packages/apis/src/ibc/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,11 @@ pub enum ProviderPacket {

/// Ack sent for ProviderPacket::Stake
#[cw_serde]
pub struct StakeAck {
/// Return the value from the original packet
pub tx_id: u64,
}
pub struct StakeAck {}

/// Ack sent for ProviderPacket::Unstake
#[cw_serde]
pub struct UnstakeAck {
/// Return the value from the original packet
pub tx_id: u64,
}
pub struct UnstakeAck {}

/// These are messages sent from consumer -> provider
/// ibc_packet_receive in external-staking must handle them all.
Expand Down