Skip to content

Conversation

@yukia3e
Copy link
Contributor

@yukia3e yukia3e commented Jan 10, 2025

Changes

  • Linear: https://linear.app/thirdweb/issue/INF-171/
  • In the existing metadata transformation logic, properties and attributes were treated interchangeably (properties: metadata.properties || metadata.attributes). However, these fields serve different purposes and should be handled separately to avoid potential data conflicts and maintain clarity.
  • Updated the logic to explicitly set properties and attributes as independent fields in the NFT metadata transformation.

How this PR will be tested

  • Open the dashboard and click X. Result: A modal should appear.
  • Call the /foo/bar API. Result: Returns 200 with "baz" in the response body.

Output

(Example: Screenshot/GIF for UI changes, cURL output for API changes)


PR-Codex overview

This PR focuses on updating the handling of properties and attributes in the mint-to.ts files for both erc721 and erc1155 contracts. The changes ensure that properties and attributes are set to undefined if they are not present in the metadata.

Detailed summary

  • Changed properties assignment from metadata.properties || metadata.attributes to metadata.properties ?? undefined.
  • Added attributes assignment with metadata.attributes ?? undefined in both erc721 and erc1155 files.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@github-actions
Copy link

This PR is stale because it has been open for 7 days with no activity. Remove stale label or comment or this PR will be closed in 3 days.

@joaquim-verges joaquim-verges changed the title fix: Separate properties and attributes in NFTInput [SDK] fix: Separate properties and attributes in NFTInput Jan 18, 2025
@joaquim-verges
Copy link
Member

thank you @yukia3e !

@joaquim-verges joaquim-verges merged commit 38ecff2 into thirdweb-dev:main Jan 18, 2025
4 checks passed
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