From 26d32716436cd8925a5278173ba72ad54e00eef8 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Fri, 10 Jan 2020 20:59:28 -0500 Subject: [PATCH] Add missing chainId to transaction responses (#700). --- 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 b75ae8ff..824a9b57 100644 --- a/src.ts/providers/base-provider.ts +++ b/src.ts/providers/base-provider.ts @@ -247,6 +247,9 @@ function checkTransactionResponse(transaction: any): TransactionResponse { if (typeof(networkId) !== 'number') { networkId = 0; } result.networkId = networkId; + if (result.chainId == null && networkId != null) { + result.chainId = networkId; + } // 0x0000... should actually be null if (result.blockHash && result.blockHash.replace(/0/g, '') === 'x') {