Skip to content

test(privateListings): cover getPrivateListingConsiderations and getPrivateListingFulfillments - #1996

Closed
devorun wants to merge 1 commit into
ProjectOpenSea:mainfrom
devorun:test/private-listing-fulfillments
Closed

test(privateListings): cover getPrivateListingConsiderations and getPrivateListingFulfillments#1996
devorun wants to merge 1 commit into
ProjectOpenSea:mainfrom
devorun:test/private-listing-fulfillments

Conversation

@devorun

@devorun devorun commented Aug 21, 2026

Copy link
Copy Markdown

Summary

Completes the unit coverage of the privateListings helpers. test/orders/privateListings.spec.ts already covers computePrivateListingValue and constructPrivateListingCounterOrder; the other two exported functions were untested. This adds them:

  • getPrivateListingConsiderations — stamps the private-sale recipient onto every offer item, preserving order and fields (plus the empty-offer case).
  • getPrivateListingFulfillments — matches each offered NFT to its consideration counterpart, routes every currency consideration item to the counter order's aggregated offer (orderIndex: 1, itemIndex: 0), skips non-currency items, and throws when an offered NFT has no matching consideration item.

Testing

  • vitest run test/orders/privateListings.spec.ts (16 tests pass)
  • biome check and tsc -p tsconfig.check.json clean

…rivateListingFulfillments

Complete the unit coverage of the privateListings helpers. The existing
spec already covers computePrivateListingValue and
constructPrivateListingCounterOrder; this adds the two remaining exported
functions:

- getPrivateListingConsiderations: stamps the private-sale recipient onto
  every offer item, preserving order and fields.
- getPrivateListingFulfillments: matches each offered NFT to its
  consideration counterpart, routes every currency consideration item to
  the counter order's aggregated offer, skips non-currency items, and
  throws when an offered NFT has no matching consideration item.
@ryanio

ryanio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Taken, thanks. I checked the assertions against the source branch by branch and they match, including the routing of every currency consideration item to the counter order's single offer item, and the throw when an offered NFT has no counterpart.

This repo is a read-only mirror, so the tests are recreated in our internal monorepo with you credited as co-author and ship in the next release. Closing in favor of that.

@ryanio ryanio closed this Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants