Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tx with generate-only and offline shouldn't use chain id #10710

Merged
merged 12 commits into from
Dec 10, 2021
Prev Previous commit
Next Next commit
add tests
  • Loading branch information
likhita-809 committed Dec 9, 2021
commit 29e5106e05b929766c5fcd82e08d504d49cfcbbf
17 changes: 17 additions & 0 deletions x/bank/client/testutil/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,23 @@ func (s *IntegrationTestSuite) TestNewSendTxCmd() {
},
false, 0, &sdk.TxResponse{},
},
{
"chain-id shouldn't be used with offline and generate-only flags",
val.Address,
val.Address,
sdk.NewCoins(
sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)),
sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)),
),
[]string{
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync),
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
fmt.Sprintf("--%s=true", flags.FlagOffline),
fmt.Sprintf("--%s=true", flags.FlagGenerateOnly),
},
false, 0, &sdk.TxResponse{},
},
{
"not enough fees",
val.Address,
Expand Down