Skip to content
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

Updated Price type #1614

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

crypt0biwan
Copy link

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

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.

1 participant