@dynamic-labs/solana 4.53.0 → 4.53.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 +18 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/SolanaWalletConnectors.cjs +7 -1
- package/src/SolanaWalletConnectors.js +7 -1
- package/src/index.cjs +1 -0
- package/src/index.js +1 -0
- package/src/injected/fetchInjectedWalletConnectors.cjs +33 -1
- package/src/injected/fetchInjectedWalletConnectors.js +34 -2
- package/src/injected/walletStandard/getWalletStandardWallets/getWalletStandardWallets.cjs +7 -1
- package/src/injected/walletStandard/getWalletStandardWallets/getWalletStandardWallets.d.ts +7 -1
- package/src/injected/walletStandard/getWalletStandardWallets/getWalletStandardWallets.js +7 -1
- package/src/walletConnect/SolanaWalletConnectConnector/SolanaWalletConnectConnector.cjs +15 -0
- package/src/walletConnect/SolanaWalletConnectConnector/SolanaWalletConnectConnector.d.ts +15 -0
- package/src/walletConnect/SolanaWalletConnectConnector/SolanaWalletConnectConnector.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.53.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.53.1...v4.53.2) (2026-01-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add iCloud backup functionality ([#10219](https://github.com/dynamic-labs/dynamic-auth/issues/10219)) ([44e95e5](https://github.com/dynamic-labs/dynamic-auth/commit/44e95e5a5dc99f83918a382ab1c69d452359c346))
|
|
8
|
+
* update PSBT building with Largest-First UTXO selection and fee priorities (high/medium/low) ([#10227](https://github.com/dynamic-labs/dynamic-auth/issues/10227)) ([94c5f5c](https://github.com/dynamic-labs/dynamic-auth/commit/94c5f5cb97432bb97374b754cb95bc23290dd184))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* allow late registered solana wallets to appear in the wallet list ([#10224](https://github.com/dynamic-labs/dynamic-auth/issues/10224)) ([2f418d4](https://github.com/dynamic-labs/dynamic-auth/commit/2f418d4f3e0543bdd829a45807329f89da1e41a7))
|
|
14
|
+
* correctly show app name in wallet app for wallet connect evm connections ([#10218](https://github.com/dynamic-labs/dynamic-auth/issues/10218)) ([fec0009](https://github.com/dynamic-labs/dynamic-auth/commit/fec0009177439baa67015050b4ad799119615f4f))
|
|
15
|
+
* destructure wallets from getWalletStandardWallets before calling find ([#10234](https://github.com/dynamic-labs/dynamic-auth/issues/10234)) ([b59617a](https://github.com/dynamic-labs/dynamic-auth/commit/b59617a8579b9c7d8a5f744a2ea9363ccb4aee58))
|
|
16
|
+
* **react-native:** filter connectors by enabled chains and add chain parameter to connectWallet ([#10230](https://github.com/dynamic-labs/dynamic-auth/issues/10230)) ([a2bbd03](https://github.com/dynamic-labs/dynamic-auth/commit/a2bbd03ece52950711d2eda18cb2345df15710dd))
|
|
17
|
+
|
|
18
|
+
### [4.53.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.53.0...v4.53.1) (2026-01-14)
|
|
19
|
+
|
|
2
20
|
## [4.53.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.52.5...v4.53.0) (2026-01-13)
|
|
3
21
|
|
|
4
22
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "4.53.
|
|
3
|
+
"version": "4.53.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.53.
|
|
21
|
+
"@dynamic-labs/wallet-connect": "4.53.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.53.
|
|
33
|
-
"@dynamic-labs/embedded-wallet-solana": "4.53.
|
|
34
|
-
"@dynamic-labs/logger": "4.53.
|
|
35
|
-
"@dynamic-labs/rpc-providers": "4.53.
|
|
36
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
37
|
-
"@dynamic-labs/solana-core": "4.53.
|
|
38
|
-
"@dynamic-labs/types": "4.53.
|
|
39
|
-
"@dynamic-labs/utils": "4.53.
|
|
40
|
-
"@dynamic-labs/waas-svm": "4.53.
|
|
41
|
-
"@dynamic-labs/wallet-book": "4.53.
|
|
42
|
-
"@dynamic-labs/wallet-connector-core": "4.53.
|
|
32
|
+
"@dynamic-labs/assert-package-version": "4.53.2",
|
|
33
|
+
"@dynamic-labs/embedded-wallet-solana": "4.53.2",
|
|
34
|
+
"@dynamic-labs/logger": "4.53.2",
|
|
35
|
+
"@dynamic-labs/rpc-providers": "4.53.2",
|
|
36
|
+
"@dynamic-labs/sdk-api-core": "0.0.855",
|
|
37
|
+
"@dynamic-labs/solana-core": "4.53.2",
|
|
38
|
+
"@dynamic-labs/types": "4.53.2",
|
|
39
|
+
"@dynamic-labs/utils": "4.53.2",
|
|
40
|
+
"@dynamic-labs/waas-svm": "4.53.2",
|
|
41
|
+
"@dynamic-labs/wallet-book": "4.53.2",
|
|
42
|
+
"@dynamic-labs/wallet-connector-core": "4.53.2",
|
|
43
43
|
"eventemitter3": "5.0.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {}
|
|
@@ -19,6 +19,8 @@ var addSolanaWalletConnectConnectors = require('./walletConnect/utils/addSolanaW
|
|
|
19
19
|
const SolanaWalletConnectors = (
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
props) => {
|
|
22
|
+
const solNetworks = props.solNetworks || [];
|
|
23
|
+
const hasSolanaNetworks = solNetworks.length > 0;
|
|
22
24
|
const initialConnectors = [
|
|
23
25
|
...fetchInjectedWalletConnectors.injectedWalletOverrides,
|
|
24
26
|
...fetchInjectedWalletConnectors.fetchInjectedWalletConnectors(props),
|
|
@@ -26,8 +28,12 @@ props) => {
|
|
|
26
28
|
...waasSvm.DynamicWaasSVMConnectors(),
|
|
27
29
|
Phantom.Phantom,
|
|
28
30
|
FallbackSolanaConnector.FallbackSolanaConnector,
|
|
29
|
-
getSolanaWalletConnectConnector.getSolanaWalletConnectConnector(),
|
|
31
|
+
...(hasSolanaNetworks ? [getSolanaWalletConnectConnector.getSolanaWalletConnectConnector()] : []),
|
|
30
32
|
];
|
|
33
|
+
// Only add WalletConnect connectors if Solana networks are configured
|
|
34
|
+
if (!hasSolanaNetworks) {
|
|
35
|
+
return initialConnectors;
|
|
36
|
+
}
|
|
31
37
|
return addSolanaWalletConnectConnectors.addSolanaWalletConnectConnectors({
|
|
32
38
|
connectors: initialConnectors,
|
|
33
39
|
walletBook: props.walletBook,
|
|
@@ -15,6 +15,8 @@ import { addSolanaWalletConnectConnectors } from './walletConnect/utils/addSolan
|
|
|
15
15
|
const SolanaWalletConnectors = (
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
17
|
props) => {
|
|
18
|
+
const solNetworks = props.solNetworks || [];
|
|
19
|
+
const hasSolanaNetworks = solNetworks.length > 0;
|
|
18
20
|
const initialConnectors = [
|
|
19
21
|
...injectedWalletOverrides,
|
|
20
22
|
...fetchInjectedWalletConnectors(props),
|
|
@@ -22,8 +24,12 @@ props) => {
|
|
|
22
24
|
...DynamicWaasSVMConnectors(),
|
|
23
25
|
Phantom,
|
|
24
26
|
FallbackSolanaConnector,
|
|
25
|
-
getSolanaWalletConnectConnector(),
|
|
27
|
+
...(hasSolanaNetworks ? [getSolanaWalletConnectConnector()] : []),
|
|
26
28
|
];
|
|
29
|
+
// Only add WalletConnect connectors if Solana networks are configured
|
|
30
|
+
if (!hasSolanaNetworks) {
|
|
31
|
+
return initialConnectors;
|
|
32
|
+
}
|
|
27
33
|
return addSolanaWalletConnectConnectors({
|
|
28
34
|
connectors: initialConnectors,
|
|
29
35
|
walletBook: props.walletBook,
|
package/src/index.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var SolanaWalletConnectConnectors = require('./walletConnect/SolanaWalletConnect
|
|
|
13
13
|
var SolanaWalletConnectorsWithConfig = require('./SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.cjs');
|
|
14
14
|
var isBackpackSolanaSigner = require('./utils/isBackpackSolanaSigner.cjs');
|
|
15
15
|
var isSignedMessage = require('./utils/isSignedMessage.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-book');
|
|
16
17
|
require('@dynamic-labs/wallet-connector-core');
|
|
17
18
|
require('@dynamic-labs/utils');
|
|
18
19
|
require('./CoinbaseSolana/CoinbaseSolana.cjs');
|
package/src/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { SolanaWalletConnectConnectors } from './walletConnect/SolanaWalletConne
|
|
|
9
9
|
export { SolanaWalletConnectorsWithConfig } from './SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.js';
|
|
10
10
|
export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner.js';
|
|
11
11
|
export { isSignedMessage } from './utils/isSignedMessage.js';
|
|
12
|
+
import '@dynamic-labs/wallet-book';
|
|
12
13
|
import '@dynamic-labs/wallet-connector-core';
|
|
13
14
|
import '@dynamic-labs/utils';
|
|
14
15
|
import './CoinbaseSolana/CoinbaseSolana.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
6
7
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
8
|
var utils = require('@dynamic-labs/utils');
|
|
8
9
|
var CoinbaseSolana = require('../CoinbaseSolana/CoinbaseSolana.cjs');
|
|
@@ -14,6 +15,7 @@ var getConnectorConstructorForWalletStandardWallet = require('./walletStandard/g
|
|
|
14
15
|
var getWalletStandardWallets = require('./walletStandard/getWalletStandardWallets/getWalletStandardWallets.cjs');
|
|
15
16
|
var hasAllWalletStandardRequiredFeatures = require('./walletStandard/hasAllWalletStandardRequiredFeatures/hasAllWalletStandardRequiredFeatures.cjs');
|
|
16
17
|
|
|
18
|
+
let removeSolanaWalletStandardListener = null;
|
|
17
19
|
const injectedWalletOverrides = [
|
|
18
20
|
CoinbaseSolana.CoinbaseSolana,
|
|
19
21
|
BackpackSol.BackpackSol,
|
|
@@ -52,8 +54,38 @@ const shouldAddWalletStandardConnector = (wallet, walletBook, authMode) => {
|
|
|
52
54
|
});
|
|
53
55
|
return !shouldHandleFromWalletBook && hasAllFeatures;
|
|
54
56
|
};
|
|
57
|
+
const addSolanaWalletStandardListener = (walletBook$1, authMode) => {
|
|
58
|
+
// check to ensure this method doesn't run with SSR
|
|
59
|
+
if (typeof window === 'undefined') {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
removeSolanaWalletStandardListener === null || removeSolanaWalletStandardListener === void 0 ? void 0 : removeSolanaWalletStandardListener();
|
|
63
|
+
const { on } = getWalletStandardWallets.getWalletStandardWallets();
|
|
64
|
+
removeSolanaWalletStandardListener = on('register', (wallet) => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
if (!shouldAddWalletStandardConnector(wallet, walletBook$1, authMode)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
logger.logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Wallet registered via wallet-standard', wallet.name);
|
|
70
|
+
const walletBookWallet = walletBook.findWalletBookWalletByNameAndChain(walletBook$1, wallet.name, 'sol');
|
|
71
|
+
const walletKey = walletBookWallet
|
|
72
|
+
? (_b = Object.entries((_a = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
|
|
73
|
+
: undefined;
|
|
74
|
+
const walletBookMetadata = walletBookWallet &&
|
|
75
|
+
walletConnectorCore.getWalletMetadataFromWalletBook({
|
|
76
|
+
walletBook: walletBook$1,
|
|
77
|
+
walletBookWallet,
|
|
78
|
+
walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${utils.sanitizeName(wallet.name)}sol`,
|
|
79
|
+
});
|
|
80
|
+
const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
|
|
81
|
+
walletConnectorCore.walletConnectorEvents.emit('providerInjected', {
|
|
82
|
+
injectedConnectorConstructor,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
55
86
|
const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
|
|
56
87
|
var _a;
|
|
88
|
+
addSolanaWalletStandardListener(walletBook, authMode);
|
|
57
89
|
const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
|
|
58
90
|
.filter(([key, wallet]) => {
|
|
59
91
|
var _a, _b, _c;
|
|
@@ -66,7 +98,7 @@ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
|
|
|
66
98
|
return isSolanaWallet && !shouldBeFiltered;
|
|
67
99
|
})
|
|
68
100
|
.map(([key, wallet]) => getConnectorConstructorInjectedWallet.getConnectorConstructorInjectedWallet({ key, wallet, walletBook }));
|
|
69
|
-
const walletStandardWallets = getWalletStandardWallets.getWalletStandardWallets();
|
|
101
|
+
const { wallets: walletStandardWallets } = getWalletStandardWallets.getWalletStandardWallets();
|
|
70
102
|
const walletStandardConnectors = walletStandardWallets
|
|
71
103
|
.filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook, authMode))
|
|
72
104
|
.map((wallet) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import {
|
|
2
|
+
import { findWalletBookWalletByNameAndChain } from '@dynamic-labs/wallet-book';
|
|
3
|
+
import { getWalletMetadataFromWalletBook, walletConnectorEvents } from '@dynamic-labs/wallet-connector-core';
|
|
3
4
|
import { sanitizeName } from '@dynamic-labs/utils';
|
|
4
5
|
import { CoinbaseSolana } from '../CoinbaseSolana/CoinbaseSolana.js';
|
|
5
6
|
import { Solflare } from '../Solflare/Solflare.js';
|
|
@@ -10,6 +11,7 @@ import { getConnectorConstructorForWalletStandardWallet } from './walletStandard
|
|
|
10
11
|
import { getWalletStandardWallets } from './walletStandard/getWalletStandardWallets/getWalletStandardWallets.js';
|
|
11
12
|
import { hasAllWalletStandardRequiredFeatures } from './walletStandard/hasAllWalletStandardRequiredFeatures/hasAllWalletStandardRequiredFeatures.js';
|
|
12
13
|
|
|
14
|
+
let removeSolanaWalletStandardListener = null;
|
|
13
15
|
const injectedWalletOverrides = [
|
|
14
16
|
CoinbaseSolana,
|
|
15
17
|
BackpackSol,
|
|
@@ -48,8 +50,38 @@ const shouldAddWalletStandardConnector = (wallet, walletBook, authMode) => {
|
|
|
48
50
|
});
|
|
49
51
|
return !shouldHandleFromWalletBook && hasAllFeatures;
|
|
50
52
|
};
|
|
53
|
+
const addSolanaWalletStandardListener = (walletBook, authMode) => {
|
|
54
|
+
// check to ensure this method doesn't run with SSR
|
|
55
|
+
if (typeof window === 'undefined') {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
removeSolanaWalletStandardListener === null || removeSolanaWalletStandardListener === void 0 ? void 0 : removeSolanaWalletStandardListener();
|
|
59
|
+
const { on } = getWalletStandardWallets();
|
|
60
|
+
removeSolanaWalletStandardListener = on('register', (wallet) => {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
if (!shouldAddWalletStandardConnector(wallet, walletBook, authMode)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Wallet registered via wallet-standard', wallet.name);
|
|
66
|
+
const walletBookWallet = findWalletBookWalletByNameAndChain(walletBook, wallet.name, 'sol');
|
|
67
|
+
const walletKey = walletBookWallet
|
|
68
|
+
? (_b = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
|
|
69
|
+
: undefined;
|
|
70
|
+
const walletBookMetadata = walletBookWallet &&
|
|
71
|
+
getWalletMetadataFromWalletBook({
|
|
72
|
+
walletBook,
|
|
73
|
+
walletBookWallet,
|
|
74
|
+
walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${sanitizeName(wallet.name)}sol`,
|
|
75
|
+
});
|
|
76
|
+
const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
|
|
77
|
+
walletConnectorEvents.emit('providerInjected', {
|
|
78
|
+
injectedConnectorConstructor,
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
};
|
|
51
82
|
const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
|
|
52
83
|
var _a;
|
|
84
|
+
addSolanaWalletStandardListener(walletBook, authMode);
|
|
53
85
|
const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
|
|
54
86
|
.filter(([key, wallet]) => {
|
|
55
87
|
var _a, _b, _c;
|
|
@@ -62,7 +94,7 @@ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
|
|
|
62
94
|
return isSolanaWallet && !shouldBeFiltered;
|
|
63
95
|
})
|
|
64
96
|
.map(([key, wallet]) => getConnectorConstructorInjectedWallet({ key, wallet, walletBook }));
|
|
65
|
-
const walletStandardWallets = getWalletStandardWallets();
|
|
97
|
+
const { wallets: walletStandardWallets } = getWalletStandardWallets();
|
|
66
98
|
const walletStandardConnectors = walletStandardWallets
|
|
67
99
|
.filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook, authMode))
|
|
68
100
|
.map((wallet) => {
|
|
@@ -5,6 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var app = require('@wallet-standard/app');
|
|
7
7
|
|
|
8
|
-
const getWalletStandardWallets = () =>
|
|
8
|
+
const getWalletStandardWallets = () => {
|
|
9
|
+
const { get, on } = app.getWallets();
|
|
10
|
+
return {
|
|
11
|
+
on,
|
|
12
|
+
wallets: get(),
|
|
13
|
+
};
|
|
14
|
+
};
|
|
9
15
|
|
|
10
16
|
exports.getWalletStandardWallets = getWalletStandardWallets;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Wallets } from '@wallet-standard/app';
|
|
2
|
+
type GetWalletStandardWalletsResult = {
|
|
3
|
+
wallets: ReturnType<Wallets['get']>;
|
|
4
|
+
on: Wallets['on'];
|
|
5
|
+
};
|
|
6
|
+
export declare const getWalletStandardWallets: () => GetWalletStandardWalletsResult;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { getWallets } from '@wallet-standard/app';
|
|
3
3
|
|
|
4
|
-
const getWalletStandardWallets = () =>
|
|
4
|
+
const getWalletStandardWallets = () => {
|
|
5
|
+
const { get, on } = getWallets();
|
|
6
|
+
return {
|
|
7
|
+
on,
|
|
8
|
+
wallets: get(),
|
|
9
|
+
};
|
|
10
|
+
};
|
|
5
11
|
|
|
6
12
|
export { getWalletStandardWallets };
|
|
@@ -29,6 +29,21 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
29
29
|
this.canConnectViaQrCode = true;
|
|
30
30
|
this.isWalletConnect = true;
|
|
31
31
|
this.canHandleMultipleConnections = false;
|
|
32
|
+
/**
|
|
33
|
+
* Set to false to prevent merging wallet book chains with connector-specific chains.
|
|
34
|
+
*
|
|
35
|
+
* Solana WalletConnect connectors (e.g., Trust Wallet Solana connector) have a walletKey
|
|
36
|
+
* like 'trust' that matches the wallet book entry for the Trust Wallet brand. The wallet
|
|
37
|
+
* book entry indicates Trust supports both EVM and SOL chains globally. However, THIS
|
|
38
|
+
* specific connector instance only supports SOL.
|
|
39
|
+
*
|
|
40
|
+
* If we merge wallet book chains, a Solana-only connector would incorrectly include ETH/EVM
|
|
41
|
+
* in its supported chains, causing it to pass the filter when only ETH is enabled (even
|
|
42
|
+
* though Solana is disabled). By setting this to false, we ensure that only the connector's
|
|
43
|
+
* specific supported chains (['SOL']) are used for filtering, so Solana connectors are
|
|
44
|
+
* correctly filtered out when Solana is disabled.
|
|
45
|
+
*/
|
|
46
|
+
this.mergeWalletBookChains = false;
|
|
32
47
|
this.name = opts.walletName;
|
|
33
48
|
const storedChainId = utils.StorageService.getItem(WC_SOLANA_CURRENT_CHAIN_KEY);
|
|
34
49
|
if (storedChainId) {
|
|
@@ -37,6 +37,21 @@ export declare class SolanaWalletConnectConnector extends SolanaWalletConnector
|
|
|
37
37
|
canConnectViaQrCode: boolean;
|
|
38
38
|
isWalletConnect: boolean;
|
|
39
39
|
canHandleMultipleConnections: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Set to false to prevent merging wallet book chains with connector-specific chains.
|
|
42
|
+
*
|
|
43
|
+
* Solana WalletConnect connectors (e.g., Trust Wallet Solana connector) have a walletKey
|
|
44
|
+
* like 'trust' that matches the wallet book entry for the Trust Wallet brand. The wallet
|
|
45
|
+
* book entry indicates Trust supports both EVM and SOL chains globally. However, THIS
|
|
46
|
+
* specific connector instance only supports SOL.
|
|
47
|
+
*
|
|
48
|
+
* If we merge wallet book chains, a Solana-only connector would incorrectly include ETH/EVM
|
|
49
|
+
* in its supported chains, causing it to pass the filter when only ETH is enabled (even
|
|
50
|
+
* though Solana is disabled). By setting this to false, we ensure that only the connector's
|
|
51
|
+
* specific supported chains (['SOL']) are used for filtering, so Solana connectors are
|
|
52
|
+
* correctly filtered out when Solana is disabled.
|
|
53
|
+
*/
|
|
54
|
+
mergeWalletBookChains: boolean;
|
|
40
55
|
constructor(opts: SolanaWalletConnectConnectorOpts);
|
|
41
56
|
get deepLinkPreference(): DeepLinkVariant;
|
|
42
57
|
/**
|
|
@@ -20,6 +20,21 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
20
20
|
this.canConnectViaQrCode = true;
|
|
21
21
|
this.isWalletConnect = true;
|
|
22
22
|
this.canHandleMultipleConnections = false;
|
|
23
|
+
/**
|
|
24
|
+
* Set to false to prevent merging wallet book chains with connector-specific chains.
|
|
25
|
+
*
|
|
26
|
+
* Solana WalletConnect connectors (e.g., Trust Wallet Solana connector) have a walletKey
|
|
27
|
+
* like 'trust' that matches the wallet book entry for the Trust Wallet brand. The wallet
|
|
28
|
+
* book entry indicates Trust supports both EVM and SOL chains globally. However, THIS
|
|
29
|
+
* specific connector instance only supports SOL.
|
|
30
|
+
*
|
|
31
|
+
* If we merge wallet book chains, a Solana-only connector would incorrectly include ETH/EVM
|
|
32
|
+
* in its supported chains, causing it to pass the filter when only ETH is enabled (even
|
|
33
|
+
* though Solana is disabled). By setting this to false, we ensure that only the connector's
|
|
34
|
+
* specific supported chains (['SOL']) are used for filtering, so Solana connectors are
|
|
35
|
+
* correctly filtered out when Solana is disabled.
|
|
36
|
+
*/
|
|
37
|
+
this.mergeWalletBookChains = false;
|
|
23
38
|
this.name = opts.walletName;
|
|
24
39
|
const storedChainId = StorageService.getItem(WC_SOLANA_CURRENT_CHAIN_KEY);
|
|
25
40
|
if (storedChainId) {
|