@onekeyfe/onekey-sui-provider 1.1.27 → 1.1.28

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.
@@ -33,6 +33,8 @@ class ProviderSui extends ProviderSuiBase {
33
33
  this._handleDisconnected();
34
34
  });
35
35
  this.on(PROVIDER_EVENTS.message_low_level, (payload) => {
36
+ if (!payload)
37
+ return;
36
38
  const { method, params } = payload;
37
39
  if (isWalletEventMethodMatch({ method, name: PROVIDER_EVENTS.accountChanged })) {
38
40
  this._handleAccountChange(params);
@@ -70,7 +72,7 @@ class ProviderSui extends ProviderSuiBase {
70
72
  _handleAccountChange(payload) {
71
73
  const account = payload;
72
74
  if (this.isAccountsChanged(account)) {
73
- this.emit('accountChanged', account.address || null);
75
+ this.emit('accountChanged', (account === null || account === void 0 ? void 0 : account.address) || null);
74
76
  }
75
77
  if (!account) {
76
78
  this._handleDisconnected();
@@ -36,6 +36,8 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
36
36
  this._handleDisconnected();
37
37
  });
38
38
  this.on(PROVIDER_EVENTS.message_low_level, (payload) => {
39
+ if (!payload)
40
+ return;
39
41
  const { method, params } = payload;
40
42
  if (isWalletEventMethodMatch({ method, name: PROVIDER_EVENTS.accountChanged })) {
41
43
  this._handleAccountChange(params);
@@ -73,7 +75,7 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
73
75
  _handleAccountChange(payload) {
74
76
  const account = payload;
75
77
  if (this.isAccountsChanged(account)) {
76
- this.emit('accountChanged', account.address || null);
78
+ this.emit('accountChanged', (account === null || account === void 0 ? void 0 : account.address) || null);
77
79
  }
78
80
  if (!account) {
79
81
  this._handleDisconnected();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/onekey-sui-provider",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "keywords": [
5
5
  "cross-inpage-provider"
6
6
  ],
@@ -28,13 +28,13 @@
28
28
  "start": "tsc --watch"
29
29
  },
30
30
  "dependencies": {
31
- "@mysten/wallet-standard": "^0.5.1",
32
- "@onekeyfe/cross-inpage-provider-core": "1.1.27",
33
- "@onekeyfe/cross-inpage-provider-errors": "1.1.27",
34
- "@onekeyfe/cross-inpage-provider-types": "1.1.27",
35
- "@onekeyfe/extension-bridge-injected": "1.1.27",
31
+ "@mysten/wallet-standard": "^0.5.5",
32
+ "@onekeyfe/cross-inpage-provider-core": "1.1.28",
33
+ "@onekeyfe/cross-inpage-provider-errors": "1.1.28",
34
+ "@onekeyfe/cross-inpage-provider-types": "1.1.28",
35
+ "@onekeyfe/extension-bridge-injected": "1.1.28",
36
36
  "eth-rpc-errors": "^4.0.3",
37
37
  "mitt": "^3.0.0"
38
38
  },
39
- "gitHead": "88eab9a9526dad8c26b84f2f3f779f5927d6a6cf"
39
+ "gitHead": "5469ed1680c52acc985f6191bdbe2a102f848071"
40
40
  }