@dynamic-labs/sdk-react-core 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/lib/data/api/user/user.cjs +3 -2
- package/src/lib/data/api/user/user.js +3 -2
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +1 -1
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.0.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.7...v2.0.8) (2024-05-27)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* allow leather to show up in wallet list even when not installed … ([#5626](https://github.com/dynamic-labs/DynamicAuth/issues/5626)) ([e757679](https://github.com/dynamic-labs/DynamicAuth/commit/e757679a05feee628392c7c9042080b53e743694))
|
|
8
|
+
* btc balance calculation ([#5740](https://github.com/dynamic-labs/DynamicAuth/issues/5740)) ([f8e01bb](https://github.com/dynamic-labs/DynamicAuth/commit/f8e01bb5d8d404f041797f10f27dfea1ddbfccdf)), closes [#5716](https://github.com/dynamic-labs/DynamicAuth/issues/5716)
|
|
9
|
+
* init ethers web3provider without a network if selected network is unsupported ([#5653](https://github.com/dynamic-labs/DynamicAuth/issues/5653)) ([91095c2](https://github.com/dynamic-labs/DynamicAuth/commit/91095c2aa45e57847e3852fbcde7fe926b2e581a))
|
|
10
|
+
* show phone number in use error message ([#5684](https://github.com/dynamic-labs/DynamicAuth/issues/5684)) ([add08e4](https://github.com/dynamic-labs/DynamicAuth/commit/add08e490749af4852efaddae83b43f227442756)), closes [#5681](https://github.com/dynamic-labs/DynamicAuth/issues/5681)
|
|
11
|
+
* use PromptModal when using the DynamicMultiWalletPromptsWidget f… ([#5628](https://github.com/dynamic-labs/DynamicAuth/issues/5628)) ([310a92c](https://github.com/dynamic-labs/DynamicAuth/commit/310a92cfe6386747b7327fa3853d970a75b996cd))
|
|
12
|
+
|
|
2
13
|
### [2.0.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.6...v2.0.7) (2024-05-15)
|
|
3
14
|
|
|
4
15
|
|
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": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"react-i18next": "13.5.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
19
|
"react-international-phone": "4.2.5",
|
|
20
|
-
"@dynamic-labs/iconic": "2.0.
|
|
21
|
-
"@dynamic-labs/logger": "2.0.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "2.0.
|
|
23
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.0.
|
|
24
|
-
"@dynamic-labs/rpc-provider-solana": "2.0.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "2.0.
|
|
26
|
-
"@dynamic-labs/types": "2.0.
|
|
27
|
-
"@dynamic-labs/utils": "2.0.
|
|
28
|
-
"@dynamic-labs/viem-utils": "2.0.
|
|
29
|
-
"@dynamic-labs/wallet-book": "2.0.
|
|
30
|
-
"@dynamic-labs/wallet-connector-core": "2.0.
|
|
20
|
+
"@dynamic-labs/iconic": "2.0.8",
|
|
21
|
+
"@dynamic-labs/logger": "2.0.8",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "2.0.8",
|
|
23
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.0.8",
|
|
24
|
+
"@dynamic-labs/rpc-provider-solana": "2.0.8",
|
|
25
|
+
"@dynamic-labs/rpc-providers": "2.0.8",
|
|
26
|
+
"@dynamic-labs/types": "2.0.8",
|
|
27
|
+
"@dynamic-labs/utils": "2.0.8",
|
|
28
|
+
"@dynamic-labs/viem-utils": "2.0.8",
|
|
29
|
+
"@dynamic-labs/wallet-book": "2.0.8",
|
|
30
|
+
"@dynamic-labs/wallet-connector-core": "2.0.8",
|
|
31
31
|
"eventemitter3": "5.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -41,8 +41,9 @@ const updateUserProfileFields = (jwt, environmentId, fields) => _tslib.__awaiter
|
|
|
41
41
|
else if (error.code === 'too_many_verification_attempts') {
|
|
42
42
|
throw new utils.TooManyEmailVerificationsError();
|
|
43
43
|
}
|
|
44
|
-
else if (error.code === 'invalid_phone'
|
|
45
|
-
|
|
44
|
+
else if (error.code === 'invalid_phone' ||
|
|
45
|
+
error.code === 'invalid_sms_verification') {
|
|
46
|
+
throw new utils.InvalidPhoneNumberError(error.error);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
throw e;
|
|
@@ -37,8 +37,9 @@ const updateUserProfileFields = (jwt, environmentId, fields) => __awaiter(void 0
|
|
|
37
37
|
else if (error.code === 'too_many_verification_attempts') {
|
|
38
38
|
throw new TooManyEmailVerificationsError();
|
|
39
39
|
}
|
|
40
|
-
else if (error.code === 'invalid_phone'
|
|
41
|
-
|
|
40
|
+
else if (error.code === 'invalid_phone' ||
|
|
41
|
+
error.code === 'invalid_sms_verification') {
|
|
42
|
+
throw new InvalidPhoneNumberError(error.error);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
throw e;
|
|
@@ -77,7 +77,7 @@ const useUserDataForm = ({ onSubmit, onError, userProfile, shouldEnforcePolicies
|
|
|
77
77
|
formikHelper.setErrors({ username: 'Username already exists' });
|
|
78
78
|
}
|
|
79
79
|
else if (e instanceof utils.InvalidPhoneNumberError) {
|
|
80
|
-
formikHelper.setErrors({ phoneNumber:
|
|
80
|
+
formikHelper.setErrors({ phoneNumber: e.message });
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
83
|
formikHelper.setErrors({
|
|
@@ -73,7 +73,7 @@ const useUserDataForm = ({ onSubmit, onError, userProfile, shouldEnforcePolicies
|
|
|
73
73
|
formikHelper.setErrors({ username: 'Username already exists' });
|
|
74
74
|
}
|
|
75
75
|
else if (e instanceof InvalidPhoneNumberError) {
|
|
76
|
-
formikHelper.setErrors({ phoneNumber:
|
|
76
|
+
formikHelper.setErrors({ phoneNumber: e.message });
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
79
|
formikHelper.setErrors({
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs
CHANGED
|
@@ -53,8 +53,7 @@ require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.
|
|
|
53
53
|
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
54
54
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
55
55
|
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
56
|
-
var
|
|
57
|
-
require('react-focus-lock');
|
|
56
|
+
var PromptModal = require('../../components/PromptModal/PromptModal.cjs');
|
|
58
57
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
59
58
|
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
60
59
|
var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs');
|
|
@@ -74,6 +73,7 @@ require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
|
74
73
|
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
75
74
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
76
75
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
76
|
+
require('react-focus-lock');
|
|
77
77
|
require('qrcode');
|
|
78
78
|
require('../../../../views/WalletList/WalletList.cjs');
|
|
79
79
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
@@ -97,7 +97,7 @@ const PendingConnectionContent = () => {
|
|
|
97
97
|
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptLayout, { dataTestId: 'pending-connection-modal', icon: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon // eslint-disable-line
|
|
98
98
|
, { jwt: authToken, wallet: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet }), title: title, children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: description }) }));
|
|
99
99
|
};
|
|
100
|
-
const PendingConnectionModal = () => (jsxRuntime.jsx(
|
|
100
|
+
const PendingConnectionModal = () => (jsxRuntime.jsx(PromptModal.PromptModal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt, children: jsxRuntime.jsx(PendingConnectionContent, {}) }));
|
|
101
101
|
const PendingConnectionWidgetPortal = () => (jsxRuntime.jsx(WidgetPortal.WidgetPortal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt(), children: jsxRuntime.jsx(PendingConnectionContent, {}) }));
|
|
102
102
|
|
|
103
103
|
exports.PendingConnectionModal = PendingConnectionModal;
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js
CHANGED
|
@@ -49,8 +49,7 @@ import '../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.j
|
|
|
49
49
|
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
50
50
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
51
51
|
import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
52
|
-
import {
|
|
53
|
-
import 'react-focus-lock';
|
|
52
|
+
import { PromptModal } from '../../components/PromptModal/PromptModal.js';
|
|
54
53
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
55
54
|
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
56
55
|
import { DefaultPromptLayout } from '../DefaultPromptModal/DefaultPromptModal.js';
|
|
@@ -70,6 +69,7 @@ import '../../../../components/InlineWidget/InlineWidget.js';
|
|
|
70
69
|
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
71
70
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
72
71
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
72
|
+
import 'react-focus-lock';
|
|
73
73
|
import 'qrcode';
|
|
74
74
|
import '../../../../views/WalletList/WalletList.js';
|
|
75
75
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
@@ -93,7 +93,7 @@ const PendingConnectionContent = () => {
|
|
|
93
93
|
return (jsx(DefaultPromptLayout, { dataTestId: 'pending-connection-modal', icon: jsx(AuthProviderIcon // eslint-disable-line
|
|
94
94
|
, { jwt: authToken, wallet: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet }), title: title, children: jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: description }) }));
|
|
95
95
|
};
|
|
96
|
-
const PendingConnectionModal = () => (jsx(
|
|
96
|
+
const PendingConnectionModal = () => (jsx(PromptModal, { onClose: useCloseMultiWalletPrompt, children: jsx(PendingConnectionContent, {}) }));
|
|
97
97
|
const PendingConnectionWidgetPortal = () => (jsx(WidgetPortal, { onClose: useCloseMultiWalletPrompt(), children: jsx(PendingConnectionContent, {}) }));
|
|
98
98
|
|
|
99
99
|
export { PendingConnectionModal, PendingConnectionWidgetPortal };
|