Skip to content

Commit 2768c61

Browse files
committed
add more codes
1 parent 8579e6c commit 2768c61

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/CONST/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ const connectionsVideoPaths = {
9191
// Explicit type annotation is required
9292
const cardActiveStates: number[] = [2, 3, 4, 7];
9393

94+
const brokenConnectionScrapeStatuses: number[] = [200, 531, 530, 500, 666];
95+
9496
// Hide not issued or not activated cards (states 2, 4) from card filter options in search, as no transactions can be made on cards in these states
9597
const cardHiddenFromSearchStates: number[] = [2, 4];
9698

@@ -3266,6 +3268,7 @@ const CONST = {
32663268
MANAGE_EXPENSIFY_CARDS_ARTICLE_LINK: 'https://help.expensify.com/articles/new-expensify/expensify-card/Manage-Expensify-Cards',
32673269
},
32683270
COMPANY_CARDS: {
3271+
BROKEN_CONNECTION_IGNORED_STATUSES: brokenConnectionScrapeStatuses,
32693272
CONNECTION_ERROR: 'connectionError',
32703273
STEP: {
32713274
SELECT_BANK: 'SelectBank',

src/libs/CardUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,9 @@ function checkIfFeedConnectionIsBroken(feedCards: Record<string, Card> | undefin
637637
return false;
638638
}
639639

640-
return Object.values(feedCards).some((card) => !isEmptyObject(card) && card.bank !== feedToExclude && card.lastScrapeResult !== 200 && card.lastScrapeResult !== 531);
640+
return Object.values(feedCards).some(
641+
(card) => !isEmptyObject(card) && card.bank !== feedToExclude && card.lastScrapeResult && !CONST.COMPANY_CARDS.BROKEN_CONNECTION_IGNORED_STATUSES.includes(card.lastScrapeResult),
642+
);
641643
}
642644

643645
/**

0 commit comments

Comments
 (0)