Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default compose(
key: props => props.formID,
},
draftValues: {
key: props => `${props.formID}DraftValues`,
key: props => `${props.formID}Draft`,
},
}),
)(Form);
1 change: 0 additions & 1 deletion src/libs/ReimbursementAccountUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function getDefaultStateForField(props, fieldName, defaultValue = '') {
function getBankAccountFields(props, fieldNames) {
return {
..._.pick(lodashGet(props, 'reimbursementAccount.achData'), ...fieldNames),
..._.pick(lodashGet(props, 'reimbursementAccountDraftValues'), ...fieldNames),
..._.pick(props.reimbursementAccountDraft, ...fieldNames),
};
}
Expand Down
11 changes: 1 addition & 10 deletions src/libs/actions/FormActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,10 @@ function setErrors(formID, errors) {
* @param {Object} draftValues
*/
function setDraftValues(formID, draftValues) {
Onyx.merge(`${formID}DraftValues`, draftValues);
}

/**
* @param {String} formID
* @returns {String}
*/
function getDraftValuesKey(formID) {
return `${formID}DraftValues`;
Onyx.merge(`${formID}Draft`, draftValues);
}

export {
getDraftValuesKey,
setIsLoading,
setErrors,
setDraftValues,
Expand Down
4 changes: 0 additions & 4 deletions src/pages/ReimbursementAccount/CompanyStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import AddressForm from './AddressForm';
import ReimbursementAccountForm from './ReimbursementAccountForm';
import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount';
import * as ReimbursementAccountUtils from '../../libs/ReimbursementAccountUtils';
import * as FormActions from '../../libs/actions/FormActions';

const propTypes = {
...withLocalizePropTypes,
Expand Down Expand Up @@ -313,9 +312,6 @@ export default compose(
reimbursementAccountDraft: {
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT,
},
reimbursementAccountDraftValues: {
key: FormActions.getDraftValuesKey(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM),
},
session: {
key: ONYXKEYS.SESSION,
},
Expand Down