Skip to content

Commit

Permalink
more sdkmath...
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Dec 24, 2023
1 parent e4a160d commit 79abf9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/ibctesting/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
tmos "github.com/cometbft/cometbft/libs/os"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
Expand Down Expand Up @@ -394,7 +394,6 @@ func NewSimApp(
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

govConfig := govtypes.DefaultConfig()
Expand Down
6 changes: 3 additions & 3 deletions x/mint/types/genesis.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"cosmossdk.io/math"
sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)
Expand All @@ -11,10 +11,10 @@ import (
// bondedRatio and returns the newly calculated inflation rate.
// It can be used to specify a custom inflation calculation logic, instead of relying on the
// default logic provided by the sdk.
type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec, totalStakingSupply math.Int) sdk.Dec
type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio sdkmath.LegacyDec, totalStakingSupply sdkmath.Int) sdkmath.LegacyDec

// DefaultInflationCalculationFn is the default function used to calculate inflation.
func DefaultInflationCalculationFn(_ sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec, totalStakingSupply math.Int) sdk.Dec {
func DefaultInflationCalculationFn(_ sdk.Context, minter Minter, params Params, bondedRatio sdkmath.LegacyDec, totalStakingSupply sdkmath.Int) sdkmath.LegacyDec {
return minter.NextInflationRate(params, bondedRatio, totalStakingSupply)
}

Expand Down

0 comments on commit 79abf9b

Please sign in to comment.