diff --git a/projects/ui/src/components/App/index.tsx b/projects/ui/src/components/App/index.tsx index 9e5e7401a..2920b3350 100644 --- a/projects/ui/src/components/App/index.tsx +++ b/projects/ui/src/components/App/index.tsx @@ -64,10 +64,13 @@ import MorningFieldUpdater from '~/state/beanstalk/field/morning'; import BeanstalkCaseUpdater from '~/state/beanstalk/case/updater'; import useChainState from '~/hooks/chain/useChainState'; import EthMainnet from '~/pages/mainnet'; +import { runOnDev } from '~/util/dev'; // import Snowflakes from './theme/winter/Snowflakes'; BigNumber.set({ EXPONENTIAL_AT: [-12, 20] }); +runOnDev(); + const CustomToaster: FC<{ navHeight: number }> = ({ navHeight }) => ( diff --git a/projects/ui/src/hooks/beanstalk/useAvgSeedsPerBDV.ts b/projects/ui/src/hooks/beanstalk/useAvgSeedsPerBDV.ts index 347a0fd45..a6fe32eb8 100644 --- a/projects/ui/src/hooks/beanstalk/useAvgSeedsPerBDV.ts +++ b/projects/ui/src/hooks/beanstalk/useAvgSeedsPerBDV.ts @@ -1,14 +1,16 @@ import { BigNumber } from 'bignumber.js'; import { useCallback, useEffect, useState } from 'react'; import { DocumentNode, gql } from '@apollo/client'; -import { BeanstalkSDK, Token } from '@beanstalk/sdk'; +import { BeanstalkSDK } from '@beanstalk/sdk'; import { Time, Range } from 'lightweight-charts'; +import * as LegacyToken from '~/constants/tokens'; import { ChartQueryData } from '~/components/Analytics/AdvancedChart'; import useSdk from '~/hooks/sdk'; import { apolloClient } from '~/graph/client'; -import { toBNWithDecimals } from '~/util'; +import { toBNWithDecimals, tokenIshEqual } from '~/util'; import { ZERO_BN } from '~/constants'; +import { TokenInstance } from './useTokens'; type SeasonMap = { [season: number]: T }; @@ -53,9 +55,10 @@ const apolloFetch = async ( variables: { first, season_lte: season }, fetchPolicy: 'no-cache', notifyOnNetworkStatusChange: true, + // BS3TODO: Fix me to include L2 silo whitelist + context: { subgraph: 'beanstalk_eth' }, }); -// BS3TODO: Fix me to include L1 silo whitelist // Main hook with improved error handling and performance const useAvgSeedsPerBDV = ( range: Range