@dynamic-labs/sdk-react-core 4.0.0-alpha.30 → 4.0.0-alpha.31
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 +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.cjs +5 -5
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.js +5 -5
- package/src/lib/utils/functions/walletListBuilder/utils/createMetaMaskMobileFilter/createMetaMaskMobileFilter.cjs +25 -0
- package/src/lib/utils/functions/walletListBuilder/utils/createMetaMaskMobileFilter/createMetaMaskMobileFilter.d.ts +7 -0
- package/src/lib/utils/functions/walletListBuilder/utils/createMetaMaskMobileFilter/createMetaMaskMobileFilter.js +21 -0
- package/src/lib/utils/functions/walletListBuilder/utils/createMetaMaskMobileFilter/index.d.ts +1 -0
- package/src/lib/utils/functions/walletListBuilder/utils/{filterWalletConnectWallets/filterWalletConnectWallets.cjs → createWalletConnectWalletsFilter/createWalletConnectWalletsFilter.cjs} +6 -6
- package/src/lib/utils/functions/walletListBuilder/utils/{filterWalletConnectWallets/filterWalletConnectWallets.d.ts → createWalletConnectWalletsFilter/createWalletConnectWalletsFilter.d.ts} +1 -4
- package/src/lib/utils/functions/walletListBuilder/utils/createWalletConnectWalletsFilter/createWalletConnectWalletsFilter.js +16 -0
- package/src/lib/utils/functions/walletListBuilder/utils/createWalletConnectWalletsFilter/index.d.ts +1 -0
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs +35 -12
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.d.ts +3 -2
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.js +35 -12
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/filterWalletConnectWallets.js +0 -16
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.31](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.30...v4.0.0-alpha.31) (2024-11-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* allow passing telegram auth token into telegramSignIn function ([#7423](https://github.com/dynamic-labs/dynamic-auth/issues/7423)) ([4b8d594](https://github.com/dynamic-labs/dynamic-auth/commit/4b8d594984d1ac7851ce8d94fe4329ba94730f35))
|
|
8
|
+
|
|
2
9
|
## [4.0.0-alpha.30](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.29...v4.0.0-alpha.30) (2024-11-13)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.31",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.563",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"react-i18next": "13.5.0",
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
17
|
-
"@dynamic-labs/iconic": "4.0.0-alpha.
|
|
18
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
19
|
-
"@dynamic-labs/multi-wallet": "4.0.0-alpha.
|
|
20
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/store": "4.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
16
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.31",
|
|
17
|
+
"@dynamic-labs/iconic": "4.0.0-alpha.31",
|
|
18
|
+
"@dynamic-labs/logger": "4.0.0-alpha.31",
|
|
19
|
+
"@dynamic-labs/multi-wallet": "4.0.0-alpha.31",
|
|
20
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.31",
|
|
21
|
+
"@dynamic-labs/store": "4.0.0-alpha.31",
|
|
22
|
+
"@dynamic-labs/types": "4.0.0-alpha.31",
|
|
23
|
+
"@dynamic-labs/utils": "4.0.0-alpha.31",
|
|
24
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.31",
|
|
25
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.31",
|
|
26
26
|
"bs58": "5.0.0",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var filterConnectedWallets = require('../filterConnectedWallets/filterConnectedWallets.cjs');
|
|
7
7
|
var staticLinkedWalletFilter = require('../staticLinkedWalletFilter/staticLinkedWalletFilter.cjs');
|
|
8
|
-
var
|
|
8
|
+
var createWalletConnectWalletsFilter = require('../createWalletConnectWalletsFilter/createWalletConnectWalletsFilter.cjs');
|
|
9
|
+
var createMetaMaskMobileFilter = require('../createMetaMaskMobileFilter/createMetaMaskMobileFilter.cjs');
|
|
9
10
|
|
|
10
11
|
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
11
|
-
const walletList =
|
|
12
|
-
userWallets
|
|
13
|
-
|
|
14
|
-
});
|
|
12
|
+
const walletList = walletOptions
|
|
13
|
+
.filter(createWalletConnectWalletsFilter.createWalletConnectWalletsFilter(userWallets))
|
|
14
|
+
.filter(createMetaMaskMobileFilter.createMetaMaskMobileFilter(userWallets));
|
|
15
15
|
if (authMode === 'connect-only') {
|
|
16
16
|
return filterConnectedWallets.filterConnectedWallets({
|
|
17
17
|
userWallets,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { filterConnectedWallets } from '../filterConnectedWallets/filterConnectedWallets.js';
|
|
3
3
|
import { staticWalletFilter } from '../staticLinkedWalletFilter/staticLinkedWalletFilter.js';
|
|
4
|
-
import {
|
|
4
|
+
import { createWalletConnectWalletsFilter } from '../createWalletConnectWalletsFilter/createWalletConnectWalletsFilter.js';
|
|
5
|
+
import { createMetaMaskMobileFilter } from '../createMetaMaskMobileFilter/createMetaMaskMobileFilter.js';
|
|
5
6
|
|
|
6
7
|
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
7
|
-
const walletList =
|
|
8
|
-
userWallets
|
|
9
|
-
|
|
10
|
-
});
|
|
8
|
+
const walletList = walletOptions
|
|
9
|
+
.filter(createWalletConnectWalletsFilter(userWallets))
|
|
10
|
+
.filter(createMetaMaskMobileFilter(userWallets));
|
|
11
11
|
if (authMode === 'connect-only') {
|
|
12
12
|
return filterConnectedWallets({
|
|
13
13
|
userWallets,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
|
+
|
|
8
|
+
const metaMaskConnectorKey = 'metamask';
|
|
9
|
+
/**
|
|
10
|
+
* Creates a filter for MetaMask Mobile wallets
|
|
11
|
+
* If user has MetaMask Mobile wallet, filter out all other wallets
|
|
12
|
+
* because MetaMask Mobile doesn't support multiwallet
|
|
13
|
+
*/
|
|
14
|
+
const createMetaMaskMobileFilter = (userWallets) => {
|
|
15
|
+
if (!utils.isMobile()) {
|
|
16
|
+
return () => true;
|
|
17
|
+
}
|
|
18
|
+
const hasMetaMaskWallet = userWallets.some((wallet) => wallet.key === metaMaskConnectorKey);
|
|
19
|
+
if (!hasMetaMaskWallet) {
|
|
20
|
+
return () => true;
|
|
21
|
+
}
|
|
22
|
+
return (walletOption) => walletOption.walletConnector.key !== metaMaskConnectorKey;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.createMetaMaskMobileFilter = createMetaMaskMobileFilter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Wallet, WalletOption } from '../../../../../shared/types/wallets';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a filter for MetaMask Mobile wallets
|
|
4
|
+
* If user has MetaMask Mobile wallet, filter out all other wallets
|
|
5
|
+
* because MetaMask Mobile doesn't support multiwallet
|
|
6
|
+
*/
|
|
7
|
+
export declare const createMetaMaskMobileFilter: (userWallets: Wallet[]) => (walletOption: WalletOption) => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { isMobile } from '@dynamic-labs/utils';
|
|
3
|
+
|
|
4
|
+
const metaMaskConnectorKey = 'metamask';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a filter for MetaMask Mobile wallets
|
|
7
|
+
* If user has MetaMask Mobile wallet, filter out all other wallets
|
|
8
|
+
* because MetaMask Mobile doesn't support multiwallet
|
|
9
|
+
*/
|
|
10
|
+
const createMetaMaskMobileFilter = (userWallets) => {
|
|
11
|
+
if (!isMobile()) {
|
|
12
|
+
return () => true;
|
|
13
|
+
}
|
|
14
|
+
const hasMetaMaskWallet = userWallets.some((wallet) => wallet.key === metaMaskConnectorKey);
|
|
15
|
+
if (!hasMetaMaskWallet) {
|
|
16
|
+
return () => true;
|
|
17
|
+
}
|
|
18
|
+
return (walletOption) => walletOption.walletConnector.key !== metaMaskConnectorKey;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { createMetaMaskMobileFilter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createMetaMaskMobileFilter } from './createMetaMaskMobileFilter';
|
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
* Used to filter out WalletConnect wallets if user has already a WalletConnect wallet connected/linked
|
|
8
8
|
* This is useful for multi-wallet on mobile, since WalletConnect doesn't work very well with multiwallet
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const createWalletConnectWalletsFilter = (userWallets) => {
|
|
11
11
|
const hasWCWallet = userWallets.some((wallet) => wallet.connector.isWalletConnect);
|
|
12
|
-
// user doesn't have
|
|
12
|
+
// If user doesn't have WC wallet, keep all wallets (return true)
|
|
13
13
|
if (!hasWCWallet) {
|
|
14
|
-
return
|
|
14
|
+
return () => true;
|
|
15
15
|
}
|
|
16
|
-
// filter out
|
|
17
|
-
return
|
|
16
|
+
// If user has WC wallet, filter out other WC wallets
|
|
17
|
+
return (walletOption) => !walletOption.walletConnector.isWalletConnect;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
exports.
|
|
20
|
+
exports.createWalletConnectWalletsFilter = createWalletConnectWalletsFilter;
|
|
@@ -3,7 +3,4 @@ import { Wallet, WalletOption } from '../../../../../shared';
|
|
|
3
3
|
* Used to filter out WalletConnect wallets if user has already a WalletConnect wallet connected/linked
|
|
4
4
|
* This is useful for multi-wallet on mobile, since WalletConnect doesn't work very well with multiwallet
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
7
|
-
walletOptions: WalletOption[];
|
|
8
|
-
userWallets: Wallet[];
|
|
9
|
-
}) => WalletOption[];
|
|
6
|
+
export declare const createWalletConnectWalletsFilter: (userWallets: Wallet[]) => (walletOption: WalletOption) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/**
|
|
3
|
+
* Used to filter out WalletConnect wallets if user has already a WalletConnect wallet connected/linked
|
|
4
|
+
* This is useful for multi-wallet on mobile, since WalletConnect doesn't work very well with multiwallet
|
|
5
|
+
*/
|
|
6
|
+
const createWalletConnectWalletsFilter = (userWallets) => {
|
|
7
|
+
const hasWCWallet = userWallets.some((wallet) => wallet.connector.isWalletConnect);
|
|
8
|
+
// If user doesn't have WC wallet, keep all wallets (return true)
|
|
9
|
+
if (!hasWCWallet) {
|
|
10
|
+
return () => true;
|
|
11
|
+
}
|
|
12
|
+
// If user has WC wallet, filter out other WC wallets
|
|
13
|
+
return (walletOption) => !walletOption.walletConnector.isWalletConnect;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { createWalletConnectWalletsFilter };
|
package/src/lib/utils/functions/walletListBuilder/utils/createWalletConnectWalletsFilter/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createWalletConnectWalletsFilter } from './createWalletConnectWalletsFilter';
|
|
@@ -101,20 +101,43 @@ const useTelegramLogin = () => {
|
|
|
101
101
|
}
|
|
102
102
|
return telegramAuthToken;
|
|
103
103
|
};
|
|
104
|
-
const canProceedWithTelegram = (telegramAuthToken) =>
|
|
105
|
-
|
|
106
|
-
!
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
const canProceedWithTelegram = (telegramAuthToken) => {
|
|
105
|
+
let failureReason;
|
|
106
|
+
if (!isProviderEnabled.isProviderEnabled(providers, sdkApiCore.ProviderEnum.Telegram)) {
|
|
107
|
+
failureReason = 'Telegram provider is not enabled';
|
|
108
|
+
}
|
|
109
|
+
else if (!sdkHasLoaded) {
|
|
110
|
+
failureReason = 'SDK has not loaded';
|
|
111
|
+
}
|
|
112
|
+
else if (user) {
|
|
113
|
+
failureReason = 'User is already logged in';
|
|
114
|
+
}
|
|
115
|
+
else if (!telegramAuthToken) {
|
|
116
|
+
failureReason = 'Telegram auth token is missing';
|
|
117
|
+
}
|
|
118
|
+
if (failureReason) {
|
|
119
|
+
logger.logger.error(`Failed to check user Telegram authentication status due to reason: ${failureReason}`);
|
|
120
|
+
}
|
|
121
|
+
return !failureReason;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Returns whether or not this telegram user has been authenticated with Dynamic.
|
|
125
|
+
* @param authToken (Optional) the Telegram auth token of the user to check.
|
|
126
|
+
* If not provided, the SDK will attempt to grab the auth token from the URL if exists.
|
|
127
|
+
* @returns Promise<boolean> of whether or not the Telegram user has authenticated with Dynamic.
|
|
128
|
+
*/
|
|
129
|
+
const isAuthWithTelegram = (authToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
130
|
+
const telegramAuthToken = authToken || getTelegramAuthToken();
|
|
110
131
|
if (!canProceedWithTelegram(telegramAuthToken)) {
|
|
111
|
-
return;
|
|
132
|
+
return false;
|
|
112
133
|
}
|
|
113
|
-
return oauth.isUserLinkedWithTelegram(environmentId, { telegramAuthToken });
|
|
134
|
+
return Boolean(oauth.isUserLinkedWithTelegram(environmentId, { telegramAuthToken }));
|
|
114
135
|
});
|
|
115
|
-
const telegramSignIn = (...args_1) => _tslib.__awaiter(void 0, [...args_1], void 0, function* ({ forceCreateUser = false, } = {}) {
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
const telegramSignIn = (...args_1) => _tslib.__awaiter(void 0, [...args_1], void 0, function* ({ forceCreateUser = false, authToken, } = {}) {
|
|
137
|
+
if (!authToken) {
|
|
138
|
+
authToken = getTelegramAuthToken();
|
|
139
|
+
}
|
|
140
|
+
if (!canProceedWithTelegram(authToken)) {
|
|
118
141
|
return;
|
|
119
142
|
}
|
|
120
143
|
yield completeConnection({
|
|
@@ -122,7 +145,7 @@ const useTelegramLogin = () => {
|
|
|
122
145
|
forceCreateUser,
|
|
123
146
|
provider: sdkApiCore.ProviderEnum.Telegram,
|
|
124
147
|
state: '',
|
|
125
|
-
telegramAuthToken,
|
|
148
|
+
telegramAuthToken: authToken,
|
|
126
149
|
});
|
|
127
150
|
});
|
|
128
151
|
return {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
interface TelegramConfig {
|
|
2
2
|
forceCreateUser?: boolean;
|
|
3
|
+
authToken?: string;
|
|
3
4
|
}
|
|
4
5
|
export declare const useTelegramLogin: () => {
|
|
5
|
-
isAuthWithTelegram: () => Promise<boolean
|
|
6
|
-
telegramSignIn: ({ forceCreateUser, }?: TelegramConfig) => Promise<void>;
|
|
6
|
+
isAuthWithTelegram: (authToken?: string) => Promise<boolean>;
|
|
7
|
+
telegramSignIn: ({ forceCreateUser, authToken, }?: TelegramConfig) => Promise<void>;
|
|
7
8
|
};
|
|
8
9
|
export {};
|
|
@@ -97,20 +97,43 @@ const useTelegramLogin = () => {
|
|
|
97
97
|
}
|
|
98
98
|
return telegramAuthToken;
|
|
99
99
|
};
|
|
100
|
-
const canProceedWithTelegram = (telegramAuthToken) =>
|
|
101
|
-
|
|
102
|
-
!
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
const canProceedWithTelegram = (telegramAuthToken) => {
|
|
101
|
+
let failureReason;
|
|
102
|
+
if (!isProviderEnabled(providers, ProviderEnum.Telegram)) {
|
|
103
|
+
failureReason = 'Telegram provider is not enabled';
|
|
104
|
+
}
|
|
105
|
+
else if (!sdkHasLoaded) {
|
|
106
|
+
failureReason = 'SDK has not loaded';
|
|
107
|
+
}
|
|
108
|
+
else if (user) {
|
|
109
|
+
failureReason = 'User is already logged in';
|
|
110
|
+
}
|
|
111
|
+
else if (!telegramAuthToken) {
|
|
112
|
+
failureReason = 'Telegram auth token is missing';
|
|
113
|
+
}
|
|
114
|
+
if (failureReason) {
|
|
115
|
+
logger.error(`Failed to check user Telegram authentication status due to reason: ${failureReason}`);
|
|
116
|
+
}
|
|
117
|
+
return !failureReason;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Returns whether or not this telegram user has been authenticated with Dynamic.
|
|
121
|
+
* @param authToken (Optional) the Telegram auth token of the user to check.
|
|
122
|
+
* If not provided, the SDK will attempt to grab the auth token from the URL if exists.
|
|
123
|
+
* @returns Promise<boolean> of whether or not the Telegram user has authenticated with Dynamic.
|
|
124
|
+
*/
|
|
125
|
+
const isAuthWithTelegram = (authToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
126
|
+
const telegramAuthToken = authToken || getTelegramAuthToken();
|
|
106
127
|
if (!canProceedWithTelegram(telegramAuthToken)) {
|
|
107
|
-
return;
|
|
128
|
+
return false;
|
|
108
129
|
}
|
|
109
|
-
return isUserLinkedWithTelegram(environmentId, { telegramAuthToken });
|
|
130
|
+
return Boolean(isUserLinkedWithTelegram(environmentId, { telegramAuthToken }));
|
|
110
131
|
});
|
|
111
|
-
const telegramSignIn = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* ({ forceCreateUser = false, } = {}) {
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
const telegramSignIn = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* ({ forceCreateUser = false, authToken, } = {}) {
|
|
133
|
+
if (!authToken) {
|
|
134
|
+
authToken = getTelegramAuthToken();
|
|
135
|
+
}
|
|
136
|
+
if (!canProceedWithTelegram(authToken)) {
|
|
114
137
|
return;
|
|
115
138
|
}
|
|
116
139
|
yield completeConnection({
|
|
@@ -118,7 +141,7 @@ const useTelegramLogin = () => {
|
|
|
118
141
|
forceCreateUser,
|
|
119
142
|
provider: ProviderEnum.Telegram,
|
|
120
143
|
state: '',
|
|
121
|
-
telegramAuthToken,
|
|
144
|
+
telegramAuthToken: authToken,
|
|
122
145
|
});
|
|
123
146
|
});
|
|
124
147
|
return {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
/**
|
|
3
|
-
* Used to filter out WalletConnect wallets if user has already a WalletConnect wallet connected/linked
|
|
4
|
-
* This is useful for multi-wallet on mobile, since WalletConnect doesn't work very well with multiwallet
|
|
5
|
-
*/
|
|
6
|
-
const filterWalletConnectWallets = ({ walletOptions, userWallets, }) => {
|
|
7
|
-
const hasWCWallet = userWallets.some((wallet) => wallet.connector.isWalletConnect);
|
|
8
|
-
// user doesn't have any WalletConnect wallet connected/linked, so we don't need to filter anything
|
|
9
|
-
if (!hasWCWallet) {
|
|
10
|
-
return walletOptions;
|
|
11
|
-
}
|
|
12
|
-
// filter out WalletConnect wallets
|
|
13
|
-
return walletOptions.filter((walletOption) => !walletOption.walletConnector.isWalletConnect);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { filterWalletConnectWallets };
|
package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './filterWalletConnectWallets';
|