@@ -76,6 +76,8 @@ export const StakingWizard: React.FC<StakingWizardProps> = (props) => {
7676
7777 const [ stakingOrAllowanceError , setStakingOrAllowanceError ] = React . useState < Error | undefined > ( undefined ) ;
7878 const [ stakingPools , setStakingPools ] = useState < PoolWithStats [ ] | undefined > ( undefined ) ;
79+ const [ allStakingPools , setAllStakingPools ] = useState < PoolWithStats [ ] | undefined > ( undefined ) ;
80+
7981 const [ selectedStakingPools , setSelectedStakingPools ] = React . useState < UserStakingChoice [ ] | undefined > ( undefined ) ;
8082 const [ currentEpochStats , setCurrentEpochStats ] = useState < Epoch | undefined > ( undefined ) ;
8183 const [ nextEpochStats , setNextEpochStats ] = useState < Epoch | undefined > ( undefined ) ;
@@ -99,10 +101,12 @@ export const StakingWizard: React.FC<StakingWizardProps> = (props) => {
99101 const fetchAndSetPools = async ( ) => {
100102 try {
101103 const poolsResponse = await apiClient . getStakingPoolsAsync ( ) ;
104+ setAllStakingPools ( poolsResponse . stakingPools ) ;
102105 const activePools = ( poolsResponse . stakingPools || [ ] ) . filter ( stakingUtils . isPoolActive ) ;
103106 setStakingPools ( activePools ) ;
104107 } catch ( err ) {
105108 logUtils . warn ( err ) ;
109+ setAllStakingPools ( [ ] ) ;
106110 setStakingPools ( [ ] ) ;
107111 errorReporter . report ( err ) ;
108112 }
@@ -214,6 +218,7 @@ export const StakingWizard: React.FC<StakingWizardProps> = (props) => {
214218 poolId = { poolId }
215219 setSelectedStakingPools = { setSelectedStakingPools }
216220 stakingPools = { stakingPools }
221+ allStakingPools = { allStakingPools }
217222 zrxBalanceBaseUnitAmount = { zrxBalanceBaseUnitAmount }
218223 zrxBalance = { zrxBalance }
219224 providerState = { providerState }
@@ -267,6 +272,7 @@ export interface SetupStakingProps {
267272 onOpenConnectWalletDialog : ( ) => void ;
268273 onGoToNextStep : ( ) => void ;
269274 stakingPools ?: PoolWithStats [ ] ;
275+ allStakingPools ?: PoolWithStats [ ] ;
270276 zrxBalanceBaseUnitAmount ?: BigNumber ;
271277 zrxBalance ?: BigNumber ;
272278 poolId ?: string ;
@@ -287,6 +293,7 @@ const SetupStaking: React.FC<SetupStakingProps> = ({
287293 providerState,
288294 setSelectedStakingPools,
289295 stakingPools,
296+ allStakingPools,
290297 onOpenConnectWalletDialog,
291298 zrxBalanceBaseUnitAmount,
292299 zrxBalance,
@@ -338,7 +345,7 @@ const SetupStaking: React.FC<SetupStakingProps> = ({
338345 < MarketMakerStakeInputPane
339346 poolId = { poolId }
340347 zrxBalance = { zrxBalance }
341- stakingPools = { stakingPools }
348+ stakingPools = { allStakingPools }
342349 onOpenConnectWalletDialog = { onOpenConnectWalletDialog }
343350 setSelectedStakingPools = { setSelectedStakingPools }
344351 onGoToNextStep = { onGoToNextStep }
0 commit comments