Skip to content

Commit

Permalink
Pass empty attribute value through stack
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Nov 15, 2023
1 parent 4e7316e commit f31351f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/wasm/keeper/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func TestNewCustomEvents(t *testing.T) {
src: wasmvmtypes.Events{{
Type: "foo",
Attributes: []wasmvmtypes.EventAttribute{{Key: "myKey", Value: "\n\n\n"}},
}}, exp: sdk.Events{sdk.NewEvent("wasm-foo",
sdk.NewAttribute("_contract_address", myContract.String()),
sdk.NewAttribute("myKey", ""))},
}}, exp: sdk.Events{sdk.NewEvent("wasm-foo",
sdk.NewAttribute("_contract_address", myContract.String()),
sdk.NewAttribute("myKey", ""))},
},
"error on short event type": {
src: wasmvmtypes.Events{{
Expand Down
3 changes: 3 additions & 0 deletions x/wasm/relay_pingpong_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ func (p player) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmv

return &wasmvmtypes.IBCReceiveResult{
Ok: &wasmvmtypes.IBCReceiveResponse{
Attributes: wasmvmtypes.EventAttributes{
{Key: "empty-value-test"},
},
Acknowledgement: receivedBall.BuildAck().GetBytes(),
Messages: []wasmvmtypes.SubMsg{{Msg: wasmvmtypes.CosmosMsg{IBC: respHit}, ReplyOn: wasmvmtypes.ReplyNever}},
},
Expand Down

0 comments on commit f31351f

Please sign in to comment.