From 160564a3ba45a3b86d54dc30d64fa9f19be36e82 Mon Sep 17 00:00:00 2001 From: Spacebean Date: Mon, 21 Oct 2024 11:22:17 -0400 Subject: [PATCH] feat: add logs --- .../src/components/Forecast/LiquidityByState.tsx | 14 +++++++------- projects/ui/src/util/wagmi/ethersAdapter.ts | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/projects/ui/src/components/Forecast/LiquidityByState.tsx b/projects/ui/src/components/Forecast/LiquidityByState.tsx index b7976564b..c9900e822 100644 --- a/projects/ui/src/components/Forecast/LiquidityByState.tsx +++ b/projects/ui/src/components/Forecast/LiquidityByState.tsx @@ -26,22 +26,22 @@ const LiquidityByState: FC = ({ sx }) => { React.useEffect(() => { console.log({ - totalBeanSupply, - beanstalkField, - beanstalkSilo, - beanstalkBarn, + totalBeanSupply: totalBeanSupply.toNumber(), + beanstalkField: beanstalkField.podLine.toNumber(), + beanstalkSilo: beanstalkSilo.stalk.total.toNumber(), + beanstalkBarn: beanstalkBarn.unfertilized.toNumber(), }); }, [totalBeanSupply, beanstalkField, beanstalkSilo, beanstalkBarn]); React.useEffect(() => { - console.log(sdk.provider); - }, [sdk.provider]); + console.log(sdk); + }, [sdk]); const { STALK, SPROUTS, PODS } = useBeanstalkTokens(); const breakdown = useBeanstalkSiloBreakdown(); React.useEffect(() => { - console.log({ breakdown }); + console.log(breakdown); }, [breakdown]); /// Total Balances diff --git a/projects/ui/src/util/wagmi/ethersAdapter.ts b/projects/ui/src/util/wagmi/ethersAdapter.ts index 20e2b3782..bcfa10770 100644 --- a/projects/ui/src/util/wagmi/ethersAdapter.ts +++ b/projects/ui/src/util/wagmi/ethersAdapter.ts @@ -4,7 +4,8 @@ import { useMemo } from 'react'; import type { Account, Chain, Client, Transport } from 'viem'; import { Config, useClient, useConnectorClient } from 'wagmi'; -const IS_DEVELOPMENT_ENV = process.env.NODE_ENV !== 'production'; +const netlifyContext = import.meta.env.VITE_NETLIFY_CONTEXT; +const IS_DEVELOPMENT_ENV = netlifyContext !== 'production' && netlifyContext !== "deploy-preview"; const fallbackChain = { chainId: IS_DEVELOPMENT_ENV ? ChainId.LOCALHOST : ChainId.ARBITRUM_MAINNET,