Merge PR #3591: Fix setting tx hash when nil

* fix setting the tx hash when nil
* add a pending log entry
This commit is contained in:
Alexander Bezobchuk
2019-02-11 11:28:23 +01:00
committed by Christopher Goes
parent ed2b427fd6
commit 1d4bb1a863
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -45,6 +45,7 @@ BUG FIXES
* Gaia CLI
* Gaia
* [\#3585] Fix setting the tx hash in `NewResponseFormatBroadcastTxCommit`.
* SDK
+6 -1
View File
@@ -70,9 +70,14 @@ func NewResponseResultTx(res *ctypes.ResultTx, tx Tx) TxResponse {
}
func NewResponseFormatBroadcastTxCommit(res *ctypes.ResultBroadcastTxCommit) TxResponse {
var txHash string
if res.Hash != nil {
txHash = res.Hash.String()
}
return TxResponse{
Height: res.Height,
TxHash: res.Hash.String(),
TxHash: txHash,
Code: res.DeliverTx.Code,
Data: res.DeliverTx.Data,
Log: res.DeliverTx.Log,