From 0b0a08955a46d3f0bd962e01851c7b2a67756a9f Mon Sep 17 00:00:00 2001 From: George Usynin <103181646+heorhi-deriv@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:09:36 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"[UPM-670]=20Suisin/chore:=20fixed=20p?= =?UTF-8?q?ersonal=20details=20email=20property=20issue=20(=E2=80=A6"=20(#?= =?UTF-8?q?14174)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dfadcaadb3cfbdb1466b12fcb7ba1cc840a03673. --- .../Profile/PersonalDetails/personal-details-form.tsx | 7 +------ .../src/Sections/Profile/PersonalDetails/validation.ts | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/account/src/Sections/Profile/PersonalDetails/personal-details-form.tsx b/packages/account/src/Sections/Profile/PersonalDetails/personal-details-form.tsx index ceb28767559c..3a6575d0a073 100644 --- a/packages/account/src/Sections/Profile/PersonalDetails/personal-details-form.tsx +++ b/packages/account/src/Sections/Profile/PersonalDetails/personal-details-form.tsx @@ -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 ( 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, @@ -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') @@ -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(); }