Skip to content

Commit c191890

Browse files
committed
fix(sdk): throw when enclave migration fails
1 parent 4c8333d commit c191890

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/thirdweb/src/wallets/in-app/native/native-connector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ export class InAppNativeConnector implements InAppConnector {
9292
encryptionKey,
9393
});
9494
} catch {
95-
console.warn(
95+
console.error(
9696
"Failed to migrate from sharded to enclave wallet, continuing with sharded wallet",
9797
);
98+
throw new Error("Something went wrong logging into your wallet");
9899
}
99100
}
100101

packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ export class InAppWebConnector implements InAppConnector {
110110
},
111111
});
112112
if (!result) {
113-
console.warn(
113+
console.error(
114114
"Failed to migrate from sharded to enclave wallet, continuing with sharded wallet",
115115
);
116+
throw new Error("Something went wrong logging into your wallet");
116117
}
117118
}
118119

0 commit comments

Comments
 (0)