Really allow 0 tip endorsements (#2938)

This commit is contained in:
Jaco Greeff 2020-06-11 17:53:03 +02:00 committed by GitHub
parent e1addae0c2
commit ac4d6d5221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,6 @@ function TipEndorse ({ hash, isMember, members }: Props): React.ReactElement<Pro
const [isOpen, toggleOpen] = useToggle();
const [accountId, setAccountId] = useState<string | null>(null);
const [value, setValue] = useState<BN | undefined>();
const hasValue = value?.gtn(0);
return (
<>
@ -55,7 +54,6 @@ function TipEndorse ({ hash, isMember, members }: Props): React.ReactElement<Pro
<Modal.Column>
<InputBalance
help={t<string>('The tip amount that should be allocated')}
isError={!hasValue}
isZeroable
label={t<string>('value')}
onChange={setValue}
@ -70,7 +68,7 @@ function TipEndorse ({ hash, isMember, members }: Props): React.ReactElement<Pro
<TxButton
accountId={accountId}
icon='add'
isDisabled={!accountId || !hasValue }
isDisabled={!accountId}
isPrimary
label={t<string>('Submit tip')}
onStart={toggleOpen}