diff --git a/x/likenft/keeper/msg_server_blind_box_content.go b/x/likenft/keeper/msg_server_blind_box_content.go index f825a8e79..2dc946ae2 100644 --- a/x/likenft/keeper/msg_server_blind_box_content.go +++ b/x/likenft/keeper/msg_server_blind_box_content.go @@ -61,7 +61,7 @@ func (k msgServer) CreateBlindBoxContent(goCtx context.Context, msg *types.MsgCr if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf(err.Error()) } - err = k.DeductFeePerByte(ctx, userAddress, content.Size(), nil) + err = k.DeductFeePerByte(ctx, userAddress, content.Size(), msg) if err != nil { return nil, err } @@ -116,7 +116,7 @@ func (k msgServer) UpdateBlindBoxContent(goCtx context.Context, msg *types.MsgUp if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf(err.Error()) } - err = k.DeductFeePerByte(ctx, userAddress, lengthDiff, nil) + err = k.DeductFeePerByte(ctx, userAddress, lengthDiff, msg) if err != nil { return nil, err } diff --git a/x/likenft/keeper/msg_server_mint_nft.go b/x/likenft/keeper/msg_server_mint_nft.go index c49a1a5d3..f7e7574e8 100644 --- a/x/likenft/keeper/msg_server_mint_nft.go +++ b/x/likenft/keeper/msg_server_mint_nft.go @@ -99,7 +99,7 @@ func (k msgServer) mintRegularNFT(ctx sdk.Context, classId string, classData *ty Data: nftDataInAny, } // Deduct minting fee - err = k.DeductFeePerByte(ctx, userAddress, nft.Size(), nil) + err = k.DeductFeePerByte(ctx, userAddress, nft.Size(), msg) if err != nil { return nil, err } diff --git a/x/likenft/keeper/msg_server_new_class.go b/x/likenft/keeper/msg_server_new_class.go index 8d913a5e8..75dfe3cad 100644 --- a/x/likenft/keeper/msg_server_new_class.go +++ b/x/likenft/keeper/msg_server_new_class.go @@ -80,7 +80,7 @@ func (k msgServer) NewClass(goCtx context.Context, msg *types.MsgNewClass) (*typ Data: classDataInAny, } // Deduct fee - err = k.DeductFeePerByte(ctx, parent.Owner, class.Size(), nil) + err = k.DeductFeePerByte(ctx, parent.Owner, class.Size(), msg) if err != nil { return nil, err } diff --git a/x/likenft/keeper/msg_server_update_class.go b/x/likenft/keeper/msg_server_update_class.go index e254a47c3..4f48d1712 100644 --- a/x/likenft/keeper/msg_server_update_class.go +++ b/x/likenft/keeper/msg_server_update_class.go @@ -66,7 +66,7 @@ func (k msgServer) UpdateClass(goCtx context.Context, msg *types.MsgUpdateClass) // Deduct minting fee if new content is longer lengthDiff := newClass.Size() - oldClass.Size() if lengthDiff > 0 { - err = k.DeductFeePerByte(ctx, parent.Owner, lengthDiff, nil) + err = k.DeductFeePerByte(ctx, parent.Owner, lengthDiff, msg) if err != nil { return nil, err }