From 604b1ae8babda2b818a2fefd5a69082a2565387a Mon Sep 17 00:00:00 2001 From: Daniel Yamuza Date: Mon, 6 May 2019 14:26:50 +0200 Subject: [PATCH] Fixed my nominations filter (#1080) (#1085) --- packages/app-staking/src/Overview/Address.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/app-staking/src/Overview/Address.tsx b/packages/app-staking/src/Overview/Address.tsx index 41c50e634d..af097d7716 100644 --- a/packages/app-staking/src/Overview/Address.tsx +++ b/packages/app-staking/src/Overview/Address.tsx @@ -12,6 +12,7 @@ import { withCalls, withMulti } from '@polkadot/ui-api/with'; import { AddressMini, AddressRow, RecentlyOffline } from '@polkadot/ui-app'; import { getAddrName } from '@polkadot/ui-app/util'; import { formatBalance } from '@polkadot/util'; +import keyring from '@polkadot/ui-keyring'; import translate from '../translate'; @@ -165,10 +166,10 @@ class Address extends React.PureComponent { } private iNominated () { - const { address } = this.props; const nominators = this.getNominators(); + const myAddresses = keyring.getAccounts().map(acc => acc.address()); - return nominators.filter(nom => nom[0].toString() === address).length > 0; + return nominators.filter(([who, value]) => myAddresses.includes(who.toString())).length > 0; } private hasNominators () {