Skip to content

Commit

Permalink
There's no check for chain-id in TxBuilder.SignStdTx cosmos#3945
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjj9219 committed Mar 20, 2019
1 parent 386116f commit fd73b93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/auth/client/txbuilder/txbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ func (bldr TxBuilder) BuildTxForSim(msgs []sdk.Msg) ([]byte, error) {
// SignStdTx appends a signature to a StdTx and returns a copy of a it. If append
// is false, it replaces the signatures already attached with the new signature.
func (bldr TxBuilder) SignStdTx(name, passphrase string, stdTx auth.StdTx, appendSig bool) (signedStdTx auth.StdTx, err error) {
chainID := bldr.chainID
if chainID == "" {
return auth.StdTx{}, fmt.Errorf("chain ID required but not specified")
}

stdSignature, err := MakeSignature(bldr.keybase, name, passphrase, StdSignMsg{
ChainID: bldr.chainID,
AccountNumber: bldr.accountNumber,
Expand Down

0 comments on commit fd73b93

Please sign in to comment.