Skip to content

Commit

Permalink
use string instead of Date for sig gen function
Browse files Browse the repository at this point in the history
  • Loading branch information
v9n committed Feb 1, 2025
1 parent 161dbda commit 2a08481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/sdk-js/src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const getKeyRequestMessage = (chainId: number, address: string, issuedAt: Date, expiredAt: Date): string => {
export const getKeyRequestMessage = (chainId: number, address: string, issuedAt: string, expiredAt: string): string => {
return `Please sign the below text for ownership verification.
URI: https://app.avaprotocol.org
Chain ID: ${chainId}
Version: 1
Issued At: ${issuedAt.toISOString()}
Expire At: ${expiredAt.toISOString()}
Issued At: ${issuedAt}
Expire At: ${expiredAt}
Wallet: ${address}`;

}
5 changes: 3 additions & 2 deletions tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ export async function generateSignature(
const message = getKeyRequestMessage(
chainId,
wallet.address,
issuedAt,
expiredAt);
issuedAt.toISOString(),
expiredAt.toISOString()
);

const signature = await wallet.signMessage(message);https://www.prisma.io/docs/orm/prisma-migrate/understanding-prisma-migrate/migration-histories#committing-the-migration-history-to-source-control

Expand Down

0 comments on commit 2a08481

Please sign in to comment.