diff --git a/src/BlockTransactions.tsx b/src/BlockTransactions.tsx index 30d39c0..2ce687b 100644 --- a/src/BlockTransactions.tsx +++ b/src/BlockTransactions.tsx @@ -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), };