diff --git a/src/lib/delegation/crypto.ts b/src/lib/delegation/crypto.ts index 52df0de..7a4461e 100644 --- a/src/lib/delegation/crypto.ts +++ b/src/lib/delegation/crypto.ts @@ -25,7 +25,8 @@ export class DelegationCrypto { expiryTimestamp: number, nonce: string ): string { - return `I, ${walletAddress}, authorize browser key ${browserPublicKey} until ${expiryTimestamp} (nonce: ${nonce})`; + const expiryDate = new Date(expiryTimestamp).toLocaleString(); + return `I, ${walletAddress}, authorize browser key ${browserPublicKey} until ${expiryDate} (nonce: ${nonce})`; } /** diff --git a/src/lib/forum/__tests__/relevance.test.ts b/src/lib/forum/__tests__/relevance.test.ts index 0c188a6..e7c8643 100644 --- a/src/lib/forum/__tests__/relevance.test.ts +++ b/src/lib/forum/__tests__/relevance.test.ts @@ -11,9 +11,9 @@ import { expect, describe, beforeEach, it } from 'vitest'; // Mock delegation proof for tests const mockDelegationProof: DelegationProof = { - authMessage: 'I authorize browser key: test-key until 9999999999', + authMessage: 'I, test-address, authorize browser key test-key until 20/11/2286, 11:16:39 pm (nonce: test-nonce)', walletSignature: 'mock-signature', - expiryTimestamp: 9999999999, + expiryTimestamp: 9999999999999, walletAddress: 'test-address', walletType: 'ethereum', };