Disable multisig button is no weight retrieved (#7580)

This commit is contained in:
Jaco 2022-05-15 09:10:37 +02:00 committed by GitHub
parent 51f4d74962
commit 650a4167ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }:
const { allAccounts } = useAccounts();
const [callHex, setCallHex] = useState<string>('');
const [{ callData, callError, callInfo }, setCallData] = useState<CallData>(EMPTY_CALL);
const [callWeight] = useWeight(callData);
const [callWeight, callLength] = useWeight(callData);
const [hash, setHash] = useState<string | null>(() => ongoing[0][0].toHex());
const [{ isMultiCall, multisig }, setMultisig] = useState<MultiInfo>(() => ({ isMultiCall: false, multisig: null }));
const [isCallOverride, setCallOverride] = useState(true);
@ -277,7 +277,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }:
accountId={signatory}
extrinsic={tx}
icon={isAye ? 'check' : 'times'}
isDisabled={!tx || (isAye && !whoFilter.length)}
isDisabled={!tx || (isAye && !whoFilter.length) || !callLength}
label={isAye ? 'Approve' : 'Reject'}
onStart={onClose}
/>