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

fix: parameterize chainId #4793

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

Conversation

sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Oct 14, 2024

Explanation

Parameterize chainId in getNftInformationFromApi fct

References

Changelog

@metamask/assets-controllers

  • FIXED: add networkClientId as argument in getNftInformationFromApi fct

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@sahar-fehri sahar-fehri marked this pull request as ready for review October 14, 2024 13:24
@sahar-fehri sahar-fehri requested a review from a team as a code owner October 14, 2024 13:24
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Seems useful, but I'm not seeing any tests that confirm the new behavior. Can you add them?

* @returns Promise resolving to the current NFT name and image.
*/
async #getNftInformationFromApi(
contractAddress: string,
tokenId: string,
networkClientId?: NetworkClientId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Since this is an optional argument what are your thoughts on placing this within an options bag? This would allow more optional arguments to be added in the future without worrying about passing them in a specific order.

Suggested change
networkClientId?: NetworkClientId,
{ networkClientId }: {
networkClientId?: NetworkClientId,
}

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