Skip to content

Commit 3f6f8cb

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

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
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,

packages/thirdweb/src/wallets/native/create-wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import type {
4141
*/
4242
export function createWallet<const ID extends WalletId>(
4343
...args: CreateWalletArgs<ID>
44-
) {
44+
): Wallet<ID> {
4545
const [id, creationOptions] = args;
4646

4747
switch (true) {

0 commit comments

Comments
 (0)