@dynamic-labs/sui 4.19.1 → 4.19.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
1
 
2
+ ### [4.19.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.2...v4.19.3) (2025-05-28)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * rerender issue with Slush wallet pop up appearing multiple times ([#8817](https://github.com/dynamic-labs/dynamic-auth/issues/8817)) ([bea0da6](https://github.com/dynamic-labs/dynamic-auth/commit/bea0da647bab983610ebbf18a6ca66ba0ac569bf))
8
+
9
+ ### [4.19.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.1...v4.19.2) (2025-05-27)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * always set the current wallet address when creating WalletClient for that wallet ([#8800](https://github.com/dynamic-labs/dynamic-auth/issues/8800)) ([3282902](https://github.com/dynamic-labs/dynamic-auth/commit/3282902581d429b66c91c533f5573964174e43d6))
15
+
2
16
  ### [4.19.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.0...v4.19.1) (2025-05-26)
3
17
 
4
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.19.1";
6
+ var version = "4.19.3";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.19.1";
2
+ var version = "4.19.3";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sui",
3
- "version": "4.19.1",
3
+ "version": "4.19.3",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "@mysten/wallet-standard": "0.13.29",
23
23
  "@mysten/sui": "1.24.0",
24
24
  "text-encoding": "0.7.0",
25
- "@dynamic-labs/assert-package-version": "4.19.1",
26
- "@dynamic-labs/logger": "4.19.1",
27
- "@dynamic-labs/rpc-providers": "4.19.1",
28
- "@dynamic-labs/types": "4.19.1",
29
- "@dynamic-labs/utils": "4.19.1",
30
- "@dynamic-labs/wallet-book": "4.19.1",
31
- "@dynamic-labs/wallet-connector-core": "4.19.1"
25
+ "@dynamic-labs/assert-package-version": "4.19.3",
26
+ "@dynamic-labs/logger": "4.19.3",
27
+ "@dynamic-labs/rpc-providers": "4.19.3",
28
+ "@dynamic-labs/types": "4.19.3",
29
+ "@dynamic-labs/utils": "4.19.3",
30
+ "@dynamic-labs/wallet-book": "4.19.3",
31
+ "@dynamic-labs/wallet-connector-core": "4.19.3"
32
32
  },
33
33
  "peerDependencies": {}
34
34
  }
@@ -24,6 +24,8 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
24
24
  this.canSetEventListeners = true;
25
25
  /** Sui clients */
26
26
  this.suiClients = {};
27
+ /** Whether the connector is currently attempting to connect */
28
+ this.isConnecting = false;
27
29
  this.name = name;
28
30
  this.wallet = opts.wallet;
29
31
  this.chainRpcProviders = opts.chainRpcProviders;
@@ -39,8 +41,8 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
39
41
  connect() {
40
42
  return _tslib.__awaiter(this, arguments, void 0, function* ({ silent } = {}) {
41
43
  var _a, _b;
42
- if (this.account) {
43
- // Account is already connected
44
+ if (this.account || this.isConnecting) {
45
+ // Account is already connected or we're already connecting
44
46
  return;
45
47
  }
46
48
  const connectFeature = (_a = this.getFeatures()) === null || _a === void 0 ? void 0 : _a['standard:connect'];
@@ -50,6 +52,8 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
50
52
  }
51
53
  throw new utils.DynamicError('Wallet does not support standard:connect');
52
54
  }
55
+ // Start connecting
56
+ this.isConnecting = true;
53
57
  this.logger.debug('[connect] Creating new connection');
54
58
  try {
55
59
  const response = yield connectFeature.connect(silent ? { silent } : undefined);
@@ -67,6 +71,9 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
67
71
  }
68
72
  throw new utils.DynamicError('Connection failed');
69
73
  }
74
+ finally {
75
+ this.isConnecting = false;
76
+ }
70
77
  this.setupEventListeners();
71
78
  });
72
79
  }
@@ -32,6 +32,8 @@ export declare abstract class SuiWalletConnector extends WalletConnectorBase<typ
32
32
  suiNetworks: GenericNetwork[];
33
33
  /** Dynamic logger */
34
34
  logger: Logger;
35
+ /** Whether the connector is currently attempting to connect */
36
+ protected isConnecting: boolean;
35
37
  constructor(name: string, opts: SuiWalletConnectorProps);
36
38
  /** Helper to return the wallet features */
37
39
  getFeatures(): SuiWalletFeatures | undefined;
@@ -20,6 +20,8 @@ class SuiWalletConnector extends WalletConnectorBase {
20
20
  this.canSetEventListeners = true;
21
21
  /** Sui clients */
22
22
  this.suiClients = {};
23
+ /** Whether the connector is currently attempting to connect */
24
+ this.isConnecting = false;
23
25
  this.name = name;
24
26
  this.wallet = opts.wallet;
25
27
  this.chainRpcProviders = opts.chainRpcProviders;
@@ -35,8 +37,8 @@ class SuiWalletConnector extends WalletConnectorBase {
35
37
  connect() {
36
38
  return __awaiter(this, arguments, void 0, function* ({ silent } = {}) {
37
39
  var _a, _b;
38
- if (this.account) {
39
- // Account is already connected
40
+ if (this.account || this.isConnecting) {
41
+ // Account is already connected or we're already connecting
40
42
  return;
41
43
  }
42
44
  const connectFeature = (_a = this.getFeatures()) === null || _a === void 0 ? void 0 : _a['standard:connect'];
@@ -46,6 +48,8 @@ class SuiWalletConnector extends WalletConnectorBase {
46
48
  }
47
49
  throw new DynamicError('Wallet does not support standard:connect');
48
50
  }
51
+ // Start connecting
52
+ this.isConnecting = true;
49
53
  this.logger.debug('[connect] Creating new connection');
50
54
  try {
51
55
  const response = yield connectFeature.connect(silent ? { silent } : undefined);
@@ -63,6 +67,9 @@ class SuiWalletConnector extends WalletConnectorBase {
63
67
  }
64
68
  throw new DynamicError('Connection failed');
65
69
  }
70
+ finally {
71
+ this.isConnecting = false;
72
+ }
66
73
  this.setupEventListeners();
67
74
  });
68
75
  }