@embarkai/ui-kit 0.3.0 → 0.3.1

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/index.js CHANGED
@@ -15499,7 +15499,7 @@ var init_package = __esm({
15499
15499
  "package.json"() {
15500
15500
  package_default = {
15501
15501
  name: "@embarkai/ui-kit",
15502
- version: "0.3.0",
15502
+ version: "0.3.1",
15503
15503
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
15504
15504
  type: "module",
15505
15505
  main: "./dist/index.cjs",
@@ -16366,19 +16366,8 @@ function WalletConnectHandler() {
16366
16366
  });
16367
16367
  setHasStartedLinking(true);
16368
16368
  setProviderType(null);
16369
- if (isConnected) {
16370
- disconnect();
16371
- setTimeout(() => {
16372
- setPage(null);
16373
- if (openConnectModal) {
16374
- openConnectModal();
16375
- } else {
16376
- console.error("[WalletConnectHandler] openConnectModal is undefined!");
16377
- setIsWalletLinking(false);
16378
- setHasStartedLinking(false);
16379
- }
16380
- }, 500);
16381
- } else {
16369
+ disconnect();
16370
+ setTimeout(() => {
16382
16371
  setPage(null);
16383
16372
  if (openConnectModal) {
16384
16373
  openConnectModal();
@@ -16387,7 +16376,7 @@ function WalletConnectHandler() {
16387
16376
  setIsWalletLinking(false);
16388
16377
  setHasStartedLinking(false);
16389
16378
  }
16390
- }
16379
+ }, 500);
16391
16380
  }
16392
16381
  if (!isWalletLinking && hasStartedLinking) {
16393
16382
  setHasStartedLinking(false);
@@ -16418,6 +16407,13 @@ function WalletConnectHandler() {
16418
16407
  disconnect();
16419
16408
  setIsWalletLinking(false);
16420
16409
  setHasStartedLinking(false);
16410
+ if (passportWalletAddress) {
16411
+ setManageWalletLinkError("Wallet connection timed out. Please try again.");
16412
+ setPage("manage-wallet" /* MANAGE_WALLET */);
16413
+ } else {
16414
+ setAuthError({ title: "Connection timed out", message: "Wallet did not respond. Please try again." });
16415
+ setPage("auth" /* AUTH */);
16416
+ }
16421
16417
  }, 12e4);
16422
16418
  return () => clearTimeout(timeout);
16423
16419
  }