fix: add ORDER event type to AssetEventType enum#1927
Closed
MuhammadMinhaj wants to merge 1 commit intoProjectOpenSea:mainfrom
Closed
fix: add ORDER event type to AssetEventType enum#1927MuhammadMinhaj wants to merge 1 commit intoProjectOpenSea:mainfrom
MuhammadMinhaj wants to merge 1 commit intoProjectOpenSea:mainfrom
Conversation
The OpenSea REST API returns event_type "order" for listing events, but the SDK enum only had "listing". This caused listing events to fall through unhandled when consuming real API responses. Added ORDER = "order" to AssetEventType. LISTING is kept for backwards compatibility. No breaking changes.
3 tasks
Collaborator
|
Thanks for identifying this gap @MuhammadMinhaj! The API does indeed return We've opened #1929 which builds on your change with a couple of additions:
You're credited as co-author on the commit. Closing in favor of #1929. |
Contributor
Author
|
Thanks for the update and improvements! Appreciate the co-author credit. 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OpenSea REST API returns event_type "order" for listing events, but the SDK enum only had "listing". This caused listing events to fall through unhandled when consuming real API responses.
Added ORDER = "order" to AssetEventType. LISTING is kept for backwards compatibility. No breaking changes.
Motivation
The OpenSea Events API (
/api/v2/events) returnsevent_type: "order"for listing events in real API responses. The SDK'sAssetEventTypeenum only defined"listing", causing a mismatch where listing events were silently unhandled when processing live API data.Solution
Added
ORDER = "order"to theAssetEventTypeenum.LISTINGis retained for backwards compatibility. This is a purely additive change with no breaking changes.