From 349c427c27f9dee39203fa8ce6d940df41ce3116 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 27 Oct 2019 12:53:35 +0100 Subject: [PATCH] Fix council off-by-1 (#1770) * Fix council off-by-1 * Nor args for normal elections module --- packages/app-council/src/Overview/SubmitCandidacy.tsx | 9 +-------- packages/app-council/src/Overview/Summary.tsx | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/app-council/src/Overview/SubmitCandidacy.tsx b/packages/app-council/src/Overview/SubmitCandidacy.tsx index bcf7397bf6..fcfc5a6104 100644 --- a/packages/app-council/src/Overview/SubmitCandidacy.tsx +++ b/packages/app-council/src/Overview/SubmitCandidacy.tsx @@ -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 { ? '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; diff --git a/packages/app-council/src/Overview/Summary.tsx b/packages/app-council/src/Overview/Summary.tsx index 614b112cac..232b637625 100644 --- a/packages/app-council/src/Overview/Summary.tsx +++ b/packages/app-council/src/Overview/Summary.tsx @@ -19,7 +19,7 @@ function Summary ({ electionsInfo: { members, candidateCount, desiredSeats, term
- {formatNumber(Object.keys(members).length)}/{formatNumber(desiredSeats)} + {formatNumber(members.length)}/{formatNumber(desiredSeats)} {formatNumber(candidateCount)}