Skip to content

Commit

Permalink
Fix for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Mar 7, 2024
1 parent 716266c commit 484e8ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion x/foundation/keeper/exported.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/Finschia/finschia-sdk/x/foundation"
"github.com/Finschia/finschia-sdk/x/foundation/keeper/internal"
Expand Down Expand Up @@ -60,7 +61,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState {
return k.impl.ExportGenesis(ctx)
}

func (k Keeper) Hooks() internal.Hooks {
func (k Keeper) Hooks() stakingtypes.StakingHooks {
return k.impl.Hooks()
}

Expand Down
20 changes: 10 additions & 10 deletions x/foundation/keeper/internal/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ type Hooks struct {
// Create new foundation hooks
func (k Keeper) Hooks() Hooks { return Hooks{k} }

func (h Hooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error {
func (h Hooks) AfterDelegationModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error {
func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error {
return nil
}

func (h Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error {
func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error {
func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error {
return nil
}

Expand All @@ -51,26 +51,26 @@ func (h Hooks) AfterValidatorCreated(goCtx context.Context, valAddr sdk.ValAddre
return nil
}

func (h Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error {
func (h Hooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error {
func (h Hooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error {
func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error {
func (h Hooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error {
func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error {
return nil
}

func (h Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error {
func (h Hooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ math.LegacyDec) error {
return nil
}

0 comments on commit 484e8ef

Please sign in to comment.