From d1fb425e75b4c25be986bc3ab2d10dfce9809f63 Mon Sep 17 00:00:00 2001 From: Totemancer Date: Fri, 17 Jan 2025 02:30:28 +0100 Subject: [PATCH 1/4] Update _tonconnect_ui.html --- docs/modules/_tonconnect_ui.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/modules/_tonconnect_ui.html b/docs/modules/_tonconnect_ui.html index 27c8e5c24..29dabbfbc 100644 --- a/docs/modules/_tonconnect_ui.html +++ b/docs/modules/_tonconnect_ui.html @@ -230,6 +230,8 @@

Add the return strategy

Use inside TMA (Telegram Mini Apps)

TonConnect UI will work in TMA in the same way as in a regular website! +Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script in the HTML header:

+
Basically, no changes are required from the dApp's developers. The only thing you have to set is a dynamic return strategy.

Currently, it is impossible for TMA-wallets to redirect back to previous opened TMA-dApp like native wallet-apps do. It means, that you need to specify the return strategy as a link to your TMA that will be only applied if the dApp is opened in TMA mode.

@@ -711,4 +713,4 @@

WalletsModalState

Generated using TypeDoc

-
\ No newline at end of file +
From db6ae46837848e86bcc4c4ce4fa243bcbddf28ca Mon Sep 17 00:00:00 2001 From: Totemancer Date: Fri, 17 Jan 2025 02:33:15 +0100 Subject: [PATCH 2/4] Update _tonconnect_ui.html --- docs/modules/_tonconnect_ui.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/modules/_tonconnect_ui.html b/docs/modules/_tonconnect_ui.html index 29dabbfbc..ef8639053 100644 --- a/docs/modules/_tonconnect_ui.html +++ b/docs/modules/_tonconnect_ui.html @@ -230,9 +230,11 @@

Add the return strategy

Use inside TMA (Telegram Mini Apps)

TonConnect UI will work in TMA in the same way as in a regular website! -Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script in the HTML header:

-
-Basically, no changes are required from the dApp's developers. The only thing you have to set is a dynamic return strategy.

+Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script inside the `
` block of your HTML:

+
<header>
+  <script src="https://telegram.org/js/telegram-web-app.js"></script>
+</header>
+Basically, no additional changes are required from the dApp's developers. The only thing you have to set is a dynamic return strategy.

Currently, it is impossible for TMA-wallets to redirect back to previous opened TMA-dApp like native wallet-apps do. It means, that you need to specify the return strategy as a link to your TMA that will be only applied if the dApp is opened in TMA mode.

tonConnectUI.uiOptions = {
twaReturnUrl: 'https://t.me/durov'
}; From 18cb6259993506f74a820abf5cab2ef552b7f428 Mon Sep 17 00:00:00 2001 From: Totemancer Date: Fri, 17 Jan 2025 02:35:20 +0100 Subject: [PATCH 3/4] Update _tonconnect_ui.html --- docs/modules/_tonconnect_ui.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/_tonconnect_ui.html b/docs/modules/_tonconnect_ui.html index ef8639053..25ad9df12 100644 --- a/docs/modules/_tonconnect_ui.html +++ b/docs/modules/_tonconnect_ui.html @@ -230,7 +230,7 @@

Add the return strategy

Use inside TMA (Telegram Mini Apps)

TonConnect UI will work in TMA in the same way as in a regular website! -Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script inside the `

` block of your HTML:

+Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script inside the `header` block of your HTML:

<header>
   <script src="https://telegram.org/js/telegram-web-app.js"></script>
 </header>
From 4318432629fec84f6115f050e971a9c9f8345f14 Mon Sep 17 00:00:00 2001 From: Totemancer Date: Fri, 17 Jan 2025 02:36:35 +0100 Subject: [PATCH 4/4] Update _tonconnect_ui.html --- docs/modules/_tonconnect_ui.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/_tonconnect_ui.html b/docs/modules/_tonconnect_ui.html index 25ad9df12..5ac65f395 100644 --- a/docs/modules/_tonconnect_ui.html +++ b/docs/modules/_tonconnect_ui.html @@ -230,7 +230,7 @@

Add the return strategy

Use inside TMA (Telegram Mini Apps)

TonConnect UI will work in TMA in the same way as in a regular website! -Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script inside the `header` block of your HTML:

+Developers need to ensure that the Telegram Mini Apps environment is detected correctly by including the following script inside the header block of your HTML:

<header>
   <script src="https://telegram.org/js/telegram-web-app.js"></script>
 </header>