Skip to content

Commit

Permalink
(fix) Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shibaeff committed Oct 3, 2024
1 parent d89db43 commit f5995a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f5995a1

Please sign in to comment.