From 5a5673e75e30ef5c94d2d8da508057b2361198a0 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Wed, 20 Nov 2024 11:31:31 -0800 Subject: [PATCH] fix(sdk): throw when enclave migration fails --- .../thirdweb/src/wallets/in-app/native/native-connector.ts | 5 ++--- .../thirdweb/src/wallets/in-app/web/lib/web-connector.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/thirdweb/src/wallets/in-app/native/native-connector.ts b/packages/thirdweb/src/wallets/in-app/native/native-connector.ts index c9ba843949c..15bf9b6becf 100644 --- a/packages/thirdweb/src/wallets/in-app/native/native-connector.ts +++ b/packages/thirdweb/src/wallets/in-app/native/native-connector.ts @@ -92,9 +92,8 @@ export class InAppNativeConnector implements InAppConnector { encryptionKey, }); } catch { - console.warn( - "Failed to migrate from sharded to enclave wallet, continuing with sharded wallet", - ); + console.error("Failed to migrate from sharded to enclave wallet"); + throw new Error("Something went wrong logging into your wallet"); } } diff --git a/packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts b/packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts index e6c990dc648..d8b9d439f44 100644 --- a/packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts +++ b/packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts @@ -110,9 +110,8 @@ export class InAppWebConnector implements InAppConnector { }, }); if (!result) { - console.warn( - "Failed to migrate from sharded to enclave wallet, continuing with sharded wallet", - ); + console.error("Failed to migrate from sharded to enclave wallet."); + throw new Error("Something went wrong logging into your wallet"); } }