@clonegod/ttd-bsc-common 1.0.63 → 1.0.64

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.
@@ -44,8 +44,16 @@ class BaseTxParser {
44
44
  }
45
45
  calculateGasFee(txReceipt) {
46
46
  try {
47
- const gasUsed = txReceipt.gasUsed || ethers_1.ethers.BigNumber.from(0);
48
- const effectiveGasPrice = txReceipt.effectiveGasPrice || ethers_1.ethers.BigNumber.from(0);
47
+ const gasUsed = txReceipt.gasUsed
48
+ ? (typeof txReceipt.gasUsed === 'string' || typeof txReceipt.gasUsed === 'number'
49
+ ? ethers_1.ethers.BigNumber.from(txReceipt.gasUsed)
50
+ : txReceipt.gasUsed)
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)
56
+ : ethers_1.ethers.BigNumber.from(0);
49
57
  const gasFeeBN = gasUsed.mul(effectiveGasPrice);
50
58
  const base_fee = Number(ethers_1.ethers.utils.formatEther(gasFeeBN));
51
59
  const priority_fee = 0;
@@ -1,3 +1,2 @@
1
1
  export * from './subscribe_v2_events';
2
2
  export * from './subscribe_v3_events';
3
- export * from './bsc_stream_ws_client';
package/dist/ws/index.js CHANGED
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./subscribe_v2_events"), exports);
18
18
  __exportStar(require("./subscribe_v3_events"), exports);
19
- __exportStar(require("./bsc_stream_ws_client"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-bsc-common",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "BSC common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",