From 6a471b0ca8979914d6360c7115ae46a63f62eedb Mon Sep 17 00:00:00 2001 From: Przemek Rzad Date: Mon, 8 Jul 2024 15:26:10 +0200 Subject: [PATCH] Use `forceBatch` in Staking Payout (#10736) * force batch * lint --- packages/page-staking/src/Payouts/PayButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/page-staking/src/Payouts/PayButton.tsx b/packages/page-staking/src/Payouts/PayButton.tsx index 1a483812a5..2e94320051 100644 --- a/packages/page-staking/src/Payouts/PayButton.tsx +++ b/packages/page-staking/src/Payouts/PayButton.tsx @@ -3,6 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { BatchOptions } from '@polkadot/react-hooks/types'; import type { u32 } from '@polkadot/types'; import type { EraIndex } from '@polkadot/types/interfaces'; import type { PayoutValidator } from './types.js'; @@ -60,9 +61,10 @@ function PayButton ({ className, isAll, isDisabled, payout }: Props): React.Reac const [isVisible, togglePayout] = useToggle(); const [accountId, setAccount] = useState(null); const [txs, setTxs] = useState[] | null>(null); - const batchOpts = useMemo( + const batchOpts = useMemo( () => ({ - max: 36 * 64 / ((api.consts.staking.maxNominatorRewardedPerValidator as u32)?.toNumber() || 64) + max: 36 * 64 / ((api.consts.staking.maxNominatorRewardedPerValidator as u32)?.toNumber() || 64), + type: 'force' }), [api] );