diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index 57b2905f5e15..6d153dd56183 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -332,19 +332,14 @@ function MoneyRequestConfirmationList({ const shouldShowTax = isTaxTrackingEnabled(isPolicyExpenseChat, policy, isDistanceRequest, isPerDiemRequest); + // Update the tax code when the default changes (for example, because the transaction currency changed) + const defaultTaxCode = getDefaultTaxCode(policy, transaction) ?? ''; useEffect(() => { - // Set the default tax code when conditions change - if (!shouldShowTax || !transaction || !transactionID) { + if (!transactionID) { return; } - const defaultTaxCode = getDefaultTaxCode(policy, transaction); - const currentTaxCode = transaction.taxCode ?? ''; - - // Update tax code if it's different from what should be the default - if (defaultTaxCode !== currentTaxCode) { - setMoneyRequestTaxRate(transactionID, defaultTaxCode ?? ''); - } - }, [customUnitRateID, policy, shouldShowTax, transaction, transactionID]); + setMoneyRequestTaxRate(transactionID, defaultTaxCode); + }, [defaultTaxCode, transactionID]); const isMovingTransactionFromTrackExpense = isMovingTransactionFromTrackExpenseUtil(action);