@clonegod/ttd-bsc-common 3.1.62 → 3.1.63

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.
@@ -31,6 +31,7 @@ export interface CheckSyncParams {
31
31
  tokenB: any;
32
32
  quote_token: string;
33
33
  };
34
+ txHash?: string;
34
35
  }
35
36
  export declare class QuotePriceVerify {
36
37
  private quoteCache;
@@ -75,7 +75,7 @@ class QuotePriceVerify {
75
75
  checkSync(params) {
76
76
  if (!this.enabled)
77
77
  return;
78
- const { poolAddress, poolName, blockNumber, reserve0, reserve1, poolInfo } = params;
78
+ const { poolAddress, poolName, blockNumber, reserve0, reserve1, poolInfo, txHash } = params;
79
79
  const { token0Address, token1Address, token0Decimals, token1Decimals } = params;
80
80
  const cached = this.quoteCache.get(poolAddress);
81
81
  if (!cached)
@@ -112,7 +112,7 @@ class QuotePriceVerify {
112
112
  inputAmountUi = Number(delta1) / Math.pow(10, token1Decimals);
113
113
  outputAmountUi = Number(-delta0) / Math.pow(10, token0Decimals);
114
114
  }
115
- this.compareAndLog(poolAddress, poolName, poolInfo, cached, inputTokenAddress, outputTokenAddress, inputAmountUi, outputAmountUi, cached.token0PriceUsd, cached.token1PriceUsd, token0Address, blockNumber);
115
+ this.compareAndLog(poolAddress, poolName, poolInfo, cached, inputTokenAddress, outputTokenAddress, inputAmountUi, outputAmountUi, cached.token0PriceUsd, cached.token1PriceUsd, token0Address, blockNumber, txHash);
116
116
  }
117
117
  compareAndLog(poolAddress, poolName, poolInfo, cached, inputTokenAddress, outputTokenAddress, inputAmountUi, outputAmountUi, token0PriceUsd, token1PriceUsd, token0Address, swapBlockNumber, txHash) {
118
118
  if (inputAmountUi <= 0 || outputAmountUi <= 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-bsc-common",
3
- "version": "3.1.62",
3
+ "version": "3.1.63",
4
4
  "description": "BSC common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",