Skip to content

Commit

Permalink
Add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Jun 15, 2024
1 parent a4ec36b commit f00a7e1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/eip712/proxy/EIP712Proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,31 @@ describe('EIP712Proxy', () => {
).not.to.be.reverted;
});

it('should verify delegated revocation request sent from a different account', async () => {
const revocationRequest = {
uid,
value: 0n
};

const signature = await eip712ProxyUtils.signDelegatedProxyRevocation(
sender,
schemaId,
revocationRequest.uid,
revocationRequest.value,
deadline
);

await expect(
proxy.connect(sender2).verifyRevoke({
schema: schemaId,
data: revocationRequest,
signature: { v: signature.v, r: hexlify(signature.r), s: hexlify(signature.s) },
revoker: await sender.getAddress(),
deadline
})
).not.to.be.reverted;
});

it('should revert when verifying delegated revocation request with a wrong signature', async () => {
const revocationRequest = {
uid,
Expand Down

0 comments on commit f00a7e1

Please sign in to comment.