parent
75558b9c7e
commit
6a471b0ca8
@ -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<string | null>(null);
|
||||
const [txs, setTxs] = useState<SubmittableExtrinsic<'promise'>[] | null>(null);
|
||||
const batchOpts = useMemo(
|
||||
const batchOpts = useMemo<BatchOptions>(
|
||||
() => ({
|
||||
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]
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user