Adjust for new payout weights (#3733)

This commit is contained in:
Jaco Greeff 2020-09-21 17:06:57 +02:00 committed by GitHub
parent b71a67922c
commit 4e4f5a4b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ import { useApi, useToggle } from '@polkadot/react-hooks';
import { useTranslation } from '../translate';
const DEFAULT_BATCH = 40;
const DEFAULT_BATCH = 36;
const DEFAULT_PAYOUTS = 64;
interface Props {
@ -29,7 +29,7 @@ interface SinglePayout {
}
function createExtrinsic (api: ApiPromise, payout: PayoutValidator | PayoutValidator[], maxPayouts: number): SubmittableExtrinsic<'promise'> | null {
const batchSize = DEFAULT_BATCH * (DEFAULT_PAYOUTS / maxPayouts);
const batchSize = DEFAULT_BATCH * DEFAULT_PAYOUTS / maxPayouts;
if (Array.isArray(payout)) {
if (payout.length === 1) {