cli/sc: tune error messages for forced save/send

Here we're either saving or sending a transaction (depending on `out`), but
not both. Refs. #2664.
This commit is contained in:
Roman Khimov 2022-08-31 09:51:57 +03:00
parent 314cd3341b
commit 4b136e8ab1

View file

@ -702,14 +702,11 @@ func invokeWithArgs(ctx *cli.Context, acc *wallet.Account, wall *wallet.Wallet,
return sender, cli.NewExitError(errText, 1) return sender, cli.NewExitError(errText, 1)
} }
action := "save" action := "send"
process := "Saving" process := "Sending"
if out != "" { if out != "" {
action += "and send" action = "save"
process += "and sending" process = "Saving"
} else {
action = "send"
process = "Sending"
} }
if !ctx.Bool("force") { if !ctx.Bool("force") {
return sender, cli.NewExitError(errText+".\nUse --force flag to "+action+" the transaction anyway.", 1) return sender, cli.NewExitError(errText+".\nUse --force flag to "+action+" the transaction anyway.", 1)