Fix paymentinfo with no accounts (#5022)

This commit is contained in:
Jaco Greeff 2021-04-04 09:10:07 +03:00 committed by GitHub
parent 12d4601a7b
commit a45652525c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ export function useTxBatch (txs?: SubmittableExtrinsic<'promise'>[] | null, opti
const [batchSize, setBatchSize] = useState(Math.floor(options?.batchSize || 64));
useEffect((): void => {
txs && txs.length &&
txs && txs.length && allAccounts[0] &&
txs[0]
.paymentInfo(allAccounts[0])
.then((info) => setBatchSize((prev) =>