From 6183e2785f7b671e9157342a5d5724f1afb8db86 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Mon, 23 Nov 2026 22:45:13 +0530 Subject: [PATCH 1/2] Pass currentUser personal details to invoice functions --- src/libs/actions/IOU/SendInvoice.ts | 10 +++++++++- .../step/DynamicIOURequestStepCompanyInfo.tsx | 1 + .../submission/useInvoiceSubmission.ts | 1 + tests/actions/IOUTest/SendInvoiceTest.ts | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/IOU/SendInvoice.ts b/src/libs/actions/IOU/SendInvoice.ts index a7d479a61134..20fb142199c6 100644 --- a/src/libs/actions/IOU/SendInvoice.ts +++ b/src/libs/actions/IOU/SendInvoice.ts @@ -32,6 +32,7 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type * as OnyxTypes from '@src/types/onyx'; import type {Participant} from '@src/types/onyx/IOU'; +import type {CurrentUserPersonalDetails} from '@src/types/onyx/PersonalDetails'; import type {InvoiceReceiver, InvoiceReceiverType} from '@src/types/onyx/Report'; import type {OnyxData} from '@src/types/onyx/Request'; import type {Receipt} from '@src/types/onyx/Transaction'; @@ -80,6 +81,7 @@ type SendInvoiceInformation = { type SendInvoiceOptions = { transaction: OnyxEntry; currentUserAccountID: number; + currentUserPersonalDetails: CurrentUserPersonalDetails; policyRecentlyUsedCurrencies: string[]; invoiceChatReport?: OnyxEntry; invoiceChatReportID?: string; @@ -127,6 +129,7 @@ type BuildOnyxDataForInvoiceParams = { companyName?: string; companyWebsite?: string; participant?: Participant; + currentUserPersonalDetails: CurrentUserPersonalDetails; }; /** Builds the Onyx data for an invoice */ @@ -146,7 +149,7 @@ function buildOnyxDataForInvoice( | typeof ONYXKEYS.COLLECTION.SNAPSHOT | typeof ONYXKEYS.COLLECTION.RAM_ONLY_REPORT_LOADING_STATE > { - const {chat, iou, transactionParams, policyParams, optimisticData: optimisticDataParams, companyName, companyWebsite, participant} = invoiceParams; + const {chat, iou, transactionParams, policyParams, optimisticData: optimisticDataParams, companyName, companyWebsite, participant, currentUserPersonalDetails} = invoiceParams; const transaction = transactionParams.transaction; const clearedPendingFields = Object.fromEntries(Object.keys(transactionParams.transaction.pendingFields ?? {}).map((key) => [key, null])); @@ -580,6 +583,7 @@ function buildOnyxDataForInvoice( const searchUpdate = getSearchOnyxUpdate({ transaction, participant, + currentUserPersonalDetails, iouReport: iou.report, iouAction: iou.action, policy: policyParams.policy, @@ -622,6 +626,7 @@ function getReceiverType(receiverParticipant: Participant | InvoiceReceiver | un function getSendInvoiceInformation({ transaction, currentUserAccountID, + currentUserPersonalDetails, policyRecentlyUsedCurrencies, invoiceChatReport, invoiceChatReportID, @@ -767,6 +772,7 @@ function getSendInvoiceInformation({ policyRecentlyUsedTags: optimisticPolicyRecentlyUsedTags, }, participant: receiver, + currentUserPersonalDetails, companyName, companyWebsite, }); @@ -789,6 +795,7 @@ function getSendInvoiceInformation({ function sendInvoice({ currentUserAccountID, + currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies, invoiceChatReport, @@ -829,6 +836,7 @@ function sendInvoice({ } = getSendInvoiceInformation({ transaction, currentUserAccountID, + currentUserPersonalDetails, policyRecentlyUsedCurrencies, invoiceChatReportID, invoiceChatReport, diff --git a/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx b/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx index 04e0db526833..16aabd6c615f 100644 --- a/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx +++ b/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx @@ -110,6 +110,7 @@ function DynamicIOURequestStepCompanyInfo({route, report, transaction}: DynamicI sendInvoice({ getCurrencyDecimals, currentUserAccountID: currentUserPersonalDetails.accountID, + currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies: policyRecentlyUsedCurrencies ?? [], invoiceChatReport: report, diff --git a/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts b/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts index 315445cbaadf..e6ba8069cba6 100644 --- a/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts +++ b/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts @@ -74,6 +74,7 @@ function useInvoiceSubmission({ getCurrencyDecimals, writeBarrier, currentUserAccountID: currentUserPersonalDetails.accountID, + currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies, invoiceChatReport, diff --git a/tests/actions/IOUTest/SendInvoiceTest.ts b/tests/actions/IOUTest/SendInvoiceTest.ts index 5f5ff14723c3..951f5aad19e0 100644 --- a/tests/actions/IOUTest/SendInvoiceTest.ts +++ b/tests/actions/IOUTest/SendInvoiceTest.ts @@ -207,6 +207,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: undefined, @@ -235,6 +236,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: {...baseTransaction, currency: CONST.CURRENCY.EUR}, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: initialCurrencies, invoiceChatReport: undefined, receiptFile: undefined, @@ -289,6 +291,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: undefined, @@ -338,6 +341,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: undefined, @@ -379,6 +383,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReportFixture, receiptFile: undefined, @@ -417,6 +422,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID: 123, + currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: undefined, @@ -460,6 +466,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReportFixture, receiptFile: undefined, @@ -499,6 +506,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: mockReceipt, @@ -551,6 +559,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: mockTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, receiptFile: undefined, @@ -583,6 +592,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, invoiceChatReportID: preGeneratedReportID, @@ -636,6 +646,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReport, invoiceChatReportID: preGeneratedReportID, @@ -700,6 +711,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: mockTransaction, currentUserAccountID: 123, + currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], policyRecentlyUsedTags, senderPolicyTags: senderPolicyTags ?? {}, @@ -751,6 +763,7 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: mockTransaction, currentUserAccountID: 123, + currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], senderPolicyTags: senderPolicyTags ?? {}, formatPhoneNumber, @@ -782,6 +795,7 @@ describe('actions/SendInvoice', () => { // When the user sends a new invoice to an individual sendInvoice({ currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, transaction, policyRecentlyUsedCurrencies: [], policy, @@ -829,6 +843,7 @@ describe('actions/SendInvoice', () => { sendInvoice({ currentUserAccountID: 123, + currentUserPersonalDetails: {accountID: 123}, transaction, policyRecentlyUsedCurrencies: [], senderPolicyTags: undefined, @@ -869,6 +884,7 @@ describe('actions/SendInvoice', () => { mockFetch.pause(); sendInvoice({ currentUserAccountID: 1, + currentUserPersonalDetails: {accountID: 1}, transaction, policyRecentlyUsedCurrencies: initialCurrencies, senderPolicyTags: undefined, @@ -910,6 +926,7 @@ describe('actions/SendInvoice', () => { // When sending an invoice sendInvoice({ currentUserAccountID, + currentUserPersonalDetails: {accountID: currentUserAccountID}, transaction, policyRecentlyUsedCurrencies: [], policyRecentlyUsedCategories, @@ -949,6 +966,7 @@ describe('actions/SendInvoice', () => { // When sending an invoice sendInvoice({ currentUserAccountID: 1, + currentUserPersonalDetails: {accountID: 1}, transaction, policyRecentlyUsedCurrencies: [], policyRecentlyUsedTags, @@ -994,6 +1012,7 @@ describe('actions/SendInvoice', () => { sendInvoice({ currentUserAccountID: 123, + currentUserPersonalDetails: {accountID: 123}, transaction, policyRecentlyUsedCurrencies: [], invoiceChatReportID: preGeneratedReportID, From aaf329e950d855469cc66eea8abb91afafb299f4 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Wed, 25 Nov 2026 19:03:54 +0530 Subject: [PATCH 2/2] Resolve review comments --- src/libs/actions/IOU/SendInvoice.ts | 7 +- .../step/DynamicIOURequestStepCompanyInfo.tsx | 1 - .../submission/useInvoiceSubmission.ts | 1 - tests/actions/IOUTest/SendInvoiceTest.ts | 81 ++++++++++++++----- 4 files changed, 64 insertions(+), 26 deletions(-) diff --git a/src/libs/actions/IOU/SendInvoice.ts b/src/libs/actions/IOU/SendInvoice.ts index 20fb142199c6..98af0f5aaaa1 100644 --- a/src/libs/actions/IOU/SendInvoice.ts +++ b/src/libs/actions/IOU/SendInvoice.ts @@ -80,7 +80,6 @@ type SendInvoiceInformation = { type SendInvoiceOptions = { transaction: OnyxEntry; - currentUserAccountID: number; currentUserPersonalDetails: CurrentUserPersonalDetails; policyRecentlyUsedCurrencies: string[]; invoiceChatReport?: OnyxEntry; @@ -625,7 +624,6 @@ function getReceiverType(receiverParticipant: Participant | InvoiceReceiver | un /** Gathers all the data needed to create an invoice. */ function getSendInvoiceInformation({ transaction, - currentUserAccountID, currentUserPersonalDetails, policyRecentlyUsedCurrencies, invoiceChatReport, @@ -643,6 +641,7 @@ function getSendInvoiceInformation({ delegateAccountID, getCurrencyDecimals, }: SendInvoiceOptions): SendInvoiceInformation { + const currentUserAccountID = currentUserPersonalDetails.accountID; const { amount = 0, currency = '', @@ -794,7 +793,6 @@ function getSendInvoiceInformation({ } function sendInvoice({ - currentUserAccountID, currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies, @@ -835,7 +833,6 @@ function sendInvoice({ onyxData, } = getSendInvoiceInformation({ transaction, - currentUserAccountID, currentUserPersonalDetails, policyRecentlyUsedCurrencies, invoiceChatReportID, @@ -859,7 +856,7 @@ function sendInvoice({ createdReportActionIDForThread, reportActionID, senderWorkspaceID, - accountID: currentUserAccountID, + accountID: currentUserPersonalDetails.accountID, amount: transaction?.amount ?? 0, currency: transaction?.currency ?? '', comment: parsedComment, diff --git a/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx b/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx index ef85fe874234..a32e9aef65e2 100644 --- a/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx +++ b/src/pages/iou/request/step/DynamicIOURequestStepCompanyInfo.tsx @@ -113,7 +113,6 @@ function DynamicIOURequestStepCompanyInfo({route, report, transaction}: DynamicI const draftTransactionIDs = validTransactionDraftIDsSelector(transactionDrafts); sendInvoice({ getCurrencyDecimals, - currentUserAccountID: currentUserPersonalDetails.accountID, currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies: policyRecentlyUsedCurrencies ?? [], diff --git a/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts b/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts index e6ba8069cba6..c80a4b1c3e39 100644 --- a/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts +++ b/src/pages/iou/request/step/confirmation/submission/useInvoiceSubmission.ts @@ -73,7 +73,6 @@ function useInvoiceSubmission({ sendInvoice({ getCurrencyDecimals, writeBarrier, - currentUserAccountID: currentUserPersonalDetails.accountID, currentUserPersonalDetails, transaction, policyRecentlyUsedCurrencies, diff --git a/tests/actions/IOUTest/SendInvoiceTest.ts b/tests/actions/IOUTest/SendInvoiceTest.ts index 951f5aad19e0..6bec6a152526 100644 --- a/tests/actions/IOUTest/SendInvoiceTest.ts +++ b/tests/actions/IOUTest/SendInvoiceTest.ts @@ -4,6 +4,7 @@ import type {RenderAPI} from '@testing-library/react-native'; import {getReceiverType, getSendInvoiceInformation, sendInvoice} from '@libs/actions/IOU/SendInvoice'; import initOnyxDerivedValues from '@libs/actions/OnyxDerived'; import {WRITE_COMMANDS} from '@libs/API/types'; +import {buildSearchQueryJSON} from '@libs/SearchQueryUtils'; import CONST from '@src/CONST'; import IntlStore from '@src/languages/IntlStore'; @@ -206,7 +207,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation with policyRecentlyUsedCategories const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -235,7 +235,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: {...baseTransaction, currency: CONST.CURRENCY.EUR}, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: initialCurrencies, invoiceChatReport: undefined, @@ -290,7 +289,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -340,7 +338,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -382,7 +379,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReportFixture, @@ -421,7 +417,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID: 123, currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -465,7 +460,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation with existing chat report const result = getSendInvoiceInformation({ transaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReportFixture, @@ -505,7 +499,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation with receipt const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -558,7 +551,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation with minimal data const result = getSendInvoiceInformation({ transaction: mockTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -591,7 +583,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: undefined, @@ -645,7 +636,6 @@ describe('actions/SendInvoice', () => { const result = getSendInvoiceInformation({ transaction: baseTransaction, - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, policyRecentlyUsedCurrencies: [], invoiceChatReport: existingInvoiceChatReport, @@ -710,7 +700,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation with senderPolicyTags read from Onyx const result = getSendInvoiceInformation({ transaction: mockTransaction, - currentUserAccountID: 123, currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], policyRecentlyUsedTags, @@ -762,7 +751,6 @@ describe('actions/SendInvoice', () => { // When: Call getSendInvoiceInformation without a tag on the transaction const result = getSendInvoiceInformation({ transaction: mockTransaction, - currentUserAccountID: 123, currentUserPersonalDetails: {accountID: 123}, policyRecentlyUsedCurrencies: [], senderPolicyTags: senderPolicyTags ?? {}, @@ -794,7 +782,6 @@ describe('actions/SendInvoice', () => { // When the user sends a new invoice to an individual sendInvoice({ - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, transaction, policyRecentlyUsedCurrencies: [], @@ -842,7 +829,6 @@ describe('actions/SendInvoice', () => { }); sendInvoice({ - currentUserAccountID: 123, currentUserPersonalDetails: {accountID: 123}, transaction, policyRecentlyUsedCurrencies: [], @@ -872,6 +858,67 @@ describe('actions/SendInvoice', () => { } }); + it('writes the passed sender details into the invoice search snapshot', async () => { + // Given a loaded type:invoice snapshot, so getSearchOnyxUpdate has a recorded query to patch + const queryJSON = buildSearchQueryJSON('type:invoice'); + await Onyx.merge(`${ONYXKEYS.COLLECTION.SNAPSHOT}${queryJSON?.hash}`, {search: {inputQuery: 'type:invoice'}}); + await waitForBatchedUpdates(); + + const writeSpy = jest.fn(); + const apiSpies = spyOnApiWrites(writeSpy); + + // And sender details that differ from what Onyx holds for the session user, so the Onyx fallback can't satisfy the assertion + const senderAccountID = 32; + const currentUserPersonalDetails = {accountID: senderAccountID, displayName: 'Sender', login: 'sender@test.com', avatar: 'https://avatar.png'}; + const transaction = createMock({ + transactionID: 'transaction_sender_snapshot', + reportID: 'report_sender_snapshot', + amount: 100, + currency: 'USD', + created: '2024-02-01', + merchant: 'Sender Invoice', + participants: [ + {accountID: senderAccountID, isSender: true, policyID: 'workspace_test'}, + {accountID: 456, isSender: false, login: 'receiver@test.com'}, + ], + }); + + // When the invoice is sent + sendInvoice({ + currentUserPersonalDetails, + transaction, + policyRecentlyUsedCurrencies: [], + senderPolicyTags: undefined, + formatPhoneNumber, + delegateAccountID: undefined, + getCurrencyDecimals: getCurrencyDecimalsLocal, + }); + + // Then the snapshot gets the sender from the passed details, not from the Onyx fallback + expect(writeSpy).toHaveBeenCalledWith( + WRITE_COMMANDS.SEND_INVOICE, + expect.anything(), + expect.objectContaining({ + optimisticData: expect.arrayContaining([ + expect.objectContaining({ + key: `${ONYXKEYS.COLLECTION.SNAPSHOT}${queryJSON?.hash}`, + value: expect.objectContaining({ + data: expect.objectContaining({ + [ONYXKEYS.PERSONAL_DETAILS_LIST]: expect.objectContaining({ + [senderAccountID]: expect.objectContaining({displayName: 'Sender', avatar: 'https://avatar.png', login: 'sender@test.com'}), + }), + }), + }), + }), + ]), + }), + ); + + for (const spy of apiSpies) { + spy.mockRestore(); + } + }); + it('should not clear transaction pending action when send invoice fails', async () => { const testCurrency = CONST.CURRENCY.EUR; const transaction: Transaction = { @@ -883,7 +930,6 @@ describe('actions/SendInvoice', () => { mockFetch.pause(); sendInvoice({ - currentUserAccountID: 1, currentUserPersonalDetails: {accountID: 1}, transaction, policyRecentlyUsedCurrencies: initialCurrencies, @@ -925,7 +971,6 @@ describe('actions/SendInvoice', () => { // When sending an invoice sendInvoice({ - currentUserAccountID, currentUserPersonalDetails: {accountID: currentUserAccountID}, transaction, policyRecentlyUsedCurrencies: [], @@ -965,7 +1010,6 @@ describe('actions/SendInvoice', () => { }; // When sending an invoice sendInvoice({ - currentUserAccountID: 1, currentUserPersonalDetails: {accountID: 1}, transaction, policyRecentlyUsedCurrencies: [], @@ -1011,7 +1055,6 @@ describe('actions/SendInvoice', () => { const apiSpies = spyOnApiWrites(writeSpy); sendInvoice({ - currentUserAccountID: 123, currentUserPersonalDetails: {accountID: 123}, transaction, policyRecentlyUsedCurrencies: [],