Adjust multisig parallel calls (#6377)
This commit is contained in:
parent
b541e1e604
commit
aa0d98a5a2
@ -119,8 +119,10 @@ async function wrapTx (api: ApiPromise, currentItem: QueueTx, { isMultiCall, mul
|
||||
|
||||
if (multiRoot) {
|
||||
const multiModule = api.tx.multisig ? 'multisig' : 'utility';
|
||||
const info = await api.query[multiModule].multisigs<Option<Multisig>>(multiRoot, tx.method.hash);
|
||||
const { weight } = await tx.paymentInfo(multiRoot);
|
||||
const [info, { weight }] = await Promise.all([
|
||||
api.query[multiModule].multisigs<Option<Multisig>>(multiRoot, tx.method.hash),
|
||||
tx.paymentInfo(multiRoot)
|
||||
]);
|
||||
const { threshold, who } = extractExternal(multiRoot);
|
||||
const others = who.filter((w) => w !== signAddress);
|
||||
let timepoint: Timepoint | null = null;
|
||||
@ -182,12 +184,12 @@ function TxSigned ({ className, currentItem, requestAddress }: Props): React.Rea
|
||||
const { queueSetTxStatus } = useContext(StatusContext);
|
||||
const [flags, setFlags] = useState(() => tryExtract(requestAddress));
|
||||
const [error, setError] = useState<Error | null>(null);
|
||||
const [{ isQrHashed, qrAddress, qrPayload, qrResolve }, setQrState] = useState<QrState>({ isQrHashed: false, qrAddress: '', qrPayload: new Uint8Array() });
|
||||
const [{ isQrHashed, qrAddress, qrPayload, qrResolve }, setQrState] = useState<QrState>(() => ({ isQrHashed: false, qrAddress: '', qrPayload: new Uint8Array() }));
|
||||
const [isBusy, setBusy] = useState(false);
|
||||
const [isRenderError, toggleRenderError] = useToggle();
|
||||
const [isSubmit, setIsSubmit] = useState(true);
|
||||
const [passwordError, setPasswordError] = useState<string | null>(null);
|
||||
const [senderInfo, setSenderInfo] = useState<AddressProxy>({ isMultiCall: false, isUnlockCached: false, multiRoot: null, proxyRoot: null, signAddress: requestAddress, signPassword: '' });
|
||||
const [senderInfo, setSenderInfo] = useState<AddressProxy>(() => ({ isMultiCall: false, isUnlockCached: false, multiRoot: null, proxyRoot: null, signAddress: requestAddress, signPassword: '' }));
|
||||
const [signedOptions, setSignedOptions] = useState<Partial<SignerOptions>>({});
|
||||
const [signedTx, setSignedTx] = useState<string | null>(null);
|
||||
const [{ innerHash, innerTx }, setCallInfo] = useState<InnerTx>(EMPTY_INNER);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user