Skip to content

Commit

Permalink
Merge branch 'tom/stake-update' of github.com:bob-collective/ui into …
Browse files Browse the repository at this point in the history
…tom/stake-update

* 'tom/stake-update' of github.com:bob-collective/ui:
  chore: set fixed chain for staking tvl calculations
  • Loading branch information
tomjeatt committed Dec 5, 2024
2 parents 00272f4 + 70cf690 commit 71059ca
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import { useReadContracts } from 'wagmi';
import { CurrencyTickers, usePrices } from '@gobob/hooks';
import { Address, erc20Abi } from 'viem';
import Big from 'big.js';
import { bob } from 'viem/chains';

import { useGetStrategies } from '@/hooks';
import { seTokenAbi } from '@/abis/seToken.abi';
import { strategyBaseTVLLimitAbi } from '@/abis/StrategyBaseTVL.abi';
import { getConfig } from '@/lib/wagmi';
import { isProd } from '@/constants';

type StrategyData = {
raw: GatewayStrategyContract;
Expand Down Expand Up @@ -91,6 +94,10 @@ const useGetStakingStrategies = () => {
enabled: isStrategiesSucess
},
allowFailure: false,
config: {
...getConfig({ isProd }),
chains: [bob]
},
contracts: strategies?.flatMap((strategy) =>
hasUnderlying(strategy.raw.outputToken?.symbol)
? ([
Expand Down Expand Up @@ -138,6 +145,10 @@ const useGetStakingStrategies = () => {
enabled: isStrategiesSucess
},
allowFailure: false,
config: {
...getConfig({ isProd }),
chains: [bob]
},
contracts: strategies?.flatMap((strategy) =>
hasUnderlying(strategy.raw.outputToken?.symbol)
? ([
Expand Down Expand Up @@ -174,6 +185,10 @@ const useGetStakingStrategies = () => {
enabled: isStrategiesSucess
},
allowFailure: false,
config: {
...getConfig({ isProd }),
chains: [bob]
},
contracts: strategies?.flatMap((strategy) =>
hasCGId(strategy.raw.outputToken?.symbol)
? ([
Expand Down Expand Up @@ -215,6 +230,10 @@ const useGetStakingStrategies = () => {
enabled: isStrategiesSucess
},
allowFailure: false,
config: {
...getConfig({ isProd }),
chains: [bob]
},
contracts: strategies?.flatMap((strategy) =>
hasNoOutputToken(strategy.raw.address)
? ([
Expand Down

0 comments on commit 71059ca

Please sign in to comment.