@tonconnect/ui 2.4.0-beta.4 → 2.4.0-beta.6
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 +20 -20
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +16 -3
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.mjs +16 -3
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WalletInfoInjectable, WalletInfoRemote, RequiredFeatures, VersionEvent, ConnectionEvent, ConnectionRestoringEvent, DisconnectionEvent, TransactionSigningEvent, DataSigningEvent, WalletModalOpenedEvent, SelectedWalletEvent, EventDispatcher, SdkActionEvent, ITonConnect, WalletInfoBase, Wallet, OptionalTraceable, FeatureName, WalletInfo, Account, ConnectAdditionalRequest, ChainId, TonConnectError, SendTransactionRequest, SendTransactionResponse, SignDataPayload, SignDataResponse } from '@tonconnect/sdk';
|
|
1
|
+
import { WalletInfoInjectable, WalletInfoRemote, RequiredFeatures, AnalyticsSettings, VersionEvent, ConnectionEvent, ConnectionRestoringEvent, DisconnectionEvent, TransactionSigningEvent, DataSigningEvent, WalletModalOpenedEvent, SelectedWalletEvent, EventDispatcher, SdkActionEvent, ITonConnect, WalletInfoBase, Wallet, OptionalTraceable, FeatureName, WalletInfo, Account, ConnectAdditionalRequest, ChainId, TonConnectError, SendTransactionRequest, SendTransactionResponse, SignDataPayload, SignDataResponse } from '@tonconnect/sdk';
|
|
2
2
|
export * from '@tonconnect/sdk';
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
4
|
|
|
@@ -174,6 +174,10 @@ interface TonConnectUiOptions {
|
|
|
174
174
|
* @default true
|
|
175
175
|
*/
|
|
176
176
|
enableAndroidBackHandler?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Analytics configuration forwarded to the underlying TonConnect SDK instance.
|
|
179
|
+
*/
|
|
180
|
+
analytics?: AnalyticsSettings;
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
/**
|
package/lib/index.mjs
CHANGED
|
@@ -1726,7 +1726,7 @@ function openLinkBlank(href) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
function openDeeplinkWithFallback(href, fallback) {
|
|
1728
1728
|
const doFallback = () => {
|
|
1729
|
-
if (isBrowser("safari") || isOS("android") && isBrowser("firefox")) {
|
|
1729
|
+
if (isBrowser("safari") || isOS("android") && isBrowser("firefox") || isOS("windows")) {
|
|
1730
1730
|
return;
|
|
1731
1731
|
}
|
|
1732
1732
|
fallback();
|
|
@@ -2428,6 +2428,18 @@ try {
|
|
|
2428
2428
|
initParams = urlParseHashParams(locationHash);
|
|
2429
2429
|
} catch (e2) {
|
|
2430
2430
|
}
|
|
2431
|
+
try {
|
|
2432
|
+
const launchParamsStorageKey = "ton-connect-session_storage_launchParams";
|
|
2433
|
+
if (Object.entries(initParams).length > 0) {
|
|
2434
|
+
sessionStorage.setItem(launchParamsStorageKey, JSON.stringify(initParams));
|
|
2435
|
+
} else {
|
|
2436
|
+
const savedInitParams = sessionStorage.getItem(launchParamsStorageKey);
|
|
2437
|
+
if (savedInitParams) {
|
|
2438
|
+
initParams = JSON.parse(savedInitParams);
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
} catch (e2) {
|
|
2442
|
+
}
|
|
2431
2443
|
let tmaPlatform = "unknown";
|
|
2432
2444
|
if (initParams == null ? void 0 : initParams.tgWebAppPlatform) {
|
|
2433
2445
|
tmaPlatform = (_a = initParams.tgWebAppPlatform) != null ? _a : "unknown";
|
|
@@ -12771,7 +12783,7 @@ class TonConnectUITracker {
|
|
|
12771
12783
|
}
|
|
12772
12784
|
}
|
|
12773
12785
|
}
|
|
12774
|
-
const tonConnectUiVersion = "2.4.0-beta.
|
|
12786
|
+
const tonConnectUiVersion = "2.4.0-beta.6";
|
|
12775
12787
|
class TonConnectEnvironment {
|
|
12776
12788
|
constructor() {
|
|
12777
12789
|
this.userAgent = getUserAgent();
|
|
@@ -12812,7 +12824,8 @@ class TonConnectUI {
|
|
|
12812
12824
|
manifestUrl: options.manifestUrl,
|
|
12813
12825
|
eventDispatcher,
|
|
12814
12826
|
walletsRequiredFeatures: options.walletsRequiredFeatures,
|
|
12815
|
-
environment: new TonConnectEnvironment()
|
|
12827
|
+
environment: new TonConnectEnvironment(),
|
|
12828
|
+
analytics: options.analytics
|
|
12816
12829
|
});
|
|
12817
12830
|
} else {
|
|
12818
12831
|
throw new TonConnectUIError(
|