Skip to content

Commit 8494b9e

Browse files
committed
change(auth): partially remove usage of SetBalances from tests
1 parent 3fb8672 commit 8494b9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

x/auth/ante/ante_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() {
137137
func() {
138138
acc1 := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr0)
139139
suite.app.AccountKeeper.SetAccount(suite.ctx, acc1)
140-
err := suite.app.BankKeeper.SetBalances(suite.ctx, addr0, feeAmount)
140+
err := suite.app.BankKeeper.SetBalances(suite.ctx, addr0, feeAmount) // TODO(fdymylja): IDK
141141
suite.Require().NoError(err)
142142
},
143143
false,
@@ -466,7 +466,7 @@ func (suite *AnteTestSuite) TestAnteHandlerFees() {
466466
{
467467
"signer does not have enough funds to pay the fee",
468468
func() {
469-
suite.app.BankKeeper.SetBalances(suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 149)))
469+
suite.app.BankKeeper.SetBalances(suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 149))) // TODO(fdymylja): IDK
470470
},
471471
false,
472472
false,
@@ -480,7 +480,7 @@ func (suite *AnteTestSuite) TestAnteHandlerFees() {
480480
suite.Require().True(suite.app.BankKeeper.GetAllBalances(suite.ctx, modAcc.GetAddress()).Empty())
481481
require.True(sdk.IntEq(suite.T(), suite.app.BankKeeper.GetAllBalances(suite.ctx, addr0).AmountOf("atom"), sdk.NewInt(149)))
482482

483-
suite.app.BankKeeper.SetBalances(suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 150)))
483+
suite.app.BankKeeper.SetBalances(suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 150))) // TODO(fdymylja): IDK
484484
},
485485
false,
486486
true,
@@ -1120,7 +1120,7 @@ func (suite *AnteTestSuite) TestAnteHandlerReCheck() {
11201120

11211121
// remove funds for account so antehandler fails on recheck
11221122
suite.app.AccountKeeper.SetAccount(suite.ctx, accounts[0].acc)
1123-
suite.app.BankKeeper.SetBalances(suite.ctx, accounts[0].acc.GetAddress(), sdk.NewCoins())
1123+
suite.app.BankKeeper.SetBalances(suite.ctx, accounts[0].acc.GetAddress(), sdk.NewCoins()) // TODO(fdymylja): IDK
11241124

11251125
_, err = suite.anteHandler(suite.ctx, tx, false)
11261126
suite.Require().NotNil(err, "antehandler on recheck did not fail once feePayer no longer has sufficient funds")

x/auth/ante/fee_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (suite *AnteTestSuite) TestDeductFees() {
8282
// Set account with insufficient funds
8383
acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr1)
8484
suite.app.AccountKeeper.SetAccount(suite.ctx, acc)
85-
suite.app.BankKeeper.SetBalances(suite.ctx, addr1, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(10))))
85+
suite.app.BankKeeper.SetBalances(suite.ctx, addr1, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(10)))) // TODO(fdymylja): IDK
8686

8787
dfd := ante.NewDeductFeeDecorator(suite.app.AccountKeeper, suite.app.BankKeeper)
8888
antehandler := sdk.ChainAnteDecorators(dfd)

x/auth/ante/testutil_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount {
7777
suite.app.AccountKeeper.SetAccount(suite.ctx, acc)
7878
suite.app.BankKeeper.SetBalances(suite.ctx, addr, sdk.Coins{
7979
sdk.NewInt64Coin("atom", 10000000),
80-
})
80+
}) // TODO(fdymylja): IDK
8181

8282
accounts = append(accounts, TestAccount{acc, priv})
8383
}

0 commit comments

Comments
 (0)