Skip to content

fix: update nft metadata on page refresh#8348

Merged
sahar-fehri merged 8 commits into
mainfrom
fix/MMASSETS-105-refresh-nft-metadata
Jan 31, 2024
Merged

fix: update nft metadata on page refresh#8348
sahar-fehri merged 8 commits into
mainfrom
fix/MMASSETS-105-refresh-nft-metadata

Conversation

@sahar-fehri

@sahar-fehri sahar-fehri commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Description

This PR fixes nft metadata refresh when the user refreshes the page

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-105

Manual testing steps

  1. Mint an NFT. (I used REMIX)
  2. Go to NFT tab and import the NFT
  3. You should be able to see the NFT image
  4. Update the NFT image
  5. Pull down the page to refresh and notice that the image is updated

Screenshots/Recordings

Before

saved1.mov

After

Screen.Recording.2024-01-19.at.16.05.35.mov
Screen.Recording.2024-01-22.at.20.02.25.mov

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.

@sahar-fehri sahar-fehri requested a review from a team as a code owner January 19, 2024 15:13
@sahar-fehri sahar-fehri self-assigned this Jan 19, 2024
@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.

@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-105-refresh-nft-metadata branch from 5d91549 to 8787eea Compare January 19, 2024 15:15
@codecov-commenter

codecov-commenter commented Jan 19, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (4dd9073) 40.62% compared to head (83527ac) 40.66%.

❗ Current head 83527ac differs from pull request most recent head 911c69e. Consider uploading reports for the commit 911c69e to get more accurate results

Files Patch % Lines
app/components/UI/CollectibleContracts/index.js 78.57% 3 Missing ⚠️
.../components/UI/CollectibleContractElement/index.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8348      +/-   ##
==========================================
+ Coverage   40.62%   40.66%   +0.04%     
==========================================
  Files        1239     1239              
  Lines       29989    30000      +11     
  Branches     2870     2870              
==========================================
+ Hits        12182    12200      +18     
+ Misses      17109    17103       -6     
+ Partials      698      697       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread app/components/UI/CollectibleContracts/index.js Outdated
Comment thread app/components/UI/CollectibleContracts/index.js Outdated
@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-105-refresh-nft-metadata branch from ebed445 to 942c377 Compare January 22, 2024 11:20

@NicolasMassart NicolasMassart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work!
Test follows good testing practices and should provide good coverage of you refresh fixes.
I added some suggestion and questions, I'm curious to know more about reason for the removal of removeNft.

Comment thread app/components/UI/CollectibleContracts/index.js Outdated
Comment thread app/components/UI/CollectibleContracts/index.test.tsx Outdated
Comment thread app/components/UI/CollectibleContracts/index.test.tsx Outdated
Comment thread app/components/UI/CollectibleContracts/index.test.tsx Outdated

@chrisleewilcox chrisleewilcox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @sahar-fehri looking forward to getting this merged. Can you also provide recordings of this feature on android emulator? We have different types of challenges with NFTs displaying properly on iOS and android.

@sahar-fehri

Copy link
Copy Markdown
Contributor Author

Hi @sahar-fehri looking forward to getting this merged. Can you also provide recordings of this feature on android emulator? We have different types of challenges with NFTs displaying properly on iOS and android.

Hello @chrisleewilcox i have updated the video for Android in the description above, lemme know if anything 🙏

@chrisleewilcox

Copy link
Copy Markdown
Contributor

chrisleewilcox
chrisleewilcox previously approved these changes Jan 23, 2024

@chrisleewilcox chrisleewilcox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread app/components/UI/CollectibleContracts/index.js Outdated
tommasini
tommasini previously approved these changes Jan 31, 2024

@tommasini tommasini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Just if possible address the minor comment

Comment thread app/components/UI/CollectibleContracts/index.js Outdated
@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-105-refresh-nft-metadata branch from 83527ac to 911c69e Compare January 31, 2024 13:31
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
75.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@github-actions

Copy link
Copy Markdown
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/30cafa7b-55a1-4bb2-8a10-e3363e010dfd
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@sahar-fehri sahar-fehri merged commit 451d710 into main Jan 31, 2024
@sahar-fehri sahar-fehri deleted the fix/MMASSETS-105-refresh-nft-metadata branch January 31, 2024 14:59
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 31, 2024
@metamaskbot metamaskbot added the release-7.17.0 Issue or pull request that will be included in release 7.17.0 label Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.17.0 Issue or pull request that will be included in release 7.17.0 team-assets team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants