mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-03 05:13:09 +00:00
chore: signature request shows timestamp in human readable format
This commit is contained in:
parent
1199de84aa
commit
89b70c758e
@ -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})`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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',
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user