Remove unnecessary field

This commit is contained in:
Willian Mitsuda 2021-07-28 04:53:55 -03:00
parent e214117f47
commit 31287796f0
3 changed files with 9 additions and 6 deletions

View File

@ -97,10 +97,8 @@ const Transaction: React.FC = () => {
maxFeePerGas: _response.maxFeePerGas, maxFeePerGas: _response.maxFeePerGas,
maxPriorityFeePerGas: _response.maxPriorityFeePerGas, maxPriorityFeePerGas: _response.maxPriorityFeePerGas,
gasPrice: _response.gasPrice!, gasPrice: _response.gasPrice!,
gasLimit: _response.gasLimit,
gasUsed: _receipt.gasUsed, gasUsed: _receipt.gasUsed,
gasUsedPerc: gasLimit: _response.gasLimit,
_receipt.gasUsed.toNumber() / _response.gasLimit.toNumber(),
nonce: _response.nonce, nonce: _response.nonce,
data: _response.data, data: _response.data,
logs: _receipt.logs, logs: _receipt.logs,

View File

@ -177,7 +177,13 @@ const Details: React.FC<DetailsProps> = ({
<GasValue value={txData.gasUsed} /> /{" "} <GasValue value={txData.gasUsed} /> /{" "}
<GasValue value={txData.gasLimit} /> <GasValue value={txData.gasLimit} />
</div> </div>
<PercentageBar perc={Math.round(txData.gasUsedPerc * 10000) / 100} /> <PercentageBar
perc={
Math.round(
(txData.gasUsed.toNumber() / txData.gasLimit.toNumber()) * 10000
) / 100
}
/>
</div> </div>
</InfoRow> </InfoRow>
<InfoRow title="Ether Price">N/A</InfoRow> <InfoRow title="Ether Price">N/A</InfoRow>

View File

@ -54,9 +54,8 @@ export type TransactionData = {
maxPriorityFeePerGas?: BigNumber | undefined; maxPriorityFeePerGas?: BigNumber | undefined;
fee: BigNumber; fee: BigNumber;
gasPrice: BigNumber; gasPrice: BigNumber;
gasLimit: BigNumber;
gasUsed: BigNumber; gasUsed: BigNumber;
gasUsedPerc: number; gasLimit: BigNumber;
nonce: number; nonce: number;
data: string; data: string;
logs: ethers.providers.Log[]; logs: ethers.providers.Log[];