Skip to content

Commit 61a1d5a

Browse files
committed
Merge branch 'main' into perf/improve-canEditFieldOfMoneyRequest
2 parents 6c2c95a + 4668539 commit 61a1d5a

13 files changed

Lines changed: 86 additions & 32 deletions

File tree

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009018002
118-
versionName "9.1.80-2"
117+
versionCode 1009018003
118+
versionName "9.1.80-3"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.1.80.2</string>
47+
<string>9.1.80.3</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.80</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.80.2</string>
16+
<string>9.1.80.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.80</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.80.2</string>
16+
<string>9.1.80.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.1.80-2",
3+
"version": "9.1.80-3",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/components/KYCWall/BaseKYCWall.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function KYCWall({
228228
}
229229

230230
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
231-
if (paymentMethod || policy) {
231+
if ((paymentMethod || policy) && !hasActivatedWallet) {
232232
setShouldShowAddPaymentMenu(false);
233233
selectPaymentMethod(paymentMethod, policy);
234234
return;

src/components/SettlementButton/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function SettlementButton({
123123
const hasMultiplePolicies = !isExpenseReport && activeAdminPolicies.length > 1;
124124
const lastPaymentMethodRef = useRef(lastPaymentMethod);
125125
const formattedPaymentMethods = formatPaymentMethods(bankAccountList, fundList, styles);
126-
const hasIntentToPay = formattedPaymentMethods.length === 1 && !lastPaymentMethod;
126+
const hasIntentToPay = ((formattedPaymentMethods.length === 1 && isIOUReport(iouReport)) || !!policy?.achAccount) && !lastPaymentMethod;
127127

128128
useEffect(() => {
129129
if (isLoadingLastPaymentMethod) {
@@ -262,7 +262,7 @@ function SettlementButton({
262262
if (personalBankAccountList.length && canUsePersonalBankAccount) {
263263
buttonOptions.push({
264264
text: translate('iou.settleWallet', {formattedAmount: ''}),
265-
value: CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT,
265+
value: CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT,
266266
icon: Expensicons.Wallet,
267267
});
268268
} else if (canUsePersonalBankAccount) {
@@ -293,7 +293,7 @@ function SettlementButton({
293293
activeAdminPolicies.forEach((activePolicy) => {
294294
const policyName = activePolicy.name;
295295
buttonOptions.push({
296-
text: translate('iou.payWithPolicy', {policyName: truncate(policyName, {length: 20}), formattedAmount: ''}),
296+
text: translate('iou.payWithPolicy', {policyName: truncate(policyName, {length: CONST.ADDITIONAL_ALLOWED_CHARACTERS}), formattedAmount: ''}),
297297
icon: Expensicons.Building,
298298
value: activePolicy.id,
299299
shouldUpdateSelectedIndex: false,
@@ -535,7 +535,7 @@ function SettlementButton({
535535
};
536536

537537
const customText = getCustomText();
538-
const secondaryText = getSecondaryText();
538+
const secondaryText = truncate(getSecondaryText(), {length: CONST.FORM_CHARACTER_LIMIT});
539539

540540
const defaultSelectedIndex = paymentButtonOptions.findIndex((paymentOption) => {
541541
if (lastPaymentMethod === CONST.IOU.PAYMENT_TYPE.ELSEWHERE) {

src/hooks/useTransactionViolations.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {useMemo} from 'react';
2-
import {isViolationDismissed} from '@libs/TransactionUtils';
2+
import {isViolationDismissed, shouldShowViolation} from '@libs/TransactionUtils';
33
import ONYXKEYS from '@src/ONYXKEYS';
44
import type {TransactionViolation, TransactionViolations} from '@src/types/onyx';
55
import getEmptyArray from '@src/types/utils/getEmptyArray';
@@ -12,8 +12,17 @@ function useTransactionViolations(transactionID?: string): TransactionViolations
1212
const [transactionViolations = getEmptyArray<TransactionViolation>()] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`, {
1313
canBeMissing: true,
1414
});
15+
const [iouReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transaction?.reportID}`, {
16+
canBeMissing: true,
17+
});
18+
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${iouReport?.policyID}`, {
19+
canBeMissing: true,
20+
});
1521

16-
return useMemo(() => transactionViolations.filter((violation) => !isViolationDismissed(transaction, violation)), [transaction, transactionViolations]);
22+
return useMemo(
23+
() => transactionViolations.filter((violation: TransactionViolation) => !isViolationDismissed(transaction, violation) && shouldShowViolation(iouReport, policy, violation.name)),
24+
[transaction, transactionViolations, iouReport, policy],
25+
);
1726
}
1827

1928
export default useTransactionViolations;

0 commit comments

Comments
 (0)