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

fix: refresh ownership status for nfts #8230

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

sahar-fehri
Copy link
Contributor

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

Description

When a user transfers an NFT, he will still be able to see it on the NFT tab view.
This PR refreshes the NFTs owned by the user and displays only the ones currently owned by him.

Related issues

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

Manual testing steps

  1. Mint an NFT using one of your accounts(ACC1).
  2. Go to NFTs tab and make sure you can see your minted NFT.
  3. Transfer the NFT to another account (ACC2), i used REMIX solidity IDE to deploy my contract and transfer the NFT.
  4. Go to the account you sent the NFT to (ACC2)
  5. Import NFT (enter address and tokenId)
  6. Make sure you can see the NFT sent by ACC1
  7. Go back to NFTs tab on ACC1 and make sure you no longuer see the NFT in your list

Screenshots/Recordings

Before

Account2 transferred the three nfts to Account test, and yet you still see the nfts displayed on account2.

Screen.Recording.2024-01-09.at.19.04.20.mov

After

Returning to account2 and refreshing the page, will remove the nft from the list.

final4.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 9, 2024 19:02
Copy link
Contributor

github-actions bot commented Jan 9, 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

I have read the CLA Document and I hereby sign the CLA

@sahar-fehri sahar-fehri added the team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead label Jan 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

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

Comparison is base (b2c9d98) 39.64% compared to head (65969eb) 39.64%.
Report is 10 commits behind head on main.

Files Patch % Lines
app/components/UI/CollectibleContracts/index.js 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8230   +/-   ##
=======================================
  Coverage   39.64%   39.64%           
=======================================
  Files        1233     1233           
  Lines       29830    29822    -8     
  Branches     2840     2840           
=======================================
- Hits        11826    11824    -2     
+ Misses      17315    17309    -6     
  Partials      689      689           

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

@sethkfman sethkfman added the release-7.15.0 Issue or pull request that will be included in release 7.15.0 label Jan 9, 2024
Copy link
Contributor

github-actions bot commented Jan 9, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8b7371f9-a52f-4f8d-a736-65132be7d714
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

sethkfman
sethkfman previously approved these changes Jan 10, 2024
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

hey @sahar-fehri can we confirm this also works on android? If possible can you add unit test coverage for this particular flow?

Also can you confirm that this bug no longer exists on your PR: #3406

@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-103-rm-nfts-not-owned-by-user branch from 9eb85d6 to 6996c55 Compare January 11, 2024 15:56
@sahar-fehri
Copy link
Contributor Author

hey @sahar-fehri can we confirm this also works on android? If possible can you add unit test coverage for this particular flow?

Also can you confirm that this bug no longer exists on your PR: #3406

hey @cortisiko I have tested it on Android also, no issues. I have added a unit test for my change, also i dnt see the problem described on PR: #3406 on my PR 🙏

Copy link

sonarcloud bot commented Jan 11, 2024

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

✅ ✅ ✅ ✅ ✅

@sahar-fehri sahar-fehri merged commit a78c0c6 into main Jan 11, 2024
26 checks passed
@sahar-fehri sahar-fehri deleted the fix/MMASSETS-103-rm-nfts-not-owned-by-user branch January 11, 2024 16:56
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.15.0 Issue or pull request that will be included in release 7.15.0 team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants