chore: use sdkmath in misc packages (#14606)
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
atheeshp
Marko
parent
ae1c29b8f8
commit
f2b6013cee
@@ -4,6 +4,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/suite"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
@@ -13,7 +15,6 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
@@ -66,7 +67,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0)
|
||||
balance := types.Balance{
|
||||
Address: acc.GetAddress().String(),
|
||||
Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(s.genesisAccountBalance))),
|
||||
Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(s.genesisAccountBalance))),
|
||||
}
|
||||
|
||||
genesisState, err := sims.GenesisStateWithValSet(cdc, app.DefaultGenesis(), valSet, []authtypes.GenesisAccount{acc}, balance)
|
||||
@@ -124,7 +125,7 @@ func (s *IntegrationTestSuite) TestGRPCQuery() {
|
||||
)
|
||||
s.Require().NoError(err)
|
||||
bal := res.GetBalance()
|
||||
s.Equal(sdk.NewCoin(denom, sdk.NewInt(s.genesisAccountBalance)), *bal)
|
||||
s.Equal(sdk.NewCoin(denom, sdkmath.NewInt(s.genesisAccountBalance)), *bal)
|
||||
}
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
clienttestutil "github.com/cosmos/cosmos-sdk/client/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
@@ -388,7 +388,7 @@ func TestPreprocessHook(t *testing.T) {
|
||||
|
||||
coin := sdk.Coin{
|
||||
Denom: "atom",
|
||||
Amount: sdk.NewInt(20),
|
||||
Amount: sdkmath.NewInt(20),
|
||||
}
|
||||
newTip := &txtypes.Tip{
|
||||
Amount: sdk.Coins{coin},
|
||||
|
||||
Reference in New Issue
Block a user