import { Governance , Proposal } from '@solana/spl-governance' ; import { ProgramAccount } from '@solana/spl-governance' ; import { useIsBeyondTimestamp } from './useIsBeyondTimestamp' ; export const useHasVoteTimeExpired = ( governance , proposal ) => { return useIsBeyondTimestamp ( proposal . account . isVoteFinalized ( ) ? 0 : proposal . account . votingAt && governance ? proposal . account . votingAt . toNumber ( ) + governance . account . config . maxVotingTime : undefined ) ; } ;