Skip to content

Commit

Permalink
(fix) Remove debug panics
Browse files Browse the repository at this point in the history
  • Loading branch information
shibaeff committed Oct 2, 2024
1 parent e98bbf1 commit b077d21
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions client/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,6 @@ func (c *chainClient) SyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastT
} else if resultTx.TxResult.Code != 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
res = &txtypes.BroadcastTxResponse{TxResponse: resResultTx}
panic(errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code)))
return res, errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code))
} else if resultTx.Height > 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
Expand Down Expand Up @@ -877,7 +876,6 @@ func (c *chainClient) SyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastT
} else if resultTx.TxResult.Code != 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
res = &txtypes.BroadcastTxResponse{TxResponse: resResultTx}
panic(errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code)))
return res, errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code))
} else if resultTx.Height > 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
Expand Down Expand Up @@ -939,7 +937,6 @@ func (c *chainClient) broadcastTx(
} else if resultTx.TxResult.Code != 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
res = &txtypes.BroadcastTxResponse{TxResponse: resResultTx}
panic(errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code)))
return res, errors.New(fmt.Sprintf("Failed with non-zero code %d", resultTx.TxResult.Code))
} else if resultTx.Height > 0 {
resResultTx := sdk.NewResponseResultTx(resultTx, res.TxResponse.Tx, res.TxResponse.Timestamp)
Expand Down

0 comments on commit b077d21

Please sign in to comment.