From 4f2c85b58a8d86fdd52a46d3a1dd7e92a7a1c90f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 12 Aug 2020 14:09:26 +0200 Subject: [PATCH] Better visibility in unchecked weight (#3404) --- packages/page-sudo/src/Sudo.tsx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index e4ceef67e7..7a9b32af5d 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -44,28 +44,28 @@ function Sudo ({ className, isMine, sudoKey }: Props): React.ReactElement label={t('submit the following change')} onChange={_onChangeExtrinsic} /> -
- {withWeight && ( + {api.tx.sudo.sudoUncheckedWeight && ( ('The unchecked weight as specified for the sudoUncheckedWeight call.')} + isDisabled={!withWeight} isError={weight.eq(BN_ZERO)} isZeroable={false} label={t('unchecked weight for this call')} onChange={_onChangeWeight} value={weight} - /> - )} - {api.tx.sudo.sudoUncheckedWeight && ( - ('sudo with unchecked weight parameter') - : t('sudo without unchecked weight parameter') - } - onChange={toggleWithWeight} - value={withWeight} - /> + > + ('with unchecked weight') + : t('without unchecked weight') + } + onChange={toggleWithWeight} + value={withWeight} + /> + )}