Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
fix worth
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialCrafter committed Nov 13, 2023
1 parent f8763d8 commit efc45a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blockchain/worth.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const quoterContract = new Contract(addresses.quoter, quoterAbi, provider);
export const getWorth = async (
address,
baseToken = defaultBaseToken,
fixedBalance = 0n,
fixedBalance = null,
full = false
) => {
const contracts = Object.entries(tokens)
Expand All @@ -40,7 +40,7 @@ export const getWorth = async (
const balance = fixedBalance ?? (await contract.balanceOf(address));
const isWrappedContract = contractAddress === tokens.wrapped.address;

if (fixedBalance === 0n && balance === 0n && !(isWrappedContract && ethBalance > 0n))
if (!fixedBalance && balance === 0n && !(isWrappedContract && ethBalance > 0n))
return {
value: 0n,
contract
Expand Down

0 comments on commit efc45a9

Please sign in to comment.