From f00850e99e9d010cdffe28ae786f66b3d0d895bf Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 26 Jun 2024 08:59:57 +0200 Subject: [PATCH] Disable price calc --- apps/api/src/app/services/BalancerService.ts | 29 +++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/apps/api/src/app/services/BalancerService.ts b/apps/api/src/app/services/BalancerService.ts index 0eaa37aac..4e9616823 100644 --- a/apps/api/src/app/services/BalancerService.ts +++ b/apps/api/src/app/services/BalancerService.ts @@ -99,23 +99,26 @@ class BalancerService { } async updatePricesJob() { - const pool = await this.balancer.pools.find(BALANCER_POOL_ID); - const [usdc, thx] = pool.tokens as unknown as { - symbol: string; - balance: number; - token: { latestUSDPrice: number }; - }[]; - const totalShares = pool.totalShares as unknown as number; - const thxValue = thx.balance * thx.token.latestUSDPrice; - const usdcValue = usdc.balance * usdc.token.latestUSDPrice; - const btpPrice = (thxValue + usdcValue) / totalShares; + // const pool = await this.balancer.pools.find(BALANCER_POOL_ID); + // const [usdc, thx] = pool.tokens as unknown as { + // symbol: string; + // balance: number; + // token: { latestUSDPrice: number }; + // }[]; + // const totalShares = pool.totalShares as unknown as number; + // const thxValue = thx.balance * thx.token.latestUSDPrice; + // const usdcValue = usdc.balance * usdc.token.latestUSDPrice; + // const btpPrice = (thxValue + usdcValue) / totalShares; const balPrice = await this.fetchPrice('BAL', 'USDC'); this.pricing = { - '20USDC-80THX': btpPrice, 'BAL': Number(balPrice), - 'USDC': Number(usdc.token.latestUSDPrice), - 'THX': Number(thx.token.latestUSDPrice), + '20USDC-80THX': 0, + 'USDC': 0, + 'THX': 0, + // '20USDC-80THX': btpPrice, + // 'USDC': Number(usdc.token.latestUSDPrice), + // 'THX': Number(thx.token.latestUSDPrice), }; }