From 805533c31435bf3862c1be240424aabba9c82f8e Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:10:26 +0100 Subject: [PATCH] fix: add missing response fields to msg close wasm --- x/margin/client/wasm/msg_close.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/x/margin/client/wasm/msg_close.go b/x/margin/client/wasm/msg_close.go index 4e34065c6..f6a49c34c 100644 --- a/x/margin/client/wasm/msg_close.go +++ b/x/margin/client/wasm/msg_close.go @@ -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 }