ACK and incorporate @cwgoes comments

This commit is contained in:
Alessio Treglia 2018-09-07 15:25:20 +01:00
parent e6a8a4df55
commit f5a7f2524f
No known key found for this signature in database
GPG Key ID: E8A48AE5311D765A
3 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ test_cover:
test_lint:
gometalinter.v2 --config=tools/gometalinter.json ./...
!(gometalinter.v2 --disable-all --enable='errcheck' --vendor ./... | grep -v -e "client/" -e "fmt\.Fprintf")
!(gometalinter.v2 --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
dep status >> /dev/null
!(grep -n branch Gopkg.toml)

View File

@ -442,7 +442,6 @@ func unmarshalStdTx(t *testing.T, s string) (stdTx auth.StdTx) {
func writeToNewTempFile(t *testing.T, s string) *os.File {
fp, err := ioutil.TempFile(os.TempDir(), "cosmos_cli_test_")
require.Nil(t, err)
// defer os.Remove(signedTxFile.Name())
_, err = fp.WriteString(s)
require.Nil(t, err)
return fp

View File

@ -19,6 +19,7 @@ type SignBody struct {
ChainID string `json:"chain_id"`
AccountNumber int64 `json:"account_number"`
Sequence int64 `json:"sequence"`
AppendSig bool `json:"append_sig"`
}
// sign tx REST handler
@ -44,7 +45,7 @@ func SignTxRequestHandlerFn(cdc *wire.Codec, cliCtx context.CLIContext) http.Han
Sequence: m.Sequence,
}
signedTx, err := txCtx.SignStdTx(m.LocalAccountName, m.Password, m.Tx, false)
signedTx, err := txCtx.SignStdTx(m.LocalAccountName, m.Password, m.Tx, m.AppendSig)
if err != nil {
utils.WriteErrorResponse(w, http.StatusInternalServerError, err.Error())
return