-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(linea): enable token detection for Linea mainnet and testnet #20698
Conversation
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. |
Token detection was never enabled in the extension code although the APIs we rely on for token detection do support Linea mainnet and testnet.
94517fa
to
571f6f9
Compare
Builds ready [571f6f9]
Page Load Metrics (1515 ± 32 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
Thank you all for the reviews. @chloeYue I didn't personally manage to test this PR because I don't have a test account with ERC20 tokens on Linea Mainnet and Linea Goerli. Is there a test account we can use internally for such tests? |
Hello, we don't have testing account that have tokens on Mainnet, i could only test token detection on Linea Goerli with personal account. |
I now have USDC on Linea Mainnet and Linea Goerli on a test account. Here's the manual import feature, which works: https://recordit.co/O7wi2n8wxL Here's the automated detection feature, which doesn't work on my side: => @chloeYue is it the automated detection feature that you managed to test? |
Hi there, what's the status? IIUC it can be merged but it has not been merged yet? |
QA update: I tested again on LINEA testnet, the token detection didn't work. It's weird i had difference behaviour than last time, i'm not sure any more maybe the last time i did something wrong while testing. I removed the QA-passed label for this PR, i think we need more investigation. cc: @gauthierpetetin |
Thanks a lot guys. |
To achieve the goal of this PR, the That means that For For For |
Thanks @danjm , here's a quick recap of what remains to be done:
=> ✅ This is done in this PR
=> ✅ This is done (see here for LINEA_MAINNET and here for LINEA_GOERLI)
=> 🚧 PR is open on core repo. It needs to be merged. Once merged, a new version of |
…i networks (#1799) ## Explanation The purpose of this PR is to enable token detection on Linea Mainnet and Linea Goerli networks. [BalanceChecker](https://github.com/wbobeirne/eth-balance-checker) smart contract has been deployed on both networks and its address needs to be indicated in AssetsContractController.ts. ## References * Unblocks MetaMask/metamask-extension#20698 ## Changelog ### `'@metamask/assets-controllers` - **ADDED**: Support token detection on Linea Mainnet and Linea Goerli networks ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
Adding |
The PR on core repo got merged. |
…i networks (#1799) ## Explanation The purpose of this PR is to enable token detection on Linea Mainnet and Linea Goerli networks. [BalanceChecker](https://github.com/wbobeirne/eth-balance-checker) smart contract has been deployed on both networks and its address needs to be indicated in AssetsContractController.ts. ## References * Unblocks MetaMask/metamask-extension#20698 ## Changelog ### `'@metamask/assets-controllers` - **ADDED**: Support token detection on Linea Mainnet and Linea Goerli networks ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
…i networks (#1799) ## Explanation The purpose of this PR is to enable token detection on Linea Mainnet and Linea Goerli networks. [BalanceChecker](https://github.com/wbobeirne/eth-balance-checker) smart contract has been deployed on both networks and its address needs to be indicated in AssetsContractController.ts. ## References * Unblocks MetaMask/metamask-extension#20698 ## Changelog ### `'@metamask/assets-controllers` - **ADDED**: Support token detection on Linea Mainnet and Linea Goerli networks ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
…i networks (#1799) ## Explanation The purpose of this PR is to enable token detection on Linea Mainnet and Linea Goerli networks. [BalanceChecker](https://github.com/wbobeirne/eth-balance-checker) smart contract has been deployed on both networks and its address needs to be indicated in AssetsContractController.ts. ## References * Unblocks MetaMask/metamask-extension#20698 ## Changelog ### `'@metamask/assets-controllers` - **ADDED**: Support token detection on Linea Mainnet and Linea Goerli networks ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
Here's a recording of the feature on Linea Mainnet: https://recordit.co/hJqmQJWy0g |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #20698 +/- ##
===========================================
- Coverage 68.61% 68.60% -0.01%
===========================================
Files 1030 1030
Lines 41023 41029 +6
Branches 10946 10950 +4
===========================================
+ Hits 28145 28147 +2
- Misses 12878 12882 +4
☔ View full report in Codecov by Sentry. |
Builds ready [b9d9477]
Page Load Metrics (1010 ± 406 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Here's an example of response we receive from Token-API:
You can notice Due to this condition, tokens will never be detected on Linea Goerli, despite the feature being implemented, because there is only one single cc @danjm @pedronfigueiredo maybe we're fine with this behaviour, or maybe an alternative could be to remove this "3 |
This PR got unblocked by the upgrade of assets controllers to version 16 finalised by @pedronfigueiredo today. |
Builds ready [161100f]
Page Load Metrics (947 ± 409 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Tested with the latest build, behaviour is as expected. Auto-detect works for Linea Mainnet. QA-passed for this PR. Screen.Recording.2023-10-20.at.17.10.02.mov |
Explanation
Token detection was never enabled in the extension code although the APIs we rely on for token detection do support Linea Mainnet and Linea Goerli.
Work needed:
Screenshots/Screencaps
Before
After
TBD
Manual Testing Steps
0x176211869cA2b568f2A7D4EE941E073a821EE1ff
and symbolUSDC
=> Acceptance criteria: Successful import.0xb4257f31750961c8e536f5cfcbb3079437700416
and symbolUSDC
=> Acceptance criteria: Successful import.Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.