@clonegod/ttd-bsc-common 1.0.64 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,10 +49,11 @@ class BaseTxParser {
|
|
|
49
49
|
? ethers_1.ethers.BigNumber.from(txReceipt.gasUsed)
|
|
50
50
|
: txReceipt.gasUsed)
|
|
51
51
|
: ethers_1.ethers.BigNumber.from(0);
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const gasPriceValue = txReceipt.effectiveGasPrice || txReceipt.gasPrice;
|
|
53
|
+
const effectiveGasPrice = gasPriceValue
|
|
54
|
+
? (typeof gasPriceValue === 'string' || typeof gasPriceValue === 'number'
|
|
55
|
+
? ethers_1.ethers.BigNumber.from(gasPriceValue)
|
|
56
|
+
: gasPriceValue)
|
|
56
57
|
: ethers_1.ethers.BigNumber.from(0);
|
|
57
58
|
const gasFeeBN = gasUsed.mul(effectiveGasPrice);
|
|
58
59
|
const base_fee = Number(ethers_1.ethers.utils.formatEther(gasFeeBN));
|