@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 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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "2.0.7";
5
+ var version = "2.0.8";
6
6
  var dependencies = {
7
7
  "@dynamic-labs/sdk-api-core": "0.0.418",
8
8
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "2.0.7";
1
+ var version = "2.0.8";
2
2
  var dependencies = {
3
3
  "@dynamic-labs/sdk-api-core": "0.0.418",
4
4
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "2.0.7",
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.7",
21
- "@dynamic-labs/logger": "2.0.7",
22
- "@dynamic-labs/multi-wallet": "2.0.7",
23
- "@dynamic-labs/rpc-provider-ethereum": "2.0.7",
24
- "@dynamic-labs/rpc-provider-solana": "2.0.7",
25
- "@dynamic-labs/rpc-providers": "2.0.7",
26
- "@dynamic-labs/types": "2.0.7",
27
- "@dynamic-labs/utils": "2.0.7",
28
- "@dynamic-labs/viem-utils": "2.0.7",
29
- "@dynamic-labs/wallet-book": "2.0.7",
30
- "@dynamic-labs/wallet-connector-core": "2.0.7",
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
- throw new utils.InvalidPhoneNumberError();
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
- throw new InvalidPhoneNumberError();
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: 'Invalid phone number' });
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: 'Invalid phone number' });
76
+ formikHelper.setErrors({ phoneNumber: e.message });
77
77
  }
78
78
  else {
79
79
  formikHelper.setErrors({
@@ -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 Modal = require('../../../../components/Modal/Modal.cjs');
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(Modal.Modal, { children: jsxRuntime.jsx(PendingConnectionContent, {}) }));
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;
@@ -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 { Modal } from '../../../../components/Modal/Modal.js';
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(Modal, { children: jsx(PendingConnectionContent, {}) }));
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 };