Skip to content

Commit d08c0a8

Browse files
authored
Merge pull request #62373 from Expensify/revert-61851-fix-next-step-update-bug
Revert "fix - Chat- Next step changes when changing category"
2 parents a9a498c + 1d2fb3e commit d08c0a8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/libs/NextStepUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function buildNextStep(report: OnyxEntry<Report>, predictedNextStatus: ValueOf<t
147147
const approvers = getLoginsByAccountIDs([approverAccountID ?? CONST.DEFAULT_NUMBER_ID]);
148148

149149
const reimburserAccountID = getReimburserAccountID(policy);
150-
const hasValidAccount = !!policy?.achAccount?.accountNumber || policy.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_YES;
150+
const hasValidAccount = !!policy?.achAccount?.accountNumber;
151151
const type: ReportNextStep['type'] = 'neutral';
152152
let optimisticNextStep: ReportNextStep | null;
153153

src/libs/actions/IOU.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4143,7 +4143,7 @@ function getUpdateMoneyRequestParams(
41434143
},
41444144
});
41454145
}
4146-
if (violationsOnyxData && (iouReport?.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN) === CONST.REPORT.STATUS_NUM.OPEN) {
4146+
if (violationsOnyxData) {
41474147
const currentNextStep = allNextSteps[`${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport?.reportID}`] ?? {};
41484148
const shouldFixViolations = Array.isArray(violationsOnyxData.value) && violationsOnyxData.value.length > 0;
41494149
optimisticData.push({

tests/unit/NextStepUtilsTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('libs/NextStepUtils', () => {
3131
type: 'team',
3232
outputCurrency: CONST.CURRENCY.USD,
3333
isPolicyExpenseChatEnabled: true,
34-
reimbursementChoice: CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_YES,
34+
reimbursementChoice: CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL,
3535
};
3636
const optimisticNextStep: ReportNextStep = {
3737
type: 'neutral',

0 commit comments

Comments
 (0)