feat: filter out account from members

This commit is contained in:
Pavel Prichodko 2022-06-14 19:52:06 +02:00
parent ca5bd55129
commit 98e340a39a
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
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'
// todo: remove in favor of useCommunity
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
}