@dynamic-labs/sdk-react-core 2.2.5 → 2.2.7
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 +16 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/index.cjs +1 -1
- package/src/index.js +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +12 -5
- package/src/lib/components/UserProfile/UserProfile.js +12 -5
- package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +1 -0
- package/src/lib/locale/en/translation.cjs +6 -0
- package/src/lib/locale/en/translation.d.ts +6 -0
- package/src/lib/locale/en/translation.js +6 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getPlatformForConnector/getPlatformForConnector.cjs +10 -0
- package/src/lib/utils/functions/getPlatformForConnector/getPlatformForConnector.d.ts +3 -0
- package/src/lib/utils/functions/getPlatformForConnector/getPlatformForConnector.js +6 -0
- package/src/lib/utils/functions/getPlatformForConnector/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.cjs +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.d.ts +3 -1
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.js +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/staticLinkedWalletFilter/staticLinkedWalletFilter.cjs +5 -12
- package/src/lib/utils/functions/walletListBuilder/utils/staticLinkedWalletFilter/staticLinkedWalletFilter.d.ts +2 -1
- package/src/lib/utils/functions/walletListBuilder/utils/staticLinkedWalletFilter/staticLinkedWalletFilter.js +5 -12
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +1 -0
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +2 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +14 -7
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +3 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +14 -7
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +8 -5
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +8 -5
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -2
- package/src/lib/shared/assets/prompt-account-switch.cjs +0 -64
- package/src/lib/shared/assets/prompt-account-switch.js +0 -40
|
@@ -0,0 +1,10 @@
|
|
|
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 getPlatformForConnector = (connector) => utils.isMobile() || connector.isWalletConnect ? 'mobile' : 'browserExtension';
|
|
9
|
+
|
|
10
|
+
exports.getPlatformForConnector = getPlatformForConnector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getPlatformForConnector';
|
|
@@ -7,7 +7,7 @@ var filterConnectedWallets = require('../filterConnectedWallets/filterConnectedW
|
|
|
7
7
|
var staticLinkedWalletFilter = require('../staticLinkedWalletFilter/staticLinkedWalletFilter.cjs');
|
|
8
8
|
var filterWalletConnectWallets = require('../filterWalletConnectWallets/filterWalletConnectWallets.cjs');
|
|
9
9
|
|
|
10
|
-
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
10
|
+
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, walletBook, }) => {
|
|
11
11
|
const walletList = filterWalletConnectWallets.filterWalletConnectWallets({
|
|
12
12
|
userWallets,
|
|
13
13
|
walletOptions,
|
|
@@ -18,7 +18,7 @@ const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
|
18
18
|
walletOptions: walletList,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
return staticLinkedWalletFilter.staticWalletFilter(userWallets, walletList);
|
|
21
|
+
return staticLinkedWalletFilter.staticWalletFilter(userWallets, walletList, walletBook);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
exports.applyMultiWalletFilters = applyMultiWalletFilters;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
1
2
|
import { AuthModeType, Wallet, WalletOption } from '../../../../../shared';
|
|
2
|
-
export declare const applyMultiWalletFilters: ({ authMode, userWallets, walletOptions, }: {
|
|
3
|
+
export declare const applyMultiWalletFilters: ({ authMode, userWallets, walletOptions, walletBook, }: {
|
|
3
4
|
authMode: AuthModeType;
|
|
4
5
|
userWallets: Wallet[];
|
|
5
6
|
walletOptions: WalletOption[];
|
|
7
|
+
walletBook: WalletBookSchema;
|
|
6
8
|
}) => WalletOption[];
|
|
@@ -3,7 +3,7 @@ import { filterConnectedWallets } from '../filterConnectedWallets/filterConnecte
|
|
|
3
3
|
import { staticWalletFilter } from '../staticLinkedWalletFilter/staticLinkedWalletFilter.js';
|
|
4
4
|
import { filterWalletConnectWallets } from '../filterWalletConnectWallets/filterWalletConnectWallets.js';
|
|
5
5
|
|
|
6
|
-
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
6
|
+
const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, walletBook, }) => {
|
|
7
7
|
const walletList = filterWalletConnectWallets({
|
|
8
8
|
userWallets,
|
|
9
9
|
walletOptions,
|
|
@@ -14,7 +14,7 @@ const applyMultiWalletFilters = ({ authMode, userWallets, walletOptions, }) => {
|
|
|
14
14
|
walletOptions: walletList,
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
return staticWalletFilter(userWallets, walletList);
|
|
17
|
+
return staticWalletFilter(userWallets, walletList, walletBook);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { applyMultiWalletFilters };
|
|
@@ -3,22 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
const staticListToFilter = [
|
|
11
|
-
'xverse',
|
|
12
|
-
'magiceden',
|
|
13
|
-
'magicedenbtc',
|
|
14
|
-
'magicedensol',
|
|
15
|
-
];
|
|
6
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
|
+
var getPlatformForConnector = require('../../../getPlatformForConnector/getPlatformForConnector.cjs');
|
|
8
|
+
|
|
16
9
|
/**
|
|
17
10
|
* This function is a helper to filter out wallets that should not appear in the wallet list
|
|
18
11
|
* if they are already linked to the user profile.
|
|
19
12
|
*/
|
|
20
|
-
const staticWalletFilter = (linkedWallets, walletOptions) => walletOptions.filter((walletOption) => {
|
|
21
|
-
if (
|
|
13
|
+
const staticWalletFilter = (linkedWallets, walletOptions, walletBook$1) => walletOptions.filter((walletOption) => {
|
|
14
|
+
if (walletBook.isWalletEventSupported(walletBook.findWalletBookWallet(walletBook$1, walletOption.key), 'accountChanged', getPlatformForConnector.getPlatformForConnector(walletOption.walletConnector))) {
|
|
22
15
|
return true;
|
|
23
16
|
}
|
|
24
17
|
if (linkedWallets.some((wallet) => wallet.connector.key === walletOption.key)) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
1
2
|
import { Wallet, WalletOption } from '../../../../../shared';
|
|
2
3
|
/**
|
|
3
4
|
* This function is a helper to filter out wallets that should not appear in the wallet list
|
|
4
5
|
* if they are already linked to the user profile.
|
|
5
6
|
*/
|
|
6
|
-
export declare const staticWalletFilter: (linkedWallets: Wallet[], walletOptions: WalletOption[]) => WalletOption[];
|
|
7
|
+
export declare const staticWalletFilter: (linkedWallets: Wallet[], walletOptions: WalletOption[], walletBook: WalletBookSchema) => WalletOption[];
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
const staticListToFilter = [
|
|
7
|
-
'xverse',
|
|
8
|
-
'magiceden',
|
|
9
|
-
'magicedenbtc',
|
|
10
|
-
'magicedensol',
|
|
11
|
-
];
|
|
2
|
+
import { isWalletEventSupported, findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
3
|
+
import { getPlatformForConnector } from '../../../getPlatformForConnector/getPlatformForConnector.js';
|
|
4
|
+
|
|
12
5
|
/**
|
|
13
6
|
* This function is a helper to filter out wallets that should not appear in the wallet list
|
|
14
7
|
* if they are already linked to the user profile.
|
|
15
8
|
*/
|
|
16
|
-
const staticWalletFilter = (linkedWallets, walletOptions) => walletOptions.filter((walletOption) => {
|
|
17
|
-
if (
|
|
9
|
+
const staticWalletFilter = (linkedWallets, walletOptions, walletBook) => walletOptions.filter((walletOption) => {
|
|
10
|
+
if (isWalletEventSupported(findWalletBookWallet(walletBook, walletOption.key), 'accountChanged', getPlatformForConnector(walletOption.walletConnector))) {
|
|
18
11
|
return true;
|
|
19
12
|
}
|
|
20
13
|
if (linkedWallets.some((wallet) => wallet.connector.key === walletOption.key)) {
|
|
@@ -32,7 +32,7 @@ var reconnectSocialWallet = require('./reconnectSocialWallet.cjs');
|
|
|
32
32
|
var createLinkedWalletsFromWalletOptions = require('./utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs');
|
|
33
33
|
var updateUserWalletsFromLinkedWallets = require('./utils/updateUserWalletsFromLinkedWallets/updateUserWalletsFromLinkedWallets.cjs');
|
|
34
34
|
|
|
35
|
-
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }) => {
|
|
35
|
+
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, walletBook, }) => {
|
|
36
36
|
const [showQrcodeModal, setShowQrcodeModal] = React.useState(false);
|
|
37
37
|
const linkedWallets = React.useMemo(() => {
|
|
38
38
|
if (!user) {
|
|
@@ -75,7 +75,7 @@ const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOption
|
|
|
75
75
|
React.useEffect(() => walletsBasedOnAuthMode.forEach((wallet) => {
|
|
76
76
|
wallet.connector.initEventListener();
|
|
77
77
|
}), [walletsBasedOnAuthMode]);
|
|
78
|
-
const { connectedWalletsMap, didConnectedStateLoad } = useWalletsConnectionState.useWalletsConnectionState(walletsBasedOnAuthMode);
|
|
78
|
+
const { connectedWalletsMap, didConnectedStateLoad } = useWalletsConnectionState.useWalletsConnectionState(walletsBasedOnAuthMode, walletBook, primaryWalletId, authMode);
|
|
79
79
|
const wallets = React.useMemo(() => walletsBasedOnAuthMode.map((wallet) => (Object.assign(Object.assign({}, wallet), { connected: Boolean(connectedWalletsMap[getWalletIdentifier.getWalletIdentifier(wallet)]) }))), [connectedWalletsMap, walletsBasedOnAuthMode]);
|
|
80
80
|
logVerboseTroubleshootingMessage.logVerboseTroubleshootingMessage('wallets', wallets);
|
|
81
81
|
logVerboseTroubleshootingMessage.logVerboseTroubleshootingMessage('didConnectedStateLoad', didConnectedStateLoad);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { UserProfile } from '@dynamic-labs/types';
|
|
3
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
3
4
|
import { AuthModeType, MultiWalletWidgetState, Wallet, WalletOption } from '../../../shared';
|
|
4
5
|
import { MultiWalletWidgetStateSetter } from '../multiWallet';
|
|
5
6
|
type Props = {
|
|
@@ -14,6 +15,7 @@ type Props = {
|
|
|
14
15
|
primaryWalletId: string | undefined;
|
|
15
16
|
user?: UserProfile;
|
|
16
17
|
canHaveMultipleWalletsConnected?: boolean;
|
|
18
|
+
walletBook: WalletBookSchema;
|
|
17
19
|
};
|
|
18
20
|
export interface UseWalletConnectors {
|
|
19
21
|
didConnectedStateLoad: boolean;
|
|
@@ -24,5 +26,5 @@ export interface UseWalletConnectors {
|
|
|
24
26
|
showQrcodeModal: boolean;
|
|
25
27
|
wallets: Wallet[];
|
|
26
28
|
}
|
|
27
|
-
export declare const useWalletConnectors: ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }: Props) => UseWalletConnectors;
|
|
29
|
+
export declare const useWalletConnectors: ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, walletBook, }: Props) => UseWalletConnectors;
|
|
28
30
|
export {};
|
|
@@ -28,7 +28,7 @@ import { reconnectSocialWallet } from './reconnectSocialWallet.js';
|
|
|
28
28
|
import { createLinkedWalletsFromWalletOptions } from './utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js';
|
|
29
29
|
import { updateUserWalletsFromLinkedWallets } from './utils/updateUserWalletsFromLinkedWallets/updateUserWalletsFromLinkedWallets.js';
|
|
30
30
|
|
|
31
|
-
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }) => {
|
|
31
|
+
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, multiWalletWidgetState, setDesktopUri, setMultiWalletWidgetState, setQrcodeUri, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, walletBook, }) => {
|
|
32
32
|
const [showQrcodeModal, setShowQrcodeModal] = useState(false);
|
|
33
33
|
const linkedWallets = useMemo(() => {
|
|
34
34
|
if (!user) {
|
|
@@ -71,7 +71,7 @@ const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOption
|
|
|
71
71
|
useEffect(() => walletsBasedOnAuthMode.forEach((wallet) => {
|
|
72
72
|
wallet.connector.initEventListener();
|
|
73
73
|
}), [walletsBasedOnAuthMode]);
|
|
74
|
-
const { connectedWalletsMap, didConnectedStateLoad } = useWalletsConnectionState(walletsBasedOnAuthMode);
|
|
74
|
+
const { connectedWalletsMap, didConnectedStateLoad } = useWalletsConnectionState(walletsBasedOnAuthMode, walletBook, primaryWalletId, authMode);
|
|
75
75
|
const wallets = useMemo(() => walletsBasedOnAuthMode.map((wallet) => (Object.assign(Object.assign({}, wallet), { connected: Boolean(connectedWalletsMap[getWalletIdentifier(wallet)]) }))), [connectedWalletsMap, walletsBasedOnAuthMode]);
|
|
76
76
|
logVerboseTroubleshootingMessage('wallets', wallets);
|
|
77
77
|
logVerboseTroubleshootingMessage('didConnectedStateLoad', didConnectedStateLoad);
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
9
10
|
require('@dynamic-labs/sdk-api-core');
|
|
10
11
|
require('../../../shared/logger.cjs');
|
|
11
12
|
require('@dynamic-labs/iconic');
|
|
12
13
|
require('react/jsx-runtime');
|
|
13
14
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
-
require('@dynamic-labs/wallet-book');
|
|
15
15
|
require('../../constants/colors.cjs');
|
|
16
16
|
require('../../constants/values.cjs');
|
|
17
17
|
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
@@ -27,6 +27,7 @@ require('viem/chains');
|
|
|
27
27
|
require('../../../config/ApiEndpoint.cjs');
|
|
28
28
|
require('@dynamic-labs/store');
|
|
29
29
|
require('../../../locale/locale.cjs');
|
|
30
|
+
var getPlatformForConnector = require('../../functions/getPlatformForConnector/getPlatformForConnector.cjs');
|
|
30
31
|
require('../../../events/dynamicEvents.cjs');
|
|
31
32
|
var useWalletConnectorEvent = require('../events/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
32
33
|
var useWindowEvent = require('../events/useWindowEvent/useWindowEvent.cjs');
|
|
@@ -35,14 +36,17 @@ var useWindowEvent = require('../events/useWindowEvent/useWindowEvent.cjs');
|
|
|
35
36
|
* For the given wallet array, this returns an object mapping from each wallet's
|
|
36
37
|
* identifier to whether its connector recognizes it as currently connected or not.
|
|
37
38
|
*/
|
|
38
|
-
const getConnectedWalletsMap = (wallets) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
const getConnectedWalletsMap = (wallets, walletBook$1, primaryWalletId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
39
40
|
const newMap = {};
|
|
40
|
-
yield Promise.all(wallets
|
|
41
|
+
yield Promise.all(wallets
|
|
42
|
+
.filter((wallet) => wallet.id === primaryWalletId ||
|
|
43
|
+
walletBook.isWalletMethodSupported(walletBook.findWalletBookWallet(walletBook$1, wallet.key), 'getConnectedAccounts', getPlatformForConnector.getPlatformForConnector(wallet.connector)))
|
|
44
|
+
.map((wallet) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
41
45
|
newMap[getWalletIdentifier.getWalletIdentifier(wallet)] = yield isWalletConnected.isWalletConnected(wallet);
|
|
42
46
|
})));
|
|
43
47
|
return newMap;
|
|
44
48
|
});
|
|
45
|
-
const useWalletsConnectionState = (wallets) => {
|
|
49
|
+
const useWalletsConnectionState = (wallets, walletBook, primaryWalletId, authMode) => {
|
|
46
50
|
const [connectedWalletsMap, setConnectedWalletsMap] = React.useState({});
|
|
47
51
|
/**
|
|
48
52
|
* Whether the connection map has been loaded off of the current wallet array.
|
|
@@ -59,7 +63,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
59
63
|
const incomingWalletSwitchAddress = React.useRef(undefined);
|
|
60
64
|
const computeConnectedStateForWallets = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
61
65
|
didConnectedStateLoad.current = false;
|
|
62
|
-
const newMap = yield getConnectedWalletsMap(wallets);
|
|
66
|
+
const newMap = yield getConnectedWalletsMap(wallets, walletBook, primaryWalletId);
|
|
63
67
|
if (Object.values(newMap).length === 0) {
|
|
64
68
|
setConnectedWalletsMap({});
|
|
65
69
|
return;
|
|
@@ -75,7 +79,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
75
79
|
return;
|
|
76
80
|
}
|
|
77
81
|
setConnectedWalletsMap(newMap);
|
|
78
|
-
}), [wallets]);
|
|
82
|
+
}), [primaryWalletId, walletBook, wallets]);
|
|
79
83
|
/** A string that is unique for each possible value of the wallets prop */
|
|
80
84
|
const walletsHash = wallets.map(getWalletIdentifier.getWalletIdentifier).join('-');
|
|
81
85
|
const connectors = wallets.map(({ connector }) => connector);
|
|
@@ -92,6 +96,9 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
92
96
|
useWalletConnectorEvent.useWalletConnectorEvent(connectors, 'accountChange', onAccountChange);
|
|
93
97
|
useWalletConnectorEvent.useWalletConnectorEvent(connectors, 'disconnect', handleEvent);
|
|
94
98
|
useWalletConnectorEvent.useWalletConnectorEvent(connectors, 'chainChange', handleEvent);
|
|
99
|
+
const computeConnectedStateKey = authMode === 'connect-and-sign'
|
|
100
|
+
? `${primaryWalletId}-${walletsHash}`
|
|
101
|
+
: walletsHash;
|
|
95
102
|
React.useEffect(() => {
|
|
96
103
|
computeConnectedStateForWallets();
|
|
97
104
|
},
|
|
@@ -100,7 +107,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
100
107
|
* wallets change.
|
|
101
108
|
*/
|
|
102
109
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
|
-
[
|
|
110
|
+
[computeConnectedStateKey]);
|
|
104
111
|
/**
|
|
105
112
|
* This is a workaround to detect when the user switches to another tab/extension
|
|
106
113
|
* and then comes back to the dapp.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
3
|
+
import { AuthModeType, Wallet } from '../../../shared';
|
|
3
4
|
type ConnectedWalletsMap = {
|
|
4
5
|
[address: string]: boolean;
|
|
5
6
|
};
|
|
6
|
-
type WalletsConnectionStateHook = (wallets: Wallet[]) => {
|
|
7
|
+
type WalletsConnectionStateHook = (wallets: Wallet[], walletBook: WalletBookSchema, primaryWalletId: string | undefined, authMode: AuthModeType) => {
|
|
7
8
|
connectedWalletsMap: ConnectedWalletsMap;
|
|
8
9
|
didConnectedStateLoad: MutableRefObject<boolean>;
|
|
9
10
|
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
5
|
+
import { isWalletMethodSupported, findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
5
6
|
import '@dynamic-labs/sdk-api-core';
|
|
6
7
|
import '../../../shared/logger.js';
|
|
7
8
|
import '@dynamic-labs/iconic';
|
|
8
9
|
import 'react/jsx-runtime';
|
|
9
10
|
import '../../../context/ViewContext/ViewContext.js';
|
|
10
|
-
import '@dynamic-labs/wallet-book';
|
|
11
11
|
import '../../constants/colors.js';
|
|
12
12
|
import '../../constants/values.js';
|
|
13
13
|
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
@@ -23,6 +23,7 @@ import 'viem/chains';
|
|
|
23
23
|
import '../../../config/ApiEndpoint.js';
|
|
24
24
|
import '@dynamic-labs/store';
|
|
25
25
|
import '../../../locale/locale.js';
|
|
26
|
+
import { getPlatformForConnector } from '../../functions/getPlatformForConnector/getPlatformForConnector.js';
|
|
26
27
|
import '../../../events/dynamicEvents.js';
|
|
27
28
|
import { useWalletConnectorEvent } from '../events/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
28
29
|
import { useWindowEvent } from '../events/useWindowEvent/useWindowEvent.js';
|
|
@@ -31,14 +32,17 @@ import { useWindowEvent } from '../events/useWindowEvent/useWindowEvent.js';
|
|
|
31
32
|
* For the given wallet array, this returns an object mapping from each wallet's
|
|
32
33
|
* identifier to whether its connector recognizes it as currently connected or not.
|
|
33
34
|
*/
|
|
34
|
-
const getConnectedWalletsMap = (wallets) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const getConnectedWalletsMap = (wallets, walletBook, primaryWalletId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
36
|
const newMap = {};
|
|
36
|
-
yield Promise.all(wallets
|
|
37
|
+
yield Promise.all(wallets
|
|
38
|
+
.filter((wallet) => wallet.id === primaryWalletId ||
|
|
39
|
+
isWalletMethodSupported(findWalletBookWallet(walletBook, wallet.key), 'getConnectedAccounts', getPlatformForConnector(wallet.connector)))
|
|
40
|
+
.map((wallet) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
41
|
newMap[getWalletIdentifier(wallet)] = yield isWalletConnected(wallet);
|
|
38
42
|
})));
|
|
39
43
|
return newMap;
|
|
40
44
|
});
|
|
41
|
-
const useWalletsConnectionState = (wallets) => {
|
|
45
|
+
const useWalletsConnectionState = (wallets, walletBook, primaryWalletId, authMode) => {
|
|
42
46
|
const [connectedWalletsMap, setConnectedWalletsMap] = useState({});
|
|
43
47
|
/**
|
|
44
48
|
* Whether the connection map has been loaded off of the current wallet array.
|
|
@@ -55,7 +59,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
55
59
|
const incomingWalletSwitchAddress = useRef(undefined);
|
|
56
60
|
const computeConnectedStateForWallets = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
61
|
didConnectedStateLoad.current = false;
|
|
58
|
-
const newMap = yield getConnectedWalletsMap(wallets);
|
|
62
|
+
const newMap = yield getConnectedWalletsMap(wallets, walletBook, primaryWalletId);
|
|
59
63
|
if (Object.values(newMap).length === 0) {
|
|
60
64
|
setConnectedWalletsMap({});
|
|
61
65
|
return;
|
|
@@ -71,7 +75,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
71
75
|
return;
|
|
72
76
|
}
|
|
73
77
|
setConnectedWalletsMap(newMap);
|
|
74
|
-
}), [wallets]);
|
|
78
|
+
}), [primaryWalletId, walletBook, wallets]);
|
|
75
79
|
/** A string that is unique for each possible value of the wallets prop */
|
|
76
80
|
const walletsHash = wallets.map(getWalletIdentifier).join('-');
|
|
77
81
|
const connectors = wallets.map(({ connector }) => connector);
|
|
@@ -88,6 +92,9 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
88
92
|
useWalletConnectorEvent(connectors, 'accountChange', onAccountChange);
|
|
89
93
|
useWalletConnectorEvent(connectors, 'disconnect', handleEvent);
|
|
90
94
|
useWalletConnectorEvent(connectors, 'chainChange', handleEvent);
|
|
95
|
+
const computeConnectedStateKey = authMode === 'connect-and-sign'
|
|
96
|
+
? `${primaryWalletId}-${walletsHash}`
|
|
97
|
+
: walletsHash;
|
|
91
98
|
useEffect(() => {
|
|
92
99
|
computeConnectedStateForWallets();
|
|
93
100
|
},
|
|
@@ -96,7 +103,7 @@ const useWalletsConnectionState = (wallets) => {
|
|
|
96
103
|
* wallets change.
|
|
97
104
|
*/
|
|
98
105
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
99
|
-
[
|
|
106
|
+
[computeConnectedStateKey]);
|
|
100
107
|
/**
|
|
101
108
|
* This is a workaround to detect when the user switches to another tab/extension
|
|
102
109
|
* and then comes back to the dapp.
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
8
9
|
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
9
10
|
require('../../../../components/Alert/Alert.cjs');
|
|
10
11
|
require('react');
|
|
@@ -17,8 +18,6 @@ require('../../../../shared/logger.cjs');
|
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('@dynamic-labs/wallet-connector-core');
|
|
19
20
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
20
|
-
var promptAccountSwitch = require('../../../../shared/assets/prompt-account-switch.cjs');
|
|
21
|
-
require('@dynamic-labs/wallet-book');
|
|
22
21
|
require('../../../../utils/constants/colors.cjs');
|
|
23
22
|
require('../../../../utils/constants/values.cjs');
|
|
24
23
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
@@ -63,6 +62,8 @@ require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
|
63
62
|
var PromptModal = require('../../components/PromptModal/PromptModal.cjs');
|
|
64
63
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
65
64
|
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
65
|
+
var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs');
|
|
66
|
+
var Divider = require('../../../../components/Divider/Divider.cjs');
|
|
66
67
|
require('../../context/DynamicWidgetContext.cjs');
|
|
67
68
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
68
69
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -75,6 +76,7 @@ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
|
75
76
|
require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
76
77
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
77
78
|
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
79
|
+
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
78
80
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
79
81
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
80
82
|
require('react-focus-lock');
|
|
@@ -85,16 +87,17 @@ require('@hcaptcha/react-hcaptcha');
|
|
|
85
87
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
86
88
|
|
|
87
89
|
const DetectedNewWalletContent = () => {
|
|
90
|
+
var _a;
|
|
88
91
|
const { t } = reactI18next.useTranslation();
|
|
89
92
|
const { setMultiWalletWidgetState, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
90
93
|
const handleClick = () => {
|
|
91
94
|
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
92
95
|
};
|
|
93
|
-
return (jsxRuntime.jsxs(
|
|
96
|
+
return (jsxRuntime.jsxs(DefaultPromptModal.DefaultPromptLayout, { dataTestId: 'detected-new-wallet-modal', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key }), title: t('dyn_detected_new_wallet.title'), children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: t('dyn_detected_new_wallet.description', {
|
|
94
97
|
walletName: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name,
|
|
95
|
-
}) }), jsxRuntime.jsx(TypographyButton.TypographyButton, { expanded: true, onClick: handleClick, typographyProps: {
|
|
98
|
+
}) }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'detected-new-wallet-modal__confirm-button', expanded: true, onClick: handleClick, typographyProps: {
|
|
96
99
|
variant: 'button_secondary',
|
|
97
|
-
}, children: t('dyn_detected_new_wallet.confirm_button') })] }));
|
|
100
|
+
}, children: t('dyn_detected_new_wallet.confirm_button') }), jsxRuntime.jsx(Divider.Divider, { fullWidth: true, text: 'Or' }), jsxRuntime.jsx(LogoutButton.LogoutButton, { isTextButton: false, buttonClassName: 'detected-new-wallet-modal__log-out-button' })] }));
|
|
98
101
|
};
|
|
99
102
|
const DetectedNewWalletWidgetPortal = () => (jsxRuntime.jsx(WidgetPortal.WidgetPortal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt(), children: jsxRuntime.jsx(DetectedNewWalletContent, {}) }));
|
|
100
103
|
const DetectedNewWalletModal = () => (jsxRuntime.jsx(PromptModal.PromptModal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt(), children: jsxRuntime.jsx(DetectedNewWalletContent, {}) }));
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
4
5
|
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
5
6
|
import '../../../../components/Alert/Alert.js';
|
|
6
7
|
import 'react';
|
|
@@ -13,8 +14,6 @@ import '../../../../shared/logger.js';
|
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '@dynamic-labs/wallet-connector-core';
|
|
15
16
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
16
|
-
import { ReactComponent as SvgPromptAccountSwitch } from '../../../../shared/assets/prompt-account-switch.js';
|
|
17
|
-
import '@dynamic-labs/wallet-book';
|
|
18
17
|
import '../../../../utils/constants/colors.js';
|
|
19
18
|
import '../../../../utils/constants/values.js';
|
|
20
19
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
@@ -59,6 +58,8 @@ import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
|
59
58
|
import { PromptModal } from '../../components/PromptModal/PromptModal.js';
|
|
60
59
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
61
60
|
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
61
|
+
import { DefaultPromptLayout } from '../DefaultPromptModal/DefaultPromptModal.js';
|
|
62
|
+
import { Divider } from '../../../../components/Divider/Divider.js';
|
|
62
63
|
import '../../context/DynamicWidgetContext.js';
|
|
63
64
|
import '../../../../components/IconButton/IconButton.js';
|
|
64
65
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
@@ -71,6 +72,7 @@ import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
|
71
72
|
import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
72
73
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
73
74
|
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
75
|
+
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
74
76
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
75
77
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
76
78
|
import 'react-focus-lock';
|
|
@@ -81,16 +83,17 @@ import '@hcaptcha/react-hcaptcha';
|
|
|
81
83
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
82
84
|
|
|
83
85
|
const DetectedNewWalletContent = () => {
|
|
86
|
+
var _a;
|
|
84
87
|
const { t } = useTranslation();
|
|
85
88
|
const { setMultiWalletWidgetState, primaryWallet } = useInternalDynamicContext();
|
|
86
89
|
const handleClick = () => {
|
|
87
90
|
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
88
91
|
};
|
|
89
|
-
return (jsxs(
|
|
92
|
+
return (jsxs(DefaultPromptLayout, { dataTestId: 'detected-new-wallet-modal', icon: jsx(WalletIcon, { walletKey: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key }), title: t('dyn_detected_new_wallet.title'), children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: t('dyn_detected_new_wallet.description', {
|
|
90
93
|
walletName: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name,
|
|
91
|
-
}) }), jsx(TypographyButton, { expanded: true, onClick: handleClick, typographyProps: {
|
|
94
|
+
}) }), jsx(TypographyButton, { buttonClassName: 'detected-new-wallet-modal__confirm-button', expanded: true, onClick: handleClick, typographyProps: {
|
|
92
95
|
variant: 'button_secondary',
|
|
93
|
-
}, children: t('dyn_detected_new_wallet.confirm_button') })] }));
|
|
96
|
+
}, children: t('dyn_detected_new_wallet.confirm_button') }), jsx(Divider, { fullWidth: true, text: 'Or' }), jsx(LogoutButton, { isTextButton: false, buttonClassName: 'detected-new-wallet-modal__log-out-button' })] }));
|
|
94
97
|
};
|
|
95
98
|
const DetectedNewWalletWidgetPortal = () => (jsx(WidgetPortal, { onClose: useCloseMultiWalletPrompt(), children: jsx(DetectedNewWalletContent, {}) }));
|
|
96
99
|
const DetectedNewWalletModal = () => (jsx(PromptModal, { onClose: useCloseMultiWalletPrompt(), children: jsx(DetectedNewWalletContent, {}) }));
|
|
@@ -75,8 +75,8 @@ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
|
75
75
|
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
76
76
|
var PromptModal = require('../../components/PromptModal/PromptModal.cjs');
|
|
77
77
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
78
|
-
var useConnectedAccountWallet = require('../../../../utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs');
|
|
79
78
|
var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs');
|
|
79
|
+
var useConnectedAccountWallet = require('../../../../utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs');
|
|
80
80
|
var SwitchAccountView = require('./SwitchAccountView/SwitchAccountView.cjs');
|
|
81
81
|
var SwitchOrUseActiveAccountView = require('./SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs');
|
|
82
82
|
require('../../context/DynamicWidgetContext.cjs');
|
package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js
CHANGED
|
@@ -71,8 +71,8 @@ import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
|
71
71
|
import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
72
72
|
import { PromptModal } from '../../components/PromptModal/PromptModal.js';
|
|
73
73
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
74
|
-
import { useConnectedAccountWallet } from '../../../../utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js';
|
|
75
74
|
import { DefaultPromptLayout } from '../DefaultPromptModal/DefaultPromptModal.js';
|
|
75
|
+
import { useConnectedAccountWallet } from '../../../../utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js';
|
|
76
76
|
import { SwitchAccountView } from './SwitchAccountView/SwitchAccountView.js';
|
|
77
77
|
import { SwitchOrUseActiveAccountView } from './SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js';
|
|
78
78
|
import '../../context/DynamicWidgetContext.js';
|
|
@@ -66,10 +66,11 @@ require('react-focus-lock');
|
|
|
66
66
|
require('../../context/DynamicWidgetContext.cjs');
|
|
67
67
|
var DynamicWidgetWallets = require('../../components/DynamicWidgetWallets/DynamicWidgetWallets.cjs');
|
|
68
68
|
var SingleWalletButtons = require('../../components/SingleWalletButtons/SingleWalletButtons.cjs');
|
|
69
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
70
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
71
|
require('formik');
|
|
70
72
|
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
71
73
|
require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
72
|
-
require('../../../../components/IconButton/IconButton.cjs');
|
|
73
74
|
require('../../../../components/Input/Input.cjs');
|
|
74
75
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
75
76
|
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
@@ -78,7 +79,6 @@ var useDynamicModals = require('../../../../utils/hooks/useDynamicModals/useDyna
|
|
|
78
79
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
79
80
|
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
80
81
|
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
81
|
-
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
82
82
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
83
83
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
84
84
|
require('qrcode');
|
|
@@ -62,10 +62,11 @@ import 'react-focus-lock';
|
|
|
62
62
|
import '../../context/DynamicWidgetContext.js';
|
|
63
63
|
import { DynamicWidgetWallets } from '../../components/DynamicWidgetWallets/DynamicWidgetWallets.js';
|
|
64
64
|
import { SingleWalletButtons } from '../../components/SingleWalletButtons/SingleWalletButtons.js';
|
|
65
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
66
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
67
|
import 'formik';
|
|
66
68
|
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
67
69
|
import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
68
|
-
import '../../../../components/IconButton/IconButton.js';
|
|
69
70
|
import '../../../../components/Input/Input.js';
|
|
70
71
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
71
72
|
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
@@ -74,7 +75,6 @@ import { useDynamicModals } from '../../../../utils/hooks/useDynamicModals/useDy
|
|
|
74
75
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
75
76
|
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
76
77
|
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
77
|
-
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
78
78
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
79
79
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
80
80
|
import 'qrcode';
|