Skip to content

Commit

Permalink
fix: remove newly introduced simapp dependency (#13219)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Sep 9, 2022
1 parent 1bccc54 commit 5912f75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.2
cosmossdk.io/errors v1.0.0-beta.7
cosmossdk.io/math v1.0.0-beta.3
cosmossdk.io/simapp v0.0.0-20220908203654-84d4bf5accad
github.com/99designs/keyring v1.2.1
github.com/armon/go-metrics v0.4.1
github.com/bgentry/speakeasy v0.1.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM=
cosmossdk.io/math v1.0.0-beta.3/go.mod h1:3LYasri3Zna4XpbrTNdKsWmD5fHHkaNAod/mNT9XdE4=
cosmossdk.io/simapp v0.0.0-20220908203654-84d4bf5accad h1:5y0F7FHvbJ/uE8L2Ab+0AtKvy5nUyFfxPEAAIy62T/Y=
cosmossdk.io/simapp v0.0.0-20220908203654-84d4bf5accad/go.mod h1://fc0lbQ4/I2Gm2xQkzq1U6SjZP+UMomSBFw/nodk9U=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
Expand Down
20 changes: 12 additions & 8 deletions x/bank/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/stretchr/testify/require"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
Expand All @@ -22,6 +21,7 @@ import (
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"github.com/cosmos/cosmos-sdk/x/bank/testutil"
"github.com/cosmos/cosmos-sdk/x/bank/types"
_ "github.com/cosmos/cosmos-sdk/x/gov"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
_ "github.com/cosmos/cosmos-sdk/x/params"
_ "github.com/cosmos/cosmos-sdk/x/staking"
Expand Down Expand Up @@ -109,7 +109,9 @@ func createTestSuite(t *testing.T, genesisAccounts []authtypes.GenesisAccount) s
configurator.AuthModule(),
configurator.StakingModule(),
configurator.TxModule(),
configurator.BankModule()),
configurator.BankModule(),
configurator.GovModule(),
),
startupCfg, &res.BankKeeper, &res.AccountKeeper)

res.App = app
Expand Down Expand Up @@ -340,12 +342,14 @@ func TestMsgMultiSendDependent(t *testing.T) {

func TestMsgSetSendEnabled(t *testing.T) {
acc1 := authtypes.NewBaseAccountWithAddress(addr1)

genAccs := []authtypes.GenesisAccount{acc1}
app := simapp.SetupWithGenesisAccounts(t, genAccs)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
require.NoError(t, testutil.FundAccount(app.BankKeeper, ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 101))))
s := createTestSuite(t, genAccs)

ctx := s.App.BaseApp.NewContext(false, tmproto.Header{})
require.NoError(t, testutil.FundAccount(s.BankKeeper, ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 101))))
addr1Str := addr1.String()
govAddr := app.BankKeeper.GetAuthority()
govAddr := s.BankKeeper.GetAuthority()
goodGovProp, err := govv1.NewMsgSubmitProposal(
[]sdk.Msg{
types.NewMsgSetSendEnabled(govAddr, nil, nil),
Expand Down Expand Up @@ -423,9 +427,9 @@ func TestMsgSetSendEnabled(t *testing.T) {

for _, tc := range testCases {
t.Run(tc.desc, func(tt *testing.T) {
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: s.App.LastBlockHeight() + 1}
txGen := moduletestutil.MakeTestEncodingConfig().TxConfig
_, _, err = simtestutil.SignCheckDeliver(tt, txGen, app.BaseApp, header, tc.msgs, "", []uint64{0}, tc.accSeqs, tc.expSimPass, tc.expPass, priv1)
_, _, err = simtestutil.SignCheckDeliver(tt, txGen, s.App.BaseApp, header, tc.msgs, "", []uint64{0}, tc.accSeqs, tc.expSimPass, tc.expPass, priv1)
if len(tc.expInError) > 0 {
require.Error(tt, err)
for _, exp := range tc.expInError {
Expand Down

0 comments on commit 5912f75

Please sign in to comment.