/
hooks.go
75 lines (62 loc) · 2.18 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package keeper
// DONTCOVER
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/desmos-labs/desmos/v7/x/profiles/types"
)
// Implements ProfilesHooks interface
var _ types.ProfilesHooks = Keeper{}
// AfterProfileSaved - call if hook is registered
func (k Keeper) AfterProfileSaved(ctx sdk.Context, profile *types.Profile) {
if k.hooks != nil {
k.hooks.AfterProfileSaved(ctx, profile)
}
}
// AfterProfileDeleted - call if hook is registered
func (k Keeper) AfterProfileDeleted(ctx sdk.Context, profile *types.Profile) {
if k.hooks != nil {
k.hooks.AfterProfileDeleted(ctx, profile)
}
}
// AfterDTagTransferRequestCreated - call if hook is registered
func (k Keeper) AfterDTagTransferRequestCreated(ctx sdk.Context, request types.DTagTransferRequest) {
if k.hooks != nil {
k.hooks.AfterDTagTransferRequestCreated(ctx, request)
}
}
// AfterDTagTransferRequestAccepted - call if hook is registered
func (k Keeper) AfterDTagTransferRequestAccepted(ctx sdk.Context, request types.DTagTransferRequest, newDTag string) {
if k.hooks != nil {
k.hooks.AfterDTagTransferRequestAccepted(ctx, request, newDTag)
}
}
// AfterDTagTransferRequestDeleted - call if hook is registered
func (k Keeper) AfterDTagTransferRequestDeleted(ctx sdk.Context, sender, recipient string) {
if k.hooks != nil {
k.hooks.AfterDTagTransferRequestDeleted(ctx, sender, recipient)
}
}
// AfterChainLinkSaved - call if hook is registered
func (k Keeper) AfterChainLinkSaved(ctx sdk.Context, link types.ChainLink) {
if k.hooks != nil {
k.hooks.AfterChainLinkSaved(ctx, link)
}
}
// AfterChainLinkDeleted - call if hook is registered
func (k Keeper) AfterChainLinkDeleted(ctx sdk.Context, link types.ChainLink) {
if k.hooks != nil {
k.hooks.AfterChainLinkDeleted(ctx, link)
}
}
// AfterApplicationLinkSaved - call if hook is registered
func (k Keeper) AfterApplicationLinkSaved(ctx sdk.Context, link types.ApplicationLink) {
if k.hooks != nil {
k.hooks.AfterApplicationLinkSaved(ctx, link)
}
}
// AfterUserPermissionDeleted - call if hook is registered
func (k Keeper) AfterApplicationLinkDeleted(ctx sdk.Context, link types.ApplicationLink) {
if k.hooks != nil {
k.hooks.AfterApplicationLinkDeleted(ctx, link)
}
}