tiwiflix-wallet-connector 1.6.0 → 1.6.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.esm.js CHANGED
@@ -3529,9 +3529,13 @@ class MetamaskAdapter extends EVMBaseAdapter {
3529
3529
  // Debug mode - safe environment check for browser
3530
3530
  this.debugMode = isDevelopmentMode();
3531
3531
  }
3532
- // Always show MetaMask as available; we'll connect via SDK or injected provider at runtime
3532
+ // Only show MetaMask as available if detected
3533
3533
  isAvailable() {
3534
- return true;
3534
+ if (typeof window === 'undefined')
3535
+ return false;
3536
+ // Check for injected MetaMask provider
3537
+ const provider = this.getInjectedProvider();
3538
+ return !!provider;
3535
3539
  }
3536
3540
  /**
3537
3541
  * Debug logging utility
@@ -5077,13 +5081,10 @@ class TONBaseAdapter extends BaseWalletAdapter {
5077
5081
  return 'https://app.tiwiflix.xyz/manifest.json';
5078
5082
  }
5079
5083
  isAvailable() {
5080
- // Check if we're in a browser environment
5084
+ // Only show TON wallet as available if a TON wallet is detected (extension or injected)
5081
5085
  if (typeof window === 'undefined')
5082
5086
  return false;
5083
- // TON Connect works via QR code and deep links even without browser extensions
5084
- // So we should always return true in browser environment
5085
- // The SDK will be loaded dynamically during connect()
5086
- return true;
5087
+ return this.checkForTonWalletExtensions();
5087
5088
  }
5088
5089
  /**
5089
5090
  * @deprecated No longer used - TonConnect UI is loaded dynamically
package/dist/index.js CHANGED
@@ -3531,9 +3531,13 @@ class MetamaskAdapter extends EVMBaseAdapter {
3531
3531
  // Debug mode - safe environment check for browser
3532
3532
  this.debugMode = isDevelopmentMode();
3533
3533
  }
3534
- // Always show MetaMask as available; we'll connect via SDK or injected provider at runtime
3534
+ // Only show MetaMask as available if detected
3535
3535
  isAvailable() {
3536
- return true;
3536
+ if (typeof window === 'undefined')
3537
+ return false;
3538
+ // Check for injected MetaMask provider
3539
+ const provider = this.getInjectedProvider();
3540
+ return !!provider;
3537
3541
  }
3538
3542
  /**
3539
3543
  * Debug logging utility
@@ -5079,13 +5083,10 @@ class TONBaseAdapter extends BaseWalletAdapter {
5079
5083
  return 'https://app.tiwiflix.xyz/manifest.json';
5080
5084
  }
5081
5085
  isAvailable() {
5082
- // Check if we're in a browser environment
5086
+ // Only show TON wallet as available if a TON wallet is detected (extension or injected)
5083
5087
  if (typeof window === 'undefined')
5084
5088
  return false;
5085
- // TON Connect works via QR code and deep links even without browser extensions
5086
- // So we should always return true in browser environment
5087
- // The SDK will be loaded dynamically during connect()
5088
- return true;
5089
+ return this.checkForTonWalletExtensions();
5089
5090
  }
5090
5091
  /**
5091
5092
  * @deprecated No longer used - TonConnect UI is loaded dynamically
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiwiflix-wallet-connector",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Multi-chain wallet connector for Tiwiflix supporting EVM, TON, Solana, and Tron wallets",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",