Skip to content

Commit

Permalink
undo it for everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jan 4, 2025
1 parent a00e418 commit 0298c1a
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions bindings_node/test/Client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,41 +139,41 @@ describe('Client', () => {
])
})

it("should revoke all installations", async () => {
const user = createUser();
it('should revoke all installations', async () => {
const user = createUser()

const client = await createRegisteredClient(user);
user.uuid = v4();
const client2 = await createRegisteredClient(user);
user.uuid = v4();
const client3 = await createRegisteredClient(user);
const client = await createRegisteredClient(user)
user.uuid = v4()
const client2 = await createRegisteredClient(user)
user.uuid = v4()
const client3 = await createRegisteredClient(user)

const inboxState = await client3.inboxState(true);
expect(inboxState.installations.length).toBe(3);
const inboxState = await client3.inboxState(true)
expect(inboxState.installations.length).toBe(3)

const installationIds = inboxState.installations.map((i) => i.id);
expect(installationIds).toContain(client.installationId());
expect(installationIds).toContain(client2.installationId());
expect(installationIds).toContain(client3.installationId());
const installationIds = inboxState.installations.map((i) => i.id)
expect(installationIds).toContain(client.installationId())
expect(installationIds).toContain(client2.installationId())
expect(installationIds).toContain(client3.installationId())

const signatureText = await client3.revokeAllOtherInstallationsSignatureText();
expect(signatureText).toBeDefined();
expect(signatureText).toBeDefined()

// Sign message
// sign message
const signature = await user.wallet.signMessage({
message: signatureText,
});
})

await client3.addSignature(
SignatureRequestType.RevokeInstallations,
toBytes(signature)
);
await client3.applySignatureRequests();
const inboxState2 = await client3.inboxState(true);
)
await client3.applySignatureRequests()
const inboxState2 = await client3.inboxState(true)

expect(inboxState2.installations.length).toBe(1);
expect(inboxState2.installations[0].id).toBe(client3.installationId());
});
expect(inboxState2.installations.length).toBe(1)
expect(inboxState2.installations[0].id).toBe(client3.installationId())
})

it('should manage consent states', async () => {
const user1 = createUser()
Expand Down

0 comments on commit 0298c1a

Please sign in to comment.