@dynamic-labs/sdk-react-core 4.0.0-alpha.15 → 4.0.0-alpha.16
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 +11 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +5 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +6 -3
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +2 -2
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +2 -2
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/smart-wallet.cjs +59 -0
- package/src/lib/shared/assets/smart-wallet.js +35 -0
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.cjs +1 -0
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.js +1 -0
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +1 -1
- package/src/lib/utils/hooks/usePromise/usePromise.js +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +2 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +8 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +8 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +3 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.16](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.15...v4.0.0-alpha.16) (2024-10-27)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add passkey to web-extension ([#7096](https://github.com/dynamic-labs/dynamic-auth/issues/7096)) ([a4b4643](https://github.com/dynamic-labs/dynamic-auth/commit/a4b4643e5307358425c878067bae095090f322ca))
|
|
8
|
+
* add social to web extension ([#7106](https://github.com/dynamic-labs/dynamic-auth/issues/7106)) ([422bc8e](https://github.com/dynamic-labs/dynamic-auth/commit/422bc8e2d276d960a7a76ad55a7b244c3fd83173))
|
|
9
|
+
* add support for compass and leap wallets ([9738749](https://github.com/dynamic-labs/dynamic-auth/commit/9738749bb5ed8e07a2582df255f683e4d408db93))
|
|
10
|
+
* add support for epicgames social ([#7220](https://github.com/dynamic-labs/dynamic-auth/issues/7220)) ([cb5bc30](https://github.com/dynamic-labs/dynamic-auth/commit/cb5bc30bc17d063bdaa9b427a9358b30124c4589))
|
|
11
|
+
* add web-extension to client ([#7180](https://github.com/dynamic-labs/dynamic-auth/issues/7180)) ([e2ccbb7](https://github.com/dynamic-labs/dynamic-auth/commit/e2ccbb77bdd0250d000a6cc4d89a2e5d7d2f4bb2))
|
|
12
|
+
|
|
2
13
|
## [4.0.0-alpha.15](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.14...v4.0.0-alpha.15) (2024-10-19)
|
|
3
14
|
|
|
4
15
|
## [4.0.0-alpha.14](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.13...v4.0.0-alpha.14) (2024-10-18)
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.0.0-alpha.
|
|
6
|
+
var version = "4.0.0-alpha.16";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.555",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
10
|
"country-list": "2.3.0",
|
|
11
11
|
formik: "2.2.9",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.0.0-alpha.
|
|
2
|
+
var version = "4.0.0-alpha.16";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.555",
|
|
5
5
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
6
6
|
"country-list": "2.3.0",
|
|
7
7
|
formik: "2.2.9",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.16",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.555",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"country-list": "2.3.0",
|
|
8
8
|
"formik": "2.2.9",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"react-i18next": "13.5.0",
|
|
13
13
|
"yup": "0.32.11",
|
|
14
14
|
"react-international-phone": "4.2.5",
|
|
15
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
16
|
-
"@dynamic-labs/iconic": "4.0.0-alpha.
|
|
17
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
18
|
-
"@dynamic-labs/multi-wallet": "4.0.0-alpha.
|
|
19
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
20
|
-
"@dynamic-labs/store": "4.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
15
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.16",
|
|
16
|
+
"@dynamic-labs/iconic": "4.0.0-alpha.16",
|
|
17
|
+
"@dynamic-labs/logger": "4.0.0-alpha.16",
|
|
18
|
+
"@dynamic-labs/multi-wallet": "4.0.0-alpha.16",
|
|
19
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.16",
|
|
20
|
+
"@dynamic-labs/store": "4.0.0-alpha.16",
|
|
21
|
+
"@dynamic-labs/types": "4.0.0-alpha.16",
|
|
22
|
+
"@dynamic-labs/utils": "4.0.0-alpha.16",
|
|
23
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.16",
|
|
24
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.16",
|
|
25
25
|
"eventemitter3": "5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -14,6 +14,7 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
14
14
|
var logger = require('../../shared/logger.cjs');
|
|
15
15
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
16
16
|
var embeddedWalletIcon = require('../../shared/assets/embedded-wallet-icon.cjs');
|
|
17
|
+
var smartWallet = require('../../shared/assets/smart-wallet.cjs');
|
|
17
18
|
require('@dynamic-labs/utils');
|
|
18
19
|
require('../../utils/constants/colors.cjs');
|
|
19
20
|
require('../../utils/constants/values.cjs');
|
|
@@ -106,8 +107,10 @@ const getWalletIcon = ({ findSocialIcon, wallet, user, }) => {
|
|
|
106
107
|
logger.logger.error(err);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
|
-
if (walletConnectorCore.
|
|
110
|
-
|
|
110
|
+
if (walletConnectorCore.isAccountAbstractionConnector(wallet.connector)) {
|
|
111
|
+
return smartWallet.ReactComponent;
|
|
112
|
+
}
|
|
113
|
+
if (walletConnectorCore.isEmbeddedConnector(wallet.connector)) {
|
|
111
114
|
return embeddedWalletIcon.ReactComponent;
|
|
112
115
|
}
|
|
113
116
|
return null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
|
|
4
4
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
5
|
-
import { isEmailOTPWalletConnector, isSocialWalletConnector,
|
|
5
|
+
import { isEmailOTPWalletConnector, isSocialWalletConnector, isAccountAbstractionConnector, isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import { useAccessDeniedContext } from '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
@@ -10,6 +10,7 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
10
10
|
import { logger } from '../../shared/logger.js';
|
|
11
11
|
import '../../context/ViewContext/ViewContext.js';
|
|
12
12
|
import { ReactComponent as SvgEmbeddedWalletIcon } from '../../shared/assets/embedded-wallet-icon.js';
|
|
13
|
+
import { ReactComponent as SvgSmartWallet } from '../../shared/assets/smart-wallet.js';
|
|
13
14
|
import '@dynamic-labs/utils';
|
|
14
15
|
import '../../utils/constants/colors.js';
|
|
15
16
|
import '../../utils/constants/values.js';
|
|
@@ -102,8 +103,10 @@ const getWalletIcon = ({ findSocialIcon, wallet, user, }) => {
|
|
|
102
103
|
logger.error(err);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
106
|
+
if (isAccountAbstractionConnector(wallet.connector)) {
|
|
107
|
+
return SvgSmartWallet;
|
|
108
|
+
}
|
|
109
|
+
if (isEmbeddedConnector(wallet.connector)) {
|
|
107
110
|
return SvgEmbeddedWalletIcon;
|
|
108
111
|
}
|
|
109
112
|
return null;
|
|
@@ -146,7 +146,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
146
146
|
const DynamicContext = React.createContext(undefined);
|
|
147
147
|
/** The context provider itself we only use internally */
|
|
148
148
|
const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, enableInstrumentation = false, }) => {
|
|
149
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
149
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
150
150
|
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, } = settings$1;
|
|
151
151
|
/**
|
|
152
152
|
* initialize Storage
|
|
@@ -305,6 +305,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
305
305
|
canHaveMultipleWalletsConnected: multiWallet,
|
|
306
306
|
connectedWallets,
|
|
307
307
|
primaryWalletId,
|
|
308
|
+
separateSmartWalletAndSigner: (_q = (_p = projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.sdk) === null || _p === void 0 ? void 0 : _p.accountAbstraction) === null || _q === void 0 ? void 0 : _q.separateSmartWalletAndSigner,
|
|
308
309
|
setMultiWalletWidgetState,
|
|
309
310
|
setPrimaryWalletId,
|
|
310
311
|
user: user$1 || userWithMissingInfo,
|
|
@@ -718,7 +719,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
718
719
|
}
|
|
719
720
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
720
721
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
721
|
-
return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((
|
|
722
|
+
return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((_r = projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.design) === null || _r === void 0 ? void 0 : _r.modal) || undefined), designSettings: projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsxs(ViewContext.ViewContextProvider, { initialView: helpers.getInitialView({
|
|
722
723
|
bridgeOnboardingCompleted,
|
|
723
724
|
connectedWallets,
|
|
724
725
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -142,7 +142,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
142
142
|
const DynamicContext = createContext(undefined);
|
|
143
143
|
/** The context provider itself we only use internally */
|
|
144
144
|
const InnerDynamicContextProvider = ({ children, theme, settings, locale, enableInstrumentation = false, }) => {
|
|
145
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
145
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
146
146
|
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, } = settings;
|
|
147
147
|
/**
|
|
148
148
|
* initialize Storage
|
|
@@ -301,6 +301,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
301
301
|
canHaveMultipleWalletsConnected: multiWallet,
|
|
302
302
|
connectedWallets,
|
|
303
303
|
primaryWalletId,
|
|
304
|
+
separateSmartWalletAndSigner: (_q = (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _p === void 0 ? void 0 : _p.accountAbstraction) === null || _q === void 0 ? void 0 : _q.separateSmartWalletAndSigner,
|
|
304
305
|
setMultiWalletWidgetState,
|
|
305
306
|
setPrimaryWalletId,
|
|
306
307
|
user: user || userWithMissingInfo,
|
|
@@ -714,7 +715,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
714
715
|
}
|
|
715
716
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
716
717
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
717
|
-
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((
|
|
718
|
+
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((_r = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _r === void 0 ? void 0 : _r.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsxs(ViewContextProvider, { initialView: getInitialView({
|
|
718
719
|
bridgeOnboardingCompleted,
|
|
719
720
|
connectedWallets,
|
|
720
721
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -92,7 +92,7 @@ const useRedirectSocialHandler = ({ setSocialProvider, }) => {
|
|
|
92
92
|
const { setView } = ViewContext.useViewContext();
|
|
93
93
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
94
94
|
const [socialStorageItem, setSocialStorageItem] = React.useState(null);
|
|
95
|
-
const { sdkHasLoaded, setShowAuthFlow, isRenderingEmbeddedAuthFlow, setShowDynamicUserProfile, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
95
|
+
const { sdkHasLoaded, setShowAuthFlow, isRenderingEmbeddedAuthFlow, setShowDynamicUserProfile, redirectUrl, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
96
96
|
const { completeConnection } = useSocialAuth.useSocialAuth({});
|
|
97
97
|
const updateInterfaceStateForSignIn = React.useCallback((socialStorageItem) => {
|
|
98
98
|
const socialSignInProvider = getSocialSignInProviderForProviderEnum.getSocialSignInProviderForProviderEnum(socialStorageItem.provider);
|
|
@@ -111,7 +111,7 @@ const useRedirectSocialHandler = ({ setSocialProvider, }) => {
|
|
|
111
111
|
// Do not run on server side
|
|
112
112
|
if (isSSR.isSSR())
|
|
113
113
|
return;
|
|
114
|
-
const url = new URL(window.location.href);
|
|
114
|
+
const url = new URL(redirectUrl !== null && redirectUrl !== void 0 ? redirectUrl : window.location.href);
|
|
115
115
|
const dynamicOauthState = url.searchParams.get('dynamicOauthState');
|
|
116
116
|
const dynamicOauthCode = url.searchParams.get('dynamicOauthCode');
|
|
117
117
|
if (!dynamicOauthState || !dynamicOauthCode) {
|
|
@@ -88,7 +88,7 @@ const useRedirectSocialHandler = ({ setSocialProvider, }) => {
|
|
|
88
88
|
const { setView } = useViewContext();
|
|
89
89
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
90
90
|
const [socialStorageItem, setSocialStorageItem] = useState(null);
|
|
91
|
-
const { sdkHasLoaded, setShowAuthFlow, isRenderingEmbeddedAuthFlow, setShowDynamicUserProfile, } = useInternalDynamicContext();
|
|
91
|
+
const { sdkHasLoaded, setShowAuthFlow, isRenderingEmbeddedAuthFlow, setShowDynamicUserProfile, redirectUrl, } = useInternalDynamicContext();
|
|
92
92
|
const { completeConnection } = useSocialAuth({});
|
|
93
93
|
const updateInterfaceStateForSignIn = useCallback((socialStorageItem) => {
|
|
94
94
|
const socialSignInProvider = getSocialSignInProviderForProviderEnum(socialStorageItem.provider);
|
|
@@ -107,7 +107,7 @@ const useRedirectSocialHandler = ({ setSocialProvider, }) => {
|
|
|
107
107
|
// Do not run on server side
|
|
108
108
|
if (isSSR())
|
|
109
109
|
return;
|
|
110
|
-
const url = new URL(window.location.href);
|
|
110
|
+
const url = new URL(redirectUrl !== null && redirectUrl !== void 0 ? redirectUrl : window.location.href);
|
|
111
111
|
const dynamicOauthState = url.searchParams.get('dynamicOauthState');
|
|
112
112
|
const dynamicOauthCode = url.searchParams.get('dynamicOauthCode');
|
|
113
113
|
if (!dynamicOauthState || !dynamicOauthCode) {
|
|
@@ -103,3 +103,4 @@ export { ReactComponent as CurrencyIcon } from './currency.svg';
|
|
|
103
103
|
export { ReactComponent as AuthenticatorIcon } from './authenticator.svg';
|
|
104
104
|
export { ReactComponent as ShieldIcon } from './shield.svg';
|
|
105
105
|
export { ReactComponent as SecureActionIcon } from './secure-action.svg';
|
|
106
|
+
export { ReactComponent as SmartWalletIcon } from './smart-wallet.svg';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
var _path, _path2;
|
|
29
|
+
var _excluded = ["title", "titleId"];
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
var SvgSmartWallet = function SvgSmartWallet(_ref) {
|
|
34
|
+
var title = _ref.title,
|
|
35
|
+
titleId = _ref.titleId,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
38
|
+
width: 32,
|
|
39
|
+
height: 32,
|
|
40
|
+
viewBox: "0 0 32 32",
|
|
41
|
+
fill: "none",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
"aria-labelledby": titleId
|
|
44
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
45
|
+
id: titleId
|
|
46
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
47
|
+
fillRule: "evenodd",
|
|
48
|
+
clipRule: "evenodd",
|
|
49
|
+
d: "M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm4.667-23.467c0-1.03-.836-1.866-1.867-1.866h-8.4A3.734 3.734 0 0 0 6.727 9.73a3.723 3.723 0 0 1 2.74-1.198h11.2ZM21.6 10.4a3.733 3.733 0 0 1 3.733 3.733V21.6a3.733 3.733 0 0 1-3.733 3.733H10.4A3.733 3.733 0 0 1 6.667 21.6v-7.467A3.733 3.733 0 0 1 10.4 10.4h11.2Z",
|
|
50
|
+
fill: "#4779FF"
|
|
51
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
52
|
+
fillRule: "evenodd",
|
|
53
|
+
clipRule: "evenodd",
|
|
54
|
+
d: "M17.455 12.667c.2 0 .38.123.452.31l.572 1.486c.145.379.191.488.254.576a.97.97 0 0 0 .228.228c.088.063.197.109.576.255l1.486.57a.485.485 0 0 1 0 .906l-1.486.571c-.379.146-.488.192-.576.255a.97.97 0 0 0-.228.228c-.063.088-.109.197-.254.576l-.572 1.485a.485.485 0 0 1-.905 0l-.571-1.485c-.146-.379-.192-.488-.254-.576a.97.97 0 0 0-.229-.229c-.088-.062-.197-.108-.576-.254l-1.485-.571a.485.485 0 0 1 0-.905l1.485-.572c.38-.145.488-.191.576-.254a.97.97 0 0 0 .229-.228c.062-.088.108-.197.254-.576l.571-1.486a.485.485 0 0 1 .453-.31ZM13.333 18c.184 0 .352.104.434.268l.38.76c.137.275.18.353.23.42.05.065.11.124.176.175.066.051.144.093.418.23l.761.38a.485.485 0 0 1 0 .867l-.76.38c-.274.138-.353.18-.42.23a.968.968 0 0 0-.175.176c-.05.066-.093.145-.23.419l-.38.76a.485.485 0 0 1-.867 0l-.38-.76c-.138-.274-.18-.353-.23-.419a.968.968 0 0 0-.176-.176c-.066-.05-.145-.092-.419-.23l-.76-.38a.485.485 0 0 1 0-.867l.76-.38c.274-.137.353-.179.419-.23a.968.968 0 0 0 .176-.176c.05-.066.092-.144.23-.418l.38-.761a.485.485 0 0 1 .433-.268Z",
|
|
55
|
+
fill: "#4779FF"
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.ReactComponent = SvgSmartWallet;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var _path, _path2;
|
|
5
|
+
var _excluded = ["title", "titleId"];
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
var SvgSmartWallet = function SvgSmartWallet(_ref) {
|
|
10
|
+
var title = _ref.title,
|
|
11
|
+
titleId = _ref.titleId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
width: 32,
|
|
15
|
+
height: 32,
|
|
16
|
+
viewBox: "0 0 32 32",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
"aria-labelledby": titleId
|
|
20
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
21
|
+
id: titleId
|
|
22
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
clipRule: "evenodd",
|
|
25
|
+
d: "M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm4.667-23.467c0-1.03-.836-1.866-1.867-1.866h-8.4A3.734 3.734 0 0 0 6.727 9.73a3.723 3.723 0 0 1 2.74-1.198h11.2ZM21.6 10.4a3.733 3.733 0 0 1 3.733 3.733V21.6a3.733 3.733 0 0 1-3.733 3.733H10.4A3.733 3.733 0 0 1 6.667 21.6v-7.467A3.733 3.733 0 0 1 10.4 10.4h11.2Z",
|
|
26
|
+
fill: "#4779FF"
|
|
27
|
+
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
clipRule: "evenodd",
|
|
30
|
+
d: "M17.455 12.667c.2 0 .38.123.452.31l.572 1.486c.145.379.191.488.254.576a.97.97 0 0 0 .228.228c.088.063.197.109.576.255l1.486.57a.485.485 0 0 1 0 .906l-1.486.571c-.379.146-.488.192-.576.255a.97.97 0 0 0-.228.228c-.063.088-.109.197-.254.576l-.572 1.485a.485.485 0 0 1-.905 0l-.571-1.485c-.146-.379-.192-.488-.254-.576a.97.97 0 0 0-.229-.229c-.088-.062-.197-.108-.576-.254l-1.485-.571a.485.485 0 0 1 0-.905l1.485-.572c.38-.145.488-.191.576-.254a.97.97 0 0 0 .229-.228c.062-.088.108-.197.254-.576l.571-1.486a.485.485 0 0 1 .453-.31ZM13.333 18c.184 0 .352.104.434.268l.38.76c.137.275.18.353.23.42.05.065.11.124.176.175.066.051.144.093.418.23l.761.38a.485.485 0 0 1 0 .867l-.76.38c-.274.138-.353.18-.42.23a.968.968 0 0 0-.175.176c-.05.066-.093.145-.23.419l-.38.76a.485.485 0 0 1-.867 0l-.38-.76c-.138-.274-.18-.353-.23-.419a.968.968 0 0 0-.176-.176c-.066-.05-.145-.092-.419-.23l-.76-.38a.485.485 0 0 1 0-.867l.76-.38c.274-.137.353-.179.419-.23a.968.968 0 0 0 .176-.176c.05-.066.092-.144.23-.418l.38-.761a.485.485 0 0 1 .433-.268Z",
|
|
31
|
+
fill: "#4779FF"
|
|
32
|
+
})));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { SvgSmartWallet as ReactComponent };
|
|
@@ -37,6 +37,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
37
37
|
return networkConfigurations;
|
|
38
38
|
}, [projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks, cosmosNetworkOverrides, evmNetworksOverrides]);
|
|
39
39
|
const createNetwork = (network, parser = (input) => input) => ({
|
|
40
|
+
bech32Prefix: network.bech32Prefix,
|
|
40
41
|
blockExplorerUrls: network.blockExplorerUrls,
|
|
41
42
|
chainId: parser(network.chainId),
|
|
42
43
|
iconUrls: network.iconUrls,
|
|
@@ -33,6 +33,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
33
33
|
return networkConfigurations;
|
|
34
34
|
}, [projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks, cosmosNetworkOverrides, evmNetworksOverrides]);
|
|
35
35
|
const createNetwork = (network, parser = (input) => input) => ({
|
|
36
|
+
bech32Prefix: network.bech32Prefix,
|
|
36
37
|
blockExplorerUrls: network.blockExplorerUrls,
|
|
37
38
|
chainId: parser(network.chainId),
|
|
38
39
|
iconUrls: network.iconUrls,
|
|
@@ -46,7 +46,7 @@ options) => {
|
|
|
46
46
|
const callTimestamp = new Date().getTime();
|
|
47
47
|
const diffFromLastCall = callTimestamp - lastCallTimestamp.current;
|
|
48
48
|
if (diffFromLastCall < 5) {
|
|
49
|
-
logger.logger.
|
|
49
|
+
logger.logger.logVerboseTroubleshootingMessage('usePromise: Fetcher function was called in very quick succession. Please make sure the fetcher function is not synchronous and that you are not calling it inside a loop.', deps);
|
|
50
50
|
}
|
|
51
51
|
lastCallTimestamp.current = callTimestamp;
|
|
52
52
|
setIsLoading(true);
|
|
@@ -42,7 +42,7 @@ options) => {
|
|
|
42
42
|
const callTimestamp = new Date().getTime();
|
|
43
43
|
const diffFromLastCall = callTimestamp - lastCallTimestamp.current;
|
|
44
44
|
if (diffFromLastCall < 5) {
|
|
45
|
-
logger.
|
|
45
|
+
logger.logVerboseTroubleshootingMessage('usePromise: Fetcher function was called in very quick succession. Please make sure the fetcher function is not synchronous and that you are not calling it inside a loop.', deps);
|
|
46
46
|
}
|
|
47
47
|
lastCallTimestamp.current = callTimestamp;
|
|
48
48
|
setIsLoading(true);
|
|
@@ -21,7 +21,7 @@ require('../../../shared/consts/index.cjs');
|
|
|
21
21
|
var createLinkedWalletsFromWalletOptions = require('./utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs');
|
|
22
22
|
var updateUserWalletsFromLinkedWallets = require('./utils/updateUserWalletsFromLinkedWallets/updateUserWalletsFromLinkedWallets.cjs');
|
|
23
23
|
|
|
24
|
-
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }) => {
|
|
24
|
+
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, separateSmartWalletAndSigner = false, }) => {
|
|
25
25
|
const [showQrcodeModal, setShowQrcodeModal] = React.useState(false);
|
|
26
26
|
const linkedWallets = React.useMemo(() => {
|
|
27
27
|
if (!user) {
|
|
@@ -29,10 +29,16 @@ const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOption
|
|
|
29
29
|
}
|
|
30
30
|
return createLinkedWalletsFromWalletOptions.createLinkedWalletsFromWalletOptions({
|
|
31
31
|
primaryWalletId,
|
|
32
|
+
separateSmartWalletAndSigner,
|
|
32
33
|
user,
|
|
33
34
|
walletConnectorOptions,
|
|
34
35
|
});
|
|
35
|
-
}, [
|
|
36
|
+
}, [
|
|
37
|
+
user,
|
|
38
|
+
primaryWalletId,
|
|
39
|
+
walletConnectorOptions,
|
|
40
|
+
separateSmartWalletAndSigner,
|
|
41
|
+
]);
|
|
36
42
|
logger.logger.logVerboseTroubleshootingMessage('linkedWallets', linkedWallets);
|
|
37
43
|
const wallets = React.useMemo(() => {
|
|
38
44
|
// Before signing the first message we are using connected wallets list
|
|
@@ -11,6 +11,7 @@ type Props = {
|
|
|
11
11
|
setPrimaryWalletId: (walletId: string) => void;
|
|
12
12
|
user?: UserProfile;
|
|
13
13
|
canHaveMultipleWalletsConnected?: boolean;
|
|
14
|
+
separateSmartWalletAndSigner?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export interface UseWalletConnectors {
|
|
16
17
|
primaryWallet: Wallet | null;
|
|
@@ -20,5 +21,5 @@ export interface UseWalletConnectors {
|
|
|
20
21
|
showQrcodeModal: boolean;
|
|
21
22
|
wallets: Wallet[];
|
|
22
23
|
}
|
|
23
|
-
export declare const useWalletConnectors: ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }: Props) => UseWalletConnectors;
|
|
24
|
+
export declare const useWalletConnectors: ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, separateSmartWalletAndSigner, }: Props) => UseWalletConnectors;
|
|
24
25
|
export {};
|
|
@@ -17,7 +17,7 @@ import '../../../shared/consts/index.js';
|
|
|
17
17
|
import { createLinkedWalletsFromWalletOptions } from './utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js';
|
|
18
18
|
import { updateUserWalletsFromLinkedWallets } from './utils/updateUserWalletsFromLinkedWallets/updateUserWalletsFromLinkedWallets.js';
|
|
19
19
|
|
|
20
|
-
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, }) => {
|
|
20
|
+
const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOptions, setMultiWalletWidgetState, primaryWalletId, setPrimaryWalletId, user, canHaveMultipleWalletsConnected, separateSmartWalletAndSigner = false, }) => {
|
|
21
21
|
const [showQrcodeModal, setShowQrcodeModal] = useState(false);
|
|
22
22
|
const linkedWallets = useMemo(() => {
|
|
23
23
|
if (!user) {
|
|
@@ -25,10 +25,16 @@ const useWalletConnectors = ({ authMode, connectedWallets, walletConnectorOption
|
|
|
25
25
|
}
|
|
26
26
|
return createLinkedWalletsFromWalletOptions({
|
|
27
27
|
primaryWalletId,
|
|
28
|
+
separateSmartWalletAndSigner,
|
|
28
29
|
user,
|
|
29
30
|
walletConnectorOptions,
|
|
30
31
|
});
|
|
31
|
-
}, [
|
|
32
|
+
}, [
|
|
33
|
+
user,
|
|
34
|
+
primaryWalletId,
|
|
35
|
+
walletConnectorOptions,
|
|
36
|
+
separateSmartWalletAndSigner,
|
|
37
|
+
]);
|
|
32
38
|
logger.logVerboseTroubleshootingMessage('linkedWallets', linkedWallets);
|
|
33
39
|
const wallets = useMemo(() => {
|
|
34
40
|
// Before signing the first message we are using connected wallets list
|
|
@@ -10,7 +10,7 @@ var shouldManuallyReconnectOnRefresh = require('../../../../functions/shouldManu
|
|
|
10
10
|
var convertLegacyPhantomLedgerConnector = require('../convertLegacyPhantomLedgerConnector/convertLegacyPhantomLedgerConnector.cjs');
|
|
11
11
|
var smartWallet = require('../smartWallet/smartWallet.cjs');
|
|
12
12
|
|
|
13
|
-
const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, primaryWalletId, }) => {
|
|
13
|
+
const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, primaryWalletId, separateSmartWalletAndSigner, }) => {
|
|
14
14
|
// wallet state should be null while loading all the wallets or when there is no user
|
|
15
15
|
if (!walletConnectorOptions || !user) {
|
|
16
16
|
return [];
|
|
@@ -37,7 +37,8 @@ const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, pr
|
|
|
37
37
|
wallet.walletConnector.isHardwareWalletEnabled = true;
|
|
38
38
|
}
|
|
39
39
|
// this account is the owner of a smart wallet, and should not be surfaced
|
|
40
|
-
if (
|
|
40
|
+
if (!separateSmartWalletAndSigner &&
|
|
41
|
+
smartWallet.isOwnerOfASmartWallet(account, user.verifiedCredentials)) {
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
if (account.address && account.chain) {
|
|
@@ -4,6 +4,7 @@ type CreateWalletsFromWalletOptionsProps = {
|
|
|
4
4
|
user: UserProfile;
|
|
5
5
|
primaryWalletId: string | undefined;
|
|
6
6
|
walletConnectorOptions: WalletOption[] | undefined;
|
|
7
|
+
separateSmartWalletAndSigner?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare const createLinkedWalletsFromWalletOptions: ({ user, walletConnectorOptions, primaryWalletId, }: CreateWalletsFromWalletOptionsProps) => Wallet[];
|
|
9
|
+
export declare const createLinkedWalletsFromWalletOptions: ({ user, walletConnectorOptions, primaryWalletId, separateSmartWalletAndSigner, }: CreateWalletsFromWalletOptionsProps) => Wallet[];
|
|
9
10
|
export {};
|
|
@@ -6,7 +6,7 @@ import { shouldManuallyReconnectOnRefresh } from '../../../../functions/shouldMa
|
|
|
6
6
|
import { convertLegacyPhantomLedgerConnector } from '../convertLegacyPhantomLedgerConnector/convertLegacyPhantomLedgerConnector.js';
|
|
7
7
|
import { isOwnerOfASmartWallet, initializeSmartWallet } from '../smartWallet/smartWallet.js';
|
|
8
8
|
|
|
9
|
-
const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, primaryWalletId, }) => {
|
|
9
|
+
const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, primaryWalletId, separateSmartWalletAndSigner, }) => {
|
|
10
10
|
// wallet state should be null while loading all the wallets or when there is no user
|
|
11
11
|
if (!walletConnectorOptions || !user) {
|
|
12
12
|
return [];
|
|
@@ -33,7 +33,8 @@ const createLinkedWalletsFromWalletOptions = ({ user, walletConnectorOptions, pr
|
|
|
33
33
|
wallet.walletConnector.isHardwareWalletEnabled = true;
|
|
34
34
|
}
|
|
35
35
|
// this account is the owner of a smart wallet, and should not be surfaced
|
|
36
|
-
if (
|
|
36
|
+
if (!separateSmartWalletAndSigner &&
|
|
37
|
+
isOwnerOfASmartWallet(account, user.verifiedCredentials)) {
|
|
37
38
|
return null;
|
|
38
39
|
}
|
|
39
40
|
if (account.address && account.chain) {
|