diff --git a/packages/siwe/lib/client.test.ts b/packages/siwe/lib/client.test.ts index 6b971890..8d2acaef 100644 --- a/packages/siwe/lib/client.test.ts +++ b/packages/siwe/lib/client.test.ts @@ -76,17 +76,7 @@ describe(`Message verification without suppressExceptions`, () => { domain: (test_fields as any).domainBinding, nonce: (test_fields as any).matchNonce, }) - // when validate is removed uncomment this and remove the following then - // .then(({ success }) => success) - .then(async ({ data }) => { - jest - .useFakeTimers() - .setSystemTime( - new Date((test_fields as any).time || test_fields.issuedAt) - ); - const res = await msg.validate(test_fields.signature); - return res === data; - }) + .then(({ success }) => success) ).resolves.toBeTruthy(); jest.useRealTimers(); diff --git a/packages/siwe/lib/client.ts b/packages/siwe/lib/client.ts index abb2f3e8..823dfda4 100644 --- a/packages/siwe/lib/client.ts +++ b/packages/siwe/lib/client.ts @@ -184,23 +184,6 @@ export class SiweMessage { return message; } - /** - * @deprecated - * Verifies the integrity of the object by matching its signature. - * @param signature Signature to match the address in the message. - * @param provider Ethers provider to be used for EIP-1271 validation - */ - async validate(signature: string, provider?: Provider) { - console.warn( - 'validate() has been deprecated, please update your code to use verify(). validate() may be removed in future versions.' - ); - return this.verify({ signature }, { provider, suppressExceptions: false }) - .then(({ data }) => data) - .catch(({ error }) => { - throw error; - }); - } - /** * Verifies the integrity of the object by matching its signature. * @param params Parameters to verify the integrity of the message, signature is required.