Skip to content

Commit

Permalink
allow tx decoding to fail in QueryTxsByEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-dydx committed Jun 6, 2024
1 parent 7330926 commit 1896689
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x/auth/tx/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ func QueryTx(clientCtx client.Context, hashHexStr string) (*sdk.TxResponse, erro

// formatTxResults parses the indexed txs into a slice of TxResponse objects.
func formatTxResults(txConfig client.TxConfig, resTxs []*coretypes.ResultTx, resBlocks map[int64]*coretypes.ResultBlock) ([]*sdk.TxResponse, error) {
var err error
out := make([]*sdk.TxResponse, len(resTxs))
out := []*sdk.TxResponse{}
for i := range resTxs {
out[i], err = mkTxResult(txConfig, resTxs[i], resBlocks[resTxs[i].Height])
if err != nil {
return nil, err
txResult, err := mkTxResult(txConfig, resTxs[i], resBlocks[resTxs[i].Height])
// Skip transactions that cannot be decoded for now
if err == nil {
out = append(out, txResult)
}
}

Expand Down

0 comments on commit 1896689

Please sign in to comment.