From 1ecceb7c9ce6bc09cb7da808e2637799c2a9c6b5 Mon Sep 17 00:00:00 2001 From: Pavel Rakhmanov <22203119+pavel-rakhmanov@users.noreply.github.com> Date: Fri, 10 Oct 2025 21:34:27 +0100 Subject: [PATCH 1/3] remove unused input_amount variable --- examples/swap.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/swap.ts b/examples/swap.ts index f5dc341..f838fb6 100644 --- a/examples/swap.ts +++ b/examples/swap.ts @@ -49,8 +49,6 @@ export async function swapAssets() { address: 'EQCl0S4xvoeGeFGijTzicSA8j6GiiugmJW5zxQbZTUntre-1', // CES }; - const input_amount = 5; // 5 TON - const route = await routingApi.buildRoute({ input_token: assetIn, output_token: assetOut, From 1970d0ead557df5762166a7826b3ad8c8845c807 Mon Sep 17 00:00:00 2001 From: Pavel Rakhmanov <22203119+pavel-rakhmanov@users.noreply.github.com> Date: Fri, 10 Oct 2025 21:34:41 +0100 Subject: [PATCH 2/3] tonconnect validUntil as unix timestamp --- examples/swap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/swap.ts b/examples/swap.ts index f838fb6..5f37d60 100644 --- a/examples/swap.ts +++ b/examples/swap.ts @@ -75,7 +75,7 @@ export async function swapAssets() { } await connector.sendTransaction({ - validUntil: Date.now() + 5 * 60 * 1000, + validUntil: Math.floor(Date.now() / 1000) + 5 * 60, messages: messages, }); From 5946ef72b698a9ce64994e3e87335dde26eba4ff Mon Sep 17 00:00:00 2001 From: Pavel Rakhmanov <22203119+pavel-rakhmanov@users.noreply.github.com> Date: Fri, 10 Oct 2025 21:34:56 +0100 Subject: [PATCH 3/3] copy changes to README --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 248256b..f96d8ca 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,6 @@ const assetOut: ApiTokenAddress = { address: 'EQCl0S4xvoeGeFGijTzicSA8j6GiiugmJW5zxQbZTUntre-1', // CES }; -const input_amount = 5; // 5 TON - const route = await routingApi.buildRoute({ input_token: assetIn, output_token: assetOut, @@ -64,7 +62,7 @@ for (const transaction of transactions.data.transactions) { } await connector.sendTransaction({ - validUntil: Date.now() + 5 * 60 * 1000, + validUntil: Math.floor(Date.now() / 1000) + 5 * 60, messages: messages, });