-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Construct an Asset Card Component that can be reused across transaction events (minting, burning), sending/receiving assets on the transaction details. The Asset card should be similar to the stakepool card, in that it uses a flex grid layout for responsiveness.
Each asset contains the following fields:
- Name
- Policy
- Fingerprint (this is like the unique id for an asset)
- Total Supply
Assets contain optional Metadata that describes the asset. Unfortunately the optional metadata is schemaless and can contain almost anything. However there are some key characteristics we need to verify.
- Image - This is the main image associated with the token, in general this will be a web url, or an IPFS identifier.
- Ipfs Identifiers may need to be translated into a URL.
- ipfs://ipfs/QmXc7RbxHrTg7KumsMS2BrZjk7aKCbG7hRDKpAG5ZX86oT =>https://ipfs.io/ipfs/QmXc7RbxHrTg7KumsMS2BrZjk7aKCbG7hRDKpAG5ZX86oT
- ipfs://QmXc7RbxHrTg7KumsMS2BrZjk7aKCbG7hRDKpAG5ZX86oT =>https://ipfs.io/ipfs/QmXc7RbxHrTg7KumsMS2BrZjk7aKCbG7hRDKpAG5ZX86oT
- Arweave identifiers may need to be translated
- ar://bTYB-gK-DLKO1roap6-ZR-jR5P3UA-6RxR3o4ndDVCk => https://arweave.net/bTYB-gK-DLKO1roap6-ZR-jR5P3UA-6RxR3o4ndDVCk
- will need to do some analysis on schemaless metadata to determine where the image keys are most often found.
- Ipfs Identifiers may need to be translated into a URL.
- Attributes - Often times an NFT will contain attributes (rarity, etc) and there should be an attributes section of the card.
- again will need to do some analysis on the schemaless metadata to determine how to get the attributes
Might look at doing some of this translation work on the serverside so the API returns standard values so we don't need this logic in the UI. For example adding a specific image attribute to the json response. Will do some analysis on this.
A couple options for using the card on the wallet view.
- Could add a drill down from the Asset Holdings table when you click on a row to bring up the details for the asset holding (including asset card)
- Modify the asset holdings from a table to a gallery of asset cards. (I prefer this option)
Sample wallet with assets: stake1uylw5ges065hhcexl7vyc8fgpeqpdja9mqlmpxp4fr6lmvsqn9m47