• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ProjectOpenSea / opensea-js / 18957733875

30 Oct 2025 11:19PM UTC coverage: 86.947% (+0.01%) from 86.937%
18957733875

push

github

web-flow
feat: default unitsToFill to 1 for offers and listings, add includePrivateListings parameter (#1809)

* feat: default unitsToFill to 1 for both listings and offers

Changes the SDK to always default `unitsToFill` to "1" for both listings and offers, providing consistent behavior across order types.

Previously:
- Listings: defaulted to remaining_quantity (API-side)
- Offers: defaulted to 1 (API-side)
- SDK sent undefined when not specified

Now:
- SDK always sends "1" when unitsToFill is not specified
- Consistent default behavior for both listings and offers
- Cleaner implementation with default parameters in utility functions

Changes:
- Updated JSDoc comments to reflect new behavior
- Modified fulfillment.ts to default to "1" instead of undefined
- Refactored getFulfillListingPayload and getFulfillOfferPayload to use default parameters and always include units_to_fill
- Updated tests to verify new default behavior
- Bumped version to 8.0.5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: update utils tests to expect units_to_fill default

Update test expectations to include units_to_fill: "1" in the expected payloads, reflecting the new default behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add includePrivateListings parameter to getBestListing

Add support for include_private_listings query parameter to getBestListing API method. This allows the integration test to fetch private listings when needed, fixing the "No listings found" error.

Changes:
- Added includePrivateListings optional parameter to getBestListing in ListingsAPI and OpenSeaAPI
- Updated integration test to use include_private_listings=true
- Updated JSDoc documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add includePrivateListings to getAllList... (continued)

433 of 646 branches covered (67.03%)

Branch coverage included in aggregate %.

7 of 10 new or added lines in 3 files covered. (70.0%)

3930 of 4372 relevant lines covered (89.89%)

4.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.28
/src/api/api.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc