feat: filter out account from members

This commit is contained in:
Pavel Prichodko 2022-06-14 19:52:06 +02:00
parent 38fabb3e18
commit 6d5d6ab498
No known key found for this signature in database
GPG Key ID: 8E4C82D464215E83
1 changed files with 7 additions and 2 deletions

View File

@ -2,9 +2,14 @@ import { useProtocol } from '~/src/protocol'
import type { Member } from '@status-im/js' import type { Member } from '@status-im/js'
// todo: remove in favor of useCommunity
export const useMembers = (): Member[] => { export const useMembers = (): Member[] => {
const { client } = useProtocol() const { client, account } = useProtocol()
if (account) {
return client.community.members.filter(
member => member.publicKey !== '0x' + account.publicKey
)
}
return client.community.members return client.community.members
} }