dydx-v4-web/src/hooks/useGovernanceVariables.ts
aleka c92f218493
bump abacus + use new env config format (#298)
* bump abacus + use new env config format

* use new config path

* bump abacus to 1.4.5

* util function for getting mintscan link
2024-02-15 13:38:05 -05:00

20 lines
589 B
TypeScript

import { useSelector } from 'react-redux';
import { GOVERNANCE_CONFIG_MAP } from '@/constants/networks';
import { getSelectedDydxChainId } from '@/state/appSelectors';
export interface GovernanceVariables {
newMarketProposal: {
initialDepositAmount: number;
delayBlocks: number;
newMarketsMethodology: string;
};
}
export const useGovernanceVariables = (): GovernanceVariables => {
const selectedDydxChainId = useSelector(getSelectedDydxChainId);
const governanceVars = GOVERNANCE_CONFIG_MAP[selectedDydxChainId] as GovernanceVariables;
return governanceVars;
};