Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
skyargos committed Nov 10, 2023
1 parent 7446fad commit fe1f7ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions x/bounty/keeper/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions x/bounty/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -27,8 +28,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
&MsgEditProgram{},
&MsgCloseProgram{},
&MsgSubmitFinding{},
&MsgAcceptFinding{},
&MsgRejectFinding{},
&MsgConfirmFinding{},
&MsgCloseFinding{},
&MsgReleaseFinding{},
)
Expand Down

0 comments on commit fe1f7ae

Please sign in to comment.