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

ProjectOpenSea / opensea-js / 18512056229

14 Oct 2025 10:40PM UTC coverage: 50.0% (+0.7%) from 49.322%
18512056229

push

github

web-flow
feat: add cancelOrders method for bulk onchain order cancellation (#1779)

* feat: add cancelOrders method for bulk onchain order cancellation

- Add public cancelOrders() method that accepts OrderV2[] or OrderComponents[]
- Supports bulk cancellation of multiple orders in a single transaction
- Provides helpful error messages when order hashes are provided without full order data
- Add comprehensive unit tests for validation and error cases
- Maintains backward compatibility with existing cancelOrder() method

Addresses #1312

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

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

* feat: fetch orders from API when canceling by hash

Previously, cancelOrders() would throw an error when provided with order
hashes, requiring users to provide full OrderV2 objects or OrderComponents.

This change improves the developer experience by automatically fetching
orders from the OpenSea API when only order hashes are provided, making
it easier to cancel orders without manually fetching order data first.

Changes:
- Add getOrderByHashPath() helper in apiPaths.ts
- Add getOrderByHash() method to OpenSeaAPI class
- Update cancelOrders() to fetch orders via API when orderHashes provided
- Update test to reflect new API-fetching behavior

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

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

* docs: add order cancellation and getOrderByHash documentation

Add comprehensive documentation for:
- Onchain order cancellation using cancelOrders() with multiple input options
- Offchain order cancellation for SignedZone-protected orders
- Fetching orders by hash using getOrderByHash() API method

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

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

* docs: add API key authentication note for offchainCancelOrder

Add documentation note that API key must belong to order offerer when offererSignature is not... (continued)

165 of 502 branches covered (32.87%)

Branch coverage included in aggregate %.

65 of 114 new or added lines in 4 files covered. (57.02%)

798 of 1424 relevant lines covered (56.04%)

1.88 hits per line

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

49.78
/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

© 2026 Coveralls, Inc