Skip to content

Commit

Permalink
Merge pull request #25939 from Expensify/georgia-removeCorporateCardList
Browse files Browse the repository at this point in the history
[NO QA][CardSettings] replace corporateCardList with cardList
  • Loading branch information
MonilBhavsar authored Aug 31, 2023
2 parents c20c387 + a8011b7 commit 4237dd3
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 31 deletions.
7 changes: 7 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,13 @@ const CONST = {
MENTION_ICON: 'mention-icon',
SMALL_NORMAL: 'small-normal',
},
EXPENSIFY_CARD: {
FRAUD_TYPES: {
DOMAIN: 'domain',
INDIVIDUAL: 'individal',
NONE: 'none',
},
},
AVATAR_ROW_SIZE: {
DEFAULT: 4,
LARGE_SCREEN: 8,
Expand Down
9 changes: 5 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ const ONYXKEYS = {
/** The user's bank accounts */
BANK_ACCOUNT_LIST: 'bankAccountList',

/** The user's credit cards (renamed from cardList) */
/** The user's payment and P2P cards */
FUND_LIST: 'fundList',

// The user's Expensify cards
CORPORATE_CARD_LIST: 'corporateCardList',
/** The user's cash card and imported cards (including the Expensify Card) */
CARD_LIST: 'cardList',

/** Stores information about the user's saved statements */
WALLET_STATEMENT: 'walletStatement',
Expand Down Expand Up @@ -341,7 +341,8 @@ type OnyxValues = {
[ONYXKEYS.WALLET_ADDITIONAL_DETAILS]: OnyxTypes.WalletAdditionalDetails;
[ONYXKEYS.WALLET_TERMS]: OnyxTypes.WalletTerms;
[ONYXKEYS.BANK_ACCOUNT_LIST]: Record<string, OnyxTypes.BankAccount>;
[ONYXKEYS.FUND_LIST]: Record<string, OnyxTypes.Card>;
[ONYXKEYS.FUND_LIST]: Record<string, OnyxTypes.Fund>;
[ONYXKEYS.CARD_LIST]: Record<string, OnyxTypes.Card>;
[ONYXKEYS.WALLET_STATEMENT]: OnyxTypes.WalletStatement;
[ONYXKEYS.PERSONAL_BANK_ACCOUNT]: OnyxTypes.PersonalBankAccount;
[ONYXKEYS.REIMBURSEMENT_ACCOUNT]: OnyxTypes.ReimbursementAccount;
Expand Down
39 changes: 12 additions & 27 deletions src/types/onyx/Card.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
type AdditionalData = {
isBillingCard?: boolean;
isP2PDebitCard?: boolean;
};

type AccountData = {
additionalData?: AdditionalData;
addressName?: string;
addressState?: string;
addressStreet?: string;
addressZip?: number;
cardMonth?: number;

/** The masked credit card number */
cardNumber?: string;

cardYear?: number;
created?: string;
currency?: string;
fundID?: number;
};
import {ValueOf} from 'type-fest';
import CONST from '../../CONST';

type Card = {
accountData?: AccountData;
accountType?: string;
description?: string;
key?: string;
methodID?: number;
title?: string;
cardID: number;
state: number;
bank: string;
availableSpend: number;
domainName: string;
maskedPan: string;
isVirtual: boolean;
fraud: ValueOf<typeof CONST.EXPENSIFY_CARD.FRAUD_TYPES>;
cardholderFirstName: string;
cardholderLastName: string;
};

export default Card;
32 changes: 32 additions & 0 deletions src/types/onyx/Fund.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
type AdditionalData = {
isBillingCard?: boolean;
isP2PDebitCard?: boolean;
};

type AccountData = {
additionalData?: AdditionalData;
addressName?: string;
addressState?: string;
addressStreet?: string;
addressZip?: number;
cardMonth?: number;

/** The masked credit card number */
cardNumber?: string;

cardYear?: number;
created?: string;
currency?: string;
fundID?: number;
};

type Fund = {
accountData?: AccountData;
accountType?: string;
description?: string;
key?: string;
methodID?: number;
title?: string;
};

export default Fund;
2 changes: 2 additions & 0 deletions src/types/onyx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import WalletAdditionalDetails from './WalletAdditionalDetails';
import WalletTerms from './WalletTerms';
import BankAccount from './BankAccount';
import Card from './Card';
import Fund from './Fund';
import WalletStatement from './WalletStatement';
import PersonalBankAccount from './PersonalBankAccount';
import FrequentlyUsedEmoji from './FrequentlyUsedEmoji';
Expand Down Expand Up @@ -70,6 +71,7 @@ export type {
WalletTerms,
BankAccount,
Card,
Fund,
WalletStatement,
PersonalBankAccount,
ReimbursementAccount,
Expand Down

0 comments on commit 4237dd3

Please sign in to comment.