Skip to content

Commit

Permalink
Simply access to parentContractID
Browse files Browse the repository at this point in the history
  • Loading branch information
haworku committed Apr 24, 2024
1 parent 21495e4 commit 1f3629c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,7 @@ describe('SingleRateSummarySection', () => {
name: 'Unlock rate',
})
await waitFor(() => {
const parentContractSubmissionID =
rateData.revisions[0].contractRevisions[
rateData.revisions[0].contractRevisions.length - 1
].contract.id
const parentContractSubmissionID = rateData.parentContractID
expect(testLocation.pathname).toBe(
`/submissions/${parentContractSubmissionID}`
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,7 @@ export const SingleRateSummarySection = ({
)
}
}
const parentContractSubmissionID =
rate.revisions[0].contractRevisions[
rate.revisions[0].contractRevisions.length - 1
].contract.id
const parentContractSubmissionID = rate.parentContractID
return (
<React.Fragment key={rate.id}>
<SectionCard
Expand Down

0 comments on commit 1f3629c

Please sign in to comment.