Skip to content

Commit 37c6c8e

Browse files
author
Tomasz Kulik
authored
chore: source_client instead of channel_id in IBCv2 (#643)
1 parent d2f76b6 commit 37c6c8e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

types/msg.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,16 @@ type IBC2Msg struct {
361361

362362
// Sends an IBC packet with given payloads over the existing channel.
363363
type IBC2SendPacketMsg struct {
364-
ChannelID string `json:"channel_id"`
365-
Payloads []IBC2Payload `json:"payloads"`
366-
Timeout uint64 `json:"timeout,string,omitempty"`
364+
SourceClient string `json:"source_client"`
365+
Payloads []IBC2Payload `json:"payloads"`
366+
Timeout uint64 `json:"timeout,string,omitempty"`
367367
}
368368

369369
type IBC2WriteAcknowledgementMsg struct {
370370
// The acknowledgement to send back
371371
Ack IBCAcknowledgement `json:"ack"`
372372
// Existing channel where the packet was received
373-
ChannelID string `json:"channel_id"`
373+
SourceClient string `json:"source_client"`
374374
// Sequence number of the packet that was received
375375
PacketSequence uint64 `json:"packet_sequence"`
376376
}

types/msg_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ func TestMsgFundCommunityPoolSerialization(t *testing.T) {
163163
}
164164

165165
func TestMsgIBC2SendPacketSerialization(t *testing.T) {
166-
document := []byte(`{"send_packet":{"channel_id":"channel-432", "payloads": [{"destination_port": "wasm.123", "version": "random_version", "encoding": "json", "value": ""}], "timeout": "0"}}`)
166+
document := []byte(`{"send_packet":{"source_client":"channel-432", "payloads": [{"destination_port": "wasm.123", "version": "random_version", "encoding": "json", "value": ""}], "timeout": "0"}}`)
167167

168168
var msg IBC2Msg
169169
err := json.Unmarshal(document, &msg)
170170
require.NoError(t, err)
171171

172-
require.Equal(t, "channel-432", msg.SendPacket.ChannelID)
172+
require.Equal(t, "channel-432", msg.SendPacket.SourceClient)
173173
require.Equal(t, []IBC2Payload{{
174174
DestinationPort: "wasm.123",
175175
Version: "random_version",

0 commit comments

Comments
 (0)