@dynamic-labs/sdk-react-core 4.9.13-preview.0 → 4.9.13-preview.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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/lib/context/DynamicContext/DynamicContext.cjs +0 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +0 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.types.d.ts +0 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +3 -9
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +3 -9
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.types.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.9.13-preview.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.12...v4.9.13-preview.1) (2025-03-29)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add zk sync aa connector ([7ef9031](https://github.com/dynamic-labs/dynamic-auth/commit/7ef9031ce709b1ebc2d908da7d120e83733be7cf))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Adjust parallel tasks to default 16 ([#8413](https://github.com/dynamic-labs/dynamic-auth/issues/8413)) ([b62d34c](https://github.com/dynamic-labs/dynamic-auth/commit/b62d34cb780859d3d8414421539116520d0ebcbd))
|
|
13
|
+
* do not prompt passkey with 7702 on v2 wallets ([#8391](https://github.com/dynamic-labs/dynamic-auth/issues/8391)) ([bb91396](https://github.com/dynamic-labs/dynamic-auth/commit/bb913965121e97801922f5ca828d11e4a551a3b6))
|
|
14
|
+
* ensure the global wallet app url is used ([#8404](https://github.com/dynamic-labs/dynamic-auth/issues/8404)) ([23a7d91](https://github.com/dynamic-labs/dynamic-auth/commit/23a7d91b50cc85e67de52306f91163c675e0f007))
|
|
15
|
+
* **global-wallet-client:** use global wallet env id when storing data to ls ([#8405](https://github.com/dynamic-labs/dynamic-auth/issues/8405)) ([2b3d9ce](https://github.com/dynamic-labs/dynamic-auth/commit/2b3d9ce8dd82dda487759e0621c73bfad2842aef))
|
|
16
|
+
|
|
2
17
|
### [4.9.13-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.12...v4.9.13-preview.0) (2025-03-28)
|
|
3
18
|
|
|
4
19
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.9.13-preview.
|
|
3
|
+
"version": "4.9.13-preview.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.645",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
16
|
"bs58": "5.0.0",
|
|
17
|
-
"@dynamic-labs/assert-package-version": "4.9.13-preview.
|
|
18
|
-
"@dynamic-labs/ethereum-aa": "4.9.13-preview.
|
|
19
|
-
"@dynamic-labs/iconic": "4.9.13-preview.
|
|
20
|
-
"@dynamic-labs/logger": "4.9.13-preview.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "4.9.13-preview.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "4.9.13-preview.
|
|
23
|
-
"@dynamic-labs/store": "4.9.13-preview.
|
|
24
|
-
"@dynamic-labs/types": "4.9.13-preview.
|
|
25
|
-
"@dynamic-labs/utils": "4.9.13-preview.
|
|
26
|
-
"@dynamic-labs/wallet-book": "4.9.13-preview.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "4.9.13-preview.
|
|
17
|
+
"@dynamic-labs/assert-package-version": "4.9.13-preview.1",
|
|
18
|
+
"@dynamic-labs/ethereum-aa": "4.9.13-preview.1",
|
|
19
|
+
"@dynamic-labs/iconic": "4.9.13-preview.1",
|
|
20
|
+
"@dynamic-labs/logger": "4.9.13-preview.1",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "4.9.13-preview.1",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "4.9.13-preview.1",
|
|
23
|
+
"@dynamic-labs/store": "4.9.13-preview.1",
|
|
24
|
+
"@dynamic-labs/types": "4.9.13-preview.1",
|
|
25
|
+
"@dynamic-labs/utils": "4.9.13-preview.1",
|
|
26
|
+
"@dynamic-labs/wallet-book": "4.9.13-preview.1",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "4.9.13-preview.1",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -250,8 +250,6 @@ const InnerDynamicContextProvider = (props) => {
|
|
|
250
250
|
const [authorizationViewDisplayOrder, setAuthorizationViewDisplayOrder] = useDisplayOrderState.useDisplayOrderState(projectSettings$1);
|
|
251
251
|
const showEmbeddedWalletActionsUI = useShowEmbeddedWalletActionsUI.useShowEmbeddedWalletActionsUI(transactionConfirmationSettings, projectSettings$1);
|
|
252
252
|
const [confirmationModal, walletUiUtils] = useWalletUiUtils.useWalletUiUtils({
|
|
253
|
-
appLogoUrl,
|
|
254
|
-
appName,
|
|
255
253
|
hideEmbeddedWalletTransactionUIs: !showEmbeddedWalletActionsUI,
|
|
256
254
|
});
|
|
257
255
|
const [authMode, setAuthMode] = React.useState(initialAuthenticationMode);
|
|
@@ -246,8 +246,6 @@ const InnerDynamicContextProvider = (props) => {
|
|
|
246
246
|
const [authorizationViewDisplayOrder, setAuthorizationViewDisplayOrder] = useDisplayOrderState(projectSettings);
|
|
247
247
|
const showEmbeddedWalletActionsUI = useShowEmbeddedWalletActionsUI(transactionConfirmationSettings, projectSettings);
|
|
248
248
|
const [confirmationModal, walletUiUtils] = useWalletUiUtils({
|
|
249
|
-
appLogoUrl,
|
|
250
|
-
appName,
|
|
251
249
|
hideEmbeddedWalletTransactionUIs: !showEmbeddedWalletActionsUI,
|
|
252
250
|
});
|
|
253
251
|
const [authMode, setAuthMode] = useState(initialAuthenticationMode);
|
|
@@ -119,13 +119,13 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
119
119
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
120
120
|
var SignMessagePreview = require('../../components/SignMessagePreview/SignMessagePreview.cjs');
|
|
121
121
|
|
|
122
|
-
const SignMessageConfirmationModal = ({
|
|
122
|
+
const SignMessageConfirmationModal = ({ message, handler, onReject, onSignMessage, hideModal }) => {
|
|
123
123
|
usePreventPageScroll.usePreventPageScroll(true);
|
|
124
124
|
const didConfirmRef = React.useRef(false);
|
|
125
125
|
const [show, setShow] = React.useState(true);
|
|
126
126
|
const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
|
|
127
127
|
const { isTurnkeyWallet } = useIsTurnkeyWallet.useIsTurnkeyWallet();
|
|
128
|
-
const { setShowAuthFlow, primaryWallet, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
128
|
+
const { setShowAuthFlow, primaryWallet, user, appLogoUrl, appName } = useInternalDynamicContext.useInternalDynamicContext();
|
|
129
129
|
const { pushView } = ViewContext.useViewContext();
|
|
130
130
|
const { userNeedsCrossDomainPasskey } = PasskeyContext.usePasskeyContext();
|
|
131
131
|
const { t } = reactI18next.useTranslation();
|
|
@@ -115,13 +115,13 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
115
115
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
116
116
|
import { SignMessagePreview } from '../../components/SignMessagePreview/SignMessagePreview.js';
|
|
117
117
|
|
|
118
|
-
const SignMessageConfirmationModal = ({
|
|
118
|
+
const SignMessageConfirmationModal = ({ message, handler, onReject, onSignMessage, hideModal }) => {
|
|
119
119
|
usePreventPageScroll(true);
|
|
120
120
|
const didConfirmRef = useRef(false);
|
|
121
121
|
const [show, setShow] = useState(true);
|
|
122
122
|
const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
|
|
123
123
|
const { isTurnkeyWallet } = useIsTurnkeyWallet();
|
|
124
|
-
const { setShowAuthFlow, primaryWallet, user } = useInternalDynamicContext();
|
|
124
|
+
const { setShowAuthFlow, primaryWallet, user, appLogoUrl, appName } = useInternalDynamicContext();
|
|
125
125
|
const { pushView } = useViewContext();
|
|
126
126
|
const { userNeedsCrossDomainPasskey } = usePasskeyContext();
|
|
127
127
|
const { t } = useTranslation();
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { PasskeyError } from '@dynamic-labs/utils';
|
|
3
3
|
export type SignMessageConfirmationModalProps = {
|
|
4
|
-
appLogoUrl?: string;
|
|
5
|
-
appName?: string;
|
|
6
4
|
handler: (message: string | ArrayLike<number>) => Promise<string>;
|
|
7
5
|
message: string | ArrayLike<number>;
|
|
8
6
|
onReject: (error: unknown) => void;
|
|
@@ -99,7 +99,7 @@ var SyncWalletPromptModal = require('../../../modals/SyncWalletPromptModal/SyncW
|
|
|
99
99
|
var TransactionConfirmationModal = require('../../../modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs');
|
|
100
100
|
var AddNetworkModal = require('../../../modals/AddNetworkModal/AddNetworkModal.cjs');
|
|
101
101
|
|
|
102
|
-
const useWalletUiUtils = ({
|
|
102
|
+
const useWalletUiUtils = ({ hideEmbeddedWalletTransactionUIs = false, }) => {
|
|
103
103
|
const confirmationStateRef = React.useRef('enabled');
|
|
104
104
|
const { t } = reactI18next.useTranslation();
|
|
105
105
|
const { modal: sendTransactionModal, open: openSendTransaction } = useConfirmationModal.useConfirmationModal({
|
|
@@ -125,20 +125,14 @@ const useWalletUiUtils = ({ appLogoUrl, appName, hideEmbeddedWalletTransactionUI
|
|
|
125
125
|
// prevent the modal from opening itself again
|
|
126
126
|
if (!shouldConfirmAction())
|
|
127
127
|
return handler();
|
|
128
|
-
return openSignMessage((resolve, reject) => (jsxRuntime.jsx(SignMessageConfirmationModal.SignMessageConfirmationModal, {
|
|
128
|
+
return openSignMessage((resolve, reject) => (jsxRuntime.jsx(SignMessageConfirmationModal.SignMessageConfirmationModal, { message: message, handler: handler, onSignMessage: resolve, onReject: reject, hideModal: hideEmbeddedWalletTransactionUIs &&
|
|
129
129
|
!(walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.isGlobalTransaction) }))).then((signedMessage) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
130
130
|
if (signedMessage === 'callHandlerOutsideModal')
|
|
131
131
|
return handler();
|
|
132
132
|
else
|
|
133
133
|
return signedMessage;
|
|
134
134
|
}));
|
|
135
|
-
}), [
|
|
136
|
-
appLogoUrl,
|
|
137
|
-
appName,
|
|
138
|
-
hideEmbeddedWalletTransactionUIs,
|
|
139
|
-
openSignMessage,
|
|
140
|
-
shouldConfirmAction,
|
|
141
|
-
]);
|
|
135
|
+
}), [hideEmbeddedWalletTransactionUIs, openSignMessage, shouldConfirmAction]);
|
|
142
136
|
const sendTransaction = React.useCallback((walletConnector, transaction) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
143
137
|
// prevent the modal from opening itself again
|
|
144
138
|
if (!shouldConfirmAction())
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { WalletUiUtils } from '@dynamic-labs/types';
|
|
3
3
|
import { InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { WalletUiUtilsHookProps } from './useWalletUiUtils.types';
|
|
5
|
-
export declare const useWalletUiUtils: ({
|
|
5
|
+
export declare const useWalletUiUtils: ({ hideEmbeddedWalletTransactionUIs, }: WalletUiUtilsHookProps) => [
|
|
6
6
|
ReactNode | undefined,
|
|
7
7
|
WalletUiUtils<InternalWalletConnector>
|
|
8
8
|
];
|
|
@@ -95,7 +95,7 @@ import { SyncWalletPromptModal } from '../../../modals/SyncWalletPromptModal/Syn
|
|
|
95
95
|
import { TransactionConfirmationModal } from '../../../modals/TransactionConfirmationModal/TransactionConfirmationModal.js';
|
|
96
96
|
import { AddNetworkModal } from '../../../modals/AddNetworkModal/AddNetworkModal.js';
|
|
97
97
|
|
|
98
|
-
const useWalletUiUtils = ({
|
|
98
|
+
const useWalletUiUtils = ({ hideEmbeddedWalletTransactionUIs = false, }) => {
|
|
99
99
|
const confirmationStateRef = useRef('enabled');
|
|
100
100
|
const { t } = useTranslation();
|
|
101
101
|
const { modal: sendTransactionModal, open: openSendTransaction } = useConfirmationModal({
|
|
@@ -121,20 +121,14 @@ const useWalletUiUtils = ({ appLogoUrl, appName, hideEmbeddedWalletTransactionUI
|
|
|
121
121
|
// prevent the modal from opening itself again
|
|
122
122
|
if (!shouldConfirmAction())
|
|
123
123
|
return handler();
|
|
124
|
-
return openSignMessage((resolve, reject) => (jsx(SignMessageConfirmationModal, {
|
|
124
|
+
return openSignMessage((resolve, reject) => (jsx(SignMessageConfirmationModal, { message: message, handler: handler, onSignMessage: resolve, onReject: reject, hideModal: hideEmbeddedWalletTransactionUIs &&
|
|
125
125
|
!(walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.isGlobalTransaction) }))).then((signedMessage) => __awaiter(void 0, void 0, void 0, function* () {
|
|
126
126
|
if (signedMessage === 'callHandlerOutsideModal')
|
|
127
127
|
return handler();
|
|
128
128
|
else
|
|
129
129
|
return signedMessage;
|
|
130
130
|
}));
|
|
131
|
-
}), [
|
|
132
|
-
appLogoUrl,
|
|
133
|
-
appName,
|
|
134
|
-
hideEmbeddedWalletTransactionUIs,
|
|
135
|
-
openSignMessage,
|
|
136
|
-
shouldConfirmAction,
|
|
137
|
-
]);
|
|
131
|
+
}), [hideEmbeddedWalletTransactionUIs, openSignMessage, shouldConfirmAction]);
|
|
138
132
|
const sendTransaction = useCallback((walletConnector, transaction) => __awaiter(void 0, void 0, void 0, function* () {
|
|
139
133
|
// prevent the modal from opening itself again
|
|
140
134
|
if (!shouldConfirmAction())
|