Skip to content

Commit

Permalink
change events to mint nft response
Browse files Browse the repository at this point in the history
  • Loading branch information
slandymani committed Sep 27, 2024
1 parent 32328ed commit bdf622a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions x/onft/keeper/wasm_hander_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
wasmkeeper "github.com/ODIN-PROTOCOL/wasmd/x/wasm/keeper"
wasmtypes "github.com/ODIN-PROTOCOL/wasmd/x/wasm/types"
wasmvmtypes "github.com/ODIN-PROTOCOL/wasmvm/v2/types"
abci "github.com/cometbft/cometbft/abci/types"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down Expand Up @@ -69,19 +68,12 @@ func NewMintNFTMessageHandler(onftKeeper Keeper) MessageHandlerFunc {
With("module", fmt.Sprintf("x/%s", wasmtypes.ModuleName)).
Info("Minted NFT", "id", nftID)

events = []sdk.Event{
{
Type: "nft",
Attributes: []abci.EventAttribute{
{
Key: "nft_id",
Value: nftID,
},
},
},
resp, err := codectypes.NewAnyWithValue(&types.MsgMintNFTResponse{Id: nftID})
if err != nil {
return nil, nil, nil, err
}

return events, nil, nil, nil
return events, nil, [][]*codectypes.Any{{resp}}, nil
}

return nil, nil, nil, wasmtypes.ErrUnknownMsg
Expand Down

0 comments on commit bdf622a

Please sign in to comment.