From 612dbd55b409f7db795339767bb8bd13a09563be Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 11 Aug 2020 23:35:26 +0200 Subject: [PATCH] Adjust account actions slash indicator (#3394) --- packages/page-staking/src/Actions/Account/index.tsx | 5 ++--- packages/page-staking/src/Actions/types.ts | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/page-staking/src/Actions/Account/index.tsx b/packages/page-staking/src/Actions/Account/index.tsx index 7c062971d0..d6ea706026 100644 --- a/packages/page-staking/src/Actions/Account/index.tsx +++ b/packages/page-staking/src/Actions/Account/index.tsx @@ -75,12 +75,11 @@ function Account ({ allSlashes, className = '', info: { controllerId, destinatio const slashes = all .filter(({ others, validator }) => validator.eq(stashId) || others.some(([nominatorId]) => nominatorId.eq(stashId))) .map(({ others, own, payout, reporters, validator }) => ({ - isValidator: validator.eq(stashId), others, own, payout, reporters, validator + others, own, payout, reporters, validator })); return { era, - isValidator: slashes.some(({ isValidator }) => isValidator), slashes }; }) @@ -105,7 +104,7 @@ function Account ({ allSlashes, className = '', info: { controllerId, destinatio return ( - {!isStashNominating && slashes.length !== 0 && ( + {slashes.length !== 0 && ( ('Slashed in era {{eras}}', { diff --git a/packages/page-staking/src/Actions/types.ts b/packages/page-staking/src/Actions/types.ts index adb761161f..564539bcd1 100644 --- a/packages/page-staking/src/Actions/types.ts +++ b/packages/page-staking/src/Actions/types.ts @@ -12,7 +12,6 @@ export interface AmountValidateState { } interface Unapplied { - isValidator: boolean; others: UnappliedSlashOther[]; own: Balance; payout: Balance; @@ -22,6 +21,5 @@ interface Unapplied { export interface Slash { era: BN; - isValidator: boolean; slashes: Unapplied[]; }