Skip to content

fix: OpenSea supply -> total_supply#22376

Merged
bergeron merged 1 commit intodevelopfrom
brian/os-supply
Dec 21, 2023
Merged

fix: OpenSea supply -> total_supply#22376
bergeron merged 1 commit intodevelopfrom
brian/os-supply

Conversation

@bergeron
Copy link
Copy Markdown
Contributor

@bergeron bergeron commented Dec 21, 2023

Description

OpenSea renamed the field supply, which used to be required, to total_supply. Fixes the error:

undefined is not an object (evaluating 'contract.supply.toString')

Which prevented some NFTs from loading. A more accurate total_supply was also added to the collection object, which is now preferred to the one on the contract.

Related issues

Manual testing steps

  1. Import a wallet containing NFTs on mainnet
  2. Enable NFT autodetection in settings, verify the NFTs appear
  3. Verify descriptions, collection/token images are correct

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@bergeron bergeron requested a review from a team as a code owner December 21, 2023 14:17
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@bergeron bergeron merged commit 161fa4f into develop Dec 21, 2023
@bergeron bergeron deleted the brian/os-supply branch December 21, 2023 14:50
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@metamaskbot metamaskbot added the release-11.9.0 Issue or pull request that will be included in release 11.9.0 label Dec 21, 2023
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1f83910]
Page Load Metrics (1535 ± 171 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1024391849747
domContentLoaded16213475225
load85621891535356171
domInteractive16213475225
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 174 Bytes (0.00%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.9.0 Issue or pull request that will be included in release 11.9.0 team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants