Skip to content

Commit

Permalink
fix: remove duplicated events in x/collection Msg/Modify (#954)
Browse files Browse the repository at this point in the history
* Remove duplicate events

* Update CHANGELOG.md
  • Loading branch information
0Tech authored Apr 7, 2023
1 parent 15314e4 commit 4fe8ae8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 0 additions & 26 deletions x/collection/keeper/supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 4fe8ae8

Please sign in to comment.