From df0dd8bd6665b9a7cf62dac21ddd54b586a00827 Mon Sep 17 00:00:00 2001 From: loc Date: Mon, 19 Aug 2024 15:01:16 +0000 Subject: [PATCH] Fix token balance aggregation --- adapters/gammastrategies/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/gammastrategies/src/index.ts b/adapters/gammastrategies/src/index.ts index a0d77c51..3998dc27 100644 --- a/adapters/gammastrategies/src/index.ts +++ b/adapters/gammastrategies/src/index.ts @@ -93,7 +93,7 @@ const getAccountData = async ( const token0Address: string = hypeShare.hypervisor.pool.token0.id; const token1Address: string = hypeShare.hypervisor.pool.token1.id; - if (token0Address in accountHoldings) { + if (token0Address in accountHoldings[account.id]) { accountHoldings[account.id][token0Address].balance += tvl0Share; } else { accountHoldings[account.id][token0Address] = { @@ -102,7 +102,7 @@ const getAccountData = async ( }; } - if (token1Address in accountHoldings) { + if (token1Address in accountHoldings[account.id]) { accountHoldings[account.id][token1Address].balance += tvl1Share; } else { accountHoldings[account.id][token1Address] = {