diff --git a/src/pages/ReimbursementAccount/BeneficialOwnersStep.js b/src/pages/ReimbursementAccount/BeneficialOwnersStep.js index 13659a27d684..faf2a67216c1 100644 --- a/src/pages/ReimbursementAccount/BeneficialOwnersStep.js +++ b/src/pages/ReimbursementAccount/BeneficialOwnersStep.js @@ -134,8 +134,15 @@ class BeneficialOwnersStep extends React.Component { */ clearErrorAndSetBeneficialOwnerValue(ownerIndex, inputKey, value) { this.setState((prevState) => { + const renamedFields = { + addressStreet: 'street', + addressCity: 'city', + addressState: 'state', + addressZipCode: 'zipCode', + }; + const renamedInputKey = lodashGet(renamedFields, inputKey, inputKey); const beneficialOwners = [...prevState.beneficialOwners]; - beneficialOwners[ownerIndex] = {...beneficialOwners[ownerIndex], [inputKey]: value}; + beneficialOwners[ownerIndex] = {...beneficialOwners[ownerIndex], [renamedInputKey]: value}; updateReimbursementAccountDraft({beneficialOwners}); return {beneficialOwners}; }); diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index 413c14646ab4..c191271af5bd 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -89,10 +89,6 @@ class RequestorStep extends React.Component { */ clearErrorAndSetValue(inputKey, value) { const renamedFields = { - street: 'requestorAddressStreet', - city: 'requestorAddressCity', - state: 'requestorAddressState', - zipCode: 'requestorAddressZipCode', addressStreet: 'requestorAddressStreet', addressCity: 'requestorAddressCity', addressState: 'requestorAddressState',