Skip to content

Commit db54597

Browse files
committed
Update in-app-core.ts
1 parent 7e226d7 commit db54597

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ export function createInAppWallet(args: {
116116
account = connectedAccount;
117117
adminAccount = _adminAccount;
118118
chain = connectedChain;
119-
authToken = await connector.storage.getAuthCookie();
119+
try {
120+
authToken = await connector.storage.getAuthCookie();
121+
} catch (error) {
122+
console.error("Failed to retrieve auth token:", error);
123+
authToken = null;
124+
}
120125
trackConnect({
121126
client: options.client,
122127
ecosystem,
@@ -171,7 +176,12 @@ export function createInAppWallet(args: {
171176
account = connectedAccount;
172177
adminAccount = _adminAccount;
173178
chain = connectedChain;
174-
authToken = await connector.storage.getAuthCookie();
179+
try {
180+
authToken = await connector.storage.getAuthCookie();
181+
} catch (error) {
182+
console.error("Failed to retrieve auth token:", error);
183+
authToken = null;
184+
}
175185
trackConnect({
176186
client: options.client,
177187
ecosystem,

0 commit comments

Comments
 (0)