Skip to content

Commit 073b502

Browse files
committed
fix: don't panic if tx has no receipt
1 parent c582d05 commit 073b502

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rpc/rpc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ func (rpc *RPC) TransactionReceipt(ctx context.Context, txHash ethcommon.Hash) (
296296
if err != nil {
297297
return nil, err
298298
}
299+
if receipt == nil {
300+
return nil, errors.New("transaction has no receipt")
301+
}
299302
return receipt, nil
300303
}, 3, 100*time.Millisecond) // 3 retries with 100ms initial delay
301304
}

0 commit comments

Comments
 (0)