From bb15cdd92c0493e5043c59e8037618dc1c93cecd Mon Sep 17 00:00:00 2001 From: Ava Howell Date: Thu, 13 Jul 2023 23:07:06 -0700 Subject: [PATCH] fix packet commitment paths: use `sequences` correctly --- crates/core/component/ibc/src/component/state_key.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/component/ibc/src/component/state_key.rs b/crates/core/component/ibc/src/component/state_key.rs index 275a5d8eb6..363aeee9f1 100644 --- a/crates/core/component/ibc/src/component/state_key.rs +++ b/crates/core/component/ibc/src/component/state_key.rs @@ -75,14 +75,14 @@ pub fn seq_send(channel_id: &ChannelId, port_id: &PortId) -> String { pub fn packet_receipt(packet: &Packet) -> String { format!( - "receipts/ports/{}/channels/{}/receipts/{}", + "receipts/ports/{}/channels/{}/sequences/{}", packet.port_on_b, packet.chan_on_b, packet.sequence ) } pub fn receipt_by_channel(port_id: &PortId, channel_id: &ChannelId, sequence: u64) -> String { format!( - "receipts/ports/{port_id}/channels/{channel_id}/receipts/{sequence}", + "receipts/ports/{port_id}/channels/{channel_id}/sequences/{sequence}", port_id = port_id, channel_id = channel_id, sequence = sequence @@ -91,7 +91,7 @@ pub fn receipt_by_channel(port_id: &PortId, channel_id: &ChannelId, sequence: u6 pub fn packet_commitment(packet: &Packet) -> String { format!( - "commitments/ports/{}/channels/{}/packets/{}", + "commitments/ports/{}/channels/{}/sequences/{}", packet.port_on_a, packet.chan_on_a, packet.sequence ) } @@ -108,7 +108,7 @@ pub fn packet_commitment_by_port( channel_id: &ChannelId, sequence: u64, ) -> String { - format!("commitments/ports/{port_id}/channels/{channel_id}/packets/{sequence}") + format!("commitments/ports/{port_id}/channels/{channel_id}/sequences/{sequence}") } pub fn ics20_value_balance(channel_id: &ChannelId, asset_id: &asset::Id) -> String {