@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 effectiveGasPrice = txReceipt.effectiveGasPrice
53
- ? (typeof txReceipt.effectiveGasPrice === 'string' || typeof txReceipt.effectiveGasPrice === 'number'
54
- ? ethers_1.ethers.BigNumber.from(txReceipt.effectiveGasPrice)
55
- : txReceipt.effectiveGasPrice)
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-bsc-common",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
4
4
  "description": "BSC common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",