Skip to content

Commit

Permalink
fix: forknet balances
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Oct 16, 2023
1 parent 6e502fb commit 9c60d75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/common/contexts/useWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export const WalletContextApp = memo(function WalletContextApp({children}: {chil
}
for (const token of tokens) {
if (token.chainID === 1) {
//remove it
tokens.push({...token, chainID: 1337});
}
}
Expand Down Expand Up @@ -258,8 +259,13 @@ export const WalletContextApp = memo(function WalletContextApp({children}: {chil
}
}
}

if (shouldUseForknetBalances) {
// eslint-disable-next-line prefer-destructuring
_tokens[1] = _tokens[1337];
}
return _tokens;
}, [tokensRaw]);
}, [tokensRaw, shouldUseForknetBalances]);

const cumulatedValueInVaults = useMemo((): number => {
let cumulatedValueInVaults = 0;
Expand Down Expand Up @@ -317,8 +323,6 @@ export const WalletContextApp = memo(function WalletContextApp({children}: {chil
[tokens]
);

console.log(tokens);

/* 🔵 - Yearn Finance ******************************************************
** Setup and render the Context provider to use in the app.
***************************************************************************/
Expand Down

0 comments on commit 9c60d75

Please sign in to comment.