Skip to content

Commit

Permalink
fix lint err
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Sep 5, 2024
1 parent 841cbbd commit 8b2a247
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions precompiles/assets/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ func (p Precompile) UpdateTokenFromInputs(
if !ok || assetAddr == nil {
return 0, "", sdkmath.NewInt(0), "", fmt.Errorf(exocmn.ErrContractInputParaOrType, 1, "[]byte", args[1])
}
// #nosec G115
if uint32(len(assetAddr)) < clientChainAddrLength {
return 0, "", sdkmath.NewInt(0), "", fmt.Errorf(exocmn.ErrInvalidAddrLength, len(assetAddr), clientChainAddrLength)
}
Expand Down
2 changes: 1 addition & 1 deletion precompiles/testutil/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func CheckLogs(logArgs LogCheckArgs) error {
int64(float64(logArgs.Res.GasUsed)/float64(logArgs.Res.GasWanted)*100),
)
}
if err := CheckVMError(logArgs.Res, logArgs.ErrContains); err != nil {
if err := CheckVMError(logArgs.Res, logArgs.ErrContains); err != nil { //nolint:govet

Check failure on line 40 in precompiles/testutil/logs.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

directive `//nolint:govet` is unused for linter "govet" (nolintlint)
return err
}

Expand Down
3 changes: 1 addition & 2 deletions x/avs/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,13 @@ func (k Keeper) UpdateAVSInfo(ctx sdk.Context, params *types.AVSRegisterOrDeregi
}
// TODO: The AvsUnbondingPeriod is used for undelegation, but this check currently blocks updates to AVS information. Remove this check to allow AVS updates, while detailed control mechanisms for updates should be considered and implemented in the future.
// If avs UpdateAction check UnbondingPeriod

// #nosec G115
// if int64(avsInfo.Info.AvsUnbondingPeriod) < (epoch.CurrentEpoch - int64(avsInfo.GetInfo().StartingEpoch)) {
// return errorsmod.Wrap(types.ErrUnbondingPeriod, fmt.Sprintf("not qualified to deregister %s", avsInfo))
// }
// If avs UpdateAction check CallerAddress


avs := avsInfo.Info

if params.AvsName != "" {
Expand Down
2 changes: 1 addition & 1 deletion x/oracle/keeper/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (k Keeper) RegisterNewTokenAndSetTokenFeeder(ctx sdk.Context, oInfo *types.
Name: oInfo.Token.Name,
ChainID: chainID,
ContractAddress: oInfo.Token.Contract,
Decimal: int32(decimalInt),
Decimal: int32(decimalInt), // #nosec G115
Active: true,
AssetID: oInfo.AssetID,
})
Expand Down

0 comments on commit 8b2a247

Please sign in to comment.