Skip to content

Updated Price type #1614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Updated Price type #1614

merged 1 commit into from
Mar 4, 2025

Conversation

crypt0biwan
Copy link
Contributor

Updated Price type (mismatch with API response) and added a few asserts examples for price in "BestOffer"

Motivation

When implementing "opensea-js" package, I can't use the Price type. The API response doesn't contain a "current" field.

Solution

Updated the type, removed the "current" level. Also added a few asserts in the unit test to validate the format of the API call.
Also, maybe it's a nice recommendation to include "zod" so you can validate API responses against a schema during tests

Copy link
Collaborator

@ryanio ryanio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@ryanio ryanio merged commit e06278d into ProjectOpenSea:main Mar 4, 2025
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.

None yet

2 participants