Skip to content

Commit

Permalink
print also the tx for the signer_infos field
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed May 13, 2024
1 parent 218657f commit a2fcd9b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmd/govgend/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,23 @@ func getBytesToSignCommand() *cobra.Command {
if err != nil {
return err
}
cmd.Printf("Bytes to sign:\n%s\n", base64.StdEncoding.EncodeToString(bytesToSign))

cmd.Printf("%s\n", base64.StdEncoding.EncodeToString(bytesToSign))
// Print the input tx with the filled `auth_info.signer_infos` field.
json, err := clientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx())
if err != nil {
return err
}
cmd.Printf("Tx with filled `signer_infos`:\n%s\n", json)
return nil
},
}
cmd.Flags().String(flags.FlagChainID, "", "The network chain ID")
cmd.MarkFlagRequired(flags.FlagFrom)
flags.AddTxFlagsToCmd(cmd)
cmd.MarkFlagRequired(flags.FlagFrom)

Check failure on line 272 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)

Check failure on line 272 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / Analyze

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
cmd.MarkFlagRequired(flags.FlagChainID)

Check failure on line 273 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)

Check failure on line 273 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / Analyze

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
cmd.MarkFlagRequired(flags.FlagSequence)

Check failure on line 274 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)

Check failure on line 274 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / Analyze

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
cmd.MarkFlagRequired(flags.FlagAccountNumber)

Check failure on line 275 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)

Check failure on line 275 in cmd/govgend/cmd/root.go

View workflow job for this annotation

GitHub Actions / Analyze

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
return cmd
}

Expand Down

0 comments on commit a2fcd9b

Please sign in to comment.