Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Jan 13, 2025
1 parent 98376cf commit 6b4188d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
16 changes: 0 additions & 16 deletions x/dex/types/keys.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package types

import (
"errors"
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -76,21 +75,6 @@ func TickIndexToBytes(tickTakerToMaker int64) []byte {
return key
}

func BytesToTickIndex(bz []byte) (int64, error) {
if len(bz) != 9 {
return 0, errors.New("input should be 9 bytes long")
}

isNegative := bz[0] == 0
tickTakerToMaker := sdk.BigEndianToUint64(bz[1:])

if isNegative {
return int64(-tickTakerToMaker), nil
}
// else
return int64(tickTakerToMaker), nil
}

// LimitOrderTrancheUserKey returns the store key to retrieve a LimitOrderTrancheUser from the index fields
func LimitOrderTrancheUserKey(address, trancheKey string) []byte {
var key []byte
Expand Down
4 changes: 2 additions & 2 deletions x/globalfee/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (mfd FeeDecorator) GetTxFeeRequired(ctx sdk.Context, tx sdk.FeeTx) (sdk.Coi
// to form the tx fee requirements

// Get local minimum-gas-prices
localFees := GetMinGasPrice(ctx, int64(tx.GetGas()))
localFees := GetMinGasPrice(ctx, int64(tx.GetGas())) //nolint:gosec
c, err := CombinedFeeRequirement(globalFees, localFees)

// Return combined fee requirements
Expand All @@ -180,7 +180,7 @@ func (mfd FeeDecorator) GetGlobalFee(ctx sdk.Context, feeTx sdk.FeeTx) sdk.Coins
requiredGlobalFees := make(sdk.Coins, len(globalMinGasPrices))
// Determine the required fees by multiplying each required minimum gas
// price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
glDec := math.LegacyNewDec(int64(feeTx.GetGas()))
glDec := math.LegacyNewDec(int64(feeTx.GetGas())) //nolint:gosec
for i, gp := range globalMinGasPrices {
fee := gp.Amount.Mul(glDec)
requiredGlobalFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())
Expand Down

0 comments on commit 6b4188d

Please sign in to comment.