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

[wallet-ext] Add OriginByte NFTs support #4621

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

oribyts
Copy link
Contributor

@oribyts oribyts commented Sep 14, 2022

Add support of OriginByte NFTs standard.

Screen.Recording.2022-09-14.at.12.00.07.mov

@@ -29,14 +29,17 @@ function NFTDisplayCard({
const { filePath, nftObjectID, nftFields, fileExtentionType } =
useNFTBasicData(nftobj);

const name = nftFields?.name || nftFields?.metadata?.fields?.name;

Choose a reason for hiding this comment

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

Is there any special reason using an independent metadata field to store NFT name?

Choose a reason for hiding this comment

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

The reasoning behind it is that we are trying to be as generic as possible, but I guess some basic fields do make sense to have. In general, which fields do you see being part of the NFT object rather than the metadata object?

Choose a reason for hiding this comment

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

name, description, image, [optional]animation_url, [optional] attributes

you can take metaplex for an example here doc

Copy link
Collaborator

Choose a reason for hiding this comment

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

Having a number of "special" (field name, type) pairs is the approach we've taken so far--cc @666lcz for more details on what we currently support.

Copy link

@fredliang44 fredliang44 Sep 25, 2022

Choose a reason for hiding this comment

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

Hi @sblackshear @666lcz @nmboavida, we also noticed ecosystem projects have totally different practices on the same thing inside the metadata of the objects. So we create a draft standard/best practice for the ecosystem projects, hoping to improve the forward compatibility and extendability.

Feel free to comment on our repo, we really hoping to push the ecosystem forward together.

https://std.suiet.app/
https://github.com/suiet/standard

@@ -10,7 +10,7 @@ export default function useMediaUrl(objData: SuiData) {
const { fields } = (isSuiMoveObject(objData) && objData) || {};
return useMemo(() => {
if (fields) {
const mediaUrl = fields.url;
const mediaUrl = fields.url || fields.metadata?.fields.uri;
Copy link

@fredliang44 fredliang44 Sep 20, 2022

Choose a reason for hiding this comment

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

we should also consider using url rather than uri, because we will need the specific protocols to access the media.

Choose a reason for hiding this comment

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

We are changing the name of the field to url in this PR

Choose a reason for hiding this comment

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

The PR has been merged, from version 0.3.0 onwards it is now url

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Field name has been changed as well.

)}
{!!nftFields?.metadata?.fields?.attributes && (
<>
{nftFields.metadata.fields.attributes.fields.keys.map(
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: how big this list pf attributes can be? (or is usually?)
Do you mind adding some screenshots in the PR description?

cc: @mystie711

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pchrysochoidis
Usually not more than 3-4 attributes/tags.
I've attached some video too.

Choose a reason for hiding this comment

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

I would say the typical collection of NFTs will have around 5-10 attributes

Copy link
Collaborator

@sblackshear sblackshear left a comment

Choose a reason for hiding this comment

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

Accepting to unblock. Lots of iteration to do, but allowing users to try this out can only help us here!

@sblackshear sblackshear enabled auto-merge (rebase) September 23, 2022 15:28
@sblackshear sblackshear merged commit 5033bd0 into MystenLabs:main Sep 23, 2022
@mystie711
Copy link
Collaborator

mystie711 commented Sep 23, 2022

Only just getting around to reviewing earlier pieces of the conversation.

Agree that we should keep this moving.

Based on at most "5-10 attributes" expectation, @pchrysochoidis i would suggest letting the attributes section accommodate up to 8 lines of attributes BEFORE the section becomes scrollable.

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.

6 participants