Skip to content

Commit

Permalink
fix tvl on the detail page without wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
iamoskvin committed Jun 10, 2024
1 parent dd7bffa commit 3cdd272
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/Vault/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,15 @@ const PageTitle = ({ token0, token1 }: { token0?: Token; token1?: Token }) => {

export default function Vault({ className }: { className?: string }) {
const { vaultId: vaultIdFromUrl } = useParams()
const { chainId } = useAccountDetails()
const { chainId: chainIdConnected } = useAccountDetails()
const chainId = chainIdConnected || DEFAULT_CHAIN_ID
const [generalError, setGeneralError] = useState<boolean | null>(null)
const [generalLoading, setGeneralLoading] = useState(true)

const { data: allVaults, error: allVaultsError, isLoading: isAllVaultsLoading } = useAllVaults()
const currentVault: any = allVaults && vaultIdFromUrl ? allVaults[vaultIdFromUrl] : {}
const currency0: any = useCurrency(currentVault?.token0?.address)
const currency1: any = useCurrency(currentVault?.token1?.address)
const currency0: any = useCurrency(currentVault?.token0?.address, chainId)
const currency1: any = useCurrency(currentVault?.token1?.address, chainId)
const vaultState = useVaultState()
const { totalShares, totalToken0Amount, totalToken1Amount } = useUserShares(
vaultIdFromUrl,
Expand Down

0 comments on commit 3cdd272

Please sign in to comment.