@dynamic-labs/sdk-react-core 5.8.0 → 5.8.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 +7 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/index.d.ts +3 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -0
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/data/api/wallets/wallets.cjs +4 -4
- package/src/lib/data/api/wallets/wallets.js +5 -5
- package/src/lib/utils/constants/authViewLayoutChecks.cjs +2 -2
- package/src/lib/utils/constants/authViewLayoutChecks.js +2 -2
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -4
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +3 -3
- package/src/lib/views/NoAccess/useNoAccessText.cjs +19 -19
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +8 -8
- package/src/lib/views/NoAccess/useNoAccessText.js +19 -19
- package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs +1 -1
- package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js +1 -1
- package/src/lib/views/viewToComponentMap.cjs +1 -1
- package/src/lib/views/viewToComponentMap.d.ts +1 -1
- package/src/lib/views/viewToComponentMap.js +1 -1
- package/src/version.cjs +2 -0
- package/src/version.d.ts +1 -0
- package/src/version.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [5.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.8.0...v5.8.1) (2026-09-15)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **wallet-connect:** fix Rabby WalletConnect connection ([#12385](https://github.com/dynamic-labs/dynamic-auth/issues/12385)) ([df2a93c](https://github.com/dynamic-labs/dynamic-auth/commit/df2a93cd95b75b74dd47468faedad88c463b14de))
|
|
8
|
+
|
|
2
9
|
## [5.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.7.0...v5.8.0) (2026-09-09)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "5.8.
|
|
6
|
+
var version = "5.8.1";
|
|
7
7
|
var dependencies = {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.32.0",
|
|
9
|
-
"@dynamic-labs-sdk/client": "1.31.
|
|
9
|
+
"@dynamic-labs-sdk/client": "1.31.2",
|
|
10
10
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.118",
|
|
11
11
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
|
|
12
12
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "5.8.
|
|
2
|
+
var version = "5.8.1";
|
|
3
3
|
var dependencies = {
|
|
4
4
|
"@dynamic-labs/sdk-api-core": "0.32.0",
|
|
5
|
-
"@dynamic-labs-sdk/client": "1.31.
|
|
5
|
+
"@dynamic-labs-sdk/client": "1.31.2",
|
|
6
6
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.118",
|
|
7
7
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
|
|
8
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.32.0",
|
|
6
|
-
"@dynamic-labs-sdk/client": "1.31.
|
|
6
|
+
"@dynamic-labs-sdk/client": "1.31.2",
|
|
7
7
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.118",
|
|
8
8
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"react-i18next": "13.5.0",
|
|
19
19
|
"react-international-phone": "4.5.0",
|
|
20
20
|
"yup": "0.32.11",
|
|
21
|
-
"@dynamic-labs/assert-package-version": "5.8.
|
|
22
|
-
"@dynamic-labs/iconic": "5.8.
|
|
23
|
-
"@dynamic-labs/locale": "5.8.
|
|
24
|
-
"@dynamic-labs/logger": "5.8.
|
|
25
|
-
"@dynamic-labs/multi-wallet": "5.8.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "5.8.
|
|
27
|
-
"@dynamic-labs/store": "5.8.
|
|
28
|
-
"@dynamic-labs/types": "5.8.
|
|
29
|
-
"@dynamic-labs/utils": "5.8.
|
|
30
|
-
"@dynamic-labs/wallet-book": "5.8.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "5.8.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "5.8.1",
|
|
22
|
+
"@dynamic-labs/iconic": "5.8.1",
|
|
23
|
+
"@dynamic-labs/locale": "5.8.1",
|
|
24
|
+
"@dynamic-labs/logger": "5.8.1",
|
|
25
|
+
"@dynamic-labs/multi-wallet": "5.8.1",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "5.8.1",
|
|
27
|
+
"@dynamic-labs/store": "5.8.1",
|
|
28
|
+
"@dynamic-labs/types": "5.8.1",
|
|
29
|
+
"@dynamic-labs/utils": "5.8.1",
|
|
30
|
+
"@dynamic-labs/wallet-book": "5.8.1",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "5.8.1",
|
|
32
32
|
"eventemitter3": "5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
package/src/index.d.ts
CHANGED
|
@@ -104,7 +104,9 @@ export { getDefaultColor, getThemeConfig, themesData, } from './lib/context/Them
|
|
|
104
104
|
export type {
|
|
105
105
|
/** @deprecated */
|
|
106
106
|
ViewType, } from './lib/context/ViewContext';
|
|
107
|
-
export type { NotSupportedError, SandboxMaximumThresholdReachedError, NoAccessError,
|
|
107
|
+
export type { NotSupportedError, SandboxMaximumThresholdReachedError, NoAccessError,
|
|
108
|
+
/** @deprecated use WalletScreeningBlockedError */
|
|
109
|
+
ChainalysisError, WalletScreeningBlockedError, EmailAlreadyExistsError, UsernameAlreadyExistsError, SocialAccountAlreadyExistsError, WalletNotDeployedError, WalletUsedError, EmailVerificationError, AccountExistsError, InvalidPhoneNumberError, PhoneNumberAlreadyLinkedError, RateLimitError, } from '@dynamic-labs/utils';
|
|
108
110
|
export type { WalletConnector, Chain, } from '@dynamic-labs/wallet-connector-core';
|
|
109
111
|
export type { EvmNetwork, PhoneData, OtpDestination, UserProfile,
|
|
110
112
|
/** @deprecated use AuthOptions instead */
|
|
@@ -20,6 +20,7 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
20
20
|
require('eventemitter3');
|
|
21
21
|
require('@dynamic-labs-sdk/client');
|
|
22
22
|
var useInitializeSdkClient = require('../../client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs');
|
|
23
|
+
var version = require('../../../version.cjs');
|
|
23
24
|
var values = require('../../utils/constants/values.cjs');
|
|
24
25
|
require('@dynamic-labs/multi-wallet');
|
|
25
26
|
var logger$1 = require('../../shared/logger.cjs');
|
|
@@ -775,6 +776,8 @@ const DynamicContextProvider = (props) => {
|
|
|
775
776
|
useInitializeSdkClient.useInitializeSdkClient(props, reinitializeState.key);
|
|
776
777
|
logger.Logger.setEnvironmentId(props.settings.environmentId);
|
|
777
778
|
logger.Logger.setEmitErrors(props.emitErrors);
|
|
779
|
+
logger.Logger.globalMetaData.set('sdkReactCoreVersion', version.VERSION);
|
|
780
|
+
logger.Logger.globalMetaData.set('sdkVersion', version.CLIENT_VERSION);
|
|
778
781
|
useParentDynamicContextGuard.useParentDynamicContextGuard();
|
|
779
782
|
return (jsxRuntime.jsx(ReinitializeContextProvider.ReinitializeContextProvider, { reinitializeState: reinitializeState, onReinitialize: onReinitialize.onReinitialize, children: jsxRuntime.jsx(ErrorBoundary.ErrorBoundary, { children: jsxRuntime.jsx(ErrorContext.ErrorContextProvider, { children: jsxRuntime.jsx(UserWalletsContext.UserWalletsProvider, { children: jsxRuntime.jsx(FieldsStateContext.FieldsStateProvider, { children: jsxRuntime.jsx(IpConfigurationContext.IpConfigurationContextProvider, { children: jsxRuntime.jsx(WidgetRegistryContextProvider.WidgetRegistryContextProvider, { children: jsxRuntime.jsx(InnerDynamicContextProvider, Object.assign({}, props)) }) }) }) }) }) }) }));
|
|
780
783
|
};
|
|
@@ -16,6 +16,7 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
16
16
|
import 'eventemitter3';
|
|
17
17
|
import '@dynamic-labs-sdk/client';
|
|
18
18
|
import { useInitializeSdkClient } from '../../client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js';
|
|
19
|
+
import { VERSION, CLIENT_VERSION } from '../../../version.js';
|
|
19
20
|
import { DEFAULT_NUMBER_OF_WALLETS_TO_SHOW } from '../../utils/constants/values.js';
|
|
20
21
|
import '@dynamic-labs/multi-wallet';
|
|
21
22
|
import { logger } from '../../shared/logger.js';
|
|
@@ -771,6 +772,8 @@ const DynamicContextProvider = (props) => {
|
|
|
771
772
|
useInitializeSdkClient(props, reinitializeState.key);
|
|
772
773
|
Logger.setEnvironmentId(props.settings.environmentId);
|
|
773
774
|
Logger.setEmitErrors(props.emitErrors);
|
|
775
|
+
Logger.globalMetaData.set('sdkReactCoreVersion', VERSION);
|
|
776
|
+
Logger.globalMetaData.set('sdkVersion', CLIENT_VERSION);
|
|
774
777
|
useParentDynamicContextGuard();
|
|
775
778
|
return (jsx(ReinitializeContextProvider, { reinitializeState: reinitializeState, onReinitialize: onReinitialize, children: jsx(ErrorBoundary, { children: jsx(ErrorContextProvider, { children: jsx(UserWalletsProvider, { children: jsx(FieldsStateProvider, { children: jsx(IpConfigurationContextProvider, { children: jsx(WidgetRegistryContextProvider, { children: jsx(InnerDynamicContextProvider, Object.assign({}, props)) }) }) }) }) }) }) }));
|
|
776
779
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
2
|
import type { viewToComponentMap } from '../../../views/viewToComponentMap';
|
|
3
|
-
export type ViewType = 'auth-loading' | 'access-blocked' | 'backup-unsuccessful' | 'select-hardware-wallet' | 'captcha' | '
|
|
3
|
+
export type ViewType = 'auth-loading' | 'access-blocked' | 'backup-unsuccessful' | 'select-hardware-wallet' | 'captcha' | 'collect-user-data' | 'collect-user-data-login-no-wallet' | 'device-registration' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'login-with-sms-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'verify-email' | 'verify-sms' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'unified-wallet-exchange-list' | 'external-funding-exchange-list' | 'external-funding-wallet-list' | 'mfa-exchange-view' | 'exchange-whitelist-warning' | 'sandbox-maximum-threshold-reached' | 'multi-wallet-wallet-list' | 'duplicate-wallet' | 'wallet-screening-blocked' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'select-wallet-in-wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'merge-user-accounts-conflicts' | 'merge-user-accounts-with-same-email' | 'mfa-choose-device' | 'mfa-recovery' | 'mfa-secure-device' | 'mfa-secure-device-help' | 'mfa-verification' | 'mfa-display-backup-codes' | 'wallet-cannot-be-transferred' | 'global-wallet-confirm' | 'global-wallet-malicious' | 'global-wallet-info' | 'passkey-setup' | 'passkey-confirm' | 'embedded-reveal-view' | 'export-shares-view' | 'embedded-reveal-account-view' | 'rename-passkey' | 'wallet-redirect-view' | 'mobile-wallet-redirect-view' | 'farcaster-connect-view' | 'embedded-wallet-exists' | 'user-delete-account' | 'wallet-delegation-view' | 'waas-backup-view' | 'waas-backup-info-view' | 'waas-backup-cloud-provider-view' | 'waas-backup-download-view' | 'waas-backup-grant-access-view' | 'waas-backup-progress-view' | 'waas-backup-success-view' | 'setup-password-terms' | 'setup-password-for-wallet-creation' | 'reset-password-flow' | 'unlock-wallet' | 'step-up-reauth-choose' | 'step-up-reauth-otp' | 'step-up-reauth-social' | 'step-up-reauth-wallet';
|
|
4
4
|
export type ViewMapConstraint = Record<ViewType, FC<any>>;
|
|
5
5
|
export type ViewMap = typeof viewToComponentMap;
|
|
6
6
|
export type ViewState<T extends ViewType> = {
|
|
@@ -179,8 +179,8 @@ const verifyWallet = (environmentId_3, _f) => _tslib.__awaiter(void 0, [environm
|
|
|
179
179
|
if (data.code === utils$1.SdkErrorCode.WALLET_NOT_DEPLOYED) {
|
|
180
180
|
throw new utils$1.WalletNotDeployedError();
|
|
181
181
|
}
|
|
182
|
-
if (((_g = data.error) === null || _g === void 0 ? void 0 : _g.code)
|
|
183
|
-
throw new utils$1.
|
|
182
|
+
if (utils$1.SCREENING_BLOCKED_WALLET_ERROR_CODES.includes((_g = data.error) === null || _g === void 0 ? void 0 : _g.code)) {
|
|
183
|
+
throw new utils$1.WalletScreeningBlockedError(data.payload.walletPublicKey, data.error.code);
|
|
184
184
|
}
|
|
185
185
|
if (((_h = data.error) === null || _h === void 0 ? void 0 : _h.code) === 'gate_blocked') {
|
|
186
186
|
throw new utils$1.GateBlockedError(data.payload.walletPublicKey);
|
|
@@ -231,8 +231,8 @@ const walletsVerify = (environmentId_4, _l) => _tslib.__awaiter(void 0, [environ
|
|
|
231
231
|
if (data.code === utils$1.SdkErrorCode.WALLET_NOT_DEPLOYED) {
|
|
232
232
|
throw new utils$1.WalletNotDeployedError();
|
|
233
233
|
}
|
|
234
|
-
if (((_m = data.error) === null || _m === void 0 ? void 0 : _m.code)
|
|
235
|
-
throw new utils$1.
|
|
234
|
+
if (utils$1.SCREENING_BLOCKED_WALLET_ERROR_CODES.includes((_m = data.error) === null || _m === void 0 ? void 0 : _m.code)) {
|
|
235
|
+
throw new utils$1.WalletScreeningBlockedError(data.payload.walletPublicKey, data.error.code);
|
|
236
236
|
}
|
|
237
237
|
if (((_o = data.error) === null || _o === void 0 ? void 0 : _o.code) === 'gate_blocked') {
|
|
238
238
|
throw new utils$1.GateBlockedError(data.payload.walletPublicKey);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { getElevatedAccessToken } from '@dynamic-labs-sdk/client';
|
|
4
4
|
import { TokenScope, VerifyRequestFromJSON } from '@dynamic-labs/sdk-api-core';
|
|
5
|
-
import { DynamicError, EmbeddedWalletExistsError, WalletUsedError, MergeAccountsConfirmationError, SandboxMaximumThresholdReachedError, SdkErrorCode, WalletNotDeployedError,
|
|
5
|
+
import { DynamicError, EmbeddedWalletExistsError, WalletUsedError, MergeAccountsConfirmationError, SandboxMaximumThresholdReachedError, SdkErrorCode, WalletNotDeployedError, SCREENING_BLOCKED_WALLET_ERROR_CODES, WalletScreeningBlockedError, GateBlockedError, NoAccessError, ErrorCode, AccountExistsError } from '@dynamic-labs/utils';
|
|
6
6
|
import '@dynamic-labs-sdk/client/core';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'eventemitter3';
|
|
@@ -175,8 +175,8 @@ const verifyWallet = (environmentId_3, _f) => __awaiter(void 0, [environmentId_3
|
|
|
175
175
|
if (data.code === SdkErrorCode.WALLET_NOT_DEPLOYED) {
|
|
176
176
|
throw new WalletNotDeployedError();
|
|
177
177
|
}
|
|
178
|
-
if (((_g = data.error) === null || _g === void 0 ? void 0 : _g.code)
|
|
179
|
-
throw new
|
|
178
|
+
if (SCREENING_BLOCKED_WALLET_ERROR_CODES.includes((_g = data.error) === null || _g === void 0 ? void 0 : _g.code)) {
|
|
179
|
+
throw new WalletScreeningBlockedError(data.payload.walletPublicKey, data.error.code);
|
|
180
180
|
}
|
|
181
181
|
if (((_h = data.error) === null || _h === void 0 ? void 0 : _h.code) === 'gate_blocked') {
|
|
182
182
|
throw new GateBlockedError(data.payload.walletPublicKey);
|
|
@@ -227,8 +227,8 @@ const walletsVerify = (environmentId_4, _l) => __awaiter(void 0, [environmentId_
|
|
|
227
227
|
if (data.code === SdkErrorCode.WALLET_NOT_DEPLOYED) {
|
|
228
228
|
throw new WalletNotDeployedError();
|
|
229
229
|
}
|
|
230
|
-
if (((_m = data.error) === null || _m === void 0 ? void 0 : _m.code)
|
|
231
|
-
throw new
|
|
230
|
+
if (SCREENING_BLOCKED_WALLET_ERROR_CODES.includes((_m = data.error) === null || _m === void 0 ? void 0 : _m.code)) {
|
|
231
|
+
throw new WalletScreeningBlockedError(data.payload.walletPublicKey, data.error.code);
|
|
232
232
|
}
|
|
233
233
|
if (((_o = data.error) === null || _o === void 0 ? void 0 : _o.code) === 'gate_blocked') {
|
|
234
234
|
throw new GateBlockedError(data.payload.walletPublicKey);
|
|
@@ -19,14 +19,14 @@ const viewsThatHideHelpContent = [
|
|
|
19
19
|
'qr-code',
|
|
20
20
|
'no-qr-not-installed',
|
|
21
21
|
'wallet-used',
|
|
22
|
-
'
|
|
22
|
+
'wallet-screening-blocked',
|
|
23
23
|
'wallet-sign',
|
|
24
24
|
'collect-user-data',
|
|
25
25
|
];
|
|
26
26
|
const viewsThatHideHeader = [
|
|
27
27
|
'collect-user-data',
|
|
28
28
|
'no-access',
|
|
29
|
-
'
|
|
29
|
+
'wallet-screening-blocked',
|
|
30
30
|
'wallet-locked-view',
|
|
31
31
|
'gate-blocked-wallet',
|
|
32
32
|
'email-wallet-otp-verification-view',
|
|
@@ -15,14 +15,14 @@ const viewsThatHideHelpContent = [
|
|
|
15
15
|
'qr-code',
|
|
16
16
|
'no-qr-not-installed',
|
|
17
17
|
'wallet-used',
|
|
18
|
-
'
|
|
18
|
+
'wallet-screening-blocked',
|
|
19
19
|
'wallet-sign',
|
|
20
20
|
'collect-user-data',
|
|
21
21
|
];
|
|
22
22
|
const viewsThatHideHeader = [
|
|
23
23
|
'collect-user-data',
|
|
24
24
|
'no-access',
|
|
25
|
-
'
|
|
25
|
+
'wallet-screening-blocked',
|
|
26
26
|
'wallet-locked-view',
|
|
27
27
|
'gate-blocked-wallet',
|
|
28
28
|
'email-wallet-otp-verification-view',
|
|
@@ -60,10 +60,6 @@ const useDynamicLayoutData = ({ view }) => {
|
|
|
60
60
|
copykey: 'dyn_waas.backup_unsuccessful.title',
|
|
61
61
|
heading: t('dyn_waas.backup_unsuccessful.title'),
|
|
62
62
|
},
|
|
63
|
-
'chainalysis-blocked-wallet': {
|
|
64
|
-
copykey: 'dyn_chainalysis_blocked_wallet.title',
|
|
65
|
-
heading: t('dyn_chainalysis_blocked_wallet.title'),
|
|
66
|
-
},
|
|
67
63
|
'confirm-exchange-transfer': {
|
|
68
64
|
copykey: 'dyn_exchange_transfer_confirmation.title',
|
|
69
65
|
heading: t('dyn_exchange_transfer_confirmation.title'),
|
|
@@ -212,6 +208,10 @@ const useDynamicLayoutData = ({ view }) => {
|
|
|
212
208
|
copykey: 'dyn_wallet_list.title.select',
|
|
213
209
|
heading: t('dyn_wallet_list.title.select'),
|
|
214
210
|
},
|
|
211
|
+
'wallet-screening-blocked': {
|
|
212
|
+
copykey: 'dyn_screening_blocked_wallet.title',
|
|
213
|
+
heading: t('dyn_screening_blocked_wallet.title'),
|
|
214
|
+
},
|
|
215
215
|
'wallet-sign': {
|
|
216
216
|
copykey: 'dyn_wallet_transfer.sign.title',
|
|
217
217
|
heading: t('dyn_wallet_transfer.sign.title'),
|
|
@@ -56,10 +56,6 @@ const useDynamicLayoutData = ({ view }) => {
|
|
|
56
56
|
copykey: 'dyn_waas.backup_unsuccessful.title',
|
|
57
57
|
heading: t('dyn_waas.backup_unsuccessful.title'),
|
|
58
58
|
},
|
|
59
|
-
'chainalysis-blocked-wallet': {
|
|
60
|
-
copykey: 'dyn_chainalysis_blocked_wallet.title',
|
|
61
|
-
heading: t('dyn_chainalysis_blocked_wallet.title'),
|
|
62
|
-
},
|
|
63
59
|
'confirm-exchange-transfer': {
|
|
64
60
|
copykey: 'dyn_exchange_transfer_confirmation.title',
|
|
65
61
|
heading: t('dyn_exchange_transfer_confirmation.title'),
|
|
@@ -208,6 +204,10 @@ const useDynamicLayoutData = ({ view }) => {
|
|
|
208
204
|
copykey: 'dyn_wallet_list.title.select',
|
|
209
205
|
heading: t('dyn_wallet_list.title.select'),
|
|
210
206
|
},
|
|
207
|
+
'wallet-screening-blocked': {
|
|
208
|
+
copykey: 'dyn_screening_blocked_wallet.title',
|
|
209
|
+
heading: t('dyn_screening_blocked_wallet.title'),
|
|
210
|
+
},
|
|
211
211
|
'wallet-sign': {
|
|
212
212
|
copykey: 'dyn_wallet_transfer.sign.title',
|
|
213
213
|
heading: t('dyn_wallet_transfer.sign.title'),
|
|
@@ -240,10 +240,10 @@ const useVerifyWallet = ({ displaySiweStatement, environmentId, projectSettings,
|
|
|
240
240
|
setShowAuthFlow(true);
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
|
-
if (e instanceof utils.
|
|
243
|
+
if (e instanceof utils.WalletScreeningBlockedError) {
|
|
244
244
|
handleDisconnectWallet({ walletConnector });
|
|
245
245
|
setDeniedAddress(address);
|
|
246
|
-
pushView('
|
|
246
|
+
pushView('wallet-screening-blocked');
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
if (e instanceof utils.GateBlockedError) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
|
-
import { DynamicError, StorageService, EmbeddedWalletExistsError, WalletUsedError, MergeAccountsConfirmationError,
|
|
3
|
+
import { DynamicError, StorageService, EmbeddedWalletExistsError, WalletUsedError, MergeAccountsConfirmationError, WalletScreeningBlockedError, GateBlockedError, SandboxMaximumThresholdReachedError, NoAccessError, AccountExistsError, ErrorCode } from '@dynamic-labs/utils';
|
|
4
4
|
import { getWalletProvider, isSocialWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import 'react';
|
|
6
6
|
import { dynamicEvents } from '../../../events/dynamicEvents.js';
|
|
@@ -236,10 +236,10 @@ const useVerifyWallet = ({ displaySiweStatement, environmentId, projectSettings,
|
|
|
236
236
|
setShowAuthFlow(true);
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
if (e instanceof
|
|
239
|
+
if (e instanceof WalletScreeningBlockedError) {
|
|
240
240
|
handleDisconnectWallet({ walletConnector });
|
|
241
241
|
setDeniedAddress(address);
|
|
242
|
-
pushView('
|
|
242
|
+
pushView('wallet-screening-blocked');
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
if (e instanceof GateBlockedError) {
|
|
@@ -12,12 +12,12 @@ const useNoAccessText = () => {
|
|
|
12
12
|
const { socialMediaLinkText, socialMediaUrl, accessDeniedMessagePrimary, accessDeniedMessageSecondary, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
13
13
|
const { view } = ViewContext.useViewContext();
|
|
14
14
|
const { t } = reactI18next.useTranslation();
|
|
15
|
-
const
|
|
15
|
+
const isScreeningBlockedView = view.type === 'wallet-screening-blocked';
|
|
16
16
|
const isGateBlockedView = view.type === 'gate-blocked-wallet';
|
|
17
17
|
const isAccessListView = view.type === 'no-access';
|
|
18
18
|
const getSocialMediaLinkText = () => {
|
|
19
|
-
if (
|
|
20
|
-
return t(textData.
|
|
19
|
+
if (isScreeningBlockedView) {
|
|
20
|
+
return t(textData.screening._socialMediaLinkText);
|
|
21
21
|
}
|
|
22
22
|
if (isGateBlockedView) {
|
|
23
23
|
return undefined;
|
|
@@ -25,8 +25,8 @@ const useNoAccessText = () => {
|
|
|
25
25
|
return socialMediaLinkText;
|
|
26
26
|
};
|
|
27
27
|
const getSocialMediaUrl = () => {
|
|
28
|
-
if (
|
|
29
|
-
return t(textData.
|
|
28
|
+
if (isScreeningBlockedView) {
|
|
29
|
+
return t(textData.screening._socialMediaUrl);
|
|
30
30
|
}
|
|
31
31
|
if (isGateBlockedView) {
|
|
32
32
|
return undefined;
|
|
@@ -34,8 +34,8 @@ const useNoAccessText = () => {
|
|
|
34
34
|
return socialMediaUrl;
|
|
35
35
|
};
|
|
36
36
|
const getTitle = () => {
|
|
37
|
-
if (
|
|
38
|
-
return t(textData.
|
|
37
|
+
if (isScreeningBlockedView) {
|
|
38
|
+
return t(textData.screening.title);
|
|
39
39
|
}
|
|
40
40
|
if (isGateBlockedView) {
|
|
41
41
|
return t(textData.gate.title);
|
|
@@ -43,8 +43,8 @@ const useNoAccessText = () => {
|
|
|
43
43
|
return accessDeniedMessagePrimary || t(textData.default.title);
|
|
44
44
|
};
|
|
45
45
|
const getSubtitle = () => {
|
|
46
|
-
if (
|
|
47
|
-
return t(textData.
|
|
46
|
+
if (isScreeningBlockedView) {
|
|
47
|
+
return t(textData.screening.subtitle);
|
|
48
48
|
}
|
|
49
49
|
if (isGateBlockedView) {
|
|
50
50
|
return t(textData.gate.subtitle);
|
|
@@ -52,8 +52,8 @@ const useNoAccessText = () => {
|
|
|
52
52
|
return accessDeniedMessageSecondary || t(textData.default.subtitle);
|
|
53
53
|
};
|
|
54
54
|
const getButtonTitle = () => {
|
|
55
|
-
if (
|
|
56
|
-
return t(textData.
|
|
55
|
+
if (isScreeningBlockedView) {
|
|
56
|
+
return t(textData.screening.buttonTitle);
|
|
57
57
|
}
|
|
58
58
|
if (isGateBlockedView) {
|
|
59
59
|
return t(textData.gate.buttonTitle);
|
|
@@ -65,20 +65,13 @@ const useNoAccessText = () => {
|
|
|
65
65
|
_socialMediaUrl: getSocialMediaUrl(),
|
|
66
66
|
buttonTitle: getButtonTitle(),
|
|
67
67
|
isAccessListView,
|
|
68
|
-
isChainalysisView,
|
|
69
68
|
isGateBlockedView,
|
|
69
|
+
isScreeningBlockedView,
|
|
70
70
|
subtitle: getSubtitle(),
|
|
71
71
|
title: getTitle(),
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
const textData = {
|
|
75
|
-
chainalysis: {
|
|
76
|
-
_socialMediaLinkText: 'dyn_no_access.chainalysis.social_media_link_text',
|
|
77
|
-
_socialMediaUrl: 'dyn_no_access.chainalysis.social_media_link_url',
|
|
78
|
-
buttonTitle: 'dyn_no_access.chainalysis.button_text',
|
|
79
|
-
subtitle: 'dyn_no_access.chainalysis.description',
|
|
80
|
-
title: 'dyn_no_access.chainalysis.title',
|
|
81
|
-
},
|
|
82
75
|
default: {
|
|
83
76
|
buttonTitle: 'dyn_no_access.default.button_text',
|
|
84
77
|
subtitle: 'dyn_no_access.default.description',
|
|
@@ -91,6 +84,13 @@ const textData = {
|
|
|
91
84
|
subtitle: 'dyn_no_access.gate.description',
|
|
92
85
|
title: 'dyn_no_access.gate.title',
|
|
93
86
|
},
|
|
87
|
+
screening: {
|
|
88
|
+
_socialMediaLinkText: 'dyn_no_access.screening.social_media_link_text',
|
|
89
|
+
_socialMediaUrl: 'dyn_no_access.screening.social_media_link_url',
|
|
90
|
+
buttonTitle: 'dyn_no_access.screening.button_text',
|
|
91
|
+
subtitle: 'dyn_no_access.screening.description',
|
|
92
|
+
title: 'dyn_no_access.screening.title',
|
|
93
|
+
},
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
exports.textData = textData;
|
|
@@ -3,19 +3,12 @@ export declare const useNoAccessText: () => {
|
|
|
3
3
|
_socialMediaUrl: string | undefined;
|
|
4
4
|
buttonTitle: string;
|
|
5
5
|
isAccessListView: boolean;
|
|
6
|
-
isChainalysisView: boolean;
|
|
7
6
|
isGateBlockedView: boolean;
|
|
7
|
+
isScreeningBlockedView: boolean;
|
|
8
8
|
subtitle: string;
|
|
9
9
|
title: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const textData: {
|
|
12
|
-
chainalysis: {
|
|
13
|
-
_socialMediaLinkText: string;
|
|
14
|
-
_socialMediaUrl: string;
|
|
15
|
-
buttonTitle: string;
|
|
16
|
-
subtitle: string;
|
|
17
|
-
title: string;
|
|
18
|
-
};
|
|
19
12
|
default: {
|
|
20
13
|
buttonTitle: string;
|
|
21
14
|
subtitle: string;
|
|
@@ -28,4 +21,11 @@ export declare const textData: {
|
|
|
28
21
|
subtitle: string;
|
|
29
22
|
title: string;
|
|
30
23
|
};
|
|
24
|
+
screening: {
|
|
25
|
+
_socialMediaLinkText: string;
|
|
26
|
+
_socialMediaUrl: string;
|
|
27
|
+
buttonTitle: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
title: string;
|
|
30
|
+
};
|
|
31
31
|
};
|
|
@@ -8,12 +8,12 @@ const useNoAccessText = () => {
|
|
|
8
8
|
const { socialMediaLinkText, socialMediaUrl, accessDeniedMessagePrimary, accessDeniedMessageSecondary, } = useInternalDynamicContext();
|
|
9
9
|
const { view } = useViewContext();
|
|
10
10
|
const { t } = useTranslation();
|
|
11
|
-
const
|
|
11
|
+
const isScreeningBlockedView = view.type === 'wallet-screening-blocked';
|
|
12
12
|
const isGateBlockedView = view.type === 'gate-blocked-wallet';
|
|
13
13
|
const isAccessListView = view.type === 'no-access';
|
|
14
14
|
const getSocialMediaLinkText = () => {
|
|
15
|
-
if (
|
|
16
|
-
return t(textData.
|
|
15
|
+
if (isScreeningBlockedView) {
|
|
16
|
+
return t(textData.screening._socialMediaLinkText);
|
|
17
17
|
}
|
|
18
18
|
if (isGateBlockedView) {
|
|
19
19
|
return undefined;
|
|
@@ -21,8 +21,8 @@ const useNoAccessText = () => {
|
|
|
21
21
|
return socialMediaLinkText;
|
|
22
22
|
};
|
|
23
23
|
const getSocialMediaUrl = () => {
|
|
24
|
-
if (
|
|
25
|
-
return t(textData.
|
|
24
|
+
if (isScreeningBlockedView) {
|
|
25
|
+
return t(textData.screening._socialMediaUrl);
|
|
26
26
|
}
|
|
27
27
|
if (isGateBlockedView) {
|
|
28
28
|
return undefined;
|
|
@@ -30,8 +30,8 @@ const useNoAccessText = () => {
|
|
|
30
30
|
return socialMediaUrl;
|
|
31
31
|
};
|
|
32
32
|
const getTitle = () => {
|
|
33
|
-
if (
|
|
34
|
-
return t(textData.
|
|
33
|
+
if (isScreeningBlockedView) {
|
|
34
|
+
return t(textData.screening.title);
|
|
35
35
|
}
|
|
36
36
|
if (isGateBlockedView) {
|
|
37
37
|
return t(textData.gate.title);
|
|
@@ -39,8 +39,8 @@ const useNoAccessText = () => {
|
|
|
39
39
|
return accessDeniedMessagePrimary || t(textData.default.title);
|
|
40
40
|
};
|
|
41
41
|
const getSubtitle = () => {
|
|
42
|
-
if (
|
|
43
|
-
return t(textData.
|
|
42
|
+
if (isScreeningBlockedView) {
|
|
43
|
+
return t(textData.screening.subtitle);
|
|
44
44
|
}
|
|
45
45
|
if (isGateBlockedView) {
|
|
46
46
|
return t(textData.gate.subtitle);
|
|
@@ -48,8 +48,8 @@ const useNoAccessText = () => {
|
|
|
48
48
|
return accessDeniedMessageSecondary || t(textData.default.subtitle);
|
|
49
49
|
};
|
|
50
50
|
const getButtonTitle = () => {
|
|
51
|
-
if (
|
|
52
|
-
return t(textData.
|
|
51
|
+
if (isScreeningBlockedView) {
|
|
52
|
+
return t(textData.screening.buttonTitle);
|
|
53
53
|
}
|
|
54
54
|
if (isGateBlockedView) {
|
|
55
55
|
return t(textData.gate.buttonTitle);
|
|
@@ -61,20 +61,13 @@ const useNoAccessText = () => {
|
|
|
61
61
|
_socialMediaUrl: getSocialMediaUrl(),
|
|
62
62
|
buttonTitle: getButtonTitle(),
|
|
63
63
|
isAccessListView,
|
|
64
|
-
isChainalysisView,
|
|
65
64
|
isGateBlockedView,
|
|
65
|
+
isScreeningBlockedView,
|
|
66
66
|
subtitle: getSubtitle(),
|
|
67
67
|
title: getTitle(),
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
const textData = {
|
|
71
|
-
chainalysis: {
|
|
72
|
-
_socialMediaLinkText: 'dyn_no_access.chainalysis.social_media_link_text',
|
|
73
|
-
_socialMediaUrl: 'dyn_no_access.chainalysis.social_media_link_url',
|
|
74
|
-
buttonTitle: 'dyn_no_access.chainalysis.button_text',
|
|
75
|
-
subtitle: 'dyn_no_access.chainalysis.description',
|
|
76
|
-
title: 'dyn_no_access.chainalysis.title',
|
|
77
|
-
},
|
|
78
71
|
default: {
|
|
79
72
|
buttonTitle: 'dyn_no_access.default.button_text',
|
|
80
73
|
subtitle: 'dyn_no_access.default.description',
|
|
@@ -87,6 +80,13 @@ const textData = {
|
|
|
87
80
|
subtitle: 'dyn_no_access.gate.description',
|
|
88
81
|
title: 'dyn_no_access.gate.title',
|
|
89
82
|
},
|
|
83
|
+
screening: {
|
|
84
|
+
_socialMediaLinkText: 'dyn_no_access.screening.social_media_link_text',
|
|
85
|
+
_socialMediaUrl: 'dyn_no_access.screening.social_media_link_url',
|
|
86
|
+
buttonTitle: 'dyn_no_access.screening.button_text',
|
|
87
|
+
subtitle: 'dyn_no_access.screening.description',
|
|
88
|
+
title: 'dyn_no_access.screening.title',
|
|
89
|
+
},
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
export { textData, useNoAccessText };
|
|
@@ -20,7 +20,7 @@ const findPrimaryEmbeddedChain = (projectSettings) => {
|
|
|
20
20
|
return primaryChainName;
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
logger.
|
|
23
|
+
logger.warn('Unsupported primary chain', { primaryChainName });
|
|
24
24
|
}
|
|
25
25
|
return sdkApiCore.ChainEnum.Evm;
|
|
26
26
|
};
|
|
@@ -16,7 +16,7 @@ const findPrimaryEmbeddedChain = (projectSettings) => {
|
|
|
16
16
|
return primaryChainName;
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
logger.
|
|
19
|
+
logger.warn('Unsupported primary chain', { primaryChainName });
|
|
20
20
|
}
|
|
21
21
|
return ChainEnum.Evm;
|
|
22
22
|
};
|
|
@@ -95,7 +95,6 @@ const viewToComponentMap = {
|
|
|
95
95
|
'bridge-summary': BridgeSummaryView.BridgeSummaryView,
|
|
96
96
|
'bridge-welcome': BridgeWelcomeView.BridgeWelcomeView,
|
|
97
97
|
captcha: CaptchaVerifyUser.CaptchaVerifyUser,
|
|
98
|
-
'chainalysis-blocked-wallet': NoAccess.NoAccess,
|
|
99
98
|
'collect-user-data': CollectUserDataView.CollectUserDataView,
|
|
100
99
|
'collect-user-data-login-no-wallet': CollectUserDataViewNoWallet.CollectUserDataViewNoWallet,
|
|
101
100
|
'device-registration': DeviceRegistrationView.DeviceRegistrationView,
|
|
@@ -173,6 +172,7 @@ const viewToComponentMap = {
|
|
|
173
172
|
'wallet-list': WalletListForDefaultConnection.WalletListForDefaultConnection,
|
|
174
173
|
'wallet-locked-view': WalletLockedView.WalletLockedView,
|
|
175
174
|
'wallet-redirect-view': WalletRedirectView.WalletRedirectView,
|
|
175
|
+
'wallet-screening-blocked': NoAccess.NoAccess,
|
|
176
176
|
'wallet-sign': WalletSignSpinnerView.WalletSignSpinnerView,
|
|
177
177
|
'wallet-used': WalletUsedView.WalletUsedView,
|
|
178
178
|
};
|
|
@@ -8,7 +8,6 @@ export declare const viewToComponentMap: {
|
|
|
8
8
|
'bridge-summary': () => JSX.Element;
|
|
9
9
|
'bridge-welcome': () => JSX.Element;
|
|
10
10
|
captcha: () => JSX.Element;
|
|
11
|
-
'chainalysis-blocked-wallet': () => JSX.Element;
|
|
12
11
|
'collect-user-data': () => JSX.Element | null;
|
|
13
12
|
'collect-user-data-login-no-wallet': import("react").FC<{
|
|
14
13
|
userIdentification: "environmentId" | keyof import("@dynamic-labs/sdk-api-core").UserFields | "lastVerifiedCredentialId" | "lists" | "newUser" | "sessionId" | "userId" | "verifiedCredentials" | "scope" | "missingFields";
|
|
@@ -127,6 +126,7 @@ export declare const viewToComponentMap: {
|
|
|
127
126
|
}>;
|
|
128
127
|
'wallet-locked-view': () => JSX.Element | null;
|
|
129
128
|
'wallet-redirect-view': () => JSX.Element;
|
|
129
|
+
'wallet-screening-blocked': () => JSX.Element;
|
|
130
130
|
'wallet-sign': () => JSX.Element | null;
|
|
131
131
|
'wallet-used': () => JSX.Element;
|
|
132
132
|
};
|
|
@@ -91,7 +91,6 @@ const viewToComponentMap = {
|
|
|
91
91
|
'bridge-summary': BridgeSummaryView,
|
|
92
92
|
'bridge-welcome': BridgeWelcomeView,
|
|
93
93
|
captcha: CaptchaVerifyUser,
|
|
94
|
-
'chainalysis-blocked-wallet': NoAccess,
|
|
95
94
|
'collect-user-data': CollectUserDataView,
|
|
96
95
|
'collect-user-data-login-no-wallet': CollectUserDataViewNoWallet,
|
|
97
96
|
'device-registration': DeviceRegistrationView,
|
|
@@ -169,6 +168,7 @@ const viewToComponentMap = {
|
|
|
169
168
|
'wallet-list': WalletListForDefaultConnection,
|
|
170
169
|
'wallet-locked-view': WalletLockedView,
|
|
171
170
|
'wallet-redirect-view': WalletRedirectView,
|
|
171
|
+
'wallet-screening-blocked': NoAccess,
|
|
172
172
|
'wallet-sign': WalletSignSpinnerView,
|
|
173
173
|
'wallet-used': WalletUsedView,
|
|
174
174
|
};
|
package/src/version.cjs
CHANGED
|
@@ -7,6 +7,8 @@ var _package = require('../package.cjs');
|
|
|
7
7
|
|
|
8
8
|
const VERSION = _package.version;
|
|
9
9
|
const API_VERSION = _package.dependencies['@dynamic-labs/sdk-api-core'];
|
|
10
|
+
const CLIENT_VERSION = _package.dependencies['@dynamic-labs-sdk/client'];
|
|
10
11
|
|
|
11
12
|
exports.API_VERSION = API_VERSION;
|
|
13
|
+
exports.CLIENT_VERSION = CLIENT_VERSION;
|
|
12
14
|
exports.VERSION = VERSION;
|
package/src/version.d.ts
CHANGED
package/src/version.js
CHANGED
|
@@ -3,5 +3,6 @@ import { version, dependencies } from '../package.js';
|
|
|
3
3
|
|
|
4
4
|
const VERSION = version;
|
|
5
5
|
const API_VERSION = dependencies['@dynamic-labs/sdk-api-core'];
|
|
6
|
+
const CLIENT_VERSION = dependencies['@dynamic-labs-sdk/client'];
|
|
6
7
|
|
|
7
|
-
export { API_VERSION, VERSION };
|
|
8
|
+
export { API_VERSION, CLIENT_VERSION, VERSION };
|