Skip to content

Commit

Permalink
fix previous migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Nov 18, 2024
1 parent 4a23eb0 commit 094c67a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/components/TaxPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import useStyleUtils from '@hooks/useStyleUtils';
import * as IOUUtils from '@libs/IOUUtils';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import * as TaxOptionsListUtils from '@libs/TaxOptionsListUtils';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as TransactionUtils from '@libs/TransactionUtils';
import CONST from '@src/CONST';
import type {IOUAction} from '@src/CONST';
Expand Down Expand Up @@ -48,13 +47,8 @@ function TaxPicker({selectedTaxRate = '', policyID, transactionID, insets, onSub
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();
const [searchValue, setSearchValue] = useState('');
const policy = PolicyUtils.getPolicy(policyID);
const [draftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}` as `${typeof ONYXKEYS.COLLECTION.TRANSACTION}${string}`);
const [defaultTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`);
const [splitDraftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`);

const transaction = IOUUtils.shouldUseTransactionDraft(action) ? draftTransaction : defaultTransaction;

const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`);
const [transaction] = useOnyx(
(() => {
Expand All @@ -64,7 +58,6 @@ function TaxPicker({selectedTaxRate = '', policyID, transactionID, insets, onSub
return `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`;
})(),
);
const [splitDraftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`);

const isEditing = action === CONST.IOU.ACTION.EDIT;
const isEditingSplitBill = isEditing && iouType === CONST.IOU.TYPE.SPLIT;
Expand Down

0 comments on commit 094c67a

Please sign in to comment.