Skip to content

Commit 6cda85e

Browse files
committed
Review changes
1 parent d1ee032 commit 6cda85e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

types/eureka.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package types
22

3-
// EurekaPayload defines a single packet sent in the EurekaSendPacketMsg
3+
// EurekaPayload defines a single packet sent in the EurekaSendPacketMsg.
44
//
5-
// Payload value should be encoded in a format defined by the channel version,
5+
// Payload value should be encoded using the method specified in the Encoding field,
66
// and the module on the other side should know how to parse this.
77
type EurekaPayload struct {
88
// The port id on the chain where the packet is sent to (external chain).

types/msg_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,13 @@ func TestMsgFundCommunityPoolSerialization(t *testing.T) {
161161

162162
require.Equal(t, Array[Coin]{{"adenom", "300"}, {"bdenom", "400"}}, msg.FundCommunityPool.Amount)
163163
}
164+
165+
func TestMsgEurekaSendPacketSerialization(t *testing.T) {
166+
document := []byte(`{"send_packet":{"amount":[{"amount":"300","denom":"adenom"},{"amount":"400","denom":"bdenom"}]}}`)
167+
168+
var msg EurekaMsg
169+
err := json.Unmarshal(document, &msg)
170+
require.NoError(t, err)
171+
172+
require.Equal(t, Array[Coin]{{"adenom", "300"}, {"bdenom", "400"}}, msg.FundCommunityPool.Amount)
173+
}

0 commit comments

Comments
 (0)