Skip to content

feat: Multichain NFT import #14748

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

feat: Multichain NFT import #14748

wants to merge 35 commits into from

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Apr 19, 2025

Description

  1. Adds NetworkSelector to NFT import flow
  2. Adds networkClientId and userAddress signature to NftController.removeAndIgnoreNft calls
  3. Adds networkClientId signature to NftController.addNft calls

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Screen.Recording.2025-04-18.at.5.21.36.PM.mov

Pre-merge author checklist

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.

Copy link
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.

@gambinish gambinish added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 19, 2025
Copy link
Contributor

github-actions bot commented Apr 19, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 14a546d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0a9e88df-1e78-44a2-99cc-170c29682823

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 21, 2025
Copy link
Contributor

github-actions bot commented Apr 21, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 7ab19b1
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2f52b3f3-5fc4-4c0a-8325-822f29252787

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 21, 2025
Copy link
Contributor

github-actions bot commented Apr 21, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 678666d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e47ccbe9-cc5a-434b-8049-74132b7e5f80

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 22, 2025
Copy link
Contributor

github-actions bot commented Apr 22, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1f58f3e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f92dc0a0-efcd-4a76-987e-a397d76fa1e3

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Contributor

github-actions bot commented Apr 22, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 2e74bf6
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/922302e3-1e80-47fb-aec7-f30adfbab224

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 47.45763% with 31 lines in your changes missing coverage. Please review.

Project coverage is 67.55%. Comparing base (ca4eb16) to head (aa042d5).

Files with missing lines Patch % Lines
app/components/UI/AddCustomCollectible/index.tsx 8.33% 10 Missing and 1 partial ⚠️
app/components/UI/Collectibles/index.js 0.00% 8 Missing ⚠️
app/components/UI/AddCustomCollectible/util.ts 82.35% 3 Missing ⚠️
...ents/UI/AddCustomToken/NetworkSelectorDropdown.tsx 72.72% 2 Missing and 1 partial ⚠️
.../components/UI/CollectibleContractElement/index.js 25.00% 3 Missing ⚠️
app/components/Views/NftOptions/NftOptions.tsx 66.66% 1 Missing and 1 partial ⚠️
app/components/Views/AddAsset/AddAsset.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14748      +/-   ##
==========================================
+ Coverage   67.50%   67.55%   +0.04%     
==========================================
  Files        2307     2309       +2     
  Lines       49618    49648      +30     
  Branches     7198     7205       +7     
==========================================
+ Hits        33496    33541      +45     
+ Misses      14005    13986      -19     
- Partials     2117     2121       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gambinish gambinish removed the DO-NOT-MERGE Pull requests that should not be merged label Apr 22, 2025
@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 23, 2025
Copy link
Contributor

github-actions bot commented Apr 23, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 673957d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/872bc3f6-dde8-41c3-a7b3-6b7738a68095

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
64.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@gambinish gambinish added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 23, 2025
Copy link
Contributor

github-actions bot commented Apr 23, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1034417
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4ef585f2-952a-47c2-bcd6-8ddd590b563b

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@@ -197,6 +168,7 @@ const AddCustomCollectible = ({
// TODO: Replace "any" with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { NftController } = Engine.context as any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding comment here because i couldn't add a comment on the correct line ^^"
But there is a logic before adding NFT that validates collectible address validateCustomCollectible and ownership
validateCollectibleOwnership; I think those should be updated as well to pass the networkClientId of the network the user has selected.

@@ -282,6 +282,13 @@ const AddAsset = () => {
<AddCustomCollectible
navigation={navigation}
collectibleContract={collectibleContract}
selectedNetwork={
selectedNetwork
? networkConfigurations?.[selectedNetwork as Hex]?.name
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we pass the networkConfiguration object instead of just the name? and leave it to the component to display the name?
I think the AddCustomCollectible would also need the networkclientId from the networkConfiguration to pass it down to the controller fcts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Remove GNS Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants