refactor: remove defer in loop (#20223)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
coderabbitai[bot]
parent
e4ec753268
commit
2b34f69e87
@@ -207,7 +207,6 @@ func (s *CLITestSuite) TestCLISignBatchTotalFees() {
|
||||
sdk.NewCoins(sendTokens), clitestutil.TestTxConfig{GenOnly: true})
|
||||
s.Require().NoError(err)
|
||||
txFile := testutil.WriteToNewTempFile(s.T(), tx.String()+"\n")
|
||||
defer txFile.Close()
|
||||
txFiles[i] = txFile.Name()
|
||||
|
||||
unsignedTx, err := txCfg.TxJSONDecoder()(tx.Bytes())
|
||||
@@ -215,6 +214,8 @@ func (s *CLITestSuite) TestCLISignBatchTotalFees() {
|
||||
txBuilder, err := txCfg.WrapTxBuilder(unsignedTx)
|
||||
s.Require().NoError(err)
|
||||
expectedBatchedTotalFee += txBuilder.GetTx().GetFee().AmountOf(tc.denom).Int64()
|
||||
err = txFile.Close()
|
||||
s.NoError(err)
|
||||
}
|
||||
|
||||
// Test batch sign
|
||||
|
||||
Reference in New Issue
Block a user