From f5995a1c9463ae70f4efd5286e61f63b1438147e Mon Sep 17 00:00:00 2001 From: Pavel Shibaev Date: Thu, 3 Oct 2024 21:11:31 +0200 Subject: [PATCH] (fix) Fix error handling --- client/chain/chain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/chain/chain.go b/client/chain/chain.go index b494b19e..ace9511e 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -845,7 +845,7 @@ func (c *chainClient) SyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastT if errRes := client.CheckCometError(err, txBytes); errRes != nil { return &txtypes.BroadcastTxResponse{TxResponse: errRes}, err } - return nil, err + return res, err } if resultTx.TxResult.Code != 0 { resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp) @@ -939,6 +939,7 @@ func (c *chainClient) broadcastTx( if errRes := client.CheckCometError(err, txBytes); errRes != nil { return &txtypes.BroadcastTxResponse{TxResponse: errRes}, err } + return res, err } if resultTx.TxResult.Code != 0 { resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)