Skip to content

Commit e458696

Browse files
authored
Merge pull request #88090 from Expensify/ionatan_removebetaoptisimstic
Remove beta for optimistic transaction threads
2 parents 5c05358 + b44589e commit e458696

5 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/CONST/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,6 @@ const CONST = {
875875
TRAVEL_INVOICING: 'travelInvoicing',
876876
EXPENSIFY_CARD_EU_UK: 'expensifyCardEuUk',
877877
EUR_BILLING: 'eurBilling',
878-
NO_OPTIMISTIC_TRANSACTION_THREADS: 'noOptimisticTransactionThreads',
879878
UBER_FOR_BUSINESS: 'uberForBusiness',
880879
PAY_INVOICE_VIA_EXPENSIFY: 'payInvoiceViaExpensify',
881880
SUGGESTED_FOLLOWUPS: 'suggestedFollowups',

src/pages/Share/SubmitDetailsPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ function SubmitDetailsPage({
9797
const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);
9898

9999
const {isBetaEnabled} = usePermissions();
100-
const shouldGenerateTransactionThreadReport = !isBetaEnabled(CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS);
101-
102100
const fileUri = shouldUsePreValidatedFile ? (validFilesToUpload?.uri ?? '') : (currentAttachment?.content ?? '');
103101
const fileName = shouldUsePreValidatedFile ? getFileName(validFilesToUpload?.uri ?? CONST.ATTACHMENT_IMAGE_DEFAULT_NAME) : getFileName(currentAttachment?.content ?? '');
104102
const fileType = shouldUsePreValidatedFile ? (validFilesToUpload?.type ?? CONST.RECEIPT_ALLOWED_FILE_TYPES.JPEG) : (currentAttachment?.mimeType ?? '');
@@ -258,7 +256,7 @@ function SubmitDetailsPage({
258256
linkedTrackedExpenseReportID: transaction.linkedTrackedExpenseReportID,
259257
isLinkedTrackedExpenseReportArchived,
260258
},
261-
shouldGenerateTransactionThreadReport,
259+
shouldGenerateTransactionThreadReport: false,
262260
isASAPSubmitBetaEnabled,
263261
currentUserAccountIDParam: currentUserPersonalDetails.accountID,
264262
currentUserEmailParam: currentUserPersonalDetails.login ?? '',

src/pages/iou/request/step/IOURequestStepAmount.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ function IOURequestStepAmount({
132132
const decimals = getCurrencyDecimals(selectedCurrency || CONST.CURRENCY.USD);
133133
// eslint-disable-next-line rulesdir/no-negated-variables
134134
const shouldShowNotFoundPage = useShowNotFoundPageInIOUStep(action, iouType, reportActionID, report, transaction);
135-
const shouldGenerateTransactionThreadReport = !isBetaEnabled(CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS);
136135
const isUnreportedDistanceExpense = isEditing && isDistanceRequest(transaction) && isExpenseUnreported(transaction);
137136

138137
const isASAPSubmitBetaEnabled = isBetaEnabled(CONST.BETAS.ASAP_SUBMIT);
@@ -292,7 +291,7 @@ function IOURequestStepAmount({
292291
reimbursable: defaultReimbursable,
293292
},
294293
backToReport,
295-
shouldGenerateTransactionThreadReport,
294+
shouldGenerateTransactionThreadReport: false,
296295
isASAPSubmitBetaEnabled,
297296
currentUserAccountIDParam,
298297
currentUserEmailParam,

src/pages/iou/request/step/IOURequestStepConfirmation.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ function IOURequestStepConfirmation({
363363
);
364364
const participantsPolicyTags = useParticipantsPolicyTags(participants ?? []);
365365
const isPolicyExpenseChat = useMemo(() => participants?.some((participant) => participant.isPolicyExpenseChat), [participants]);
366-
const shouldGenerateTransactionThreadReport = !isBetaEnabled(CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS);
367366
const formHasBeenSubmitted = useRef(false);
368367
const isFromGlobalCreate = !!(transaction?.isFromGlobalCreate ?? transaction?.isFromFloatingActionButton);
369368

@@ -602,7 +601,7 @@ function IOURequestStepConfirmation({
602601
: {}),
603602
},
604603
shouldHandleNavigation: shouldHandleNav && index === transactions.length - 1,
605-
shouldGenerateTransactionThreadReport,
604+
shouldGenerateTransactionThreadReport: false,
606605
backToReport,
607606
isASAPSubmitBetaEnabled,
608607
currentUserAccountIDParam: currentUserPersonalDetails.accountID,
@@ -639,7 +638,6 @@ function IOURequestStepConfirmation({
639638
transactionTaxValue,
640639
customUnitRateID,
641640
isTimeRequest,
642-
shouldGenerateTransactionThreadReport,
643641
backToReport,
644642
isASAPSubmitBetaEnabled,
645643
policyRecentlyUsedCurrencies,

src/pages/iou/request/step/IOURequestStepScan/hooks/useReceiptScan.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ function useReceiptScan({
7676
const isEditing = action === CONST.IOU.ACTION.EDIT;
7777
const isReplacingReceipt = (isEditing && hasReceipt(initialTransaction)) || (!!initialTransaction?.receipt && !!backTo);
7878
const shouldAcceptMultipleFiles = !isEditing && !backTo;
79-
const shouldGenerateTransactionThreadReport = !isBetaEnabled(CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS);
8079
const isASAPSubmitBetaEnabled = isBetaEnabled(CONST.BETAS.ASAP_SUBMIT);
8180

8281
const defaultTaxCode = getDefaultTaxCode(policy, initialTransaction);
@@ -132,7 +131,7 @@ function useReceiptScan({
132131
backToReport,
133132
shouldSkipConfirmation,
134133
defaultExpensePolicy,
135-
shouldGenerateTransactionThreadReport,
134+
shouldGenerateTransactionThreadReport: false,
136135
isArchivedExpenseReport: isArchived,
137136
isAutoReporting: !!personalPolicy?.autoReporting,
138137
isASAPSubmitBetaEnabled,

0 commit comments

Comments
 (0)