From 24335d0dd71d11a2a9088c05728ed8507062434d Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 4 Oct 2018 16:46:19 -0400 Subject: [PATCH] Fix for geth-etc (official geth is fine), which returns Receipts before the blockHash is synced to the database. --- src.ts/providers/base-provider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src.ts/providers/base-provider.ts b/src.ts/providers/base-provider.ts index be214f930..db3a8f04e 100644 --- a/src.ts/providers/base-provider.ts +++ b/src.ts/providers/base-provider.ts @@ -980,6 +980,9 @@ export class BaseProvider extends Provider { return undefined; } + // "geth-etc" returns receipts before they are ready + if (result.blockHash == null) { return undefined; } + return checkTransactionReceipt(result); }); }, { onceBlock: this });