@@ -2,24 +2,21 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
22import { getExpensifyCardFeedsForDisplay } from '@libs/CardFeedUtils' ;
33import { isCard , isCardHiddenFromSearch , isCSVFeedOrExpensifyCard , isExpensifyCard , isPersonalCard , supportsPINManagementFeatures } from '@libs/CardUtils' ;
44import { filterObject } from '@libs/ObjectUtils' ;
5- import Permissions from '@libs/Permissions' ;
65import CONST from '@src/CONST' ;
76import ONYXKEYS from '@src/ONYXKEYS' ;
87import type { CardList , NonPersonalAndWorkspaceCardListDerivedValue , WorkspaceCardsList } from '@src/types/onyx' ;
9- import type Beta from '@src/types/onyx/Beta' ;
108
119/**
1210 * Builds a lightweight map of "${domainID}_${feedName}" keys that have card entries.
1311 * A feed counts as having cards when:
1412 * - it has at least one assigned card object, OR
15- * - it is a CSV feed, the CSV_CARD_IMPORT beta is enabled, and it has at least one entry in `cardList`.
13+ * - it is a CSV feed, and it has at least one entry in `cardList`.
1614 *
1715 * Input key format: "cards_${domainID}_${feedName}" (e.g., "cards_12345_oauth.chase.com")
1816 * Output key format: "${domainID}_${feedName}" (e.g., "12345_oauth.chase.com")
1917 */
20- const buildFeedKeysWithAssignedCards = ( allWorkspaceCards : OnyxCollection < WorkspaceCardsList > , betas ?: OnyxEntry < Beta [ ] > ) : Record < string , true > => {
18+ const buildFeedKeysWithAssignedCards = ( allWorkspaceCards : OnyxCollection < WorkspaceCardsList > ) : Record < string , true > => {
2119 const result : Record < string , true > = { } ;
22- const isCSVCardImportBetaEnabled = Permissions . isBetaEnabled ( CONST . BETAS . CSV_CARD_IMPORT , betas ) ;
2320
2421 for ( const [ key , cards ] of Object . entries ( allWorkspaceCards ?? { } ) ) {
2522 if ( ! cards || typeof cards !== 'object' ) {
@@ -30,7 +27,7 @@ const buildFeedKeysWithAssignedCards = (allWorkspaceCards: OnyxCollection<Worksp
3027 const cardFeedName = feedKey . split ( '_' ) . slice ( 1 ) . join ( '_' ) ;
3128 const hasAssignedCards = Object . keys ( cards ) . some ( ( k ) => k !== 'cardList' ) ;
3229 const isCSVFeed = isCSVFeedOrExpensifyCard ( cardFeedName ) ;
33- const hasCardsToAssign = isCSVCardImportBetaEnabled && isCSVFeed && Object . keys ( cards . cardList ?? { } ) . length > 0 ;
30+ const hasCardsToAssign = isCSVFeed && Object . keys ( cards . cardList ?? { } ) . length > 0 ;
3431 if ( hasAssignedCards || hasCardsToAssign ) {
3532 result [ feedKey ] = true ;
3633 }
0 commit comments