Fix council off-by-1 (#1770)
* Fix council off-by-1 * Nor args for normal elections module
This commit is contained in:
parent
ba988b29aa
commit
349c427c27
@ -5,7 +5,6 @@
|
||||
import { ApiProps } from '@polkadot/react-api/types';
|
||||
import { ComponentProps } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import React from 'react';
|
||||
import { withApi } from '@polkadot/react-api';
|
||||
import { Button } from '@polkadot/react-components';
|
||||
@ -27,13 +26,7 @@ class SubmitCandidacy extends TxModal<Props, State> {
|
||||
? 'electionsPhragmen.submitCandidacy'
|
||||
: 'elections.submitCandidacy';
|
||||
|
||||
protected txParams = (): [BN] | [] => {
|
||||
const { api, electionsInfo: { candidateCount } } = this.props;
|
||||
|
||||
return api.tx.electionsPhragmen
|
||||
? []
|
||||
: [candidateCount];
|
||||
}
|
||||
protected txParams = (): [] => [];
|
||||
|
||||
protected isDisabled = (): boolean => {
|
||||
const { accountId } = this.state;
|
||||
|
||||
@ -19,7 +19,7 @@ function Summary ({ electionsInfo: { members, candidateCount, desiredSeats, term
|
||||
<SummaryBox>
|
||||
<section>
|
||||
<CardSummary label={t('seats')}>
|
||||
{formatNumber(Object.keys(members).length)}/{formatNumber(desiredSeats)}
|
||||
{formatNumber(members.length)}/{formatNumber(desiredSeats)}
|
||||
</CardSummary>
|
||||
<CardSummary label={t('candidates')}>
|
||||
{formatNumber(candidateCount)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user