diff --git a/src/components/Create/hooks/useAvailableReconfigurationStrategies.ts b/src/components/Create/hooks/useAvailableReconfigurationStrategies.ts index 0035c53459..a40f21e04a 100644 --- a/src/components/Create/hooks/useAvailableReconfigurationStrategies.ts +++ b/src/components/Create/hooks/useAvailableReconfigurationStrategies.ts @@ -3,7 +3,7 @@ import { NetworkName } from 'models/networkName' import { ArrayElement } from 'utils/arrayElement' export const useAvailableReconfigurationStrategies = (network: NetworkName) => { - const strategies = ballotStrategiesFn(network).map(s => + const strategies = ballotStrategiesFn({ network }).map(s => s.id === 'threeDay' ? { ...s, isDefault: true } : { ...s, isDefault: false }, diff --git a/src/components/Create/hooks/useLoadInitialStateFromQuery.ts b/src/components/Create/hooks/useLoadInitialStateFromQuery.ts index 9f5e2520bf..1e6a3035ab 100644 --- a/src/components/Create/hooks/useLoadInitialStateFromQuery.ts +++ b/src/components/Create/hooks/useLoadInitialStateFromQuery.ts @@ -73,7 +73,7 @@ const parseCreateFlowStateFromInitialState = ( } const reconfigurationRuleSelection = - ballotStrategiesFn().find(s => + ballotStrategiesFn({}).find(s => isEqualAddress(s.address, initialState.fundingCycleData.ballot), )?.id ?? 'threeDay' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx index 3d208e5e48..ec240aae5f 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx @@ -1,14 +1,17 @@ import { Trans } from '@lingui/macro' import { Form, Select } from 'antd' import { ballotStrategiesFn } from 'constants/v2v3/ballotStrategies' +import { V2V3ContractsContext } from 'contexts/v2v3/Contracts/V2V3ContractsContext' import { BallotStrategy } from 'models/ballot' +import { useContext } from 'react' export default function CycleDeadlineDropdown({ className, }: { className?: string }) { - const ballotStrategies = ballotStrategiesFn() + const { cv } = useContext(V2V3ContractsContext) + const ballotStrategies = ballotStrategiesFn({ cv }) return (