Skip to content

Commit

Permalink
rename transactionData
Browse files Browse the repository at this point in the history
  • Loading branch information
mkzie2 committed Nov 22, 2024
1 parent d0918fe commit e08c53a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ type GPSPoint = {
long: number;
};

type RequestMoneyTransactionData = {
type RequestMoneyTransactionParams = {
attendees: Attendee[] | undefined;
amount: number;
currency: string;
Expand Down Expand Up @@ -202,7 +202,7 @@ type RequestMoneyInformation = {
gpsPoints?: GPSPoint;
action?: IOUAction;
reimbursible?: boolean;
transactionData: RequestMoneyTransactionData;
transactionParams: RequestMoneyTransactionParams;
};

let allPersonalDetails: OnyxTypes.PersonalDetailsList = {};
Expand Down Expand Up @@ -3565,7 +3565,7 @@ function shareTrackedExpense(
* Submit expense to another user
*/
function requestMoney(requestMoneyInformation: RequestMoneyInformation) {
const {report, participantParams, policyParams = {}, transactionData, gpsPoints, action, reimbursible} = requestMoneyInformation;
const {report, participantParams, policyParams = {}, transactionParams, gpsPoints, action, reimbursible} = requestMoneyInformation;
const {participant, payeeAccountID, payeeEmail} = participantParams;
const {policy, policyCategories, policyTagList} = policyParams;
const {
Expand All @@ -3584,7 +3584,7 @@ function requestMoney(requestMoneyInformation: RequestMoneyInformation) {
actionableWhisperReportActionID,
linkedTrackedExpenseReportAction,
linkedTrackedExpenseReportID,
} = transactionData;
} = transactionParams;

// If the report is iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function
const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function IOURequestStepAmount({
payeeEmail: currentUserPersonalDetails.login,
payeeAccountID: currentUserPersonalDetails.accountID,
},
transactionData: {
transactionParams: {
amount: backendAmount,
currency,
created: transaction?.created ?? '',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function IOURequestStepConfirmation({
},
gpsPoints,
action,
transactionData: {
transactionParams: {
amount: transaction.amount,
attendees: transaction.attendees,
currency: transaction.currency,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function IOURequestStepScan({
payeeAccountID: currentUserPersonalDetails.accountID,
participant,
},
transactionData: {
transactionParams: {
amount: 0,
attendees: transaction?.attendees,
currency: transaction?.currency ?? 'USD',
Expand Down Expand Up @@ -369,7 +369,7 @@ function IOURequestStepScan({
lat: successData.coords.latitude,
long: successData.coords.longitude,
},
transactionData: {
transactionParams: {
amount: 0,
attendees: transaction?.attendees,
currency: transaction?.currency ?? 'USD',
Expand Down
4 changes: 2 additions & 2 deletions src/pages/iou/request/step/IOURequestStepScan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function IOURequestStepScan({
payeeAccountID: currentUserPersonalDetails.accountID,
participant,
},
transactionData: {
transactionParams: {
amount: 0,
attendees: transaction?.attendees,
currency: transaction?.currency ?? 'USD',
Expand Down Expand Up @@ -399,7 +399,7 @@ function IOURequestStepScan({
lat: successData.coords.latitude,
long: successData.coords.longitude,
},
transactionData: {
transactionParams: {
amount: 0,
attendees: transaction?.attendees,
currency: transaction?.currency ?? 'USD',
Expand Down
24 changes: 12 additions & 12 deletions tests/actions/IOUTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -301,7 +301,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -520,7 +520,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -675,7 +675,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -1491,7 +1491,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -1727,7 +1727,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -1855,7 +1855,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -1956,7 +1956,7 @@ describe('actions/IOU', () => {
payeeAccountID: TEST_USER_ACCOUNT_ID,
participant: {login: RORY_EMAIL, accountID: RORY_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -2705,7 +2705,7 @@ describe('actions/IOU', () => {
payeeAccountID: TEST_USER_ACCOUNT_ID,
participant: {login: RORY_EMAIL, accountID: RORY_ACCOUNT_ID},
},
transactionData: {
transactionParams: {
amount: amount2,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -2923,7 +2923,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID, isPolicyExpenseChat: true, reportID: chatReport.reportID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -3030,7 +3030,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID, isPolicyExpenseChat: true, reportID: chatReport.reportID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down Expand Up @@ -3138,7 +3138,7 @@ describe('actions/IOU', () => {
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID, isPolicyExpenseChat: true, reportID: chatReport.reportID},
},
transactionData: {
transactionParams: {
amount,
attendees: [],
currency: CONST.CURRENCY.USD,
Expand Down

0 comments on commit e08c53a

Please sign in to comment.