@bounded-sh/client 0.0.112-ux-audit.2 → 0.0.113
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/auth/bounded-widget-modal.d.ts +24 -2
- package/dist/auth/providers/injected-wallet-provider.d.ts +7 -0
- package/dist/auth/providers/injected-wallet-types.d.ts +2 -0
- package/dist/auth/providers/solana-mobile-registration.d.ts +18 -0
- package/dist/{email-auth-provider-BfCH7K6N.mjs → email-auth-provider-Bk5GSpYT.mjs} +2 -2
- package/dist/{email-auth-provider-C7RXLVd9.mjs.map → email-auth-provider-Bk5GSpYT.mjs.map} +1 -1
- package/dist/{email-auth-provider-DTrCfOJd.js → email-auth-provider-Cr66GaKw.js} +2 -2
- package/dist/{email-auth-provider-DTrCfOJd.js.map → email-auth-provider-Cr66GaKw.js.map} +1 -1
- package/dist/{email-auth-provider-53sA5_i2.js → email-auth-provider-DeORQbTK.js} +2 -2
- package/dist/{email-auth-provider-53sA5_i2.js.map → email-auth-provider-DeORQbTK.js.map} +1 -1
- package/dist/{email-auth-provider-C7RXLVd9.mjs → email-auth-provider-nDZjRDpj.mjs} +2 -2
- package/dist/{email-auth-provider-BfCH7K6N.mjs.map → email-auth-provider-nDZjRDpj.mjs.map} +1 -1
- package/dist/{guest-auth-provider-00KkSNpE.js → guest-auth-provider-5bX-xt6K.js} +2 -2
- package/dist/{guest-auth-provider-00KkSNpE.js.map → guest-auth-provider-5bX-xt6K.js.map} +1 -1
- package/dist/{guest-auth-provider-Tndt6tzJ.js → guest-auth-provider-CUNkZVFK.js} +2 -2
- package/dist/{guest-auth-provider-Tndt6tzJ.js.map → guest-auth-provider-CUNkZVFK.js.map} +1 -1
- package/dist/{guest-auth-provider-DjOFjtnk.mjs → guest-auth-provider-DDudqqxY.mjs} +2 -2
- package/dist/{guest-auth-provider-DjOFjtnk.mjs.map → guest-auth-provider-DDudqqxY.mjs.map} +1 -1
- package/dist/{guest-auth-provider-2J4fnTX5.mjs → guest-auth-provider-ejUTbjCC.mjs} +2 -2
- package/dist/{guest-auth-provider-2J4fnTX5.mjs.map → guest-auth-provider-ejUTbjCC.mjs.map} +1 -1
- package/dist/{index-D3kdhCpH.mjs → index-BAiLpNEQ.mjs} +190 -53
- package/dist/index-BAiLpNEQ.mjs.map +1 -0
- package/dist/{index-DJeEMevo.js → index-BZ0X1Z9X.js} +190 -53
- package/dist/index-BZ0X1Z9X.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-ingNhWPw.js → index.native-DJSOqyKQ.js} +101 -14
- package/dist/index.native-DJSOqyKQ.js.map +1 -0
- package/dist/{index.native-CAH_ks0s.mjs → index.native-DcW2klyn.mjs} +100 -15
- package/dist/index.native-DcW2klyn.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-Cao1U0NZ.js → injected-evm-wallet-provider-BDYWjIOQ.js} +2 -2
- package/dist/{injected-evm-wallet-provider-Cao1U0NZ.js.map → injected-evm-wallet-provider-BDYWjIOQ.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-DXjwPjLW.mjs → injected-evm-wallet-provider-BQ_kG1vI.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-DXjwPjLW.mjs.map → injected-evm-wallet-provider-BQ_kG1vI.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BtyG1HOX.mjs → injected-evm-wallet-provider-C4aKa2v1.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BtyG1HOX.mjs.map → injected-evm-wallet-provider-C4aKa2v1.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-IlkuKffc.js → injected-evm-wallet-provider-D06arDQD.js} +2 -2
- package/dist/{injected-evm-wallet-provider-IlkuKffc.js.map → injected-evm-wallet-provider-D06arDQD.js.map} +1 -1
- package/dist/{injected-wallet-provider-BEYwsn6M.js → injected-wallet-provider-B9jvzDM5.js} +51 -22
- package/dist/{injected-wallet-provider-BEYwsn6M.js.map → injected-wallet-provider-B9jvzDM5.js.map} +1 -1
- package/dist/{injected-wallet-provider-0SSONh1d.mjs → injected-wallet-provider-Dj-F69gb.mjs} +51 -22
- package/dist/{injected-wallet-provider-0SSONh1d.mjs.map → injected-wallet-provider-Dj-F69gb.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-DSlHfgMU.js → injected-wallet-provider-Dqmk-m4V.js} +67 -26
- package/dist/{injected-wallet-provider-DSlHfgMU.js.map → injected-wallet-provider-Dqmk-m4V.js.map} +1 -1
- package/dist/{injected-wallet-provider-CfYNIIHd.mjs → injected-wallet-provider-DxPcYxP-.mjs} +67 -26
- package/dist/{injected-wallet-provider-CfYNIIHd.mjs.map → injected-wallet-provider-DxPcYxP-.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index-D3kdhCpH.mjs.map +0 -1
- package/dist/index-DJeEMevo.js.map +0 -1
- package/dist/index.native-CAH_ks0s.mjs.map +0 -1
- package/dist/index.native-ingNhWPw.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ag as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, af as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, ae as BUILD_REVIEW_CAPABILITY_SCHEMA, a7 as BuildsApiError, ad as FAILURE_REASONS, a9 as NON_TERMINAL_STATES, a1 as OffchainAuthProvider, ac as PARK_REASONS, a2 as PrivyExpoProvider, ab as RUN_STATES, aa as TERMINAL_STATES, W as WalletConfigError, Q as apps, a6 as builds, I as completeLoginFromRedirect, a4 as connectBroadcast, a5 as connectServiceSession, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, Y as getIdToken, J as getLoginReturnError, S as getOrCreateTurnkeyWallet, g as getPlatform, V as getTurnkeyWalletRecoveryUrl, U as getTurnkeyWalletSessionState, p as init, y as login, K as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, a8 as mediaAgentTools, v as onAuthLoadingChanged, u as onAuthStateChanged, Z as onramp, _ as onrampQuote, $ as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a3 as requestEip6963Providers, a0 as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, X as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-
|
|
1
|
+
export { ag as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, af as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, ae as BUILD_REVIEW_CAPABILITY_SCHEMA, a7 as BuildsApiError, ad as FAILURE_REASONS, a9 as NON_TERMINAL_STATES, a1 as OffchainAuthProvider, ac as PARK_REASONS, a2 as PrivyExpoProvider, ab as RUN_STATES, aa as TERMINAL_STATES, W as WalletConfigError, Q as apps, a6 as builds, I as completeLoginFromRedirect, a4 as connectBroadcast, a5 as connectServiceSession, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, Y as getIdToken, J as getLoginReturnError, S as getOrCreateTurnkeyWallet, g as getPlatform, V as getTurnkeyWalletRecoveryUrl, U as getTurnkeyWalletSessionState, p as init, y as login, K as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, a8 as mediaAgentTools, v as onAuthLoadingChanged, u as onAuthStateChanged, Z as onramp, _ as onrampQuote, $ as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a3 as requestEip6963Providers, a0 as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, X as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-BAiLpNEQ.mjs';
|
|
2
2
|
export * from '@bounded-sh/core';
|
|
3
3
|
export { AppTokenExchangeError, BoundedDeclineError, DECLINE_EVENT_NAME, RATE_LIMIT_EVENT_NAME, ScopedClientReadOnlyError, aggregate, clearAppTokenCache, count, createAppTokenAuthHeaders, createClient, deriveDecline, dispatchDeclineEvent, dispatchRateLimitEvent, docId, exchangeAppToken, get, getConfig, getFiles, getMany, queryAggregate, reconcileSetResult, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe, waitForSetResult } from '@bounded-sh/core';
|
|
4
4
|
import 'react';
|
|
@@ -3760,6 +3760,46 @@ function isSolanaMobileWallet(wallet) {
|
|
|
3760
3760
|
function solanaMobileWalletLeavesPage(name) {
|
|
3761
3761
|
return name === LOCAL_MOBILE_WALLET_NAME;
|
|
3762
3762
|
}
|
|
3763
|
+
/**
|
|
3764
|
+
* Whether this wallet answers a sign-in from its authorization cache, so the
|
|
3765
|
+
* cached record must be dropped before asking it to sign in.
|
|
3766
|
+
*
|
|
3767
|
+
* Both Mobile Wallet Adapter transports consult their persisted authorization
|
|
3768
|
+
* before EVERY authorize call, including the one that carries the Sign In With
|
|
3769
|
+
* Solana payload (@solana-mobile/wallet-standard-mobile 0.5.3
|
|
3770
|
+
* lib/esm/index.browser.js:1291). A record left by a plain connect holds no
|
|
3771
|
+
* sign-in result, so that sign-in fails with "no sign in result returned by
|
|
3772
|
+
* wallet" without the wallet app ever being asked; a record left by an earlier
|
|
3773
|
+
* sign-in holds that OLD proof, so a later sign-in replays a spent nonce. The
|
|
3774
|
+
* wallet's own `standard:disconnect` clears the record locally - it opens
|
|
3775
|
+
* nothing - and the sign-in that follows then authorizes afresh, with its
|
|
3776
|
+
* payload, in the wallet app. A name check, like leavesPage: this describes the
|
|
3777
|
+
* transport, and the same adapter registered by another SDK behaves the same.
|
|
3778
|
+
*/
|
|
3779
|
+
function solanaMobileWalletAnswersSignInFromCache(name) {
|
|
3780
|
+
return mobileWalletNames.has(name);
|
|
3781
|
+
}
|
|
3782
|
+
/**
|
|
3783
|
+
* The Wallet Standard name of a feature a Mobile Wallet Adapter account reports.
|
|
3784
|
+
*
|
|
3785
|
+
* The adapter copies a wallet app's per-account `features` into the Wallet
|
|
3786
|
+
* Standard account untranslated (0.5.3 lib/esm/index.browser.js:1421), and the
|
|
3787
|
+
* MWA protocol names them differently from the Wallet Standard (spec feature
|
|
3788
|
+
* identifiers: `solana:signMessages`, `solana:signInWithSolana`,
|
|
3789
|
+
* `solana:signTransactions`). Filtered by the Wallet Standard names, such an
|
|
3790
|
+
* account looks unable to sign a message or sign in, and the page sees no
|
|
3791
|
+
* connected account after a successful authorization. Wallet Standard names pass
|
|
3792
|
+
* through unchanged, so this applies to every account.
|
|
3793
|
+
*/
|
|
3794
|
+
const MWA_FEATURE_NAMES = {
|
|
3795
|
+
'solana:signMessages': 'solana:signMessage',
|
|
3796
|
+
'solana:signInWithSolana': 'solana:signIn',
|
|
3797
|
+
'solana:signTransactions': 'solana:signTransaction',
|
|
3798
|
+
};
|
|
3799
|
+
function walletStandardFeatureName(feature) {
|
|
3800
|
+
var _a;
|
|
3801
|
+
return (_a = MWA_FEATURE_NAMES[feature]) !== null && _a !== void 0 ? _a : feature;
|
|
3802
|
+
}
|
|
3763
3803
|
/**
|
|
3764
3804
|
* Register Solana Mobile's MWA wallet with the Wallet Standard registry so
|
|
3765
3805
|
* wallet discovery surfaces it. Idempotent - the first wallet-lane activation
|
|
@@ -3840,9 +3880,13 @@ async function ensureSolanaMobileWalletRegistered(config, network) {
|
|
|
3840
3880
|
}
|
|
3841
3881
|
catch (_e) {
|
|
3842
3882
|
throw new WalletConfigError(`Bounded: Solana Mobile wallet support needs the optional peer dependency ` +
|
|
3843
|
-
`'@solana-mobile/wallet-standard-mobile', which is not installed.
|
|
3844
|
-
`
|
|
3845
|
-
`
|
|
3883
|
+
`'@solana-mobile/wallet-standard-mobile', which is not installed. Until it is, ` +
|
|
3884
|
+
`Android users (Seeker, Saga, any phone browser) get NO wallet to connect: ` +
|
|
3885
|
+
`installed wallet apps are never injected into a page there, the mobile adapter ` +
|
|
3886
|
+
`is the only route. Fix: npm install @solana-mobile/wallet-standard-mobile ` +
|
|
3887
|
+
`(a web app also needs legacy-peer-deps=true in its .npmrc, because the adapter's ` +
|
|
3888
|
+
`protocol package declares react-native as a peer). Or leave the Solana Mobile ` +
|
|
3889
|
+
`wallet out of this app's wallet configuration on purpose.`);
|
|
3846
3890
|
}
|
|
3847
3891
|
const { registerMwa, createDefaultChainSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapterRemoteWalletName, } = mwa;
|
|
3848
3892
|
const before = new Set(getWallets().get());
|
|
@@ -3929,7 +3973,7 @@ const OVERLAY_CSS = `
|
|
|
3929
3973
|
:host{all:initial}
|
|
3930
3974
|
*{box-sizing:border-box}
|
|
3931
3975
|
.bw-ov{position:fixed;inset:0;z-index:2147483647;display:none;
|
|
3932
|
-
font-family:"Schibsted Grotesk","Helvetica Neue",Arial,sans-serif}
|
|
3976
|
+
font-family:"Bounded Schibsted Grotesk","Schibsted Grotesk","Helvetica Neue",Arial,sans-serif}
|
|
3933
3977
|
.bw-ov.mounted{display:block}
|
|
3934
3978
|
.bw-back{position:fixed;inset:0;background:rgba(4,4,5,.62);opacity:0;
|
|
3935
3979
|
transition:opacity .24s ease;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
|
|
@@ -3962,6 +4006,29 @@ const OVERLAY_CSS = `
|
|
|
3962
4006
|
}
|
|
3963
4007
|
@media(prefers-reduced-motion:reduce){.bw-back,.bw-panel{transition:opacity .12s linear!important}}
|
|
3964
4008
|
`;
|
|
4009
|
+
/**
|
|
4010
|
+
* Style the shadow tree with `css` as constructed stylesheets, and say whether it could. A host
|
|
4011
|
+
* CSP whose style-src lacks 'unsafe-inline' refuses an inline <style> even inside a shadow root,
|
|
4012
|
+
* which left the widget unstyled (the Bounded router compiles exactly `style-src 'self'` for an
|
|
4013
|
+
* app that declares browser boundaries and names no style sources); CSP does not govern
|
|
4014
|
+
* constructed sheets. A browser without them (they shipped with adoptedStyleSheets everywhere)
|
|
4015
|
+
* gets <style> elements instead (styleTag).
|
|
4016
|
+
*/
|
|
4017
|
+
function adoptStyles(shadow, css) {
|
|
4018
|
+
if (!("adoptedStyleSheets" in shadow))
|
|
4019
|
+
return false;
|
|
4020
|
+
shadow.adoptedStyleSheets = css.map((text) => {
|
|
4021
|
+
const sheet = new CSSStyleSheet();
|
|
4022
|
+
sheet.replaceSync(text);
|
|
4023
|
+
return sheet;
|
|
4024
|
+
});
|
|
4025
|
+
return true;
|
|
4026
|
+
}
|
|
4027
|
+
function styleTag(css) {
|
|
4028
|
+
const style = document.createElement("style");
|
|
4029
|
+
style.textContent = css;
|
|
4030
|
+
return style;
|
|
4031
|
+
}
|
|
3965
4032
|
let modal = null;
|
|
3966
4033
|
function getModal() {
|
|
3967
4034
|
if (modal)
|
|
@@ -3969,9 +4036,8 @@ function getModal() {
|
|
|
3969
4036
|
const root = document.createElement("div");
|
|
3970
4037
|
root.setAttribute("data-bounded-widget", "");
|
|
3971
4038
|
const shadow = root.attachShadow({ mode: "open" });
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
shadow.appendChild(style);
|
|
4039
|
+
if (!adoptStyles(shadow, [OVERLAY_CSS]))
|
|
4040
|
+
shadow.appendChild(styleTag(OVERLAY_CSS));
|
|
3975
4041
|
const overlay = document.createElement("div");
|
|
3976
4042
|
overlay.className = "bw-ov";
|
|
3977
4043
|
const back = document.createElement("div");
|
|
@@ -5970,7 +6036,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
5970
6036
|
// manager as legacy email sessions. Human login should be started
|
|
5971
6037
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
5972
6038
|
// logout surface for those sessions.
|
|
5973
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-
|
|
6039
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-Cr66GaKw.js'); })).EmailAuthProvider();
|
|
5974
6040
|
break;
|
|
5975
6041
|
case "phantom": {
|
|
5976
6042
|
// First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
|
|
@@ -6012,7 +6078,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6012
6078
|
// (bounded-login-widget.ts), so registration never counts as
|
|
6013
6079
|
// evidence the user has a wallet.
|
|
6014
6080
|
await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
|
|
6015
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
6081
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-Dqmk-m4V.js'); });
|
|
6016
6082
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
6017
6083
|
break;
|
|
6018
6084
|
}
|
|
@@ -6025,7 +6091,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6025
6091
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
6026
6092
|
// to point at a specific wallet or set chainId/domain.
|
|
6027
6093
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
6028
|
-
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-
|
|
6094
|
+
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-BDYWjIOQ.js'); });
|
|
6029
6095
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
6030
6096
|
break;
|
|
6031
6097
|
}
|
|
@@ -6050,7 +6116,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6050
6116
|
break;
|
|
6051
6117
|
case "guest":
|
|
6052
6118
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
6053
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
6119
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-CUNkZVFK.js'); })).GuestAuthProvider();
|
|
6054
6120
|
break;
|
|
6055
6121
|
}
|
|
6056
6122
|
if (!currentAuthProvider) {
|
|
@@ -6112,7 +6178,7 @@ async function signInAnonymously() {
|
|
|
6112
6178
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
6113
6179
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
6114
6180
|
// so bundle-splitting can see it.
|
|
6115
|
-
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
6181
|
+
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-CUNkZVFK.js'); })).GuestAuthProvider();
|
|
6116
6182
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
6117
6183
|
// adoptSessionProvider awaits only getConfig() (already resolved here) and then
|
|
6118
6184
|
// runs every write - provider/method/config/marker/user - in one synchronous
|
|
@@ -6283,7 +6349,7 @@ function ensureSharedWalletLoginReady() {
|
|
|
6283
6349
|
if (!sharedWalletReady) {
|
|
6284
6350
|
sharedWalletReady = (async () => {
|
|
6285
6351
|
await core.getConfig();
|
|
6286
|
-
await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
6352
|
+
await Promise.resolve().then(function () { return require('./injected-wallet-provider-Dqmk-m4V.js'); });
|
|
6287
6353
|
})().catch((error) => {
|
|
6288
6354
|
sharedWalletReady = null;
|
|
6289
6355
|
throw error;
|
|
@@ -6595,6 +6661,13 @@ function registerStorageBridge() {
|
|
|
6595
6661
|
void syncStoredSession().catch((error) => console.warn('Bounded session synchronization failed:', error));
|
|
6596
6662
|
});
|
|
6597
6663
|
}
|
|
6664
|
+
function sameSessionIdentity(next, previous) {
|
|
6665
|
+
if (!next || !previous)
|
|
6666
|
+
return false;
|
|
6667
|
+
const a = core.deriveUserIdentityFromIdToken(next);
|
|
6668
|
+
const b = core.deriveUserIdentityFromIdToken(previous);
|
|
6669
|
+
return !!a.id && a.id === b.id && a.address === b.address && a.email === b.email && a.evmAddress === b.evmAddress;
|
|
6670
|
+
}
|
|
6598
6671
|
async function syncStoredSession() {
|
|
6599
6672
|
const config = initializedConfig;
|
|
6600
6673
|
if (!config)
|
|
@@ -6603,6 +6676,18 @@ async function syncStoredSession() {
|
|
|
6603
6676
|
const issuer = core.WebSessionManager.getIssuer();
|
|
6604
6677
|
if (token === observedIdToken && issuer === observedIssuer)
|
|
6605
6678
|
return;
|
|
6679
|
+
// Another tab refreshed this same session (tokens rotate every few minutes):
|
|
6680
|
+
// who is signed in did not change, so keep the user and its live reads, whose
|
|
6681
|
+
// sockets take the new token on their own, instead of hiding and restoring it.
|
|
6682
|
+
if (currentUser && issuer === observedIssuer && sameSessionIdentity(token, observedIdToken)) {
|
|
6683
|
+
const record = await core.WebSessionManager.readSessionWithGeneration();
|
|
6684
|
+
if (config !== initializedConfig || core.WebSessionManager.getIdToken() !== token)
|
|
6685
|
+
return;
|
|
6686
|
+
if ((record === null || record === void 0 ? void 0 : record.idToken) === token && (!record.appId || record.appId === config.appId)) {
|
|
6687
|
+
observedIdToken = token;
|
|
6688
|
+
return;
|
|
6689
|
+
}
|
|
6690
|
+
}
|
|
6606
6691
|
observedIdToken = token;
|
|
6607
6692
|
observedIssuer = issuer;
|
|
6608
6693
|
const generation = ++initializationGeneration;
|
|
@@ -8812,10 +8897,12 @@ exports.signInAnonymously = signInAnonymously;
|
|
|
8812
8897
|
exports.signMessageWithTurnkey = signMessageWithTurnkey;
|
|
8813
8898
|
exports.signTransactionV1WithTurnkey = signTransactionV1WithTurnkey;
|
|
8814
8899
|
exports.signTransactionWithTurnkey = signTransactionWithTurnkey;
|
|
8900
|
+
exports.solanaMobileWalletAnswersSignInFromCache = solanaMobileWalletAnswersSignInFromCache;
|
|
8815
8901
|
exports.solanaMobileWalletLeavesPage = solanaMobileWalletLeavesPage;
|
|
8816
8902
|
exports.transactionHasSignature = transactionHasSignature;
|
|
8817
8903
|
exports.useAuth = useAuth;
|
|
8818
8904
|
exports.useBuildRun = useBuildRun;
|
|
8819
8905
|
exports.useQuery = useQuery;
|
|
8820
8906
|
exports.waitForAuthReady = waitForAuthReady;
|
|
8821
|
-
|
|
8907
|
+
exports.walletStandardFeatureName = walletStandardFeatureName;
|
|
8908
|
+
//# sourceMappingURL=index.native-DJSOqyKQ.js.map
|