@dynamic-labs/sdk-react-core 5.8.0 → 5.9.0
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 +19 -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/useBusinessAccounts/useBusinessAccounts.cjs +71 -19
- package/src/lib/utils/hooks/useBusinessAccounts/useBusinessAccounts.d.ts +2 -2
- package/src/lib/utils/hooks/useBusinessAccounts/useBusinessAccounts.js +75 -23
- 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,23 @@
|
|
|
1
1
|
|
|
2
|
+
## [5.9.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.8.1...v5.9.0) (2026-09-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **sdk-react-core:** gate business account mutations behind step-up auth ([#12410](https://github.com/dynamic-labs/dynamic-auth/issues/12410)) ([d394719](https://github.com/dynamic-labs/dynamic-auth/commit/d3947198f9f84debccdd3ae4a4321f56b24467fb))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* prefer dashboard-saved RPC urls when mapping viem chains ([#12404](https://github.com/dynamic-labs/dynamic-auth/issues/12404)) ([dfe75b4](https://github.com/dynamic-labs/dynamic-auth/commit/dfe75b4193cff46b0fa0ef014f8b040587a0667e))
|
|
13
|
+
|
|
14
|
+
### [5.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.8.0...v5.8.1) (2026-09-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **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))
|
|
20
|
+
|
|
2
21
|
## [5.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.7.0...v5.8.0) (2026-09-09)
|
|
3
22
|
|
|
4
23
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "5.
|
|
6
|
+
var version = "5.9.0";
|
|
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.
|
|
2
|
+
var version = "5.9.0";
|
|
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.
|
|
3
|
+
"version": "5.9.0",
|
|
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.
|
|
22
|
-
"@dynamic-labs/iconic": "5.
|
|
23
|
-
"@dynamic-labs/locale": "5.
|
|
24
|
-
"@dynamic-labs/logger": "5.
|
|
25
|
-
"@dynamic-labs/multi-wallet": "5.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "5.
|
|
27
|
-
"@dynamic-labs/store": "5.
|
|
28
|
-
"@dynamic-labs/types": "5.
|
|
29
|
-
"@dynamic-labs/utils": "5.
|
|
30
|
-
"@dynamic-labs/wallet-book": "5.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "5.9.0",
|
|
22
|
+
"@dynamic-labs/iconic": "5.9.0",
|
|
23
|
+
"@dynamic-labs/locale": "5.9.0",
|
|
24
|
+
"@dynamic-labs/logger": "5.9.0",
|
|
25
|
+
"@dynamic-labs/multi-wallet": "5.9.0",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "5.9.0",
|
|
27
|
+
"@dynamic-labs/store": "5.9.0",
|
|
28
|
+
"@dynamic-labs/types": "5.9.0",
|
|
29
|
+
"@dynamic-labs/utils": "5.9.0",
|
|
30
|
+
"@dynamic-labs/wallet-book": "5.9.0",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "5.9.0",
|
|
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',
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var waas = require('@dynamic-labs-sdk/client/waas');
|
|
9
|
+
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
9
10
|
var client = require('../../../client/client.cjs');
|
|
10
11
|
require('@dynamic-labs-sdk/client/core');
|
|
11
|
-
require('@dynamic-labs/sdk-api-core');
|
|
12
12
|
require('@dynamic-labs-sdk/client');
|
|
13
13
|
require('../../../config/ApiEndpoint.cjs');
|
|
14
14
|
require('@dynamic-labs/iconic');
|
|
@@ -33,6 +33,7 @@ require('../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
|
33
33
|
require('../../../events/dynamicEvents.cjs');
|
|
34
34
|
var useProjectSettings = require('../../../client/extension/projectSettings/useProjectSettings/useProjectSettings.cjs');
|
|
35
35
|
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
36
|
+
var useStepUpAuthentication = require('../useStepUpAuthentication/useStepUpAuthentication.cjs');
|
|
36
37
|
|
|
37
38
|
const NO_WAAS_CHAIN_ERROR = 'No enabled WaaS chain found for business account operations';
|
|
38
39
|
const NO_CONNECTOR_ERROR = 'WaaS wallet connector not found';
|
|
@@ -40,6 +41,7 @@ const useBusinessAccounts = () => {
|
|
|
40
41
|
const { getWaasWalletConnector } = useDynamicWaas.useDynamicWaas();
|
|
41
42
|
const projectSettings = useProjectSettings.useProjectSettings();
|
|
42
43
|
const dynamicClient = client.useDynamicClient();
|
|
44
|
+
const { isStepUpRequired, promptStepUpAuth } = useStepUpAuthentication.useStepUpAuthentication();
|
|
43
45
|
const enabledChainNames = React.useMemo(() => {
|
|
44
46
|
var _a, _b;
|
|
45
47
|
return ((_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.chainConfigurations) !== null && _b !== void 0 ? _b : [])
|
|
@@ -64,6 +66,23 @@ const useBusinessAccounts = () => {
|
|
|
64
66
|
}
|
|
65
67
|
return connector.getWaasWalletClient();
|
|
66
68
|
}), [defaultChainName, getWaasWalletConnector]);
|
|
69
|
+
// Forces the step-up auth popup for every scope that still lacks a valid
|
|
70
|
+
// elevated token, so mutating business account calls always carry one.
|
|
71
|
+
// Returns whether a prompt ran, so connector-based callers can rebuild the
|
|
72
|
+
// cached iframe client after a session rotation.
|
|
73
|
+
const ensureStepUpAuth = React.useCallback((scopes) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
74
|
+
const requiredScopes = [];
|
|
75
|
+
for (const scope of scopes) {
|
|
76
|
+
if (yield isStepUpRequired({ scope })) {
|
|
77
|
+
requiredScopes.push(scope);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (requiredScopes.length === 0) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
yield promptStepUpAuth({ requestedScopes: requiredScopes });
|
|
84
|
+
return true;
|
|
85
|
+
}), [isStepUpRequired, promptStepUpAuth]);
|
|
67
86
|
const createBusinessAccount = React.useCallback((...args_1) => _tslib.__awaiter(void 0, [...args_1], void 0, function* (input = {}) {
|
|
68
87
|
const client = yield getBusinessClient();
|
|
69
88
|
return client.businessAccounts.createBusinessAccount({ request: input });
|
|
@@ -76,36 +95,56 @@ const useBusinessAccounts = () => {
|
|
|
76
95
|
const client = yield getBusinessClient();
|
|
77
96
|
return client.businessAccounts.getBusinessAccount({ businessAccountId });
|
|
78
97
|
}), [getBusinessClient]);
|
|
79
|
-
const addBusinessAccountMember = React.useCallback((
|
|
80
|
-
|
|
81
|
-
return
|
|
82
|
-
|
|
98
|
+
const addBusinessAccountMember = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ businessAccountId, userId, identifier, identifierType, role, }) {
|
|
99
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountmemberadd]);
|
|
100
|
+
return waas.addBusinessAccountMember({
|
|
101
|
+
businessAccountId,
|
|
102
|
+
role,
|
|
103
|
+
targetIdentity: { identifier, identifierType, userId },
|
|
104
|
+
}, dynamicClient);
|
|
105
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
83
106
|
const addWalletToBusinessAccount = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
}), [
|
|
107
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountlinkWallet]);
|
|
108
|
+
return waas.addWalletToBusinessAccount(input, dynamicClient);
|
|
109
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
87
110
|
// Adds a signer via the SSE reshare ceremony on the wallet's chain connector.
|
|
88
111
|
// Mints the new signer's share set and seeds it to client-keyshare-service.
|
|
89
|
-
const addBusinessAccountSigner = React.useCallback((
|
|
112
|
+
const addBusinessAccountSigner = React.useCallback((_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ accountAddress, walletId, chainName, businessAccountId, targetSignerIdentity, signerType, password, targetSignerPassword, }) {
|
|
90
113
|
const connector = getWaasWalletConnector(chainName);
|
|
91
114
|
if (!connector) {
|
|
92
115
|
throw new Error(NO_CONNECTOR_ERROR);
|
|
93
116
|
}
|
|
117
|
+
if (!businessAccountId && !walletId) {
|
|
118
|
+
throw new Error('addBusinessAccountSigner requires a walletId when no businessAccountId is provided');
|
|
119
|
+
}
|
|
94
120
|
// No account yet: find-or-create the per-wallet business account first
|
|
95
121
|
// (idempotent — converts the personal wallet, seating its owner as the
|
|
96
122
|
// first signer, or returns the existing one if already linked), then
|
|
97
|
-
// reshare the new signer into it.
|
|
123
|
+
// reshare the new signer into it. That path also needs the link_wallet
|
|
124
|
+
// elevation, so request both scopes in a single step-up prompt.
|
|
125
|
+
const requiredScopes = businessAccountId
|
|
126
|
+
? [sdkApiCore.TokenScope.BusinessAccountsigneradd]
|
|
127
|
+
: [
|
|
128
|
+
sdkApiCore.TokenScope.BusinessAccountsigneradd,
|
|
129
|
+
sdkApiCore.TokenScope.BusinessAccountlinkWallet,
|
|
130
|
+
];
|
|
131
|
+
const prompted = yield ensureStepUpAuth(requiredScopes);
|
|
98
132
|
let resolvedBusinessAccountId = businessAccountId;
|
|
99
133
|
if (!resolvedBusinessAccountId) {
|
|
100
134
|
if (!walletId) {
|
|
101
135
|
throw new Error('addBusinessAccountSigner requires a walletId when no businessAccountId is provided');
|
|
102
136
|
}
|
|
103
|
-
const account = yield addWalletToBusinessAccount({ walletId });
|
|
137
|
+
const account = yield waas.addWalletToBusinessAccount({ walletId }, dynamicClient);
|
|
104
138
|
resolvedBusinessAccountId = account.id;
|
|
105
139
|
}
|
|
106
140
|
if (!resolvedBusinessAccountId) {
|
|
107
141
|
throw new Error('addBusinessAccountSigner could not resolve a businessAccountId');
|
|
108
142
|
}
|
|
143
|
+
// Step-up reauth can rotate the session, so drop the cached iframe
|
|
144
|
+
// client and let it re-auth with the fresh token before the reshare.
|
|
145
|
+
if (prompted) {
|
|
146
|
+
yield connector.getWaasWalletClient(undefined, { forceRebuild: true });
|
|
147
|
+
}
|
|
109
148
|
return connector.addSignerViaReshare({
|
|
110
149
|
accountAddress,
|
|
111
150
|
businessAccountId: resolvedBusinessAccountId,
|
|
@@ -115,8 +154,8 @@ const useBusinessAccounts = () => {
|
|
|
115
154
|
targetSignerPassword,
|
|
116
155
|
walletId,
|
|
117
156
|
});
|
|
118
|
-
}), [
|
|
119
|
-
const createWalletForBusinessAccount = React.useCallback((
|
|
157
|
+
}), [dynamicClient, ensureStepUpAuth, getWaasWalletConnector]);
|
|
158
|
+
const createWalletForBusinessAccount = React.useCallback((_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ businessAccountId, chainName, thresholdSignatureScheme, password, }) {
|
|
120
159
|
const chain = chainName !== null && chainName !== void 0 ? chainName : defaultChainName;
|
|
121
160
|
if (!chain) {
|
|
122
161
|
throw new Error(NO_WAAS_CHAIN_ERROR);
|
|
@@ -135,13 +174,26 @@ const useBusinessAccounts = () => {
|
|
|
135
174
|
const client = yield getBusinessClient();
|
|
136
175
|
return client.getWallets();
|
|
137
176
|
}), [getBusinessClient]);
|
|
138
|
-
const removeBusinessAccountMember = React.useCallback((
|
|
177
|
+
const removeBusinessAccountMember = React.useCallback((_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ businessAccountId, userId }) {
|
|
178
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountmemberremove]);
|
|
139
179
|
return waas.removeBusinessAccountMember({ businessAccountId, userId }, dynamicClient);
|
|
140
|
-
}), [dynamicClient]);
|
|
141
|
-
const updateBusinessAccountMemberRole = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
180
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
181
|
+
const updateBusinessAccountMemberRole = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
182
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountmemberroleupdate]);
|
|
183
|
+
return waas.updateBusinessAccountMemberRole(input, dynamicClient);
|
|
184
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
185
|
+
const transferBusinessAccountOwnership = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
186
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccounttransferOwnership]);
|
|
187
|
+
return waas.transferBusinessAccountOwnership(input, dynamicClient);
|
|
188
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
189
|
+
const removeBusinessAccountWallet = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
190
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountwalletremove]);
|
|
191
|
+
return waas.removeBusinessAccountWallet(input, dynamicClient);
|
|
192
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
193
|
+
const removeBusinessAccountSigner = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
194
|
+
yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountsignerremove]);
|
|
195
|
+
return waas.removeBusinessAccountSigner(input, dynamicClient);
|
|
196
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
145
197
|
const updateBusinessAccount = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () { return waas.updateBusinessAccount(input, dynamicClient); }), [dynamicClient]);
|
|
146
198
|
return {
|
|
147
199
|
addBusinessAccountMember,
|
|
@@ -68,11 +68,11 @@ export type AddBusinessAccountSignerInput = {
|
|
|
68
68
|
targetSignerPassword?: string;
|
|
69
69
|
};
|
|
70
70
|
export declare const useBusinessAccounts: () => {
|
|
71
|
-
addBusinessAccountMember: (
|
|
71
|
+
addBusinessAccountMember: ({ businessAccountId, userId, identifier, identifierType, role, }: AddBusinessAccountMemberInput) => Promise<import("@dynamic-labs-sdk/client/waas").BusinessAccountMember>;
|
|
72
72
|
addBusinessAccountSigner: ({ accountAddress, walletId, chainName, businessAccountId, targetSignerIdentity, signerType, password, targetSignerPassword, }: AddBusinessAccountSignerInput) => Promise<{
|
|
73
73
|
shareSetId: string;
|
|
74
74
|
}>;
|
|
75
|
-
addWalletToBusinessAccount: (input: AddWalletToBusinessAccountInput) => Promise<
|
|
75
|
+
addWalletToBusinessAccount: (input: AddWalletToBusinessAccountInput) => Promise<import("@dynamic-labs-sdk/client/waas").BusinessAccountDetail>;
|
|
76
76
|
createBusinessAccount: (input?: CreateBusinessAccountInput) => Promise<any>;
|
|
77
77
|
createWalletForBusinessAccount: ({ businessAccountId, chainName, thresholdSignatureScheme, password, }: CreateWalletForBusinessAccountInput) => Promise<{
|
|
78
78
|
accountAddress: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useMemo, useCallback } from 'react';
|
|
4
|
-
import { removeBusinessAccountMember, updateBusinessAccountMemberRole, transferBusinessAccountOwnership, removeBusinessAccountWallet, removeBusinessAccountSigner, updateBusinessAccount } from '@dynamic-labs-sdk/client/waas';
|
|
4
|
+
import { addBusinessAccountMember, addWalletToBusinessAccount, removeBusinessAccountMember, updateBusinessAccountMemberRole, transferBusinessAccountOwnership, removeBusinessAccountWallet, removeBusinessAccountSigner, updateBusinessAccount } from '@dynamic-labs-sdk/client/waas';
|
|
5
|
+
import { TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
5
6
|
import { useDynamicClient } from '../../../client/client.js';
|
|
6
7
|
import '@dynamic-labs-sdk/client/core';
|
|
7
|
-
import '@dynamic-labs/sdk-api-core';
|
|
8
8
|
import '@dynamic-labs-sdk/client';
|
|
9
9
|
import '../../../config/ApiEndpoint.js';
|
|
10
10
|
import '@dynamic-labs/iconic';
|
|
@@ -29,6 +29,7 @@ import '../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
|
29
29
|
import '../../../events/dynamicEvents.js';
|
|
30
30
|
import { useProjectSettings } from '../../../client/extension/projectSettings/useProjectSettings/useProjectSettings.js';
|
|
31
31
|
import { useDynamicWaas } from '../useDynamicWaas/useDynamicWaas.js';
|
|
32
|
+
import { useStepUpAuthentication } from '../useStepUpAuthentication/useStepUpAuthentication.js';
|
|
32
33
|
|
|
33
34
|
const NO_WAAS_CHAIN_ERROR = 'No enabled WaaS chain found for business account operations';
|
|
34
35
|
const NO_CONNECTOR_ERROR = 'WaaS wallet connector not found';
|
|
@@ -36,6 +37,7 @@ const useBusinessAccounts = () => {
|
|
|
36
37
|
const { getWaasWalletConnector } = useDynamicWaas();
|
|
37
38
|
const projectSettings = useProjectSettings();
|
|
38
39
|
const dynamicClient = useDynamicClient();
|
|
40
|
+
const { isStepUpRequired, promptStepUpAuth } = useStepUpAuthentication();
|
|
39
41
|
const enabledChainNames = useMemo(() => {
|
|
40
42
|
var _a, _b;
|
|
41
43
|
return ((_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.chainConfigurations) !== null && _b !== void 0 ? _b : [])
|
|
@@ -60,6 +62,23 @@ const useBusinessAccounts = () => {
|
|
|
60
62
|
}
|
|
61
63
|
return connector.getWaasWalletClient();
|
|
62
64
|
}), [defaultChainName, getWaasWalletConnector]);
|
|
65
|
+
// Forces the step-up auth popup for every scope that still lacks a valid
|
|
66
|
+
// elevated token, so mutating business account calls always carry one.
|
|
67
|
+
// Returns whether a prompt ran, so connector-based callers can rebuild the
|
|
68
|
+
// cached iframe client after a session rotation.
|
|
69
|
+
const ensureStepUpAuth = useCallback((scopes) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
+
const requiredScopes = [];
|
|
71
|
+
for (const scope of scopes) {
|
|
72
|
+
if (yield isStepUpRequired({ scope })) {
|
|
73
|
+
requiredScopes.push(scope);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (requiredScopes.length === 0) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
yield promptStepUpAuth({ requestedScopes: requiredScopes });
|
|
80
|
+
return true;
|
|
81
|
+
}), [isStepUpRequired, promptStepUpAuth]);
|
|
63
82
|
const createBusinessAccount = useCallback((...args_1) => __awaiter(void 0, [...args_1], void 0, function* (input = {}) {
|
|
64
83
|
const client = yield getBusinessClient();
|
|
65
84
|
return client.businessAccounts.createBusinessAccount({ request: input });
|
|
@@ -72,36 +91,56 @@ const useBusinessAccounts = () => {
|
|
|
72
91
|
const client = yield getBusinessClient();
|
|
73
92
|
return client.businessAccounts.getBusinessAccount({ businessAccountId });
|
|
74
93
|
}), [getBusinessClient]);
|
|
75
|
-
const addBusinessAccountMember = useCallback((
|
|
76
|
-
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}), [
|
|
94
|
+
const addBusinessAccountMember$1 = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ businessAccountId, userId, identifier, identifierType, role, }) {
|
|
95
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountmemberadd]);
|
|
96
|
+
return addBusinessAccountMember({
|
|
97
|
+
businessAccountId,
|
|
98
|
+
role,
|
|
99
|
+
targetIdentity: { identifier, identifierType, userId },
|
|
100
|
+
}, dynamicClient);
|
|
101
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
102
|
+
const addWalletToBusinessAccount$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountlinkWallet]);
|
|
104
|
+
return addWalletToBusinessAccount(input, dynamicClient);
|
|
105
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
83
106
|
// Adds a signer via the SSE reshare ceremony on the wallet's chain connector.
|
|
84
107
|
// Mints the new signer's share set and seeds it to client-keyshare-service.
|
|
85
|
-
const addBusinessAccountSigner = useCallback((
|
|
108
|
+
const addBusinessAccountSigner = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ accountAddress, walletId, chainName, businessAccountId, targetSignerIdentity, signerType, password, targetSignerPassword, }) {
|
|
86
109
|
const connector = getWaasWalletConnector(chainName);
|
|
87
110
|
if (!connector) {
|
|
88
111
|
throw new Error(NO_CONNECTOR_ERROR);
|
|
89
112
|
}
|
|
113
|
+
if (!businessAccountId && !walletId) {
|
|
114
|
+
throw new Error('addBusinessAccountSigner requires a walletId when no businessAccountId is provided');
|
|
115
|
+
}
|
|
90
116
|
// No account yet: find-or-create the per-wallet business account first
|
|
91
117
|
// (idempotent — converts the personal wallet, seating its owner as the
|
|
92
118
|
// first signer, or returns the existing one if already linked), then
|
|
93
|
-
// reshare the new signer into it.
|
|
119
|
+
// reshare the new signer into it. That path also needs the link_wallet
|
|
120
|
+
// elevation, so request both scopes in a single step-up prompt.
|
|
121
|
+
const requiredScopes = businessAccountId
|
|
122
|
+
? [TokenScope.BusinessAccountsigneradd]
|
|
123
|
+
: [
|
|
124
|
+
TokenScope.BusinessAccountsigneradd,
|
|
125
|
+
TokenScope.BusinessAccountlinkWallet,
|
|
126
|
+
];
|
|
127
|
+
const prompted = yield ensureStepUpAuth(requiredScopes);
|
|
94
128
|
let resolvedBusinessAccountId = businessAccountId;
|
|
95
129
|
if (!resolvedBusinessAccountId) {
|
|
96
130
|
if (!walletId) {
|
|
97
131
|
throw new Error('addBusinessAccountSigner requires a walletId when no businessAccountId is provided');
|
|
98
132
|
}
|
|
99
|
-
const account = yield addWalletToBusinessAccount({ walletId });
|
|
133
|
+
const account = yield addWalletToBusinessAccount({ walletId }, dynamicClient);
|
|
100
134
|
resolvedBusinessAccountId = account.id;
|
|
101
135
|
}
|
|
102
136
|
if (!resolvedBusinessAccountId) {
|
|
103
137
|
throw new Error('addBusinessAccountSigner could not resolve a businessAccountId');
|
|
104
138
|
}
|
|
139
|
+
// Step-up reauth can rotate the session, so drop the cached iframe
|
|
140
|
+
// client and let it re-auth with the fresh token before the reshare.
|
|
141
|
+
if (prompted) {
|
|
142
|
+
yield connector.getWaasWalletClient(undefined, { forceRebuild: true });
|
|
143
|
+
}
|
|
105
144
|
return connector.addSignerViaReshare({
|
|
106
145
|
accountAddress,
|
|
107
146
|
businessAccountId: resolvedBusinessAccountId,
|
|
@@ -111,8 +150,8 @@ const useBusinessAccounts = () => {
|
|
|
111
150
|
targetSignerPassword,
|
|
112
151
|
walletId,
|
|
113
152
|
});
|
|
114
|
-
}), [
|
|
115
|
-
const createWalletForBusinessAccount = useCallback((
|
|
153
|
+
}), [dynamicClient, ensureStepUpAuth, getWaasWalletConnector]);
|
|
154
|
+
const createWalletForBusinessAccount = useCallback((_c) => __awaiter(void 0, [_c], void 0, function* ({ businessAccountId, chainName, thresholdSignatureScheme, password, }) {
|
|
116
155
|
const chain = chainName !== null && chainName !== void 0 ? chainName : defaultChainName;
|
|
117
156
|
if (!chain) {
|
|
118
157
|
throw new Error(NO_WAAS_CHAIN_ERROR);
|
|
@@ -131,18 +170,31 @@ const useBusinessAccounts = () => {
|
|
|
131
170
|
const client = yield getBusinessClient();
|
|
132
171
|
return client.getWallets();
|
|
133
172
|
}), [getBusinessClient]);
|
|
134
|
-
const removeBusinessAccountMember$1 = useCallback((
|
|
173
|
+
const removeBusinessAccountMember$1 = useCallback((_d) => __awaiter(void 0, [_d], void 0, function* ({ businessAccountId, userId }) {
|
|
174
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountmemberremove]);
|
|
135
175
|
return removeBusinessAccountMember({ businessAccountId, userId }, dynamicClient);
|
|
136
|
-
}), [dynamicClient]);
|
|
137
|
-
const updateBusinessAccountMemberRole$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
176
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
177
|
+
const updateBusinessAccountMemberRole$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
178
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountmemberroleupdate]);
|
|
179
|
+
return updateBusinessAccountMemberRole(input, dynamicClient);
|
|
180
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
181
|
+
const transferBusinessAccountOwnership$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
182
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccounttransferOwnership]);
|
|
183
|
+
return transferBusinessAccountOwnership(input, dynamicClient);
|
|
184
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
185
|
+
const removeBusinessAccountWallet$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
186
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountwalletremove]);
|
|
187
|
+
return removeBusinessAccountWallet(input, dynamicClient);
|
|
188
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
189
|
+
const removeBusinessAccountSigner$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
190
|
+
yield ensureStepUpAuth([TokenScope.BusinessAccountsignerremove]);
|
|
191
|
+
return removeBusinessAccountSigner(input, dynamicClient);
|
|
192
|
+
}), [dynamicClient, ensureStepUpAuth]);
|
|
141
193
|
const updateBusinessAccount$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () { return updateBusinessAccount(input, dynamicClient); }), [dynamicClient]);
|
|
142
194
|
return {
|
|
143
|
-
addBusinessAccountMember,
|
|
195
|
+
addBusinessAccountMember: addBusinessAccountMember$1,
|
|
144
196
|
addBusinessAccountSigner,
|
|
145
|
-
addWalletToBusinessAccount,
|
|
197
|
+
addWalletToBusinessAccount: addWalletToBusinessAccount$1,
|
|
146
198
|
createBusinessAccount,
|
|
147
199
|
createWalletForBusinessAccount,
|
|
148
200
|
defaultChainName,
|
|
@@ -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 };
|