Skip to content

Commit

Permalink
feat: fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
soring323 committed Feb 22, 2024
1 parent 39aec46 commit 8156ed0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
// initParamsKeeper init params keeper and its subspaces.
func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)

paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
paramsKeeper.Subspace(stakingtypes.ModuleName)
Expand Down
6 changes: 1 addition & 5 deletions x/gmm/types/pool_apr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package types

import (
"encoding/json"
"fmt"

sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -37,10 +36,7 @@ func (pa *PoolAPR) CalcAPR(ctx sdk.Context, tvl map[string]PoolAsset) sdk.Coins
oneYearAsSec := int64(60 * 60 * 24 * 365)
var apr sdk.Coins
for _, coin := range pa.Fees {
fmt.Println(ctx.BlockTime())
fmt.Println(ctx.BlockTime().Unix())
interval := int64(ctx.BlockTime().Unix()) - pa.CreatedAt

interval := ctx.BlockTime().Unix() - pa.CreatedAt
if _, found := tvl[coin.Denom]; found && !tvl[coin.Denom].Token.Amount.IsZero() {
if interval <= 0 {
apr = apr.Add(sdk.NewCoin(coin.Denom, sdk.NewInt(0)))
Expand Down

0 comments on commit 8156ed0

Please sign in to comment.