@btc-vision/walletconnect 1.7.0 → 1.9.0

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.
@@ -9,6 +9,9 @@ class OPWallet {
9
9
  this._isConnected = false;
10
10
  }
11
11
  isInstalled() {
12
+ if (typeof window === 'undefined') {
13
+ return false;
14
+ }
12
15
  this.walletBase = window.opnet;
13
16
  return !!this.walletBase;
14
17
  }
@@ -9,6 +9,9 @@ class UnisatWallet {
9
9
  this._isConnected = false;
10
10
  }
11
11
  isInstalled() {
12
+ if (typeof window === 'undefined') {
13
+ return false;
14
+ }
12
15
  this.walletBase = window.unisat;
13
16
  return !!this.walletBase;
14
17
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/walletconnect",
3
3
  "type": "module",
4
- "version": "1.7.0",
4
+ "version": "1.9.0",
5
5
  "author": "impredmet",
6
6
  "description": "The OP_NET Wallet Connect library helps your dApp connect to any compatible wallet.",
7
7
  "engines": {
@@ -18,6 +18,9 @@ class OPWallet implements WalletBase {
18
18
  private _isConnected: boolean = false;
19
19
 
20
20
  isInstalled() {
21
+ if (typeof window === 'undefined') {
22
+ return false;
23
+ }
21
24
  this.walletBase = (window as unknown as OPWalletWindow).opnet;
22
25
  return !!this.walletBase;
23
26
  }
@@ -23,6 +23,9 @@ class UnisatWallet implements WalletBase {
23
23
  private _isConnected: boolean = false;
24
24
 
25
25
  isInstalled() {
26
+ if (typeof window === 'undefined') {
27
+ return false;
28
+ }
26
29
  this.walletBase = (window as unknown as UnisatWalletWindow).unisat;
27
30
  return !!this.walletBase;
28
31
  }