@dynamic-labs/sdk-react-core 1.4.9 → 1.4.11
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 +17 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -3
- package/src/lib/views/CollectUserDataView/useFields.cjs +2 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +2 -0
- package/src/lib/views/CollectUserDataView/useFields.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +3 -6
- package/src/lib/views/WalletList/WalletList.js +3 -6
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
### [1.4.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.10...v1.4.11) (2024-04-26)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* display wallet tabs when linking a wallet ([#5493](https://github.com/dynamic-labs/DynamicAuth/issues/5493)) ([cf843bd](https://github.com/dynamic-labs/DynamicAuth/commit/cf843bd9f38c4aed8fe24387fe591ae045a8c3f0))
|
|
8
|
+
* ensure zerodev viem client handles eth_accounts call ([#5477](https://github.com/dynamic-labs/DynamicAuth/issues/5477)) ([#5484](https://github.com/dynamic-labs/DynamicAuth/issues/5484)) ([5c6508a](https://github.com/dynamic-labs/DynamicAuth/commit/5c6508afbfa981b5dd3d2064ee32f9396c142efb))
|
|
9
|
+
* network changes with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([#5490](https://github.com/dynamic-labs/DynamicAuth/issues/5490)) ([d54a74c](https://github.com/dynamic-labs/DynamicAuth/commit/d54a74c373a2db35add56bf7383b7243873624c3))
|
|
10
|
+
* refetch nameservice data and display properly ([#5501](https://github.com/dynamic-labs/DynamicAuth/issues/5501)) ([59c9390](https://github.com/dynamic-labs/DynamicAuth/commit/59c9390a593e52d6883f5b3ec541279e52e8f45b))
|
|
11
|
+
|
|
12
|
+
### [1.4.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.9...v1.4.10) (2024-04-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add autocomplete attribute to email and phone inputs ([#5444](https://github.com/dynamic-labs/DynamicAuth/issues/5444)) ([01fc1b0](https://github.com/dynamic-labs/DynamicAuth/commit/01fc1b0e0b93a5104112a7682907ea2948ece7b2))
|
|
18
|
+
|
|
2
19
|
### [1.4.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.8...v1.4.9) (2024-04-20)
|
|
3
20
|
|
|
4
21
|
|
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": "1.4.
|
|
3
|
+
"version": "1.4.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"react-focus-lock": "2.9.2",
|
|
17
17
|
"react-i18next": "^13.2.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
|
-
"@dynamic-labs/ethereum": "1.4.
|
|
20
|
-
"@dynamic-labs/iconic": "1.4.
|
|
21
|
-
"@dynamic-labs/logger": "1.4.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "1.4.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "1.4.
|
|
24
|
-
"@dynamic-labs/types": "1.4.
|
|
25
|
-
"@dynamic-labs/utils": "1.4.
|
|
26
|
-
"@dynamic-labs/viem-utils": "1.4.
|
|
27
|
-
"@dynamic-labs/wallet-book": "1.4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "1.4.
|
|
19
|
+
"@dynamic-labs/ethereum": "1.4.11",
|
|
20
|
+
"@dynamic-labs/iconic": "1.4.11",
|
|
21
|
+
"@dynamic-labs/logger": "1.4.11",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "1.4.11",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "1.4.11",
|
|
24
|
+
"@dynamic-labs/types": "1.4.11",
|
|
25
|
+
"@dynamic-labs/utils": "1.4.11",
|
|
26
|
+
"@dynamic-labs/viem-utils": "1.4.11",
|
|
27
|
+
"@dynamic-labs/wallet-book": "1.4.11",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "1.4.11",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -82,7 +82,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
82
82
|
const { fieldsConfig } = useFields.useFields();
|
|
83
83
|
const { t } = reactI18next.useTranslation();
|
|
84
84
|
return (jsxRuntime.jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
85
|
-
const { label, type, key } = index.getValueByKey(fieldsConfig, name);
|
|
85
|
+
const { label, type, key, autoComplete } = index.getValueByKey(fieldsConfig, name);
|
|
86
86
|
if (name === 'tShirtSize') {
|
|
87
87
|
return (jsxRuntime.jsx(formik.Field, { copykey: key, as: Select.Select, type: type, id: name, name: name, label: label, error: errors[name] && touched[name], selectDataTestId: 'tShirtSizeSelect', message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]), children: index$1.tShirtSizes.map((size) => (jsxRuntime.jsx("option", { value: size, children: size }, size))) }, name));
|
|
88
88
|
}
|
|
@@ -96,10 +96,10 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
96
96
|
return (jsxRuntime.jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxRuntime.jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsxRuntime.jsx(formik.Field, { copykey: key, as: Checkbox.Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsxRuntime.jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
|
|
97
97
|
}
|
|
98
98
|
else if (name === 'email' && !enabled) {
|
|
99
|
-
return (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
|
|
99
|
+
return (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label, autoComplete: autoComplete }, name) }, 'disabled-email-tooltip'));
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
|
-
return (jsxRuntime.jsx(formik.Field, { copykey: key, disabled: !enabled, as: Input.Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]) }, name));
|
|
102
|
+
return (jsxRuntime.jsx(formik.Field, { copykey: key, disabled: !enabled, as: Input.Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]), autoComplete: autoComplete }, name));
|
|
103
103
|
}
|
|
104
104
|
}) }));
|
|
105
105
|
};
|
|
@@ -78,7 +78,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
78
78
|
const { fieldsConfig } = useFields();
|
|
79
79
|
const { t } = useTranslation();
|
|
80
80
|
return (jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
81
|
-
const { label, type, key } = getValueByKey(fieldsConfig, name);
|
|
81
|
+
const { label, type, key, autoComplete } = getValueByKey(fieldsConfig, name);
|
|
82
82
|
if (name === 'tShirtSize') {
|
|
83
83
|
return (jsx(Field, { copykey: key, as: Select, type: type, id: name, name: name, label: label, error: errors[name] && touched[name], selectDataTestId: 'tShirtSizeSelect', message: touched[name] && getDisplayErrorMessage(label, errors[name]), children: tShirtSizes.map((size) => (jsx("option", { value: size, children: size }, size))) }, name));
|
|
84
84
|
}
|
|
@@ -92,10 +92,10 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
92
92
|
return (jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsx(Field, { copykey: key, as: Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsx(Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
|
|
93
93
|
}
|
|
94
94
|
else if (name === 'email' && !enabled) {
|
|
95
|
-
return (jsx(Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
|
|
95
|
+
return (jsx(Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label, autoComplete: autoComplete }, name) }, 'disabled-email-tooltip'));
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
-
return (jsx(Field, { copykey: key, disabled: !enabled, as: Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage(label, errors[name]) }, name));
|
|
98
|
+
return (jsx(Field, { copykey: key, disabled: !enabled, as: Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage(label, errors[name]), autoComplete: autoComplete }, name));
|
|
99
99
|
}
|
|
100
100
|
}) }));
|
|
101
101
|
};
|
|
@@ -35,6 +35,7 @@ const useFields = () => {
|
|
|
35
35
|
validation: yup.string().oneOf(index.countryCodes.map((c) => c.code)),
|
|
36
36
|
},
|
|
37
37
|
email: {
|
|
38
|
+
autoComplete: 'email',
|
|
38
39
|
key: 'dyn_collect_user_data.fields.email.label',
|
|
39
40
|
label: t('dyn_collect_user_data.fields.email.label'),
|
|
40
41
|
type: 'email',
|
|
@@ -59,6 +60,7 @@ const useFields = () => {
|
|
|
59
60
|
validation: yup.string().trim(),
|
|
60
61
|
},
|
|
61
62
|
phoneNumber: {
|
|
63
|
+
autoComplete: 'tel',
|
|
62
64
|
key: 'dyn_collect_user_data.fields.phone_number.label',
|
|
63
65
|
label: t('dyn_collect_user_data.fields.phone_number.label'),
|
|
64
66
|
type: 'string',
|
|
@@ -13,6 +13,7 @@ export declare const useFields: () => {
|
|
|
13
13
|
validation: import("yup").StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
14
14
|
};
|
|
15
15
|
email: {
|
|
16
|
+
autoComplete: string;
|
|
16
17
|
key: string;
|
|
17
18
|
label: string;
|
|
18
19
|
type: string;
|
|
@@ -37,6 +38,7 @@ export declare const useFields: () => {
|
|
|
37
38
|
validation: import("yup").StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
38
39
|
};
|
|
39
40
|
phoneNumber: {
|
|
41
|
+
autoComplete: string;
|
|
40
42
|
key: string;
|
|
41
43
|
label: string;
|
|
42
44
|
type: string;
|
|
@@ -31,6 +31,7 @@ const useFields = () => {
|
|
|
31
31
|
validation: string().oneOf(countryCodes.map((c) => c.code)),
|
|
32
32
|
},
|
|
33
33
|
email: {
|
|
34
|
+
autoComplete: 'email',
|
|
34
35
|
key: 'dyn_collect_user_data.fields.email.label',
|
|
35
36
|
label: t('dyn_collect_user_data.fields.email.label'),
|
|
36
37
|
type: 'email',
|
|
@@ -55,6 +56,7 @@ const useFields = () => {
|
|
|
55
56
|
validation: string().trim(),
|
|
56
57
|
},
|
|
57
58
|
phoneNumber: {
|
|
59
|
+
autoComplete: 'tel',
|
|
58
60
|
key: 'dyn_collect_user_data.fields.phone_number.label',
|
|
59
61
|
label: t('dyn_collect_user_data.fields.phone_number.label'),
|
|
60
62
|
type: 'string',
|
|
@@ -125,7 +125,7 @@ const EmailUpdate = () => {
|
|
|
125
125
|
});
|
|
126
126
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_email_update.title', children: t('dyn_email_update.title') }) }), jsxRuntime.jsxs("div", { className: 'email-update__container', children: [jsxRuntime.jsxs("div", { className: 'email-update__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_update.current_email', children: t('dyn_email_update.current_email') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsxRuntime.jsx(Input.Input, { id: 'email_field', onChange: (e) => {
|
|
127
127
|
setUpdatedEmail(e.target.value);
|
|
128
|
-
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
128
|
+
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError, autoComplete: 'email' }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
exports.EmailUpdate = EmailUpdate;
|
|
@@ -121,7 +121,7 @@ const EmailUpdate = () => {
|
|
|
121
121
|
});
|
|
122
122
|
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_email_update.title', children: t('dyn_email_update.title') }) }), jsxs("div", { className: 'email-update__container', children: [jsxs("div", { className: 'email-update__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_update.current_email', children: t('dyn_email_update.current_email') }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsx(Input, { id: 'email_field', onChange: (e) => {
|
|
123
123
|
setUpdatedEmail(e.target.value);
|
|
124
|
-
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
124
|
+
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError, autoComplete: 'email' }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
export { EmailUpdate };
|
|
@@ -158,7 +158,7 @@ const LoginEmailForm = ({ isLoading: isExternalLoading, onSubmit, onSubmitError,
|
|
|
158
158
|
}
|
|
159
159
|
return (jsxRuntime.jsxs("form", { className: 'login-with-email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _b === void 0 ? void 0 : _b.emailSubmitButtonInsideInput)
|
|
160
160
|
? emailInputSuffixIcon
|
|
161
|
-
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]) }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsxRuntime.jsx(Button.Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
161
|
+
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]), autoComplete: 'email' }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsxRuntime.jsx(Button.Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
162
162
|
color: 'inherit',
|
|
163
163
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
164
164
|
};
|
|
@@ -154,7 +154,7 @@ const LoginEmailForm = ({ isLoading: isExternalLoading, onSubmit, onSubmitError,
|
|
|
154
154
|
}
|
|
155
155
|
return (jsxs("form", { className: 'login-with-email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _b === void 0 ? void 0 : _b.emailSubmitButtonInsideInput)
|
|
156
156
|
? emailInputSuffixIcon
|
|
157
|
-
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]) }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsx(Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
157
|
+
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]), autoComplete: 'email' }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsx(Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
158
158
|
color: 'inherit',
|
|
159
159
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
160
160
|
};
|
|
@@ -20,7 +20,7 @@ require('@dynamic-labs/sdk-api');
|
|
|
20
20
|
require('../../shared/logger.cjs');
|
|
21
21
|
require('@dynamic-labs/iconic');
|
|
22
22
|
require('@dynamic-labs/wallet-connector-core');
|
|
23
|
-
|
|
23
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
24
24
|
var localStorage = require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
25
25
|
require('viem');
|
|
26
26
|
require('@dynamic-labs/utils');
|
|
@@ -81,17 +81,14 @@ require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/
|
|
|
81
81
|
var useViewSettings = require('../../utils/hooks/useViewSettings/useViewSettings.cjs');
|
|
82
82
|
var useInternalDynamicContext = require('../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
83
83
|
var index = require('../../utils/functions/walletFilters/index.cjs');
|
|
84
|
-
var isUserLinkingWallet = require('../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.cjs');
|
|
85
84
|
var SearchNotFoundMessage = require('./SearchNotFoundMessage/SearchNotFoundMessage.cjs');
|
|
86
85
|
var WalletListGridTabs = require('./WalletListGridTabs/WalletListGridTabs.cjs');
|
|
87
86
|
|
|
88
87
|
localStorage.LocalStorage.setToLS(localStorage$1.WALLET_PICKER_SEARCH_KEY, '');
|
|
89
88
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
90
89
|
var _a, _b, _c, _d;
|
|
91
|
-
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet,
|
|
92
|
-
const { view } = ViewContext.useViewContext();
|
|
90
|
+
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
93
91
|
const [selectedTabIndex, setSelectedTabIndex] = React.useState(null);
|
|
94
|
-
const isLinkingWallet = isUserLinkingWallet.isUserLinkingWallet(user, view.type, false);
|
|
95
92
|
const walletListViewSettings = useViewSettings.useViewSettings('wallet-list');
|
|
96
93
|
const selectedTabSettings = selectedTabIndex === null
|
|
97
94
|
? undefined
|
|
@@ -129,7 +126,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
129
126
|
const isSearchEnabled = Boolean(filterValue) ||
|
|
130
127
|
(numberOfWallets > defaultNumberOfWalletsToShow &&
|
|
131
128
|
walletsList.length !== numberOfWallets);
|
|
132
|
-
const isTabsEnabled = Boolean((
|
|
129
|
+
const isTabsEnabled = Boolean((_d = (_c = walletListViewSettings === null || walletListViewSettings === void 0 ? void 0 : walletListViewSettings.tabs) === null || _c === void 0 ? void 0 : _c.items) === null || _d === void 0 ? void 0 : _d.length);
|
|
133
130
|
const walletListScrollRef = React.useRef(null);
|
|
134
131
|
/* istanbul ignore next */
|
|
135
132
|
const handleScroll = () => {
|
|
@@ -16,7 +16,7 @@ import '@dynamic-labs/sdk-api';
|
|
|
16
16
|
import '../../shared/logger.js';
|
|
17
17
|
import '@dynamic-labs/iconic';
|
|
18
18
|
import '@dynamic-labs/wallet-connector-core';
|
|
19
|
-
import
|
|
19
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
20
20
|
import { LocalStorage } from '../../shared/utils/classes/storage/localStorage.js';
|
|
21
21
|
import 'viem';
|
|
22
22
|
import '@dynamic-labs/utils';
|
|
@@ -77,17 +77,14 @@ import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/P
|
|
|
77
77
|
import { useViewSettings } from '../../utils/hooks/useViewSettings/useViewSettings.js';
|
|
78
78
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
79
79
|
import { FilterBridgeChainsName } from '../../utils/functions/walletFilters/index.js';
|
|
80
|
-
import { isUserLinkingWallet } from '../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.js';
|
|
81
80
|
import { SearchNotFoundMessage } from './SearchNotFoundMessage/SearchNotFoundMessage.js';
|
|
82
81
|
import { WalletListGridTabs } from './WalletListGridTabs/WalletListGridTabs.js';
|
|
83
82
|
|
|
84
83
|
LocalStorage.setToLS(WALLET_PICKER_SEARCH_KEY, '');
|
|
85
84
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
86
85
|
var _a, _b, _c, _d;
|
|
87
|
-
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet,
|
|
88
|
-
const { view } = useViewContext();
|
|
86
|
+
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet, } = useInternalDynamicContext();
|
|
89
87
|
const [selectedTabIndex, setSelectedTabIndex] = useState(null);
|
|
90
|
-
const isLinkingWallet = isUserLinkingWallet(user, view.type, false);
|
|
91
88
|
const walletListViewSettings = useViewSettings('wallet-list');
|
|
92
89
|
const selectedTabSettings = selectedTabIndex === null
|
|
93
90
|
? undefined
|
|
@@ -125,7 +122,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
125
122
|
const isSearchEnabled = Boolean(filterValue) ||
|
|
126
123
|
(numberOfWallets > defaultNumberOfWalletsToShow &&
|
|
127
124
|
walletsList.length !== numberOfWallets);
|
|
128
|
-
const isTabsEnabled = Boolean((
|
|
125
|
+
const isTabsEnabled = Boolean((_d = (_c = walletListViewSettings === null || walletListViewSettings === void 0 ? void 0 : walletListViewSettings.tabs) === null || _c === void 0 ? void 0 : _c.items) === null || _d === void 0 ? void 0 : _d.length);
|
|
129
126
|
const walletListScrollRef = useRef(null);
|
|
130
127
|
/* istanbul ignore next */
|
|
131
128
|
const handleScroll = () => {
|
|
@@ -75,7 +75,7 @@ var useInternalDynamicContext = require('../../../../context/DynamicContext/useD
|
|
|
75
75
|
const useFetchNameService = (address) => {
|
|
76
76
|
const { getNameService } = useInternalDynamicContext.useInternalDynamicContext();
|
|
77
77
|
const { data: nameService } = usePromise.usePromise(() => getNameService(address), {
|
|
78
|
-
deps: [address],
|
|
78
|
+
deps: [address, getNameService],
|
|
79
79
|
});
|
|
80
80
|
return nameService;
|
|
81
81
|
};
|
|
@@ -71,7 +71,7 @@ import { useInternalDynamicContext } from '../../../../context/DynamicContext/us
|
|
|
71
71
|
const useFetchNameService = (address) => {
|
|
72
72
|
const { getNameService } = useInternalDynamicContext();
|
|
73
73
|
const { data: nameService } = usePromise(() => getNameService(address), {
|
|
74
|
-
deps: [address],
|
|
74
|
+
deps: [address, getNameService],
|
|
75
75
|
});
|
|
76
76
|
return nameService;
|
|
77
77
|
};
|