Skip to content

Commit

Permalink
Ignore blockTag when calling Etherscan if it is the default block tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Sep 13, 2023
1 parent bc6cfbf commit dcea9b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src.ts/providers/provider-etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ export class EtherscanProvider extends AbstractProvider {
if ((<any>transaction)[key] == null) { continue; }
let value = (<any>transaction)[key];
if (key === "type" && value === 0) { continue; }
if (key === "blockTag" && value === "latest") { continue; }

// Quantity-types require no leading zero, unless 0
if ((<any>{ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true })[key]) {
Expand Down

0 comments on commit dcea9b3

Please sign in to comment.