Skip to content

Commit

Permalink
Fix linter warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed May 6, 2022
1 parent 433f4ac commit 0d16725
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x/wasm/keeper/msg_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,25 @@ func (d MessageDispatcher) DispatchSubmessages(ctx sdk.Context, contractAddr sdk
continue
}

// otherwise, we create a SubcallResult and pass it into the calling contract
var result wasmvmtypes.SubcallResult
// otherwise, we create a SubMsgResult and pass it into the calling contract
var result wasmvmtypes.SubMsgResult
if err == nil {
// just take the first one for now if there are multiple sub-sdk messages
// and safely return nothing if no data
var responseData []byte
if len(data) > 0 {
responseData = data[0]
}
result = wasmvmtypes.SubcallResult{
Ok: &wasmvmtypes.SubcallResponse{
result = wasmvmtypes.SubMsgResult{
Ok: &wasmvmtypes.SubMsgResponse{
Events: sdkEventsToWasmVMEvents(filteredEvents),
Data: responseData,
},
}
} else {
// Issue #759 - we don't return error string for worries of non-determinism
moduleLogger(ctx).Info("Redacting submessage error", "cause", err)
result = wasmvmtypes.SubcallResult{
result = wasmvmtypes.SubMsgResult{
Err: redactError(err).Error(),
}
}
Expand Down

0 comments on commit 0d16725

Please sign in to comment.