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

#499 | ERC1155 inventory updates #599

Merged
merged 60 commits into from
Nov 9, 2023

Conversation

ezra-sg
Copy link
Contributor

@ezra-sg ezra-sg commented Sep 15, 2023

Fixes #499

Description

This PR makes changes to NFTs in order to support ERC1155. Previously, the NFT class was built around the assumption that each NFTClass would have one underlying NFT 'item' which contained most of its relevant information. However with ERC1155, it's more complicated because we have data from potentially many different versions of the same NFT but with different owner data (e.g. owner 1 has 5 of this NFT, owner 2 has 3 of it, etc).

Ultimately this PR simplifies the data structures surrounding NFTs into a single NFT class, which is extended by Erc721Nft and Erc1155Nft. The classes can be instantiated directly, but generally the factory function constructNft is more useful; it takes indexer data and generates an NFT from that.

This PR also updates the border color for various elements across the site which were previously too light to see, such as the border around NFT tiles and the border between wallet balance rows. It also updates tooltips to have the gradient background from designs

Note: the ability to send 1155s and to view the Owners tab on the NFT detail page will be implemented in #658

Test scenarios

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage

@netlify
Copy link

netlify bot commented Sep 15, 2023

Deploy Preview for wallet-staging ready!

Name Link
🔨 Latest commit 88debf3
🔍 Latest deploy log https://app.netlify.com/sites/wallet-staging/deploys/65495c0e91fc4f0008bc77cc
😎 Deploy Preview https://deploy-preview-599--wallet-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 15, 2023

Deploy Preview for wallet-develop-mainnet ready!

Name Link
🔨 Latest commit 88debf3
🔍 Latest deploy log https://app.netlify.com/sites/wallet-develop-mainnet/deploys/65495c0e8aa35a00089112d6
😎 Deploy Preview https://deploy-preview-599--wallet-develop-mainnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ezra-sg ezra-sg changed the base branch from develop to 326-display-nft-xfers September 15, 2023 18:16
@ezra-sg ezra-sg changed the base branch from 326-display-nft-xfers to develop September 15, 2023 20:07
@donnyquixotic donnyquixotic mentioned this pull request Nov 1, 2023
@ezra-sg ezra-sg marked this pull request as ready for review November 3, 2023 21:11
@ezra-sg ezra-sg mentioned this pull request Nov 8, 2023
10 tasks
@donnyquixotic donnyquixotic merged commit cbc3f0c into develop Nov 9, 2023
9 checks passed
@donnyquixotic donnyquixotic deleted the 499-erc1155-inventory-updates branch November 9, 2023 17:51
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.

ERC1155 Inventory/detail page updates
2 participants