Skip to content

Conversation

cryptopapi997
Copy link
Contributor

@cryptopapi997 cryptopapi997 commented Jan 31, 2023

Should be pretty straightforward - Lmk if this works and I'll add tests.
I opted to allow for passing an array of price accounts, as this allows for fetching one price account if needed, but allows for the optimization of using getMultipleAccountsInfo under the hood for the case that more than one account is needed.
Also couldn't quite tell from the rest of the library if you guys prefer throwing or returning empty objects (or null or undefined) for invalid data. I opted for throwing for now.

@jayantk
Copy link
Contributor

jayantk commented Jan 31, 2023

looks great to me. add a test and i'll approve.

I think throwing makes sense in this context (it suggests a user misconfiguration of the feed ids) so i'm happy with that choice.

@cryptopapi997
Copy link
Contributor Author

Great! Just added tests & removed a duplicate test file you guys still had in there while I was at it

@cryptopapi997
Copy link
Contributor Author

lmk if that works @jayantk

Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

thank you!

@jayantk jayantk merged commit e724b2f into pyth-network:main Feb 2, 2023
@jayantk
Copy link
Contributor

jayantk commented Feb 2, 2023

I cut a release with the new functionality as well https://github.com/pyth-network/pyth-client-js/releases/tag/v2.13.0

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.

2 participants