@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.js CHANGED
@@ -4608,13 +4608,13 @@ var WalletManager = class extends TypedEventEmitter {
4608
4608
  if (currentAddress === savedAddress.toLowerCase()) {
4609
4609
  console.debug("[WalletManager] Address matches, attempting connect (should be silent if already authorized)");
4610
4610
  try {
4611
- const account2 = await adapter.connect(data.primaryChainId);
4611
+ const account = await adapter.connect(data.primaryChainId);
4612
4612
  this.setPrimaryWallet(adapter);
4613
4613
  this.connectedWallets.set(adapter.chainType, adapter);
4614
4614
  this.setupAdapterListeners(adapter, true);
4615
- this.emit("accountChanged", account2);
4615
+ this.emit("accountChanged", account);
4616
4616
  console.debug("[WalletManager] Connect successful");
4617
- return account2;
4617
+ return account;
4618
4618
  } catch (connectError) {
4619
4619
  console.debug("[WalletManager] Connect failed (might be user rejection):", connectError?.message);
4620
4620
  return null;
@@ -4634,12 +4634,12 @@ var WalletManager = class extends TypedEventEmitter {
4634
4634
  try {
4635
4635
  const tronWeb = adapter.getTronWeb?.();
4636
4636
  if (tronWeb && tronWeb.defaultAddress?.base58) {
4637
- const account2 = await adapter.connect(data.primaryChainId);
4637
+ const account = await adapter.connect(data.primaryChainId);
4638
4638
  this.setPrimaryWallet(adapter);
4639
4639
  this.connectedWallets.set(adapter.chainType, adapter);
4640
4640
  this.setupAdapterListeners(adapter, true);
4641
- this.emit("accountChanged", account2);
4642
- return account2;
4641
+ this.emit("accountChanged", account);
4642
+ return account;
4643
4643
  }
4644
4644
  } catch (silentError) {
4645
4645
  console.debug("Silent TronLink connection failed:", silentError);
@@ -4650,14 +4650,14 @@ var WalletManager = class extends TypedEventEmitter {
4650
4650
  const wcAdapter = adapter;
4651
4651
  if (typeof wcAdapter.restoreSession === "function") {
4652
4652
  console.debug("[WalletManager] Attempting to restore WalletConnect Tron session...");
4653
- const account2 = await wcAdapter.restoreSession(data.primaryChainId);
4654
- if (account2) {
4653
+ const account = await wcAdapter.restoreSession(data.primaryChainId);
4654
+ if (account) {
4655
4655
  console.debug("[WalletManager] WalletConnect Tron session restored successfully");
4656
4656
  this.setPrimaryWallet(adapter);
4657
4657
  this.connectedWallets.set(adapter.chainType, adapter);
4658
4658
  this.setupAdapterListeners(adapter, true);
4659
- this.emit("accountChanged", account2);
4660
- return account2;
4659
+ this.emit("accountChanged", account);
4660
+ return account;
4661
4661
  } else {
4662
4662
  console.debug("[WalletManager] No valid WalletConnect Tron session found");
4663
4663
  return null;
@@ -4668,12 +4668,12 @@ var WalletManager = class extends TypedEventEmitter {
4668
4668
  return null;
4669
4669
  }
4670
4670
  }
4671
- const account = await adapter.connect(data.primaryChainId);
4672
- this.setPrimaryWallet(adapter);
4673
- this.connectedWallets.set(adapter.chainType, adapter);
4674
- this.setupAdapterListeners(adapter, true);
4675
- this.emit("accountChanged", account);
4676
- return account;
4671
+ console.debug(
4672
+ "[WalletManager] restoreFromStorage: no silent session; skipping interactive connect (type:",
4673
+ data.primaryWalletType,
4674
+ ")"
4675
+ );
4676
+ return null;
4677
4677
  } catch (error) {
4678
4678
  console.debug("Failed to restore wallet from storage:", error);
4679
4679
  return null;