Skip to content

Commit

Permalink
err handler fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong committed Jan 4, 2024
1 parent 2e5af97 commit 4c32000
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/ctxc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,8 @@ func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash,
func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
var r *types.Receipt
err := ec.c.CallContext(ctx, &r, "ctxc_getTransactionReceipt", txHash)
if err == nil {
if r == nil {
return nil, cortex.NotFound
}
if err == nil && r == nil {
return nil, cortex.NotFound
}
return r, err
}
Expand Down

0 comments on commit 4c32000

Please sign in to comment.