Skip to content

Commit

Permalink
Added effectiveGasPrice to receipt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 26, 2021
1 parent 1e31b34 commit ba6854b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/abstract-provider/src.ts/index.ts
Expand Up @@ -113,6 +113,7 @@ export interface TransactionReceipt {
blockNumber: number,
confirmations: number,
cumulativeGasUsed: BigNumber,
effectiveGasPrice: BigNumber,
byzantium: boolean,
type: number;
status?: number
Expand Down
7 changes: 1 addition & 6 deletions packages/providers/src.ts/formatter.ts
Expand Up @@ -124,6 +124,7 @@ export class Formatter {
blockNumber: number,
confirmations: Formatter.allowNull(number, null),
cumulativeGasUsed: bigNumber,
effectiveGasPrice: Formatter.allowNull(bigNumber),
status: Formatter.allowNull(number),
type: type
};
Expand Down Expand Up @@ -339,12 +340,6 @@ export class Formatter {

const result: TransactionResponse = Formatter.check(this.formats.transaction, transaction);

if (result.type === 2) {
if (result.gasPrice == null) {
result.gasPrice = result.maxFeePerGas;
}
}

if (transaction.chainId != null) {
let chainId = transaction.chainId;

Expand Down
2 changes: 1 addition & 1 deletion packages/testcases/src.ts/browser-data.json

Large diffs are not rendered by default.

0 comments on commit ba6854b

Please sign in to comment.