-
Notifications
You must be signed in to change notification settings - Fork 525
[SDK] Add option to NOT load NFT metadata #1823
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
Conversation
|
type: "ERC721", | ||
supply: "1", | ||
}; | ||
return nft as T extends true | undefined ? NFT : NFTWithoutMetadata; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a way to solve this without using type assertion.
Googling leads to this open issue: microsoft/TypeScript#33912
@@ -425,11 +444,10 @@ export class Erc721< | |||
public async getOwned( | |||
walletAddress?: AddressOrEns, | |||
queryParams?: QueryAllParams, | |||
) { | |||
): Promise<NFT[] | NFTWithoutMetadata[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wrap my head around how to deal with the typings here
@joaquim-verges The code is not complete but I'd love to have a review before I go too far. I have left a few comments above in the code ^ |
…0 to 4.2.1 (#1823) build(deps-dev): bump @trivago/prettier-plugin-sort-imports Bumps [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports) from 4.2.0 to 4.2.1. - [Release notes](https://github.com/trivago/prettier-plugin-sort-imports/releases) - [Changelog](https://github.com/trivago/prettier-plugin-sort-imports/blob/main/CHANGELOG.md) - [Commits](trivago/prettier-plugin-sort-imports@v4.2.0...v4.2.1) --- updated-dependencies: - dependency-name: "@trivago/prettier-plugin-sort-imports" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Problem solved
Short description of the bug fixed or feature added
Changes made
How to test