Browse Source

修复非ethw的识别

skyfffire 3 years ago
parent
commit
f75a658660
1 changed files with 5 additions and 6 deletions
  1. 5 6
      scripts/lp/lpMaintenance.ts

+ 5 - 6
scripts/lp/lpMaintenance.ts

@@ -2,8 +2,6 @@ import { web3 } from "hardhat";
 import History from "../interface/history";
 import contracts from "../../config/contracts";
 import logger from "../../utils/logger";
-import {BigNumber} from "ethers";
-import {replaceAll} from "hardhat/internal/util/strings";
 import history from "../interface/history";
 const ierc20abi = require('../../abi/IERC20_ABI.json')
 
@@ -50,11 +48,12 @@ export class LpMaintenance {
   async handleLp(lp: any, oldType: any) {
     // 过滤Lp
     let lpType = await this.checkLpType(lp)
+    // 一共12w个池子,非ethw的垃圾池子就不拉了
+    if (lpType == 'lp' && !lp.isEthW) {
+      lpType = 'ethLp'
+    }
+
     if (lpType != oldType) {
-      // 一共12w个池子,非ethw的垃圾池子就不拉了
-      if (lpType == 'lp' && !lp.isEthW) {
-        lpType = 'ethLp'
-      }
       // 保存变更之后的的Token
       // await this.saveToken(lp, lpType)
       // 保存变更后的Lp