From 39fa698e14a9f98736b92486925bcfa46b0dc30c Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Sat, 30 Jan 2021 16:54:01 +0800 Subject: [PATCH 1/4] fix Balance.toHuman confused --- packages/types/src/codec/AbstractInt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/src/codec/AbstractInt.ts b/packages/types/src/codec/AbstractInt.ts index 354233f9a8..933444adf9 100755 --- a/packages/types/src/codec/AbstractInt.ts +++ b/packages/types/src/codec/AbstractInt.ts @@ -178,7 +178,7 @@ export default abstract class AbstractInt extends BN implements Codec { if (rawType === 'Balance') { return this.isMax() ? 'everything' - : formatBalance(this, { decimals: this.registry.chainDecimals, withSi: true, withUnit: this.registry.chainToken }); + : formatBalance(this, { decimals: this.registry.chainDecimals[0], withSi: true, withUnit: this.registry.chainToken[0] }); } const [, divisor] = FORMATTERS.find(([type]) => type === rawType) || []; From 206d694c491f56467f5d376b20fbeef0566f771e Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Sat, 30 Jan 2021 17:02:42 +0800 Subject: [PATCH 2/4] add pangolin endpoint --- packages/apps-config/src/settings/endpoints.ts | 10 +++++----- packages/apps/public/locales/en/apps-config.json | 1 + .../apps/public/locales/en/page-staking-darwinia.json | 3 ++- packages/apps/public/locales/en/translation.json | 4 ++-- packages/apps/public/locales/zh/apps-config.json | 3 ++- .../apps/public/locales/zh/page-staking-darwinia.json | 2 +- packages/apps/public/locales/zh/react-signer.json | 2 +- packages/apps/public/locales/zh/translation.json | 4 ++-- 8 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/apps-config/src/settings/endpoints.ts b/packages/apps-config/src/settings/endpoints.ts index fa5ae3a490..3070ae60ca 100644 --- a/packages/apps-config/src/settings/endpoints.ts +++ b/packages/apps-config/src/settings/endpoints.ts @@ -31,11 +31,11 @@ function createLive (t: (key: string, text: string, options: { ns: string }) => function createTest (t: (key: string, text: string, options: { ns: string }) => string): Option[] { return [ - // { - // info: 'darwinia', - // text: t('rpc.darwinia', 'Darwinia Network (hosted by Darwinia)', { ns: 'apps-config' }), - // value: 'wss://cc1.darwinia.network' - // } + { + info: 'Pangolin', + text: t('rpc.pangolin.darwinia', 'Pangolin Test Network (hosted by Darwinia)', { ns: 'apps-config' }), + value: 'ws://t1.hkg.itering.com:9944' + } ]; } diff --git a/packages/apps/public/locales/en/apps-config.json b/packages/apps/public/locales/en/apps-config.json index b4a918f04d..a216f9642d 100755 --- a/packages/apps/public/locales/en/apps-config.json +++ b/packages/apps/public/locales/en/apps-config.json @@ -15,6 +15,7 @@ "rpc.kusama.parity": "Kusama (Polkadot Canary, hosted by Parity)", "rpc.kusama.w3f": "Kusama (Polkadot Canary, hosted by Web3 Foundation)", "rpc.local": "Local Node (Own, 127.0.0.1:9944)", + "rpc.pangolin.darwinia": "Pangolin Network (hosted by Darwinia)", "rpc.westend": "Westend (Polkadot Testnet, hosted by Parity)", "ss58.centrifuge": "Centrifuge (live)", "ss58.crab": "Crab (live)", diff --git a/packages/apps/public/locales/en/page-staking-darwinia.json b/packages/apps/public/locales/en/page-staking-darwinia.json index 597a9cbf1d..d6536d9437 100644 --- a/packages/apps/public/locales/en/page-staking-darwinia.json +++ b/packages/apps/public/locales/en/page-staking-darwinia.json @@ -126,6 +126,7 @@ "last reward": "last reward", "lock limit": "lock limit", "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional KTON rewards.": "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional KTON rewards.", + "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional {{KTON}} rewards.": "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional {{KTON}} rewards.", "nominators": "nominators", "other stake": "other stake(Power)", "own stake": "own stake(Power)", @@ -159,4 +160,4 @@ "{{currency}} slashed": "{{currency}} slashed", "{{currency}} total": "{{currency}} total", "{{days}} days": "{{days}} days" -} +} \ No newline at end of file diff --git a/packages/apps/public/locales/en/translation.json b/packages/apps/public/locales/en/translation.json index b7ea474a38..d72820917d 100644 --- a/packages/apps/public/locales/en/translation.json +++ b/packages/apps/public/locales/en/translation.json @@ -917,6 +917,7 @@ "locked": "", "locked balance": "", "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional KTON rewards.": "", + "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional {{KTON}} rewards.": "", "logs": "", "manage hardware connections": "", "matches": "", @@ -995,7 +996,6 @@ "proposer": "", "queued tx": "", "reason": "", - "Rebond funds": "", "recent blocks": "", "recent events": "", "record my vote as": "", @@ -1165,4 +1165,4 @@ "{{threshold}}, passing": "", "{{value}}, {{remaining}} blocks left": "", "{{value}}x voting balance, locked for {{lock}}x enactment ({{period}} days)": "" -} +} \ No newline at end of file diff --git a/packages/apps/public/locales/zh/apps-config.json b/packages/apps/public/locales/zh/apps-config.json index 16fca51e85..69ee686fdf 100644 --- a/packages/apps/public/locales/zh/apps-config.json +++ b/packages/apps/public/locales/zh/apps-config.json @@ -8,8 +8,9 @@ "rpc.header.test": "测试网络", "rpc.kusama.w3f": "Darwinia Network (hosted by Darwinia)", "rpc.local": "Local Node (Own, 127.0.0.1:9944)", + "rpc.pangolin.darwinia": "Pangolin 测试网络 (hosted by Darwinia)", "ss58.crab": "Crab (live)", "ss58.darwinia": "Darwinia (live)", "ss58.default": "默认的验证人配置", "ss58.substrate": "Substrate (generic)" -} \ No newline at end of file +} diff --git a/packages/apps/public/locales/zh/page-staking-darwinia.json b/packages/apps/public/locales/zh/page-staking-darwinia.json index 8f26efda64..22c820cf8e 100755 --- a/packages/apps/public/locales/zh/page-staking-darwinia.json +++ b/packages/apps/public/locales/zh/page-staking-darwinia.json @@ -227,4 +227,4 @@ "{{currency}} slashed": "{{currency}} 被罚", "{{currency}} total": "{{currency}} 总额", "{{days}} days": "{{days}} 天" -} +} \ No newline at end of file diff --git a/packages/apps/public/locales/zh/react-signer.json b/packages/apps/public/locales/zh/react-signer.json index 3d77d3d1aa..b6b68c59cb 100755 --- a/packages/apps/public/locales/zh/react-signer.json +++ b/packages/apps/public/locales/zh/react-signer.json @@ -50,4 +50,4 @@ "wrong password": "密码错误", "wrong password supplied": "密码错误", "{{total}} estimated total amount (fees + value)": "{{total}} 估算的总金额(费用+转账数量)" -} +} \ No newline at end of file diff --git a/packages/apps/public/locales/zh/translation.json b/packages/apps/public/locales/zh/translation.json index b7ea474a38..d72820917d 100644 --- a/packages/apps/public/locales/zh/translation.json +++ b/packages/apps/public/locales/zh/translation.json @@ -917,6 +917,7 @@ "locked": "", "locked balance": "", "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional KTON rewards.": "", + "locked: The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional {{KTON}} rewards.": "", "logs": "", "manage hardware connections": "", "matches": "", @@ -995,7 +996,6 @@ "proposer": "", "queued tx": "", "reason": "", - "Rebond funds": "", "recent blocks": "", "recent events": "", "record my vote as": "", @@ -1165,4 +1165,4 @@ "{{threshold}}, passing": "", "{{value}}, {{remaining}} blocks left": "", "{{value}}x voting balance, locked for {{lock}}x enactment ({{period}} days)": "" -} +} \ No newline at end of file From c7cace5602a2ebce0066f0ac5f6835777ad06b9b Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Mon, 1 Feb 2021 11:48:32 +0800 Subject: [PATCH 3/4] targets support waiting validator fix #171 --- .../locales/zh/page-staking-darwinia.json | 4 +- .../src/Actions/Account/DepositExtra.tsx | 2 +- .../page-staking/src/Targets/Validator.tsx | 4 +- packages/page-staking/src/Targets/index.tsx | 23 ++++--- packages/page-staking/src/types.ts | 1 + packages/page-staking/src/useSortedTargets.ts | 69 ++----------------- .../react-components-darwinia/src/Table.tsx | 10 ++- packages/react-components/src/Table/Body.tsx | 6 +- packages/util/src/array/chunk.ts | 29 ++++++++ packages/util/src/array/filter.ts | 11 ++- packages/util/src/array/flatten.ts | 36 ++++++++++ packages/util/src/array/index.ts | 4 +- 12 files changed, 110 insertions(+), 89 deletions(-) create mode 100755 packages/util/src/array/chunk.ts create mode 100755 packages/util/src/array/flatten.ts diff --git a/packages/apps/public/locales/zh/page-staking-darwinia.json b/packages/apps/public/locales/zh/page-staking-darwinia.json index 22c820cf8e..734eea9c2d 100755 --- a/packages/apps/public/locales/zh/page-staking-darwinia.json +++ b/packages/apps/public/locales/zh/page-staking-darwinia.json @@ -10,7 +10,7 @@ "Amount": "数量", "Amount taken up-front from the reward by the validator before splitting the remainder between themselves and the nominators": "确认之前从奖励中预先提取的金额,然后将剩余部分分配给自己和提名人", "Amount to add to the currently bonded funds. This is adjusted using the available funds on the account.": "当前质押金额的总量. 使用帐户中的可用资金进行调整.", - "Amount to add to the currently deposit funds. This is adjusted using the bonded funds on the account.": "Amount to add to the currently deposit funds. This is adjusted using the bonded funds on the account.", + "Amount to add to the currently deposit funds. This is adjusted using the bonded funds on the account.": "将冻结资产转换为锁定资产的数量", "An account that is to receive the rewards.": "接收收益的账号", "Any account can request payout for stakers, this is not limited to accounts that will be rewarded.": "Any account can request payout for stakers, this is not limited to accounts that will be rewarded.", "Aura": "Aura", @@ -227,4 +227,4 @@ "{{currency}} slashed": "{{currency}} 被罚", "{{currency}} total": "{{currency}} 总额", "{{days}} days": "{{days}} 天" -} \ No newline at end of file +} diff --git a/packages/page-staking-darwinia/src/Actions/Account/DepositExtra.tsx b/packages/page-staking-darwinia/src/Actions/Account/DepositExtra.tsx index bc499c00a3..c331e9d0a1 100755 --- a/packages/page-staking-darwinia/src/Actions/Account/DepositExtra.tsx +++ b/packages/page-staking-darwinia/src/Actions/Account/DepositExtra.tsx @@ -73,7 +73,7 @@ class BondExtra extends TxComponent { public render (): React.ReactNode { const { isOpen, onClose, stashId, t } = this.props; const { accept, currencyType, extrinsic, maxAdditional, promiseMonth } = this.state; - const canSubmit = !!maxAdditional && maxAdditional.gtn(0) && promiseMonth; + const canSubmit = !!maxAdditional && maxAdditional.gtn(0) && promiseMonth && accept; if (!isOpen) { return null; diff --git a/packages/page-staking/src/Targets/Validator.tsx b/packages/page-staking/src/Targets/Validator.tsx index c4210afe56..e320721864 100644 --- a/packages/page-staking/src/Targets/Validator.tsx +++ b/packages/page-staking/src/Targets/Validator.tsx @@ -20,7 +20,7 @@ interface Props { toggleSelected: (accountId: string) => void; } -function Validator ({ canSelect, info: { accountId, bondOther, bondOwn, bondTotal, commissionPer, currentEraCommissionPer, isCommission, isFavorite, isNominating, key, numNominators, rankOverall, rewardPayout, validatorPayment }, isSelected, toggleFavorite, toggleSelected }: Props): React.ReactElement { +function Validator ({ canSelect, info: { accountId, bondOther, bondOwn, bondTotal, commissionPer, currentEraCommissionPer, isCommission, isFavorite, isNominating, isValidator, key, numNominators, rankOverall, rewardPayout, validatorPayment }, isSelected, toggleFavorite, toggleSelected }: Props): React.ReactElement { const _onQueryStats = useCallback( (): void => { window.location.hash = `/staking/query/${key}`; @@ -34,7 +34,7 @@ function Validator ({ canSelect, info: { accountId, bondOther, bondOwn, bondTota ); return ( - + + validators[a].isValidator === validators[b].isValidator + ? 0 + : (validators[a].isValidator ? -1 : 1) ); } -function Targets ({ className, ownStashes, targets: { calcWith, lastReward, nominators, setCalcWith, toggleFavorite, totalStaked, validators, waitings } }: Props): React.ReactElement { +function Targets ({ className, ownStashes, targets: { calcWith, lastReward, nominators, setCalcWith, toggleFavorite, totalStaked, validators } }: Props): React.ReactElement { const { t } = useTranslation(); const ownNominators = useOwnNominators(ownStashes); const [selected, setSelected] = useState([]); @@ -137,15 +141,14 @@ function Targets ({ className, ownStashes, targets: { calcWith, lastReward, nomi // filter={filter} header={header} > - {validators && sorted && (validators.length === sorted.length) && sorted.map((index): React.ReactNode => - + {validators && sorted && (validators.length === sorted.length) && sorted.map((index): React.ReactNode => )} diff --git a/packages/page-staking/src/types.ts b/packages/page-staking/src/types.ts index 4e51dbe519..21b1dcc982 100644 --- a/packages/page-staking/src/types.ts +++ b/packages/page-staking/src/types.ts @@ -50,6 +50,7 @@ export interface ValidatorInfo extends ValidatorInfoRank { isCommission: boolean; isFavorite: boolean; isNominating: boolean; + isValidator: boolean; key: string; numNominators: number; rewardPayout: BN; diff --git a/packages/page-staking/src/useSortedTargets.ts b/packages/page-staking/src/useSortedTargets.ts index 13f0ce9d74..16c0d7ce7e 100644 --- a/packages/page-staking/src/useSortedTargets.ts +++ b/packages/page-staking/src/useSortedTargets.ts @@ -31,7 +31,7 @@ function mapIndex (mapBy: TargetSortBy): (info: ValidatorInfo, index: number) => function sortValidators (list: ValidatorInfo[]): ValidatorInfo[] { return list - .filter((a) => a.bondTotal.gtn(0)) + // .filter((a) => a.bondTotal.gtn(0)) .sort((a, b) => b.commissionPer - a.commissionPer) .map(mapIndex('rankComm')) .sort((a, b) => b.currentEraCommissionPer - a.currentEraCommissionPer) @@ -71,7 +71,7 @@ function extractInfo (allAccounts: string[], amount: BN = baseBalance(), elected const perValidatorReward = lastReward.divn(electedInfo.info.length); const validators = sortValidators( - electedInfo.info.map(({ accountId, exposure: _exposure, validatorPrefs }, index): ValidatorInfo => { + [...electedInfo.info, ...waitingInfo.info].map(({ accountId, exposure: _exposure, validatorPrefs }, index): ValidatorInfo => { const exposure = _exposure || { others: registry.createType('Vec'), own: registry.createType('Compact'), @@ -109,10 +109,11 @@ function extractInfo (allAccounts: string[], amount: BN = baseBalance(), elected bondShare: 0, bondTotal, commissionPer: (((prefs as ValidatorPrefs).commission?.unwrap() || new BN(0)).toNumber() / 10_000_000), - currentEraCommissionPer: ((electedInfo.activeComminssions[index].commission?.unwrap() || new BN(0)).toNumber() / 10_000_000), + currentEraCommissionPer: ((electedInfo.activeComminssions[index]?.commission?.unwrap() || new BN(0)).toNumber() / 10_000_000), isCommission: !!(prefs as ValidatorPrefs).commission, isFavorite: favorites.includes(key), isNominating, + isValidator: index < electedInfo.info.length, key, numNominators: exposure.others.length, rankBondOther: 0, @@ -130,67 +131,7 @@ function extractInfo (allAccounts: string[], amount: BN = baseBalance(), elected }) ); - const waitings = sortValidators( - waitingInfo.info.map(({ accountId, exposure: _exposure, validatorPrefs }, index): ValidatorInfo => { - const exposure = _exposure || { - others: registry.createType('Vec'), - own: registry.createType('Compact'), - total: registry.createType('Compact') - }; - const prefs = (validatorPrefs as (ValidatorPrefs | ValidatorPrefsTo196)) || { - commission: registry.createType('Compact') - }; - const bondOwn = exposure.ownPower; - const bondTotal = exposure.totalPower; - const validatorPayment = (prefs as ValidatorPrefsTo196).validatorPayment - ? (prefs as ValidatorPrefsTo196).validatorPayment.unwrap() as BN - : (prefs as ValidatorPrefs).commission.unwrap().mul(perValidatorReward).div(PERBILL); - const key = accountId.toString(); - const rewardSplit = perValidatorReward.sub(validatorPayment); - const rewardPayout = rewardSplit.gtn(0) - ? amount.mul(rewardSplit).div(amount.add(bondTotal)) - : new BN(0); - const isNominating = exposure.others.reduce((isNominating, indv): boolean => { - const nominator = indv.who.toString(); - - if (!nominators.includes(nominator)) { - nominators.push(nominator); - } - - return isNominating || allAccounts.includes(nominator); - }, allAccounts.includes(key)); - - totalStaked = totalStaked.add(bondTotal); - - return { - accountId, - bondOther: bondTotal.sub(bondOwn), - bondOwn, - bondShare: 0, - bondTotal, - commissionPer: (((prefs as ValidatorPrefs).commission?.unwrap() || new BN(0)).toNumber() / 10_000_000), - currentEraCommissionPer: ((electedInfo.activeComminssions[index].commission?.unwrap() || new BN(0)).toNumber() / 10_000_000), - isCommission: !!(prefs as ValidatorPrefs).commission, - isFavorite: favorites.includes(key), - isNominating, - key, - numNominators: exposure.others.length, - rankBondOther: 0, - rankBondOwn: 0, - rankBondTotal: 0, - rankComm: 0, - rankActiveComm: 0, - rankOverall: 0, - rankPayment: 0, - rankReward: 0, - rewardPayout, - rewardSplit, - validatorPayment - }; - }) - ); - - return { nominators, totalStaked, validators, waitings }; + return { nominators, totalStaked, validators }; } export default function useSortedTargets (): SortedTargets { diff --git a/packages/react-components-darwinia/src/Table.tsx b/packages/react-components-darwinia/src/Table.tsx index b63481619a..d49d051a08 100755 --- a/packages/react-components-darwinia/src/Table.tsx +++ b/packages/react-components-darwinia/src/Table.tsx @@ -66,7 +66,13 @@ export default styled(Table)` &.isHighlight { td { - background: #ffffed; + background: #ffffed !important; + } + } + + &.isWaiting { + td { + background: #f2f2f2; } } @@ -184,7 +190,7 @@ export default styled(Table)` color: darkorange; } } - + th { background: #666; color: #eee; diff --git a/packages/react-components/src/Table/Body.tsx b/packages/react-components/src/Table/Body.tsx index a444c2a726..ef20f63e5a 100644 --- a/packages/react-components/src/Table/Body.tsx +++ b/packages/react-components/src/Table/Body.tsx @@ -143,7 +143,11 @@ export default React.memo(styled(Body)` tr { &.isHighlight td { - background: #ffffed; + background: #ffffed !important; + } + + &.isWaiting td { + background: #f2f2f2; } &:last-child td { diff --git a/packages/util/src/array/chunk.ts b/packages/util/src/array/chunk.ts new file mode 100755 index 0000000000..efad3beb74 --- /dev/null +++ b/packages/util/src/array/chunk.ts @@ -0,0 +1,29 @@ +// Copyright 2017-2021 @polkadot/util authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +/** + * @name arrayChunk + * @summary Split T[] into T[][] based on the defind size + * @description + * Returns a set ao arrays based on the chunksize + * @example + *
+ * + * ```javascript + * import { arrayChunk } from '@polkadot/util'; + * + * arrayChunk([1, 2, 3, 4, 5]); // [[1, 2], [3, 4], [5]] + * ``` + */ +export function arrayChunk (array: T[], chunkSize: number): T[][] { + const outputSize = Math.ceil(array.length / chunkSize); + const output = Array(outputSize); + + for (let index = 0; index < outputSize; index++) { + const offset = index * chunkSize; + + output[index] = array.slice(offset, offset + chunkSize); + } + + return output; +} diff --git a/packages/util/src/array/filter.ts b/packages/util/src/array/filter.ts index 9061d8648f..1f09ec1667 100755 --- a/packages/util/src/array/filter.ts +++ b/packages/util/src/array/filter.ts @@ -1,9 +1,8 @@ -// Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// Copyright 2017-2021 @polkadot/util authors & contributors +// SPDX-License-Identifier: Apache-2.0 -import isNull from '../is/null'; -import isUndefined from '../is/undefined'; +import { isNull } from '../is/null'; +import { isUndefined } from '../is/undefined'; /** * @name arrayFilter @@ -21,7 +20,7 @@ import isUndefined from '../is/undefined'; * ``` */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -export default function arrayFilter (array: T[], allowNulls = true): T[] { +export function arrayFilter (array: T[], allowNulls = true): T[] { return array.filter((value) => !isUndefined(value) && (allowNulls || !isNull(value)) ); diff --git a/packages/util/src/array/flatten.ts b/packages/util/src/array/flatten.ts new file mode 100755 index 0000000000..3160e7e981 --- /dev/null +++ b/packages/util/src/array/flatten.ts @@ -0,0 +1,36 @@ +// Copyright 2017-2021 @polkadot/util authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +// This is supposed to be a faster concat... +// https://dev.to/uilicious/javascript-array-push-is-945x-faster-than-array-concat-1oki + +/** + * @name arrayFlatten + * @summary Merge T[][] into T[] + * @description + * Returns a new array with all arrays merged into one + * @example + *
+ * + * ```javascript + * import { arrayFlatten } from '@polkadot/util'; + * + * arrayFlatten([[1, 2], [3, 4], [5]]); // [1, 2, 3, 4, 5] + * ``` + */ +export function arrayFlatten (arrays: T[][]): T[] { + // pre-allocate based on the combined size + const output = new Array(arrays.reduce((length, array) => length + array.length, 0)); + let index = -1; + + for (let a = 0; a < arrays.length; a++) { + const array = arrays[a]; + + // instead of pushing, we just set the entries + for (let e = 0; e < array.length; e++) { + output[++index] = array[e]; + } + } + + return output; +} diff --git a/packages/util/src/array/index.ts b/packages/util/src/array/index.ts index 6ccb51f6b5..2acea33274 100755 --- a/packages/util/src/array/index.ts +++ b/packages/util/src/array/index.ts @@ -6,4 +6,6 @@ * @summary Utility methods that operates on arrays */ -export { default as arrayFilter } from './filter'; +export { arrayChunk } from './chunk'; +export { arrayFilter } from './filter'; +export { arrayFlatten } from './flatten'; From 53c01f2094985d06fb45d0fd185f97d19319532c Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Mon, 1 Feb 2021 11:54:33 +0800 Subject: [PATCH 4/4] disable rebond when in election --- packages/page-staking-darwinia/src/Actions/Account/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/page-staking-darwinia/src/Actions/Account/index.tsx b/packages/page-staking-darwinia/src/Actions/Account/index.tsx index 480d584b0e..f043e2588a 100755 --- a/packages/page-staking-darwinia/src/Actions/Account/index.tsx +++ b/packages/page-staking-darwinia/src/Actions/Account/index.tsx @@ -563,7 +563,7 @@ function Account ({ allStashes, className, isInElection, isOwnStash, next, onUpd {t('Deposit')} {t('Rebond funds')}