Эх сурвалжийг харах

factory LP token0 token1 feei

skyfffire 3 жил өмнө
parent
commit
466f2a89ef

+ 9 - 2
scripts/path/level2Generate.ts

@@ -35,10 +35,17 @@ class Level2Generate {
     // 根据sum值进行池子分类
     logger.debug(`generate sum group by sum...${allTypeLpList.length}`)
     for (const lpDbObj of allTypeLpList) {
+      const newLp: any = {}
+      newLp.factory = lpDbObj.dataObj.factory
+      newLp.LP = lpDbObj.dataObj.LP
+      newLp.token0 = lpDbObj.dataObj.token0
+      newLp.token1 = lpDbObj.dataObj.token1
+      newLp.feei = lpDbObj.dataObj.feei
+
       if (this.lpSumObj[lpDbObj.dataObj.sum2]) {
-        this.lpSumObj[lpDbObj.dataObj.sum2].push(lpDbObj.dataObj)
+        this.lpSumObj[lpDbObj.dataObj.sum2].push(newLp)
       } else {
-        this.lpSumObj[lpDbObj.dataObj.sum2] = [lpDbObj.dataObj]
+        this.lpSumObj[lpDbObj.dataObj.sum2] = [newLp]
       }
     }
   }