Skip to content

Commit f5e6163

Browse files
committed
Math.floor the expiry
1 parent a08fd24 commit f5e6163

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/x402-example/src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ async function main() {
7272
const chainId = parseChainIdFromNetwork(requirements.network);
7373
const environment = getSmartAccountsEnvironment(chainId);
7474

75-
// expires in 1 minute
76-
const expiry = Date.now() / 1000 + 60;
75+
// expires in 1 minute (must be an integer unix timestamp)
76+
const expiry = Math.floor(Date.now() / 1000) + 60;
7777

7878
const delegation = createOpenDelegation({
7979
environment,

0 commit comments

Comments
 (0)