From bf90e800befcb02a21e14d7ef04c6a2e50e645d4 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Tue, 23 Apr 2024 21:51:36 -0700 Subject: [PATCH] fix: right a test for it --- example/src/HomeScreen.tsx | 14 +++++--------- example/src/tests/groupTests.ts | 6 ++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/example/src/HomeScreen.tsx b/example/src/HomeScreen.tsx index f9c45bb5b..d67cf3288 100644 --- a/example/src/HomeScreen.tsx +++ b/example/src/HomeScreen.tsx @@ -100,16 +100,12 @@ function GroupListItem({ DecodedMessage[] >([]) const lastMessage = messages?.[0] - const [getConsentState, setConsentState] = useState() + const [consentState, setConsentState] = useState() const denyGroup = async () => { await client?.contacts.denyGroups([group.id]) - group - .consentState() - .then(setConsentState) - .catch((e) => { - console.error('Error denying contact: ', e) - }) + const consent = await group.consentState() + setConsentState(consent) } useEffect(() => { @@ -147,12 +143,12 @@ function GroupListItem({