@dynamic-labs/solana 4.40.1 → 4.40.2

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,11 @@
1
1
 
2
+ ### [4.40.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.40.1...v4.40.2) (2025-10-28)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * upgrade node to 20.20 in sanity-yarn-add-sdk job for compatibility ([#9743](https://github.com/dynamic-labs/dynamic-auth/issues/9743)) ([58d7e32](https://github.com/dynamic-labs/dynamic-auth/commit/58d7e32cd3965fba983c91c6345eae3bfe8dd1d5))
8
+
2
9
  ### [4.40.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.40.0...v4.40.1) (2025-10-24)
3
10
 
4
11
  ### Bug Fixes
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.40.1";
6
+ var version = "4.40.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.40.1";
2
+ var version = "4.40.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana",
3
- "version": "4.40.1",
3
+ "version": "4.40.2",
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",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/wallet-connect": "4.40.1",
21
+ "@dynamic-labs/wallet-connect": "4.40.2",
22
22
  "@solana/web3.js": "1.98.1",
23
23
  "@wallet-standard/app": "1.0.1",
24
24
  "@wallet-standard/base": "1.0.1",
@@ -29,17 +29,17 @@
29
29
  "@walletconnect/sign-client": "2.21.5",
30
30
  "@walletconnect/utils": "2.21.5",
31
31
  "@walletconnect/types": "2.21.5",
32
- "@dynamic-labs/assert-package-version": "4.40.1",
33
- "@dynamic-labs/embedded-wallet-solana": "4.40.1",
34
- "@dynamic-labs/logger": "4.40.1",
35
- "@dynamic-labs/rpc-providers": "4.40.1",
32
+ "@dynamic-labs/assert-package-version": "4.40.2",
33
+ "@dynamic-labs/embedded-wallet-solana": "4.40.2",
34
+ "@dynamic-labs/logger": "4.40.2",
35
+ "@dynamic-labs/rpc-providers": "4.40.2",
36
36
  "@dynamic-labs/sdk-api-core": "0.0.813",
37
- "@dynamic-labs/solana-core": "4.40.1",
38
- "@dynamic-labs/types": "4.40.1",
39
- "@dynamic-labs/utils": "4.40.1",
40
- "@dynamic-labs/waas-svm": "4.40.1",
41
- "@dynamic-labs/wallet-book": "4.40.1",
42
- "@dynamic-labs/wallet-connector-core": "4.40.1",
37
+ "@dynamic-labs/solana-core": "4.40.2",
38
+ "@dynamic-labs/types": "4.40.2",
39
+ "@dynamic-labs/utils": "4.40.2",
40
+ "@dynamic-labs/waas-svm": "4.40.2",
41
+ "@dynamic-labs/wallet-book": "4.40.2",
42
+ "@dynamic-labs/wallet-connector-core": "4.40.2",
43
43
  "eventemitter3": "5.0.1"
44
44
  },
45
45
  "peerDependencies": {}
@@ -5,13 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../_virtual/_tslib.cjs');
7
7
  var utils = require('@dynamic-labs/utils');
8
+ var walletBook = require('@dynamic-labs/wallet-book');
8
9
  var InjectedWalletBase = require('../injected/InjectedWalletBase/InjectedWalletBase.cjs');
9
10
 
10
11
  class Solflare extends InjectedWalletBase.InjectedWalletBase {
11
- constructor() {
12
- super(...arguments);
12
+ constructor(props) {
13
+ super(props);
13
14
  this.name = 'Solflare';
14
15
  this.overrideKey = 'solflare';
16
+ this.walletConnectWalletBookEntry = walletBook.findWalletBookWallet(props.walletBook, this.key);
15
17
  }
16
18
  getAddress() {
17
19
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -1,7 +1,9 @@
1
+ import { SolanaWalletConnectorOpts } from '@dynamic-labs/solana-core';
1
2
  import { InjectedWalletBase } from '../injected/InjectedWalletBase';
2
3
  export declare class Solflare extends InjectedWalletBase {
3
4
  name: string;
4
5
  overrideKey: string;
6
+ constructor(props: SolanaWalletConnectorOpts);
5
7
  getAddress(): Promise<string | undefined>;
6
8
  signMessage(messageToSign: string): Promise<string | undefined>;
7
9
  }
@@ -1,13 +1,15 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../_virtual/_tslib.js';
3
3
  import { isMobile, handleMobileWalletRedirect, bufferToBase64 } from '@dynamic-labs/utils';
4
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
4
5
  import { InjectedWalletBase } from '../injected/InjectedWalletBase/InjectedWalletBase.js';
5
6
 
6
7
  class Solflare extends InjectedWalletBase {
7
- constructor() {
8
- super(...arguments);
8
+ constructor(props) {
9
+ super(props);
9
10
  this.name = 'Solflare';
10
11
  this.overrideKey = 'solflare';
12
+ this.walletConnectWalletBookEntry = findWalletBookWallet(props.walletBook, this.key);
11
13
  }
12
14
  getAddress() {
13
15
  return __awaiter(this, void 0, void 0, function* () {
package/src/index.cjs CHANGED
@@ -12,7 +12,6 @@ var SolanaWalletConnectors = require('./SolanaWalletConnectors.cjs');
12
12
  var SolanaWalletConnectorsWithConfig = require('./SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.cjs');
13
13
  var isBackpackSolanaSigner = require('./utils/isBackpackSolanaSigner.cjs');
14
14
  var isSignedMessage = require('./utils/isSignedMessage.cjs');
15
- require('@dynamic-labs/wallet-book');
16
15
  require('@dynamic-labs/wallet-connector-core');
17
16
  require('@dynamic-labs/utils');
18
17
  require('./CoinbaseSolana/CoinbaseSolana.cjs');
package/src/index.js CHANGED
@@ -8,7 +8,6 @@ export { SolanaWalletConnectors } from './SolanaWalletConnectors.js';
8
8
  export { SolanaWalletConnectorsWithConfig } from './SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.js';
9
9
  export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner.js';
10
10
  export { isSignedMessage } from './utils/isSignedMessage.js';
11
- import '@dynamic-labs/wallet-book';
12
11
  import '@dynamic-labs/wallet-connector-core';
13
12
  import '@dynamic-labs/utils';
14
13
  import './CoinbaseSolana/CoinbaseSolana.js';
@@ -5,13 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../_virtual/_tslib.cjs');
7
7
  var utils = require('@dynamic-labs/utils');
8
+ var walletBook = require('@dynamic-labs/wallet-book');
8
9
  var InjectedWalletBase = require('../InjectedWalletBase/InjectedWalletBase.cjs');
9
10
 
10
11
  class BackpackSol extends InjectedWalletBase.InjectedWalletBase {
11
- constructor() {
12
- super(...arguments);
12
+ constructor(props) {
13
+ super(props);
13
14
  this.name = 'Backpack';
14
15
  this.overrideKey = 'backpacksol';
16
+ this.walletConnectWalletBookEntry = walletBook.findWalletBookWallet(props.walletBook, this.key);
15
17
  }
16
18
  getSigner() {
17
19
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -1,7 +1,9 @@
1
+ import { SolanaWalletConnectorOpts } from '@dynamic-labs/solana-core';
1
2
  import { InjectedWalletBase } from '../InjectedWalletBase';
2
3
  export declare class BackpackSol extends InjectedWalletBase {
3
4
  name: string;
4
5
  overrideKey: string;
6
+ constructor(props: SolanaWalletConnectorOpts);
5
7
  getSigner<IBackpackSolanaSigner>(): Promise<IBackpackSolanaSigner | undefined>;
6
8
  signMessage(messageToSign: string): Promise<string | undefined>;
7
9
  }
@@ -1,13 +1,15 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../_virtual/_tslib.js';
3
3
  import { bufferToBase64 } from '@dynamic-labs/utils';
4
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
4
5
  import { InjectedWalletBase } from '../InjectedWalletBase/InjectedWalletBase.js';
5
6
 
6
7
  class BackpackSol extends InjectedWalletBase {
7
- constructor() {
8
- super(...arguments);
8
+ constructor(props) {
9
+ super(props);
9
10
  this.name = 'Backpack';
10
11
  this.overrideKey = 'backpacksol';
12
+ this.walletConnectWalletBookEntry = findWalletBookWallet(props.walletBook, this.key);
11
13
  }
12
14
  getSigner() {
13
15
  return __awaiter(this, void 0, void 0, function* () {
@@ -36,10 +36,7 @@ class InjectedWalletBase extends solanaCore.SolanaWalletConnector {
36
36
  return this;
37
37
  }
38
38
  // if the wallet is not installed on the browser and WC is available, return the WC connector
39
- const wcConnector = new SolanaWalletConnectConnector.SolanaWalletConnectConnector(Object.assign(Object.assign({}, this.constructorProps), { metadata: walletConnectorCore.getWalletMetadataFromWalletBook({
40
- walletBookWallet: this.walletConnectWalletBookEntry,
41
- walletKey: this.key,
42
- }), overrideKey: this.key, walletName: this.name }));
39
+ const wcConnector = new SolanaWalletConnectConnector.SolanaWalletConnectConnector(Object.assign(Object.assign({}, this.constructorProps), { metadata: walletConnectorCore.getWalletMetadataFromWalletBook(Object.assign(Object.assign({}, this.metadata), { walletBookWallet: this.walletConnectWalletBookEntry, walletKey: this.key })), overrideKey: this.key, walletName: this.name }));
43
40
  wcConnector.init();
44
41
  return wcConnector;
45
42
  }
@@ -32,10 +32,7 @@ class InjectedWalletBase extends SolanaWalletConnector {
32
32
  return this;
33
33
  }
34
34
  // if the wallet is not installed on the browser and WC is available, return the WC connector
35
- const wcConnector = new SolanaWalletConnectConnector(Object.assign(Object.assign({}, this.constructorProps), { metadata: getWalletMetadataFromWalletBook({
36
- walletBookWallet: this.walletConnectWalletBookEntry,
37
- walletKey: this.key,
38
- }), overrideKey: this.key, walletName: this.name }));
35
+ const wcConnector = new SolanaWalletConnectConnector(Object.assign(Object.assign({}, this.constructorProps), { metadata: getWalletMetadataFromWalletBook(Object.assign(Object.assign({}, this.metadata), { walletBookWallet: this.walletConnectWalletBookEntry, walletKey: this.key })), overrideKey: this.key, walletName: this.name }));
39
36
  wcConnector.init();
40
37
  return wcConnector;
41
38
  }
@@ -3,7 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var walletBook = require('@dynamic-labs/wallet-book');
7
6
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
8
7
  var utils = require('@dynamic-labs/utils');
9
8
  var CoinbaseSolana = require('../CoinbaseSolana/CoinbaseSolana.cjs');
@@ -53,9 +52,9 @@ const shouldAddWalletStandardConnector = (wallet, walletBook, authMode) => {
53
52
  });
54
53
  return !shouldHandleFromWalletBook && hasAllFeatures;
55
54
  };
56
- const fetchInjectedWalletConnectors = ({ walletBook: walletBook$1, authMode, }) => {
55
+ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
57
56
  var _a;
58
- const walletBookConnectors = Object.entries((_a = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _a !== void 0 ? _a : {})
57
+ const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
59
58
  .filter(([key, wallet]) => {
60
59
  var _a, _b, _c;
61
60
  const injectedConfig = (_a = wallet.injectedConfig) === null || _a === void 0 ? void 0 : _a.find((config) => config.chain === 'sol');
@@ -66,21 +65,26 @@ const fetchInjectedWalletConnectors = ({ walletBook: walletBook$1, authMode, })
66
65
  ((_c = (_b = injectedConfig === null || injectedConfig === void 0 ? void 0 : injectedConfig.walletStandard) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.length);
67
66
  return isSolanaWallet && !shouldBeFiltered;
68
67
  })
69
- .map(([key, wallet]) => getConnectorConstructorInjectedWallet.getConnectorConstructorInjectedWallet({ key, wallet, walletBook: walletBook$1 }));
68
+ .map(([key, wallet]) => getConnectorConstructorInjectedWallet.getConnectorConstructorInjectedWallet({ key, wallet, walletBook }));
70
69
  const walletStandardWallets = getWalletStandardWallets.getWalletStandardWallets();
71
70
  const walletStandardConnectors = walletStandardWallets
72
- .filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook$1, authMode))
71
+ .filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook, authMode))
73
72
  .map((wallet) => {
74
- const walletBookWallet = walletBook.findWalletBookWalletByNameAndChain(walletBook$1, wallet.name, 'sol');
73
+ var _a, _b;
74
+ const [walletBookKey, walletBookWallet] = (_b = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).find(([, walletBookEntry]) => {
75
+ var _a, _b;
76
+ return walletBookEntry.name === wallet.name &&
77
+ ((_b = (_a = walletBookEntry.injectedConfig) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.chain) === 'sol';
78
+ })) !== null && _b !== void 0 ? _b : [];
75
79
  // if the wallet book wallet is found, we want to use it to get the metadata
76
80
  // to merge with the wallet standard metadata, specially the supportedHardwareWallets prop
77
81
  const walletBookMetadata = walletBookWallet &&
78
82
  walletConnectorCore.getWalletMetadataFromWalletBook({
79
- walletBook: walletBook$1,
83
+ walletBook,
80
84
  walletBookWallet,
81
- walletKey: `sanitizeName(${wallet.name})sol`,
85
+ walletKey: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : `${utils.sanitizeName(wallet.name)}sol`,
82
86
  });
83
- return getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata);
87
+ return getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletBookKey);
84
88
  });
85
89
  logger.logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] walletStandardConnectors', walletStandardConnectors.map((w) => w.name));
86
90
  return [...walletBookConnectors, ...walletStandardConnectors];
@@ -1,5 +1,4 @@
1
1
  'use client'
2
- import { findWalletBookWalletByNameAndChain } from '@dynamic-labs/wallet-book';
3
2
  import { getWalletMetadataFromWalletBook } from '@dynamic-labs/wallet-connector-core';
4
3
  import { sanitizeName } from '@dynamic-labs/utils';
5
4
  import { CoinbaseSolana } from '../CoinbaseSolana/CoinbaseSolana.js';
@@ -67,16 +66,21 @@ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
67
66
  const walletStandardConnectors = walletStandardWallets
68
67
  .filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook, authMode))
69
68
  .map((wallet) => {
70
- const walletBookWallet = findWalletBookWalletByNameAndChain(walletBook, wallet.name, 'sol');
69
+ var _a, _b;
70
+ const [walletBookKey, walletBookWallet] = (_b = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).find(([, walletBookEntry]) => {
71
+ var _a, _b;
72
+ return walletBookEntry.name === wallet.name &&
73
+ ((_b = (_a = walletBookEntry.injectedConfig) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.chain) === 'sol';
74
+ })) !== null && _b !== void 0 ? _b : [];
71
75
  // if the wallet book wallet is found, we want to use it to get the metadata
72
76
  // to merge with the wallet standard metadata, specially the supportedHardwareWallets prop
73
77
  const walletBookMetadata = walletBookWallet &&
74
78
  getWalletMetadataFromWalletBook({
75
79
  walletBook,
76
80
  walletBookWallet,
77
- walletKey: `sanitizeName(${wallet.name})sol`,
81
+ walletKey: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : `${sanitizeName(wallet.name)}sol`,
78
82
  });
79
- return getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata);
83
+ return getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletBookKey);
80
84
  });
81
85
  logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] walletStandardConnectors', walletStandardConnectors.map((w) => w.name));
82
86
  return [...walletBookConnectors, ...walletStandardConnectors];
@@ -7,9 +7,9 @@ var utils = require('@dynamic-labs/utils');
7
7
  var InjectedWalletBase = require('../../InjectedWalletBase/InjectedWalletBase.cjs');
8
8
  var createSolanaSignerFromWalletStandard = require('../createSolanaSignerFromWalletStandard/createSolanaSignerFromWalletStandard.cjs');
9
9
 
10
- const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}) => {
10
+ const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}, walletBookKey = undefined) => {
11
11
  const sanitizedName = utils.sanitizeName(wallet.name);
12
- return class extends InjectedWalletBase.InjectedWalletBase {
12
+ const ConnectorConstructor = class extends InjectedWalletBase.InjectedWalletBase {
13
13
  constructor(props) {
14
14
  super(Object.assign(Object.assign({}, props), { metadata: Object.assign(Object.assign({}, walletBookMetadata), { groupKey: sanitizedName, icon: wallet.icon, id: sanitizedName, name: wallet.name }) }));
15
15
  this.name = wallet.name;
@@ -23,6 +23,11 @@ const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetada
23
23
  return this._provider;
24
24
  }
25
25
  };
26
+ Object.defineProperty(ConnectorConstructor, 'key', {
27
+ value: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : sanitizedName,
28
+ writable: false,
29
+ });
30
+ return ConnectorConstructor;
26
31
  };
27
32
 
28
33
  exports.getConnectorConstructorForWalletStandardWallet = getConnectorConstructorForWalletStandardWallet;
@@ -1,3 +1,3 @@
1
1
  import { Wallet } from '@wallet-standard/base';
2
2
  import { WalletConnectorConstructor, WalletMetadata } from '@dynamic-labs/wallet-connector-core';
3
- export declare const getConnectorConstructorForWalletStandardWallet: (wallet: Wallet, walletBookMetadata?: Partial<WalletMetadata>) => WalletConnectorConstructor;
3
+ export declare const getConnectorConstructorForWalletStandardWallet: (wallet: Wallet, walletBookMetadata?: Partial<WalletMetadata>, walletBookKey?: string | undefined) => WalletConnectorConstructor;
@@ -3,9 +3,9 @@ import { sanitizeName } from '@dynamic-labs/utils';
3
3
  import { InjectedWalletBase } from '../../InjectedWalletBase/InjectedWalletBase.js';
4
4
  import { createSolanaSignerFromWalletStandard } from '../createSolanaSignerFromWalletStandard/createSolanaSignerFromWalletStandard.js';
5
5
 
6
- const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}) => {
6
+ const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}, walletBookKey = undefined) => {
7
7
  const sanitizedName = sanitizeName(wallet.name);
8
- return class extends InjectedWalletBase {
8
+ const ConnectorConstructor = class extends InjectedWalletBase {
9
9
  constructor(props) {
10
10
  super(Object.assign(Object.assign({}, props), { metadata: Object.assign(Object.assign({}, walletBookMetadata), { groupKey: sanitizedName, icon: wallet.icon, id: sanitizedName, name: wallet.name }) }));
11
11
  this.name = wallet.name;
@@ -19,6 +19,11 @@ const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetada
19
19
  return this._provider;
20
20
  }
21
21
  };
22
+ Object.defineProperty(ConnectorConstructor, 'key', {
23
+ value: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : sanitizedName,
24
+ writable: false,
25
+ });
26
+ return ConnectorConstructor;
22
27
  };
23
28
 
24
29
  export { getConnectorConstructorForWalletStandardWallet };
@@ -189,6 +189,9 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
189
189
  return _tslib.__awaiter(this, void 0, void 0, function* () {
190
190
  var _a;
191
191
  logger.logger.debug('[SolanaWalletConnect] getAddress', opts);
192
+ if (this.session) {
193
+ return this.getActiveAddress();
194
+ }
192
195
  /**
193
196
  * In mobile/Safari, if the user just navigates back after the deeplink prompt the connection
194
197
  * is not rejected, so the previous connection URI is still valid and we can use it to handle the connection
@@ -198,10 +201,6 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
198
201
  this.displayUri(opts);
199
202
  return;
200
203
  }
201
- /**
202
- * If we are already connected to a session, we need to end it first
203
- */
204
- yield this.endSession();
205
204
  logger.logger.logVerboseTroubleshootingMessage('[WalletConnectConnector] getAddress', {
206
205
  inAppBrowserUrl: (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl,
207
206
  isMobile: utils.isMobile(),
@@ -180,6 +180,9 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
180
180
  return __awaiter(this, void 0, void 0, function* () {
181
181
  var _a;
182
182
  logger.debug('[SolanaWalletConnect] getAddress', opts);
183
+ if (this.session) {
184
+ return this.getActiveAddress();
185
+ }
183
186
  /**
184
187
  * In mobile/Safari, if the user just navigates back after the deeplink prompt the connection
185
188
  * is not rejected, so the previous connection URI is still valid and we can use it to handle the connection
@@ -189,10 +192,6 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
189
192
  this.displayUri(opts);
190
193
  return;
191
194
  }
192
- /**
193
- * If we are already connected to a session, we need to end it first
194
- */
195
- yield this.endSession();
196
195
  logger.logVerboseTroubleshootingMessage('[WalletConnectConnector] getAddress', {
197
196
  inAppBrowserUrl: (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl,
198
197
  isMobile: isMobile(),