From 15226f5265751dedb577cc2578fff37fc95c40f0 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 22 Jul 2020 13:55:09 +0200 Subject: [PATCH] Remove imminent toggle, pass through only (#3249) --- .../page-democracy/src/Overview/PreImage.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index bcb8e26b75..898a0911e2 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -8,7 +8,7 @@ import { Hash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; -import { Input, InputAddress, InputBalance, Extrinsic, Modal, Toggle, TxButton } from '@polkadot/react-components'; +import { Input, InputAddress, InputBalance, Extrinsic, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; @@ -31,11 +31,10 @@ interface HashState { const ZERO_HASH = blake2AsHex(''); -function PreImage ({ className = '', imageHash, isImminent: propsIsImminent, onClose }: Props): React.ReactElement { +function PreImage ({ className = '', imageHash, isImminent = false, onClose }: Props): React.ReactElement { const { t } = useTranslation(); const { api, apiDefaultTxSudo } = useApi(); const [accountId, setAccountId] = useState(null); - const [isImminent, setIsImminent] = useState(propsIsImminent || false); const [{ encodedHash, encodedProposal, storageFee }, setHash] = useState({ encodedHash: ZERO_HASH, encodedProposal: '', storageFee: BN_ZERO }); const [proposal, setProposal] = useState(); @@ -100,19 +99,6 @@ function PreImage ({ className = '', imageHash, isImminent: propsIsImminent, onC

{t('When submitting a proposal the hash needs to be known. Proposals can be submitted with hash-only, but upon dispatch the preimage needs to be available.')}

- - - ('imminent preimage (proposal already passed)')} - onChange={setIsImminent} - value={isImminent} - /> - - -

{t('Only applicable if the proposal has already passed and is ready for dispatch.')}

-
-
{!isImminent && (