Skip to content

Commit

Permalink
Fix token balance aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
l0c4t0r committed Aug 19, 2024
1 parent c5d1d83 commit df0dd8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/gammastrategies/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand All @@ -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] = {
Expand Down

0 comments on commit df0dd8b

Please sign in to comment.