Skip to content

Commit

Permalink
Merge pull request #43499 from callstack-internal/pac-guerreiro/refac…
Browse files Browse the repository at this point in the history
…tor/39129-add-comments-to-remaining-onyx-types

 [No QA][TS Migration] Follow up - Add comments for remaining properties in Onyx types
  • Loading branch information
mountiny authored Jun 12, 2024
2 parents 82d0360 + 2ef086e commit 05f85cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ function hasViolation(transactionID: string, transactionViolations: OnyxCollecti
* Checks if any violations for the provided transaction are of type 'notice'
*/
function hasNoticeTypeViolation(transactionID: string, transactionViolations: OnyxCollection<TransactionViolation[]>): boolean {
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === 'notice');
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.NOTICE);
}

/**
Expand Down
16 changes: 8 additions & 8 deletions src/types/onyx/OriginalMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ type OriginalMessageApproved = {

/** Content of the original message */
originalMessage: {
/** Approved expense amount */
/** Approved expense report amount */
amount: number;

/** Currency of the approved expense amount */
/** Currency of the approved expense report amount */
currency: string;

/** Report ID of the expense */
/** Report ID of the expense report */
expenseReportID: string;
};
};
Expand Down Expand Up @@ -91,7 +91,7 @@ type IOUDetails = {
amount: number;

/** Optional comment */
comment?: string;
comment: string;

/** Currency of the money sent */
currency: string;
Expand Down Expand Up @@ -179,7 +179,7 @@ type Decision = {
/** Name of the decision */
decision: DecisionName;

/** When was the decision name */
/** When was the decision made */
timestamp?: string;
};

Expand Down Expand Up @@ -283,13 +283,13 @@ type OriginalMessageSubmitted = {

/** Content of the original message */
originalMessage: {
/** Approved expense amount */
/** Approved expense report amount */
amount: number;

/** Currency of the approved expense amount */
/** Currency of the approved expense report amount */
currency: string;

/** Report ID of the expense */
/** Report ID of the expense report */
expenseReportID: string;
};
};
Expand Down
4 changes: 2 additions & 2 deletions src/types/onyx/TransactionViolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type TransactionViolationData = {

/** Model of a transaction violation */
type TransactionViolation = {
/** Type of transaction violation ('violation', 'notice', 'warning', ...) */
type: string;
/** Type of transaction violation */
type: ValueOf<typeof CONST.VIOLATION_TYPES>;

/** Name of the transaction violation */
name: ViolationName;
Expand Down

0 comments on commit 05f85cb

Please sign in to comment.