Skip to content

Commit

Permalink
Revert "[UPM-670] Suisin/chore: fixed personal details email property…
Browse files Browse the repository at this point in the history
… issue (…" (deriv-com#14174)

This reverts commit dfadcaa.
  • Loading branch information
heorhi-deriv authored Mar 14, 2024
1 parent 382ef23 commit 0b0a089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,7 @@ export const PersonalDetailsForm = observer(({ history }: { history: BrowserHist

const PersonalDetailSchema = getPersonalDetailsValidationSchema(is_eu);

const initialValues = getPersonalDetailsInitialValues(
account_settings,
residence_list,
states_list,
is_social_signup
);
const initialValues = getPersonalDetailsInitialValues(account_settings, residence_list, states_list);

return (
<Formik
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ const getBaseSchema = () =>
export const getPersonalDetailsInitialValues = (
account_settings: GetSettings,
residence_list: ResidenceList,
states_list: StatesList,
is_social_signup: boolean
states_list: StatesList
) => {
const initialValues: GetSettings = {
first_name: account_settings.first_name,
Expand Down Expand Up @@ -92,10 +91,6 @@ export const getPersonalDetailsInitialValues = (
}
});

if (is_social_signup) {
initialValues.email = account_settings.email;
}

if (account_settings.address_state) {
initialValues.address_state = states_list.length
? getLocation(states_list, account_settings.address_state, 'text')
Expand Down Expand Up @@ -123,7 +118,6 @@ export const makeSettingsRequest = (
const request = settings;

if (request.residence) delete request.residence;
if (request.email) delete request.email;
if (request.first_name) {
request.first_name = request.first_name.trim();
}
Expand Down

0 comments on commit 0b0a089

Please sign in to comment.