Skip to content

Commit

Permalink
Empty submsg result does not overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Jun 14, 2021
1 parent 0dd695c commit 44e7669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/wasm/keeper/msg_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (d MessageDispatcher) DispatchSubmessages(ctx sdk.Context, contractAddr sdk
switch {
case err != nil:
return nil, sdkerrors.Wrap(err, "reply")
case rspData != nil:
case len(rspData) != 0:
rsp = rspData
}
}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/msg_dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func TestDispatchSubmessages(t *testing.T) {
return nil, nil, errors.New("my error")
},
},
expData: []byte{},
expData: []byte("myReplyData:1"),
expCommits: []bool{false, false},
},
"empty replyOn rejected": {
Expand Down

0 comments on commit 44e7669

Please sign in to comment.