Skip to content

Commit

Permalink
fix: add missing response fields to msg close wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Jan 29, 2024
1 parent 8ac4d93 commit 805533c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions x/margin/client/wasm/msg_close.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ func PerformMsgClose(f *marginkeeper.Keeper, ctx sdk.Context, contractAddr sdk.A
return nil, errorsmod.Wrap(err, "failed validating msgMsgClose")
}

_, err := msgServer.Close(sdk.WrapSDKContext(ctx), msgMsgClose) // Discard the response because it's empty
res, err := msgServer.Close(sdk.WrapSDKContext(ctx), msgMsgClose) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "margin close msg")
}

resp := &margintypes.MsgCloseResponse{}
resp := &margintypes.MsgCloseResponse{
Id: res.Id,
Amount: res.Amount,
}

return resp, nil
}

0 comments on commit 805533c

Please sign in to comment.