Adjust sudo toggle (#3415)

This commit is contained in:
Jaco Greeff 2020-08-14 12:59:56 +02:00 committed by GitHub
parent ebb15e7e94
commit b712aef42e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,11 +57,7 @@ function Sudo ({ className, isMine, sudoKey }: Props): React.ReactElement<Props>
<Toggle
className='sudoToggle'
isOverlay
label={
withWeight
? t<string>('with unchecked weight')
: t<string>('without unchecked weight')
}
label={t<string>('with weight override')}
onChange={toggleWithWeight}
value={withWeight}
/>
@ -72,7 +68,11 @@ function Sudo ({ className, isMine, sudoKey }: Props): React.ReactElement<Props>
accountId={sudoKey}
icon='sign-in-alt'
isDisabled={!method || (withWeight ? weight.eq(BN_ZERO) : false)}
label={t<string>('Submit Sudo')}
label={
withWeight
? t<string>('Submit Sudo Unchecked')
: t<string>('Submit Sudo')
}
params={
withWeight
? [method, weight]