-
Notifications
You must be signed in to change notification settings - Fork 44
/
hooks.go
45 lines (37 loc) · 1.42 KB
/
hooks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/desmos-labs/desmos/v5/x/reactions/types"
)
// Implement ReactionsHooks interface
var _ types.ReactionsHooks = Keeper{}
// AfterReactionSaved implements types.ReactionsHooks
func (k Keeper) AfterReactionSaved(ctx sdk.Context, subspaceID uint64, reactionID uint32) {
if k.hooks != nil {
k.hooks.AfterReactionSaved(ctx, subspaceID, reactionID)
}
}
// AfterReactionDeleted implements types.ReactionsHooks
func (k Keeper) AfterReactionDeleted(ctx sdk.Context, subspaceID uint64, reactionID uint32) {
if k.hooks != nil {
k.hooks.AfterReactionDeleted(ctx, subspaceID, reactionID)
}
}
// AfterRegisteredReactionSaved implements types.ReactionsHooks
func (k Keeper) AfterRegisteredReactionSaved(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) {
if k.hooks != nil {
k.hooks.AfterRegisteredReactionSaved(ctx, subspaceID, registeredReactionID)
}
}
// AfterRegisteredReactionDeleted implements types.ReactionsHooks
func (k Keeper) AfterRegisteredReactionDeleted(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) {
if k.hooks != nil {
k.hooks.AfterRegisteredReactionDeleted(ctx, subspaceID, registeredReactionID)
}
}
// AfterReactionParamsSaved implements types.ReactionsHooks
func (k Keeper) AfterReactionParamsSaved(ctx sdk.Context, subspaceID uint64) {
if k.hooks != nil {
k.hooks.AfterReactionParamsSaved(ctx, subspaceID)
}
}