@enclave-hq/wallet-sdk 1.2.5 → 1.2.7

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.mjs CHANGED
@@ -5291,13 +5291,13 @@ var WalletManager = class extends TypedEventEmitter {
5291
5291
  if (currentAddress === savedAddress.toLowerCase()) {
5292
5292
  console.debug("[WalletManager] Address matches, attempting connect (should be silent if already authorized)");
5293
5293
  try {
5294
- const account2 = await adapter.connect(data.primaryChainId);
5294
+ const account = await adapter.connect(data.primaryChainId);
5295
5295
  this.setPrimaryWallet(adapter);
5296
5296
  this.connectedWallets.set(adapter.chainType, adapter);
5297
5297
  this.setupAdapterListeners(adapter, true);
5298
- this.emit("accountChanged", account2);
5298
+ this.emit("accountChanged", account);
5299
5299
  console.debug("[WalletManager] Connect successful");
5300
- return account2;
5300
+ return account;
5301
5301
  } catch (connectError) {
5302
5302
  console.debug("[WalletManager] Connect failed (might be user rejection):", connectError?.message);
5303
5303
  return null;
@@ -5317,12 +5317,12 @@ var WalletManager = class extends TypedEventEmitter {
5317
5317
  try {
5318
5318
  const tronWeb = adapter.getTronWeb?.();
5319
5319
  if (tronWeb && tronWeb.defaultAddress?.base58) {
5320
- const account2 = await adapter.connect(data.primaryChainId);
5320
+ const account = await adapter.connect(data.primaryChainId);
5321
5321
  this.setPrimaryWallet(adapter);
5322
5322
  this.connectedWallets.set(adapter.chainType, adapter);
5323
5323
  this.setupAdapterListeners(adapter, true);
5324
- this.emit("accountChanged", account2);
5325
- return account2;
5324
+ this.emit("accountChanged", account);
5325
+ return account;
5326
5326
  }
5327
5327
  } catch (silentError) {
5328
5328
  console.debug("Silent TronLink connection failed:", silentError);
@@ -5333,14 +5333,14 @@ var WalletManager = class extends TypedEventEmitter {
5333
5333
  const wcAdapter = adapter;
5334
5334
  if (typeof wcAdapter.restoreSession === "function") {
5335
5335
  console.debug("[WalletManager] Attempting to restore WalletConnect Tron session...");
5336
- const account2 = await wcAdapter.restoreSession(data.primaryChainId);
5337
- if (account2) {
5336
+ const account = await wcAdapter.restoreSession(data.primaryChainId);
5337
+ if (account) {
5338
5338
  console.debug("[WalletManager] WalletConnect Tron session restored successfully");
5339
5339
  this.setPrimaryWallet(adapter);
5340
5340
  this.connectedWallets.set(adapter.chainType, adapter);
5341
5341
  this.setupAdapterListeners(adapter, true);
5342
- this.emit("accountChanged", account2);
5343
- return account2;
5342
+ this.emit("accountChanged", account);
5343
+ return account;
5344
5344
  } else {
5345
5345
  console.debug("[WalletManager] No valid WalletConnect Tron session found");
5346
5346
  return null;
@@ -5351,12 +5351,12 @@ var WalletManager = class extends TypedEventEmitter {
5351
5351
  return null;
5352
5352
  }
5353
5353
  }
5354
- const account = await adapter.connect(data.primaryChainId);
5355
- this.setPrimaryWallet(adapter);
5356
- this.connectedWallets.set(adapter.chainType, adapter);
5357
- this.setupAdapterListeners(adapter, true);
5358
- this.emit("accountChanged", account);
5359
- return account;
5354
+ console.debug(
5355
+ "[WalletManager] restoreFromStorage: no silent session; skipping interactive connect (type:",
5356
+ data.primaryWalletType,
5357
+ ")"
5358
+ );
5359
+ return null;
5360
5360
  } catch (error) {
5361
5361
  console.debug("Failed to restore wallet from storage:", error);
5362
5362
  return null;