diff --git a/packages/page-treasury/src/Overview/Proposal.tsx b/packages/page-treasury/src/Overview/Proposal.tsx index 567c472e83..3260679563 100644 --- a/packages/page-treasury/src/Overview/Proposal.tsx +++ b/packages/page-treasury/src/Overview/Proposal.tsx @@ -6,8 +6,9 @@ import type { DeriveTreasuryProposal } from '@polkadot/api-derive/types'; import React, { useMemo } from 'react'; import { AddressMini, AddressSmall, LinkExternal } from '@polkadot/react-components'; +import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { formatNumber } from '@polkadot/util'; +import { formatNumber, isFunction } from '@polkadot/util'; import { useTranslation } from '../translate'; import Council from './Council'; @@ -22,7 +23,9 @@ interface Props { function ProposalDisplay ({ className = '', isMember, members, proposal: { council, id, proposal }, withSend }: Props): React.ReactElement { const { t } = useTranslation(); + const { api } = useApi(); + const hasCouncil = isFunction(api.tx.council?.propose); const hasProposals = useMemo( () => !!council .map(({ votes }) => votes ? votes.index.toNumber() : -1) @@ -49,15 +52,17 @@ function ProposalDisplay ({ className = '', isMember, members, proposal: { counc - {hasProposals - ? {t('Voting')} - : withSend && ( - - ) + {hasCouncil + ? hasProposals + ? {t('Voting')} + : withSend && ( + + ) + : null } diff --git a/packages/page-treasury/src/Overview/ProposalCreate.tsx b/packages/page-treasury/src/Overview/ProposalCreate.tsx index d44518d956..1b467865ec 100644 --- a/packages/page-treasury/src/Overview/ProposalCreate.tsx +++ b/packages/page-treasury/src/Overview/ProposalCreate.tsx @@ -99,7 +99,7 @@ function Propose ({ className }: Props): React.ReactElement | null { label={t('maximum bond')} /> )} - ('Be aware that once submitted the proposal will be put to a council vote. If the proposal is rejected due to a lack of info, invalid requirements or non-benefit to the network as a whole, the full bond posted (as describe above) will be lost.')} /> + ('Be aware that once submitted the proposal will be put to a vote. If the proposal is rejected due to a lack of info, invalid requirements or non-benefit to the network as a whole, the full bond posted (as describe above) will be lost.')} />