From a45652525c3319117ad8ddb151ff6411b2277eed Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 4 Apr 2021 09:10:07 +0300 Subject: [PATCH] Fix paymentinfo with no accounts (#5022) --- packages/react-hooks/src/useTxBatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-hooks/src/useTxBatch.ts b/packages/react-hooks/src/useTxBatch.ts index c68d2b4a51..cd206cc62b 100644 --- a/packages/react-hooks/src/useTxBatch.ts +++ b/packages/react-hooks/src/useTxBatch.ts @@ -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) =>