Skip to content

Commit

Permalink
Merge pull request #80 from osmosis-labs/remove-tx-id
Browse files Browse the repository at this point in the history
Remove unneeded tx_id from Stake / Unstake Ack packets
  • Loading branch information
maurolacy committed Jun 28, 2023
2 parents caf0552 + a85c6f6 commit df58e1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
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

0 comments on commit df58e1a

Please sign in to comment.