Skip to content

Commit

Permalink
was using wrong address
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 26, 2023
1 parent 71d3793 commit c9a8f10
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions example/src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,24 +559,21 @@ test("canManagePreferences", async () => {
);
await delayToPropogate();

await bo.contacts.refreshAllowList();
await delayToPropogate();

const initialConvoState = await alixConversation.allowState();
if (initialConvoState != "allowed") {
throw new Error(`conversations created by bo should be allowed by default not ${initialConvoState}`);
}

const initialState = await bo.contacts.isAllowed(alixConversation.clientAddress);
const initialState = await bo.contacts.isAllowed(alixConversation.peerAddress);
if (!initialState) {
throw new Error(`contacts created by bo should be allowed by default not ${initialState}`);
}

bo.contacts.block([alixConversation.clientAddress]);
bo.contacts.block([alixConversation.peerAddress]);
await delayToPropogate();

const blockedState = await bo.contacts.isBlocked(alixConversation.clientAddress);
const allowedState = await bo.contacts.isAllowed(alixConversation.clientAddress);
const blockedState = await bo.contacts.isBlocked(alixConversation.peerAddress);
const allowedState = await bo.contacts.isAllowed(alixConversation.peerAddress);
if (!blockedState) {
throw new Error(`contacts blocked by bo should be blocked not ${blockedState}`);
}
Expand Down

0 comments on commit c9a8f10

Please sign in to comment.