From fe1f7ae49acd89b4cb7ff6cbe894b941649bf21e Mon Sep 17 00:00:00 2001 From: zheng-bin Date: Fri, 10 Nov 2023 15:52:24 +0800 Subject: [PATCH] fix lint error --- x/bounty/keeper/program.go | 4 ++-- x/bounty/types/codec.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x/bounty/keeper/program.go b/x/bounty/keeper/program.go index 93b130a2f..ac094b674 100644 --- a/x/bounty/keeper/program.go +++ b/x/bounty/keeper/program.go @@ -74,11 +74,11 @@ func (k Keeper) CloseProgram(ctx sdk.Context, pid string, caller sdk.AccAddress) return types.ErrProgramAlreadyClosed } // todo finding 3种存在不可关闭 - // FINDING_STATUS_SUBMITTED = 0 [(gogoproto.enumvalue_customname) = "FindingStatusSubmitted"]; + // FINDING_STATUS_SUBMITTED = 0 [(gogoproto.enumvalue_customname) = "FindingStatusSubmitted"]; // FINDING_STATUS_ACTIVE = 1 [(gogoproto.enumvalue_customname) = "FindingStatusActive"]; // FINDING_STATUS_CONFIRMED = 2 [(gogoproto.enumvalue_customname) = "FindingStatusConfirmed"]; // Check the permissions. Only the admin of the program or cert address can operate. - if program.AdminAddress != caller.String() && !k.certKeeper.IsCertifier(ctx, caller) { + if program.AdminAddress != caller.String() && !k.certKeeper.IsBountyAdmin(ctx, caller) { return types.ErrFindingOperatorNotAllowed } diff --git a/x/bounty/types/codec.go b/x/bounty/types/codec.go index 6d6dbe172..0650efd2b 100644 --- a/x/bounty/types/codec.go +++ b/x/bounty/types/codec.go @@ -13,10 +13,11 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(MsgCreateProgram{}, "bounty/CreateProgram", nil) cdc.RegisterConcrete(MsgEditProgram{}, "bounty/EditProgram", nil) + cdc.RegisterConcrete(MsgActivateProgram{}, "bounty/ActivateProgram", nil) cdc.RegisterConcrete(MsgCloseProgram{}, "bounty/CloseProgram", nil) cdc.RegisterConcrete(MsgSubmitFinding{}, "bounty/SubmitFinding", nil) - cdc.RegisterConcrete(MsgAcceptFinding{}, "bounty/AcceptFinding", nil) - cdc.RegisterConcrete(MsgRejectFinding{}, "bounty/RejectFinding", nil) + cdc.RegisterConcrete(MsgEditFinding{}, "bounty/EditFinding", nil) + cdc.RegisterConcrete(MsgConfirmFinding{}, "bounty/ConfirmFinding", nil) cdc.RegisterConcrete(MsgCloseFinding{}, "bounty/CloseFinding", nil) cdc.RegisterConcrete(MsgReleaseFinding{}, "bounty/ReleaseFinding", nil) } @@ -27,8 +28,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgEditProgram{}, &MsgCloseProgram{}, &MsgSubmitFinding{}, - &MsgAcceptFinding{}, - &MsgRejectFinding{}, + &MsgConfirmFinding{}, &MsgCloseFinding{}, &MsgReleaseFinding{}, )