Skip to content

Commit

Permalink
Add missing chainId to transaction responses (#700).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jan 11, 2020
1 parent 12da075 commit 26d3271
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src.ts/providers/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 26d3271

Please sign in to comment.