@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.
- package/dist/trade/parse/base_parser.js +10 -2
- package/dist/ws/index.d.ts +0 -1
- package/dist/ws/index.js +0 -1
- package/package.json +1 -1
|
@@ -44,8 +44,16 @@ class BaseTxParser {
|
|
|
44
44
|
}
|
|
45
45
|
calculateGasFee(txReceipt) {
|
|
46
46
|
try {
|
|
47
|
-
const gasUsed = txReceipt.gasUsed
|
|
48
|
-
|
|
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;
|
package/dist/ws/index.d.ts
CHANGED
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);
|