Fix type 2 gas column display raising exceptions

This commit is contained in:
Willian Mitsuda 2021-07-29 23:31:28 -03:00
parent aac878180a
commit 94faa79ede
1 changed files with 12 additions and 4 deletions

View File

@ -63,10 +63,18 @@ const BlockTransactions: React.FC = () => {
to: t.to,
createdContractAddress: _receipts[i].contractAddress,
value: t.value,
fee: provider.formatter
.bigNumber(_receipts[i].gasUsed)
.mul(t.gasPrice!),
gasPrice: t.gasPrice!,
fee:
t.type !== 2
? provider.formatter
.bigNumber(_receipts[i].gasUsed)
.mul(t.gasPrice!)
: provider.formatter
.bigNumber(_receipts[i].gasUsed)
.mul(t.maxPriorityFeePerGas!.add(_block.baseFeePerGas!)),
gasPrice:
t.type !== 2
? t.gasPrice!
: t.maxPriorityFeePerGas!.add(_block.baseFeePerGas!),
data: t.data,
status: provider.formatter.number(_receipts[i].status),
};