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

feat: multichain detect tokens feat #12417

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

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Nov 25, 2024

Description

PR to add the multichain autodetection to mobile under a feature flag

Related issues

Fixes:

Manual testing steps

  1. run PORTFOLIO_VIEW yarn watch
  2. run yarn start:ios
  3. check if the tokens autodetection is multichained

Screenshots/Recordings

Before

After

after.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.

@salimtb salimtb marked this pull request as ready for review November 25, 2024 19:22
@salimtb salimtb requested review from a team as code owners November 25, 2024 19:22
@salimtb salimtb changed the title Salim/multichain detect tokens feat feat: multichain detect tokens feat Nov 25, 2024
@salimtb salimtb requested review from a team as code owners November 26, 2024 10:10
@salimtb salimtb force-pushed the salim/multichain-detect-tokens-feat branch 2 times, most recently from 83504b2 to 9bac771 Compare November 26, 2024 10:28
@salimtb salimtb requested review from a team and removed request for a team November 26, 2024 10:40
@salimtb salimtb requested a review from a team as a code owner November 26, 2024 17:43
@salimtb salimtb force-pushed the salim/multichain-detect-tokens-feat branch from c97faed to a92a4d5 Compare November 26, 2024 17:57
@salimtb salimtb added team-assets needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. portfolio-view Used for PRs and issues related to Q4 2024 portfolio view labels Nov 26, 2024
@salimtb salimtb force-pushed the salim/multichain-detect-tokens-feat branch from a92a4d5 to e395402 Compare November 26, 2024 18:31
@salimtb salimtb removed the request for review from a team November 26, 2024 18:31
@salimtb salimtb added the Run Smoke E2E Triggers smoke e2e on Bitrise label Nov 26, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 6e38ade
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ff7e119a-b258-48c5-a04b-2e41885f7d9a

Note

  • This comment will auto-update when build completes
  • 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

@salimtb salimtb force-pushed the salim/multichain-detect-tokens-feat branch from 66ac45f to bd8fcc8 Compare November 26, 2024 20:57
@MetaMask MetaMask deleted a comment from sonarcloud bot Nov 26, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 26, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: bd8fcc8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b3d58362-a3e3-4955-9d2e-efcdd3b01701

Note

  • This comment will auto-update when build completes
  • 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

@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 26, 2024
Copy link
Contributor

github-actions bot commented Nov 26, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: c22734c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3b38ec14-4dae-4bb6-ad34-5f34b0e9b232

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

@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 28, 2024
Copy link
Contributor

github-actions bot commented Nov 28, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 5b8756b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/13537b04-6cd4-4b5a-87dc-cf4f68c683de

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

sonarcloud bot commented Nov 28, 2024

import { useNavigation } from '@react-navigation/native';
import { useSelector } from 'react-redux';
import AssetOptions from './AssetOptions';
// import { strings } from '../../../../locales/i18n';
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 remove this commented code?

tokensToIgnore.length > 0 &&
(await TokensController.ignoreTokens(tokensToIgnore));
if (tokensToIgnore.length > 0) {
const tokensToIgnoreByChainId = tokensToIgnore.reduce<
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to retry a more performance approach here, but need some more time to think about this just flagging with this comment

if (tokensToImport.length > 0) {
await TokensController.addTokens(tokensToImport, networkClientId);
if (isPortfolioViewEnabled) {
const tokensByChainId = tokensToImport.reduce<
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

// TODO: This isn't working fully, once a network has been selected then it
// can detect all tokens in that network. But by default it only shows
// detected tokens if the user has chosen it in the past
export const selectAllDetectedTokensFlat = createSelector(
Copy link
Contributor

Choose a reason for hiding this comment

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

It also seams that this can create a big burden performance qise if the user have a lot of tokens, we should try to get it optimized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. portfolio-view Used for PRs and issues related to Q4 2024 portfolio view Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants