@portal-hq/connect 1.1.1 → 1.1.3

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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/src/index.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/connect",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
@@ -31,5 +31,6 @@
31
31
  "@portal-hq/core": "*",
32
32
  "react": "*",
33
33
  "react-native": "*"
34
- }
34
+ },
35
+ "gitHead": "169a9045d5cfb542b037a26d0ebcc53f51eec8dd"
35
36
  }
package/src/index.ts CHANGED
@@ -8,12 +8,13 @@ import type {
8
8
  SessionRequest,
9
9
  WebsocketMessage,
10
10
  } from '../types.d'
11
+ import { IPortalProvider } from '@portal-hq/utils'
11
12
  import { SwitchEthereumChainParameter } from '@portal-hq/provider/types'
12
13
 
13
14
  class PortalConnect {
14
15
  private apiKey: string
15
16
  private connectionState: ConnectionStates = ConnectionStates.DISCONNECTED
16
- private provider: Provider
17
+ private provider: IPortalProvider
17
18
  private socket?: WebSocket
18
19
  private topic?: string
19
20
  private uri?: string
@@ -130,7 +131,6 @@ class PortalConnect {
130
131
  public async setChainId(chainId: number): Promise<void> {
131
132
  this.provider.setChainId(chainId, this)
132
133
  }
133
-
134
134
 
135
135
  /**
136
136
  * Invokes all registered event handlers with the data provided
@@ -265,7 +265,7 @@ class PortalConnect {
265
265
  },
266
266
  }),
267
267
  )
268
- })
268
+ })
269
269
 
270
270
  socket.onerror = async (event: Event) => {
271
271
  let errorMessage = 'An unexpected error occurred.'