Skip to content
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"exchrate",
"exfy",
"exitstatus",
"Expensable",
"expensescount",
"Expensi",
"Expensicon",
Expand Down Expand Up @@ -513,6 +514,7 @@
"stdev",
"stdlib",
"storepass",
"STORYLANE",
"strikethrough",
"Strikethrough",
"subcomponents",
Expand Down
32 changes: 16 additions & 16 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ const CONST = {
ANDROID: 'android',
WEB: 'web',
DESKTOP: 'desktop',
MOBILEWEB: 'mobileweb',
MOBILE_WEB: 'mobileweb',
},
PLATFORM_SPECIFIC_KEYS: {
CTRL: {
Expand Down Expand Up @@ -1191,7 +1191,7 @@ const CONST = {
MAX_COUNT_BEFORE_FOCUS_UPDATE: 30,
MIN_INITIAL_REPORT_ACTION_COUNT: 15,
UNREPORTED_REPORT_ID: '0',
SPLIT_REPORTID: '-2',
SPLIT_REPORT_ID: '-2',
SECONDARY_ACTIONS: {
SUBMIT: 'submit',
APPROVE: 'approve',
Expand Down Expand Up @@ -1713,7 +1713,7 @@ const CONST = {
UNKNOWN_ERROR: 'Unknown error',
REQUEST_CANCELLED: 'AbortError',
FAILED_TO_FETCH: 'Failed to fetch',
ENSURE_BUGBOT: 'ENSURE_BUGBOT',
ENSURE_BUG_BOT: 'ENSURE_BUGBOT',
PUSHER_ERROR: 'PusherError',
WEB_SOCKET_ERROR: 'WebSocketError',
NETWORK_REQUEST_FAILED: 'Network request failed',
Expand Down Expand Up @@ -1997,7 +1997,7 @@ const CONST = {
// Video MimeTypes allowed by iOS photos app.
VIDEO: /\.(mov|mp4)$/,
},
IOS_CAMERAROLL_ACCESS_ERROR: 'Access to photo library was denied',
IOS_CAMERA_ROLL_ACCESS_ERROR: 'Access to photo library was denied',
ADD_PAYMENT_MENU_POSITION_Y: 226,
ADD_PAYMENT_MENU_POSITION_X: 356,
EMOJI_PICKER_ITEM_TYPES: {
Expand Down Expand Up @@ -2766,11 +2766,11 @@ const CONST = {
AMOUNT_MAX_LENGTH: 8,
DISTANCE_REQUEST_AMOUNT_MAX_LENGTH: 14,
RECEIPT_STATE: {
SCANREADY: 'SCANREADY',
SCAN_READY: 'SCANREADY',
OPEN: 'OPEN',
SCANNING: 'SCANNING',
SCANCOMPLETE: 'SCANCOMPLETE',
SCANFAILED: 'SCANFAILED',
SCAN_COMPLETE: 'SCANCOMPLETE',
SCAN_FAILED: 'SCANFAILED',
},
FILE_TYPES: {
HTML: 'html',
Expand Down Expand Up @@ -3407,52 +3407,52 @@ const CONST = {
PRICING_TYPE_2025: 'team2025Pricing',
TYPE: {
ANNUAL: 'yearly2018',
PAYPERUSE: 'monthly2018',
PAY_PER_USE: 'monthly2018',
},
},
get SUBSCRIPTION_PRICES() {
return {
[this.PAYMENT_CARD_CURRENCY.USD]: {
[this.POLICY.TYPE.CORPORATE]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 900,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 1800,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1800,
},
[this.POLICY.TYPE.TEAM]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 500,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 1000,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1000,
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 500,
},
},
[this.PAYMENT_CARD_CURRENCY.AUD]: {
[this.POLICY.TYPE.CORPORATE]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 1500,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 3000,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 3000,
},
[this.POLICY.TYPE.TEAM]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 700,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 1400,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1400,
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 800,
},
},
[this.PAYMENT_CARD_CURRENCY.GBP]: {
[this.POLICY.TYPE.CORPORATE]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 700,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 1400,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1400,
},
[this.POLICY.TYPE.TEAM]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 400,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 800,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 800,
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 500,
},
},
[this.PAYMENT_CARD_CURRENCY.NZD]: {
[this.POLICY.TYPE.CORPORATE]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 1600,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 3200,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 3200,
},
[this.POLICY.TYPE.TEAM]: {
[this.SUBSCRIPTION.TYPE.ANNUAL]: 800,
[this.SUBSCRIPTION.TYPE.PAYPERUSE]: 1600,
[this.SUBSCRIPTION.TYPE.PAY_PER_USE]: 1600,
[this.SUBSCRIPTION.PRICING_TYPE_2025]: 900,
},
},
Expand Down
6 changes: 3 additions & 3 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2518,9 +2518,9 @@ const ROUTES = {
route: 'r/:reportID/schedule-call/book',
getRoute: (reportID: string) => `r/${reportID}/schedule-call/book` as const,
},
SCHEDULE_CALL_CONFIRMATON: {
route: 'r/:reportID/schedule-call/confimation',
getRoute: (reportID: string) => `r/${reportID}/schedule-call/confimation` as const,
SCHEDULE_CALL_CONFIRMATION: {
route: 'r/:reportID/schedule-call/confirmation',
getRoute: (reportID: string) => `r/${reportID}/schedule-call/confirmation` as const,
},
} as const;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {FileObject} from '@components/AttachmentModal';

type AddCommentOrAttachementParams = {
type AddCommentOrAttachmentParams = {
reportID: string;
reportActionID?: string;
commentReportActionID?: string | null;
Expand All @@ -12,4 +12,4 @@ type AddCommentOrAttachementParams = {
idempotencyKey?: string;
};

export default AddCommentOrAttachementParams;
export default AddCommentOrAttachmentParams;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* A map linking the optimistic MOVEDTRANSACTION or UNREPORTEDTRANSACTION reportActionID to the transactionID.
* A map linking the optimistic MOVED_TRANSACTION or UNREPORTED_TRANSACTION reportActionID to the transactionID.
* If we're creating the transactionThread as part of moving the transaction, we should also send the optimistic
* transactionThreadReportID and transactionThreadCreatedReportActionID
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
type RenamePolicyTaglistParams = {
type RenamePolicyTagListParams = {
policyID: string;
oldName: string;
newName: string;
tagListIndex: number;
};

export default RenamePolicyTaglistParams;
export default RenamePolicyTagListParams;
4 changes: 2 additions & 2 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export type {default as ValidateTwoFactorAuthParams} from './ValidateTwoFactorAu
export type {default as DisableTwoFactorAuthParams} from './DisableTwoFactorAuthParams';
export type {default as VerifyIdentityForBankAccountParams} from './VerifyIdentityForBankAccountParams';
export type {default as AnswerQuestionsForWalletParams} from './AnswerQuestionsForWalletParams';
export type {default as AddCommentOrAttachementParams} from './AddCommentOrAttachementParams';
export type {default as AddCommentOrAttachmentParams} from './AddCommentOrAttachmentParams';
export type {default as ReadNewestActionParams} from './ReadNewestActionParams';
export type {default as MarkAsUnreadParams} from './MarkAsUnreadParams';
export type {default as TogglePinnedChatParams} from './TogglePinnedChatParams';
Expand Down Expand Up @@ -188,7 +188,7 @@ export type {default as SetWorkspaceReimbursementParams} from './SetWorkspaceRei
export type {default as SetWorkspaceDefaultSpendCategoryParams} from './SetWorkspaceDefaultSpendCategoryParams';
export type {default as SetPolicyRequiresTag} from './SetPolicyRequiresTag';
export type {default as SetPolicyTagsRequired} from './SetPolicyTagsRequired';
export type {default as RenamePolicyTaglistParams} from './RenamePolicyTaglistParams';
export type {default as RenamePolicyTagListParams} from './RenamePolicyTagListParams';
export type {default as SwitchToOldDotParams} from './SwitchToOldDotParams';
export type {default as TrackExpenseParams} from './TrackExpenseParams';
export type {default as EnablePolicyCategoriesParams} from './EnablePolicyCategoriesParams';
Expand Down
13 changes: 7 additions & 6 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';
import type {SageIntacctMappingValue} from '@src/types/onyx/Policy';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
// We have to disable esling for this import because otherwise the import will be 300 lines long
// We have to disable eslint for this import because otherwise the import will be 300 lines long
// eslint-disable-next-line no-restricted-syntax
import type * as Parameters from './parameters';
import type SignInUserParams from './parameters/SignInUserParams';
Expand Down Expand Up @@ -169,6 +169,7 @@ const WRITE_COMMANDS = {
DELETE_POLICY_REPORT_FIELD: 'DeletePolicyReportField',
SET_POLICY_TAGS_REQUIRED: 'SetPolicyTagsRequired',
SET_POLICY_REQUIRES_TAG: 'SetPolicyRequiresTag',
// cspell:disable-next-line
RENAME_POLICY_TAG_LIST: 'RenamePolicyTaglist',
DELETE_POLICY_TAGS: 'DeletePolicyTags',
UPDATE_POLICY_TAG_GL_CODE: 'UpdatePolicyTagGLCode',
Expand Down Expand Up @@ -560,10 +561,10 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UNLINK_LOGIN]: Parameters.UnlinkLoginParams;
[WRITE_COMMANDS.ENABLE_TWO_FACTOR_AUTH]: null;
[WRITE_COMMANDS.DISABLE_TWO_FACTOR_AUTH]: Parameters.DisableTwoFactorAuthParams;
[WRITE_COMMANDS.ADD_COMMENT]: Parameters.AddCommentOrAttachementParams;
[WRITE_COMMANDS.ADD_ATTACHMENT]: Parameters.AddCommentOrAttachementParams;
[WRITE_COMMANDS.ADD_COMMENT]: Parameters.AddCommentOrAttachmentParams;
[WRITE_COMMANDS.ADD_ATTACHMENT]: Parameters.AddCommentOrAttachmentParams;
[WRITE_COMMANDS.CREATE_APP_REPORT]: Parameters.CreateAppReportParams;
[WRITE_COMMANDS.ADD_TEXT_AND_ATTACHMENT]: Parameters.AddCommentOrAttachementParams;
[WRITE_COMMANDS.ADD_TEXT_AND_ATTACHMENT]: Parameters.AddCommentOrAttachmentParams;
[WRITE_COMMANDS.CONNECT_BANK_ACCOUNT_WITH_PLAID]: Parameters.ConnectBankAccountParams;
[WRITE_COMMANDS.ADD_PERSONAL_BANK_ACCOUNT]: Parameters.AddPersonalBankAccountParams;
[WRITE_COMMANDS.RESTART_BANK_ACCOUNT_SETUP]: Parameters.RestartBankAccountSetupParams;
Expand Down Expand Up @@ -631,7 +632,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.DELETE_POLICY_REPORT_FIELD]: Parameters.DeletePolicyReportField;
[WRITE_COMMANDS.SET_POLICY_REQUIRES_TAG]: Parameters.SetPolicyRequiresTag;
[WRITE_COMMANDS.SET_POLICY_TAGS_REQUIRED]: Parameters.SetPolicyTagsRequired;
[WRITE_COMMANDS.RENAME_POLICY_TAG_LIST]: Parameters.RenamePolicyTaglistParams;
[WRITE_COMMANDS.RENAME_POLICY_TAG_LIST]: Parameters.RenamePolicyTagListParams;
[WRITE_COMMANDS.CREATE_POLICY_TAG]: Parameters.CreatePolicyTagsParams;
[WRITE_COMMANDS.RENAME_POLICY_TAG]: Parameters.RenamePolicyTagsParams;
[WRITE_COMMANDS.UPDATE_POLICY_TAG_GL_CODE]: Parameters.UpdatePolicyTagGLCodeParams;
Expand Down Expand Up @@ -959,7 +960,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.JOIN_ACCESSIBLE_POLICY]: Parameters.JoinAccessiblePolicyParams;
[WRITE_COMMANDS.ASK_TO_JOIN_POLICY]: Parameters.AskToJoinPolicyParams;

// Dismis Product Training
// Dismiss Product Training
[WRITE_COMMANDS.DISMISS_PRODUCT_TRAINING]: Parameters.DismissProductTrainingParams;
[WRITE_COMMANDS.ADD_WORK_EMAIL]: Parameters.AddWorkEmailParams;

Expand Down
4 changes: 2 additions & 2 deletions src/libs/Authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ function reauthenticate(command = ''): Promise<void> | undefined {
return;
}

// If we reauthenticated due to an expired delegate token, restore the delegate's original account.
// If we reauthenticate due to an expired delegate token, restore the delegate's original account.
// This is because the credentials used to reauthenticate were for the delegate's original account, and not for the account they were connected as.
if (isConnectedAsDelegate()) {
Log.info('Reauthenticated while connected as a delegate. Restoring original account.');
Log.info('Reauthenticate while connected as a delegate. Restoring original account.');
restoreDelegateSession(response);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/CardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function getCardFeedIcon(cardFeed: CompanyCardFeed | typeof CONST.EXPENSIFY_CARD
}

/**
* Verify if the feed is a custom feed. Those are also refered to as commercial feeds.
* Verify if the feed is a custom feed. Those are also referred to as commercial feeds.
*/
function isCustomFeed(feed: CompanyCardFeedWithNumber): boolean {
return [CONST.COMPANY_CARD.FEED_BANK_NAME.MASTER_CARD, CONST.COMPANY_CARD.FEED_BANK_NAME.VISA, CONST.COMPANY_CARD.FEED_BANK_NAME.AMEX].some((value) => feed.startsWith(value));
Expand Down
4 changes: 2 additions & 2 deletions src/libs/DateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function getCurrentTimezone(): Required<Timezone> {
}

/**
* @returns [January, Fabruary, March, April, May, June, July, August, ...]
* @returns [January, February, March, April, May, June, July, August, ...]
*/
function getMonthNames(preferredLocale: Locale): string[] {
if (preferredLocale) {
Expand All @@ -374,7 +374,7 @@ function getMonthNames(preferredLocale: Locale): string[] {
}

/**
* @returns [Monday, Thuesday, Wednesday, ...]
* @returns [Monday, Tuesday, Wednesday, ...]
*/
function getDaysOfWeek(preferredLocale: Locale): string[] {
if (preferredLocale) {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/DebugUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function onyxDataToDraftData(data: OnyxEntry<Record<string, unknown>>) {
/**
* Whether a string representation is an empty value
*
* @param value - string representantion
* @param value - string representation
* @returns whether the value is an empty value
*/
function isEmptyValue(value: string): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Fullstory/index.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const FS = {
* Initializes the FullStory metadata with the provided metadata information.
*/
consentAndIdentify: (value: OnyxEntry<UserMetadata>) => {
// On the first subscribe for UserMetadta, this function will be called. We need
// On the first subscribe for UserMetadata, this function will be called. We need
// to confirm that we actually have any value here before proceeding.
if (!value?.accountID) {
return;
Expand Down
6 changes: 3 additions & 3 deletions src/libs/IOUUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function updateIOUOwnerAndTotal<TReport extends OnyxInputOrEntry<Report>>(
currency: string,
isDeleting = false,
isUpdating = false,
isOnhold = false,
isOnHold = false,
): TReport {
// For the update case, we have calculated the diff amount in the calculateDiffAmount function so there is no need to compare currencies here
if ((currency !== iouReport?.currency && !isUpdating) || !iouReport) {
Expand All @@ -109,12 +109,12 @@ function updateIOUOwnerAndTotal<TReport extends OnyxInputOrEntry<Report>>(

if (actorAccountID === iouReport.ownerAccountID) {
iouReportUpdate.total += isDeleting ? -amount : amount;
if (!isOnhold) {
if (!isOnHold) {
iouReportUpdate.unheldTotal += isDeleting ? -amount : amount;
}
} else {
iouReportUpdate.total += isDeleting ? amount : -amount;
if (!isOnhold) {
if (!isOnHold) {
iouReportUpdate.unheldTotal += isDeleting ? amount : -amount;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/InputUtils/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {MoveSelectiontoEnd, ScrollInput} from './types';
import type {MoveSelectionToEnd, ScrollInput} from './types';

const scrollToBottom: ScrollInput = () => {};
const scrollToRight: ScrollInput = () => {};
const moveSelectionToEnd: MoveSelectiontoEnd = () => {};
const moveSelectionToEnd: MoveSelectionToEnd = () => {};

export {scrollToBottom, moveSelectionToEnd, scrollToRight};
4 changes: 2 additions & 2 deletions src/libs/InputUtils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {MoveSelectiontoEnd, ScrollInput} from './types';
import type {MoveSelectionToEnd, ScrollInput} from './types';

const scrollToBottom: ScrollInput = (input) => {
if (!('scrollTop' in input)) {
Expand All @@ -17,7 +17,7 @@ const scrollToRight: ScrollInput = (input) => {
input.scrollLeft = input.scrollWidth;
};

const moveSelectionToEnd: MoveSelectiontoEnd = (input) => {
const moveSelectionToEnd: MoveSelectionToEnd = (input) => {
if (!('setSelectionRange' in input)) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/InputUtils/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {TextInput} from 'react-native';

type ScrollInput = (input: HTMLInputElement | TextInput) => void;
type MoveSelectiontoEnd = (input: HTMLInputElement | TextInput) => void;
type MoveSelectionToEnd = (input: HTMLInputElement | TextInput) => void;

export type {ScrollInput, MoveSelectiontoEnd};
export type {ScrollInput, MoveSelectionToEnd};
2 changes: 1 addition & 1 deletion src/libs/Middleware/Logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const Logging: Middleware = (response, request) => {
Log.info('[Network] API request error: A record already exists with this ID', false, logParams);
} else {
// If we get any error that is not known log an alert so we can learn more about it and document it here.
Log.alert(`${CONST.ERROR.ENSURE_BUGBOT} unknown API request error caught while processing request`, logParams, false);
Log.alert(`${CONST.ERROR.ENSURE_BUG_BOT} unknown API request error caught while processing request`, logParams, false);
}

// Re-throw this error so the next handler can manage it
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Middleware/SaveResponseInOnyx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SaveResponseInOnyx: Middleware = (requestResponse, request) =>
requestResponse.then((response = {}) => {
const onyxUpdates = response?.onyxData ?? [];

// Sometimes we call requests that are successfull but they don't have any response or any success/failure/finally data to set. Let's return early since
// Sometimes we call requests that are successful but they don't have any response or any success/failure/finally data to set. Let's return early since
// we don't need to store anything here.
if (!onyxUpdates && !request.successData && !request.failureData && !request.finallyData) {
return Promise.resolve(response);
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
if (Number.isNaN(clearAfterTime.getTime())) {
return;
}
const subMilisecondsTime = clearAfterTime.getTime() - currentTime.getTime();
if (subMilisecondsTime > 0) {
const subMillisecondsTime = clearAfterTime.getTime() - currentTime.getTime();
if (subMillisecondsTime > 0) {
const timeoutID = setTimeout(() => {
clearStatus();
}, subMilisecondsTime);
}, subMillisecondsTime);
return () => {
clearTimeout(timeoutID);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const OPTIONS_PER_SCREEN: Partial<Record<Screen, PlatformStackNavigationOptions>
/**
* Create a modal stack navigator with an array of sub-screens.
*
* @param screens key/value pairs where the key is the name of the screen and the value is a functon that returns the lazy-loaded component
* @param screens key/value pairs where the key is the name of the screen and the value is a function that returns the lazy-loaded component
* @param getScreenOptions optional function that returns the screen options, override the default options
*/
function createModalStackNavigator<ParamList extends ParamListBase>(screens: Screens, getScreenOptions?: GetModalStackScreenOptions): React.ComponentType {
Expand Down
Loading