From 4fe8ae813d4ed2802769d57068885fb085fca785 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Fri, 7 Apr 2023 16:53:41 +0900 Subject: [PATCH] fix: remove duplicated events in x/collection Msg/Modify (#954) * Remove duplicate events * Update CHANGELOG.md --- CHANGELOG.md | 1 + x/collection/keeper/supply.go | 26 -------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22fe5b5f7d..68665a7f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/foundation) [\#946](https://github.com/line/lbm-sdk/pull/946) Fix broken x/foundation invariant on treasury * (x/foundation) [\#947](https://github.com/line/lbm-sdk/pull/947) Unpack proposals in x/foundation import-genesis * (x/collection) [\#953](https://github.com/line/lbm-sdk/pull/953) Allow zero amount of coin in x/collection Query/Balance +* (x/collection) [\#954](https://github.com/line/lbm-sdk/pull/954) Remove duplicated events in x/collection Msg/Modify ### Removed diff --git a/x/collection/keeper/supply.go b/x/collection/keeper/supply.go index 25c119d5e9..bc7f9f8a62 100644 --- a/x/collection/keeper/supply.go +++ b/x/collection/keeper/supply.go @@ -339,14 +339,6 @@ func (k Keeper) ModifyContract(ctx sdk.Context, contractID string, operator sdk. k.setContract(ctx, *contract) - event := collection.EventModifiedContract{ - ContractId: contractID, - Operator: operator.String(), - Changes: changes, - } - if err := ctx.EventManager().EmitTypedEvent(&event); err != nil { - panic(err) - } return nil } @@ -380,15 +372,6 @@ func (k Keeper) ModifyTokenClass(ctx sdk.Context, contractID string, classID str k.setTokenClass(ctx, contractID, class) - event := collection.EventModifiedTokenClass{ - ContractId: contractID, - TokenType: class.GetId(), - Operator: operator.String(), - Changes: changes, - } - if err := ctx.EventManager().EmitTypedEvent(&event); err != nil { - panic(err) - } return nil } @@ -413,15 +396,6 @@ func (k Keeper) ModifyNFT(ctx sdk.Context, contractID string, tokenID string, op k.setNFT(ctx, contractID, *token) - event := collection.EventModifiedNFT{ - ContractId: contractID, - TokenId: tokenID, - Operator: operator.String(), - Changes: changes, - } - if err := ctx.EventManager().EmitTypedEvent(&event); err != nil { - panic(err) - } return nil }