@dynamic-labs/sdk-react-core 2.0.0 → 2.0.1
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +17 -16
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +11 -3
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +11 -3
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.types.d.ts +1 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +41 -40
- package/src/lib/context/FundingContext/FundingContext.cjs +1 -1
- package/src/lib/context/FundingContext/FundingContext.js +1 -1
- package/src/lib/context/FundingContext/useFunding/useFunding.cjs +1 -1
- package/src/lib/context/FundingContext/useFunding/useFunding.js +1 -1
- package/src/lib/data/api/email/email.cjs +5 -5
- package/src/lib/data/api/email/email.d.ts +2 -2
- package/src/lib/data/api/email/email.js +5 -5
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +14 -14
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +14 -14
- package/src/lib/data/api/oauth/oauth.cjs +6 -6
- package/src/lib/data/api/oauth/oauth.js +6 -6
- package/src/lib/data/api/onramp/onramp.cjs +1 -1
- package/src/lib/data/api/onramp/onramp.d.ts +2 -2
- package/src/lib/data/api/onramp/onramp.js +1 -1
- package/src/lib/data/api/session/session.cjs +2 -2
- package/src/lib/data/api/session/session.js +2 -2
- package/src/lib/data/api/sms/sms.cjs +6 -6
- package/src/lib/data/api/sms/sms.d.ts +2 -2
- package/src/lib/data/api/sms/sms.js +6 -6
- package/src/lib/data/api/user/user.cjs +1 -1
- package/src/lib/data/api/user/user.js +1 -1
- package/src/lib/data/api/wallets/wallets.cjs +5 -5
- package/src/lib/data/api/wallets/wallets.js +5 -5
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.d.ts +1 -1
- package/src/lib/utils/constants/values.cjs +1 -1
- package/src/lib/utils/constants/values.js +1 -1
- package/src/lib/utils/functions/getSiweStatement/getSiweStatement.d.ts +1 -1
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +4 -4
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +1 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
- package/src/lib/utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +4 -4
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +4 -4
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +5 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +4 -4
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +1 -1
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +1 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.d.ts +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +4 -4
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +4 -4
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +1 -1
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +1 -1
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +1 -1
- package/src/lib/utils/hooks/useResizeObserver/useResizeObserver.d.ts +1 -1
- package/src/lib/utils/hooks/useSocialAuth/farcaster.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/farcaster.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAuth/farcaster.js +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +11 -10
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +2 -2
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +11 -10
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -4
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +7 -7
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +3 -3
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +7 -7
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +3 -3
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +3 -3
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +1 -1
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +1 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +23 -23
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.d.ts +2 -2
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +23 -23
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +2 -6
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +2 -6
|
@@ -9,7 +9,7 @@ export declare const initEmbeddedWalletSession: ({ authenticatorType, authToken,
|
|
|
9
9
|
environmentId: string;
|
|
10
10
|
userEmail: string;
|
|
11
11
|
wallet: Wallet | null;
|
|
12
|
-
sessionExpiration?: number
|
|
12
|
+
sessionExpiration?: number;
|
|
13
13
|
}) => Promise<{
|
|
14
14
|
decodedJwt: Omit<DynamicJwt, 'jwt'>;
|
|
15
15
|
passkeyRecoveryResponse: VerifyResponse;
|
|
@@ -49,7 +49,7 @@ export declare const restoreEmbeddedWalletSession: ({ authToken, iframeContainer
|
|
|
49
49
|
iframeContainer: HTMLElement;
|
|
50
50
|
iframeElementId: string;
|
|
51
51
|
wallet: Wallet | null;
|
|
52
|
-
sessionExpiration?: number
|
|
52
|
+
sessionExpiration?: number;
|
|
53
53
|
}) => Promise<boolean>;
|
|
54
54
|
export declare const addEmailRecovery: ({ authToken, userEmail, environmentId, wallet, }: {
|
|
55
55
|
authToken: string | undefined;
|
|
@@ -26,8 +26,8 @@ import 'viem';
|
|
|
26
26
|
import 'viem/chains';
|
|
27
27
|
import { iframeElementId } from '../../PasskeyRecovery/constants.js';
|
|
28
28
|
|
|
29
|
-
const initEmbeddedWalletSession = ({ authenticatorType, authToken, iframeContainer, iframeElementId, environmentId, userEmail, wallet, sessionExpiration, })
|
|
30
|
-
var
|
|
29
|
+
const initEmbeddedWalletSession = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authenticatorType, authToken, iframeContainer, iframeElementId, environmentId, userEmail, wallet, sessionExpiration, }) {
|
|
30
|
+
var _b;
|
|
31
31
|
if (!authToken) {
|
|
32
32
|
throw new DynamicError('Auth token is not defined');
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ const initEmbeddedWalletSession = ({ authenticatorType, authToken, iframeContain
|
|
|
36
36
|
!isPasskeyWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
37
37
|
throw new DynamicError('PasskeyWalletConnector not found');
|
|
38
38
|
}
|
|
39
|
-
const turnkeyRecoveryHandler = (
|
|
39
|
+
const turnkeyRecoveryHandler = (_b = wallet.connector) === null || _b === void 0 ? void 0 : _b.getAuthenticatorHandler();
|
|
40
40
|
if (authenticatorType === 'passkey' &&
|
|
41
41
|
turnkeyRecoveryHandler.isSessionActive()) {
|
|
42
42
|
return addNewPasskeyAuthenticator({
|
|
@@ -63,8 +63,8 @@ const initEmbeddedWalletSession = ({ authenticatorType, authToken, iframeContain
|
|
|
63
63
|
: response.turnkeyUserId;
|
|
64
64
|
return;
|
|
65
65
|
});
|
|
66
|
-
const passkeyRecoveryBundleValidation = (
|
|
67
|
-
var
|
|
66
|
+
const passkeyRecoveryBundleValidation = (_c) => __awaiter(void 0, [_c], void 0, function* ({ authToken, bundleInput, wallet, }) {
|
|
67
|
+
var _d, _e, _f, _g;
|
|
68
68
|
if (!bundleInput) {
|
|
69
69
|
throw new DynamicError('Code must be informed');
|
|
70
70
|
}
|
|
@@ -77,8 +77,8 @@ const passkeyRecoveryBundleValidation = ({ authToken, bundleInput, wallet, }) =>
|
|
|
77
77
|
if (!decodedJwt) {
|
|
78
78
|
throw new DynamicError('User must be logged in with a valid token');
|
|
79
79
|
}
|
|
80
|
-
const organizationId = (
|
|
81
|
-
const turnkeyRecoveryHandler = (
|
|
80
|
+
const organizationId = (_f = (_e = (_d = decodedJwt.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _e === void 0 ? void 0 : _e.walletProperties) === null || _f === void 0 ? void 0 : _f.turnkeySubOrganizationId;
|
|
81
|
+
const turnkeyRecoveryHandler = (_g = wallet.connector) === null || _g === void 0 ? void 0 : _g.getAuthenticatorHandler();
|
|
82
82
|
yield turnkeyRecoveryHandler.verifyRecoveryCode(bundleInput, organizationId);
|
|
83
83
|
const sessionSettings = {
|
|
84
84
|
createdAt: new Date().getTime(),
|
|
@@ -87,8 +87,8 @@ const passkeyRecoveryBundleValidation = ({ authToken, bundleInput, wallet, }) =>
|
|
|
87
87
|
};
|
|
88
88
|
LocalStorage.setToLS(EMBEDDED_WALLET_SESSION_SETTINGS, sessionSettings);
|
|
89
89
|
});
|
|
90
|
-
const resentRecoveryEmail = (
|
|
91
|
-
var
|
|
90
|
+
const resentRecoveryEmail = (_h) => __awaiter(void 0, [_h], void 0, function* ({ authenticatorType, authToken, environmentId, wallet, }) {
|
|
91
|
+
var _j;
|
|
92
92
|
if (!authToken) {
|
|
93
93
|
throw new DynamicError('Auth token is not defined');
|
|
94
94
|
}
|
|
@@ -97,7 +97,7 @@ const resentRecoveryEmail = ({ authenticatorType, authToken, environmentId, wall
|
|
|
97
97
|
!isPasskeyWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
98
98
|
throw new DynamicError('PasskeyWalletConnector not found');
|
|
99
99
|
}
|
|
100
|
-
const publicKey = (
|
|
100
|
+
const publicKey = (_j = wallet.connector) === null || _j === void 0 ? void 0 : _j.getAuthenticatorHandler().publicKey;
|
|
101
101
|
if (!publicKey) {
|
|
102
102
|
throw new DynamicError('Could not proceed with your request. Please restart the process.');
|
|
103
103
|
}
|
|
@@ -109,8 +109,8 @@ const resentRecoveryEmail = ({ authenticatorType, authToken, environmentId, wall
|
|
|
109
109
|
walletId: wallet === null || wallet === void 0 ? void 0 : wallet.id,
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
const completePasskeyRecovery = (
|
|
113
|
-
var
|
|
112
|
+
const completePasskeyRecovery = (_k) => __awaiter(void 0, [_k], void 0, function* ({ authToken, userEmail, environmentId, wallet, }) {
|
|
113
|
+
var _l, _m, _o;
|
|
114
114
|
if (!authToken) {
|
|
115
115
|
throw new DynamicError('User must be logged in');
|
|
116
116
|
}
|
|
@@ -125,7 +125,7 @@ const completePasskeyRecovery = ({ authToken, userEmail, environmentId, wallet,
|
|
|
125
125
|
}
|
|
126
126
|
const connector = wallet.connector;
|
|
127
127
|
connector.setEmail(userEmail);
|
|
128
|
-
const organizationId = (
|
|
128
|
+
const organizationId = (_o = (_m = (_l = decodedJwt.verifiedCredentials) === null || _l === void 0 ? void 0 : _l.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _m === void 0 ? void 0 : _m.walletProperties) === null || _o === void 0 ? void 0 : _o.turnkeySubOrganizationId;
|
|
129
129
|
if (!organizationId) {
|
|
130
130
|
throw new DynamicError('Invalid token!');
|
|
131
131
|
}
|
|
@@ -165,8 +165,8 @@ const completePasskeyRecovery = ({ authToken, userEmail, environmentId, wallet,
|
|
|
165
165
|
passkeyRecoveryResponse,
|
|
166
166
|
};
|
|
167
167
|
});
|
|
168
|
-
const addNewPasskeyAuthenticator = (
|
|
169
|
-
var
|
|
168
|
+
const addNewPasskeyAuthenticator = (_p) => __awaiter(void 0, [_p], void 0, function* ({ authToken, userEmail, environmentId, wallet, }) {
|
|
169
|
+
var _q, _r, _s;
|
|
170
170
|
if (!authToken) {
|
|
171
171
|
throw new DynamicError('User must be logged in');
|
|
172
172
|
}
|
|
@@ -181,7 +181,7 @@ const addNewPasskeyAuthenticator = ({ authToken, userEmail, environmentId, walle
|
|
|
181
181
|
}
|
|
182
182
|
const connector = wallet.connector;
|
|
183
183
|
connector.setEmail(userEmail);
|
|
184
|
-
const organizationId = (
|
|
184
|
+
const organizationId = (_s = (_r = (_q = decodedJwt.verifiedCredentials) === null || _q === void 0 ? void 0 : _q.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _r === void 0 ? void 0 : _r.walletProperties) === null || _s === void 0 ? void 0 : _s.turnkeySubOrganizationId;
|
|
185
185
|
if (!organizationId) {
|
|
186
186
|
throw new DynamicError('Invalid token!');
|
|
187
187
|
}
|
|
@@ -235,8 +235,8 @@ const canRestoreEmbeddedWalletSession = (sessionExpirationTime) => {
|
|
|
235
235
|
}
|
|
236
236
|
return true;
|
|
237
237
|
};
|
|
238
|
-
const restoreEmbeddedWalletSession = (
|
|
239
|
-
var
|
|
238
|
+
const restoreEmbeddedWalletSession = (_t) => __awaiter(void 0, [_t], void 0, function* ({ authToken, iframeContainer, iframeElementId, wallet, sessionExpiration, }) {
|
|
239
|
+
var _u, _v, _w, _x;
|
|
240
240
|
if (!authToken) {
|
|
241
241
|
throw new DynamicError('Auth token is not defined');
|
|
242
242
|
}
|
|
@@ -250,7 +250,7 @@ const restoreEmbeddedWalletSession = ({ authToken, iframeContainer, iframeElemen
|
|
|
250
250
|
throw new DynamicError('PasskeyWalletConnector not found');
|
|
251
251
|
}
|
|
252
252
|
const sessionSettings = LocalStorage.getFromLS(EMBEDDED_WALLET_SESSION_SETTINGS);
|
|
253
|
-
const turnkeyRecoveryHandler = (
|
|
253
|
+
const turnkeyRecoveryHandler = (_u = wallet.connector) === null || _u === void 0 ? void 0 : _u.getAuthenticatorHandler();
|
|
254
254
|
if (!sessionSettings || Boolean(turnkeyRecoveryHandler.recoveryUserId)) {
|
|
255
255
|
return false;
|
|
256
256
|
}
|
|
@@ -259,12 +259,12 @@ const restoreEmbeddedWalletSession = ({ authToken, iframeContainer, iframeElemen
|
|
|
259
259
|
throw new DynamicError('Could not open embedded wallet connection communication');
|
|
260
260
|
}
|
|
261
261
|
turnkeyRecoveryHandler.recoveryUserId = sessionSettings.userId;
|
|
262
|
-
const organizationId = (
|
|
262
|
+
const organizationId = (_x = (_w = (_v = decodedJwt.verifiedCredentials) === null || _v === void 0 ? void 0 : _v.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _w === void 0 ? void 0 : _w.walletProperties) === null || _x === void 0 ? void 0 : _x.turnkeySubOrganizationId;
|
|
263
263
|
yield turnkeyRecoveryHandler.verifyRecoveryCode(sessionSettings.emailCode, organizationId);
|
|
264
264
|
return true;
|
|
265
265
|
});
|
|
266
|
-
const addEmailRecovery = (
|
|
267
|
-
var
|
|
266
|
+
const addEmailRecovery = (_y) => __awaiter(void 0, [_y], void 0, function* ({ authToken, userEmail, environmentId, wallet, }) {
|
|
267
|
+
var _z, _0;
|
|
268
268
|
if (!authToken) {
|
|
269
269
|
throw new DynamicError('User must be logged in');
|
|
270
270
|
}
|
|
@@ -278,7 +278,7 @@ const addEmailRecovery = ({ authToken, userEmail, environmentId, wallet, }) => _
|
|
|
278
278
|
!isEmailWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
279
279
|
throw new DynamicError('PasskeyWalletConnector not found');
|
|
280
280
|
}
|
|
281
|
-
const { turnkeySubOrganizationId, turnkeyUserId } = (
|
|
281
|
+
const { turnkeySubOrganizationId, turnkeyUserId } = (_0 = (_z = decodedJwt.verifiedCredentials) === null || _z === void 0 ? void 0 : _z.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _0 === void 0 ? void 0 : _0.walletProperties;
|
|
282
282
|
if (!turnkeySubOrganizationId || !turnkeyUserId) {
|
|
283
283
|
throw new DynamicError('Invalid token!');
|
|
284
284
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletIconWithNetwork } from './WalletIconWithNetwork';
|
|
@@ -75,9 +75,9 @@ require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
|
75
75
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
76
76
|
|
|
77
77
|
const useFetchNameService = (address) => {
|
|
78
|
-
const { getNameService } = useInternalDynamicContext.useInternalDynamicContext();
|
|
78
|
+
const { getNameService, network } = useInternalDynamicContext.useInternalDynamicContext();
|
|
79
79
|
const { data: nameService } = usePromise.usePromise(() => getNameService(address), {
|
|
80
|
-
deps: [address],
|
|
80
|
+
deps: [address, network],
|
|
81
81
|
});
|
|
82
82
|
return nameService;
|
|
83
83
|
};
|
|
@@ -71,9 +71,9 @@ import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
|
71
71
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
72
72
|
|
|
73
73
|
const useFetchNameService = (address) => {
|
|
74
|
-
const { getNameService } = useInternalDynamicContext();
|
|
74
|
+
const { getNameService, network } = useInternalDynamicContext();
|
|
75
75
|
const { data: nameService } = usePromise(() => getNameService(address), {
|
|
76
|
-
deps: [address],
|
|
76
|
+
deps: [address, network],
|
|
77
77
|
});
|
|
78
78
|
return nameService;
|
|
79
79
|
};
|
|
@@ -158,13 +158,9 @@ const WalletSettingsView = () => {
|
|
|
158
158
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
159
159
|
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, { className: 'wallet-settings-view__body__section__button__icon', defaultIcon: jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'default-icon' }) }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Badge.Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsxRuntime.jsx(Button.Button, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
160
160
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
161
|
-
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(altKey.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet && (jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-settings-view__body__section__title', {
|
|
162
|
-
'wallet-settings-view__body__section__title__info-icon': !hasRecoveryEmail,
|
|
163
|
-
}), children: [t('dyn_wallet_settings.identity_section.title'), !hasRecoveryEmail && (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) }))] }), jsxRuntime.jsx(Button.Button, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames.classNames('wallet-settings-view__body__section__button', {
|
|
164
|
-
'wallet-settings-view__body__section__button__badge': !hasRecoveryEmail,
|
|
165
|
-
}), startSlot:
|
|
161
|
+
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(altKey.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet && !hasRecoveryEmail && (jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-settings-view__body__section__title', 'wallet-settings-view__body__section__title__info-icon'), children: [t('dyn_wallet_settings.identity_section.title'), jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsxRuntime.jsx(Button.Button, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames.classNames('wallet-settings-view__body__section__button', 'wallet-settings-view__body__section__button__badge'), startSlot:
|
|
166
162
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
167
|
-
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(signInWithEmail.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon email' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }),
|
|
163
|
+
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(signInWithEmail.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon email' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }), jsxRuntime.jsx(Badge.Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'wallet-settings-view__body__section__title', children: t('dyn_wallet_settings.export_section.title') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
168
164
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
169
165
|
jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportPrivateKey.ReactComponent, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.private_key_button', children: t('dyn_wallet_settings.export_section.private_key_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsxRuntime.jsx(Button.Button, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
170
166
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
@@ -154,13 +154,9 @@ const WalletSettingsView = () => {
|
|
|
154
154
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
155
155
|
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(PasskeyDeviceIcon, { className: 'wallet-settings-view__body__section__button__icon', defaultIcon: jsx(SvgAndroidTouchId, { "data-testid": 'default-icon' }) }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsx(Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsx(Button, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
156
156
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
157
|
-
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgAltKey, { className: 'wallet-settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsx(SvgCheckCircle, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet && (jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxs("div", { className: classNames('wallet-settings-view__body__section__title', {
|
|
158
|
-
'wallet-settings-view__body__section__title__info-icon': !hasRecoveryEmail,
|
|
159
|
-
}), children: [t('dyn_wallet_settings.identity_section.title'), !hasRecoveryEmail && (jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) }))] }), jsx(Button, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames('wallet-settings-view__body__section__button', {
|
|
160
|
-
'wallet-settings-view__body__section__button__badge': !hasRecoveryEmail,
|
|
161
|
-
}), startSlot:
|
|
157
|
+
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgAltKey, { className: 'wallet-settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsx(SvgCheckCircle, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet && !hasRecoveryEmail && (jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxs("div", { className: classNames('wallet-settings-view__body__section__title', 'wallet-settings-view__body__section__title__info-icon'), children: [t('dyn_wallet_settings.identity_section.title'), jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsx(Button, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames('wallet-settings-view__body__section__button', 'wallet-settings-view__body__section__button__badge'), startSlot:
|
|
162
158
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
163
|
-
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgSignInWithEmail, { className: 'wallet-settings-view__body__section__button__icon email' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }),
|
|
159
|
+
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgSignInWithEmail, { className: 'wallet-settings-view__body__section__button__icon email' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }), jsx(Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsx("div", { className: 'wallet-settings-view__body__section__title', children: t('dyn_wallet_settings.export_section.title') }), jsx(Button, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
164
160
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
165
161
|
jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.private_key_button', children: t('dyn_wallet_settings.export_section.private_key_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsx(Button, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
|
|
166
162
|
// eslint-disable-next-line react/jsx-wrap-multilines
|