@tonconnect/ui 2.0.1-beta.2 → 2.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tonconnect-ui.min.js +1 -1
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +20 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +20 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -8329,7 +8329,7 @@ function redirectToTelegram(universalLink, options) {
|
|
|
8329
8329
|
openLinkBlank(addReturnStrategy(directLinkUrl.toString(), options));
|
|
8330
8330
|
}
|
|
8331
8331
|
} else {
|
|
8332
|
-
if (isOS("ios"
|
|
8332
|
+
if (isOS("ios")) {
|
|
8333
8333
|
if (options.returnStrategy === "back") {
|
|
8334
8334
|
options.returnStrategy = location.href;
|
|
8335
8335
|
}
|
|
@@ -8350,6 +8350,25 @@ function redirectToTelegram(universalLink, options) {
|
|
|
8350
8350
|
);
|
|
8351
8351
|
openLinkBlank(linkWithStrategy);
|
|
8352
8352
|
}
|
|
8353
|
+
} else if (isOS("android")) {
|
|
8354
|
+
options.returnStrategy = "none";
|
|
8355
|
+
const isChrome = isBrowser("chrome");
|
|
8356
|
+
const isFirefox = isBrowser("firefox");
|
|
8357
|
+
const useDeepLink = (isChrome || isFirefox) && !options.forceRedirect;
|
|
8358
|
+
if (useDeepLink) {
|
|
8359
|
+
const linkWithStrategy = addReturnStrategy(
|
|
8360
|
+
directLinkUrl.toString(),
|
|
8361
|
+
options.returnStrategy
|
|
8362
|
+
);
|
|
8363
|
+
const deepLink = convertToTGDeepLink(linkWithStrategy);
|
|
8364
|
+
openDeeplinkWithFallback(deepLink, () => openLinkBlank(linkWithStrategy));
|
|
8365
|
+
} else {
|
|
8366
|
+
const linkWithStrategy = addReturnStrategy(
|
|
8367
|
+
directLinkUrl.toString(),
|
|
8368
|
+
options.returnStrategy
|
|
8369
|
+
);
|
|
8370
|
+
openLinkBlank(linkWithStrategy);
|
|
8371
|
+
}
|
|
8353
8372
|
} else if (isOS("macos", "windows", "linux")) {
|
|
8354
8373
|
options.returnStrategy = "none";
|
|
8355
8374
|
options.twaReturnUrl = void 0;
|