Skip to content

Conversation

@sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Mar 4, 2024

Description

Fetches NFT metadata when IPFS toggle or Display media toggle are on

Open in GitHub Codespaces

Related issues

Core PR: MetaMask/core#4008

Manual testing steps

  1. Go to settings and disable IPFS toggle and disable display Media toggle
  2. Import an NFT (where metadata is hosted on IPFS)
  3. Enable IPFS toggle
  4. You should see the image on the home page
  5. Import an NFT where NFT metadata are hosted on https server
  6. Go to settings and enable the display media toggle
  7. You should see the NFT metadata on home page

Screenshots/Recordings

Before

Screen.Recording.2024-03-04.at.14.31.31.mov

After

videoAfter.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 March 4, 2024 12:49
@sahar-fehri sahar-fehri marked this pull request as draft March 4, 2024 12:49
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2024

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
Copy link
Contributor Author

update-policies

@sahar-fehri sahar-fehri marked this pull request as ready for review March 4, 2024 15:18
@sahar-fehri sahar-fehri self-assigned this Mar 4, 2024
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
+ * @param userAddress - The current user address
+ */
+ updateNftMetadata(nfts, networkClientId, userAddress = this.config.selectedAddress) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here are the steps how this file was generated:
1- Updated node-modules NftController.js (by adding my new fct)
2- yarn patch @metamask/assets-controllers --update
3- I updated the nftController.js file under /private/var/folders/j2/z5v3y5wd23z_9ldp7tkknszh0000gn/T/xfs-6b6a5943/user
4- yarn patch-commit -s /private/var/folders/j2/z5v3y5wd23z_9ldp7tkknszh0000gn/T/xfs-6b6a5943/user

@metamaskbot
Copy link
Collaborator

Builds ready [82fab54]
Page Load Metrics (1405 ± 270 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint681731162110
domContentLoaded97826199
load9218511405563270
domInteractive97726199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 46 Bytes (0.00%)
  • ui: 775 Bytes (0.01%)
  • common: 527 Bytes (0.01%)

@codecov
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 60.71429% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 68.63%. Comparing base (ffd58dd) to head (c563892).

❗ Current head c563892 differs from pull request most recent head 9f2a51e. Consider uploading reports for the commit 9f2a51e to get more accurate results

Files Patch % Lines
ui/components/app/nfts-tab/nfts-tab.js 40.00% 9 Missing ⚠️
ui/store/actions.ts 84.62% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #23293      +/-   ##
===========================================
+ Coverage    68.45%   68.63%   +0.19%     
===========================================
  Files         1141     1099      -42     
  Lines        43769    43387     -382     
  Branches     11729    11593     -136     
===========================================
- Hits         29958    29778     -180     
+ Misses       13811    13609     -202     

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

@metamaskbot
Copy link
Collaborator

Builds ready [c563892]
Page Load Metrics (1047 ± 382 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint622381213919
domContentLoaded978342411
load5818741047795382
domInteractive978342411
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 46 Bytes (0.00%)
  • ui: 798 Bytes (0.01%)
  • common: 548 Bytes (0.01%)

@sahar-fehri sahar-fehri force-pushed the fix/fix-import-nft-when-toggle-off branch from c563892 to 590eb72 Compare March 18, 2024 16:54
@socket-security
Copy link

socket-security bot commented Mar 18, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@sahar-fehri sahar-fehri force-pushed the fix/fix-import-nft-when-toggle-off branch from c38fe3e to 5e4bc8c Compare March 18, 2024 17:01
@sahar-fehri sahar-fehri force-pushed the fix/fix-import-nft-when-toggle-off branch from 5e4bc8c to 9f2a51e Compare March 18, 2024 17:04
@sahar-fehri
Copy link
Contributor Author

closing this in favor of this #23558

@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants