Fix: use estimate gas instead of fixed gas#22374
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. |
|
Contract successfully deployed: gas.mov |
## **Description** OpenSea renamed the field `supply`, which used to be required, to `total_supply`. Fixes the error: `undefined is not an object (evaluating 'contract.supply.toString')` Which prevented some NFTs from loading. A more accurate `total_supply` was also added to the collection object, which is now preferred to the one on the contract. ## **Related issues** ## **Manual testing steps** 1. Import a wallet containing NFTs on mainnet 2. Enable NFT autodetection in settings, verify the NFTs appear 3. Verify descriptions, collection/token images are correct ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [ ] I've linked related issues - [x] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [x] 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.
## **Description** This is an automation test for toggling the hex data. The user should be able to input text via the send transaction feature. <!-- In this simple automation test, the user activates the toggle to display hexa data. Once the toggle is turned on, there should be a HexData text box in the 'send transaction' section, allowing the user to successfully complete the transaction. --> ## **Related issues** Fixes: #22271 ## **Manual testing steps** 1. Go to User settings page 2. In the advanced tab, there should be toggle for "Show Hex Data" 3. In the send transaction, verify that the HexData text box appears. ## **Screenshots/Recordings** <!----> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] 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.
## **Description** Adds the ledger-iframe to the offscreen document and establishes MV3 support for ledger. This is done by the following method: 1. ledger-iframe.ts interfaces with the ledger keyring iframe, working as a middle layer between the two. Messages received by the offscreen document that target the ledger iframe will be forwarded to the ledger keyring iframe (the github pages generated content from @MetaMask/eth-ledger-bridge-keyring. A callback manager uses an incremental id to assign an id to each message which is returned in the response such that a callback can be declared only for a specific id. 2. ledger-offscreen-bridge.ts is a bridge for the LedgerKeyring that interfaces with the offscreen document such that when the keyring calls out for specific methods, it calls into the offscreen bridge and then the communication is sent to the offscreen document and forwarded to the keyring iframe. In addition some more cleanup of the #18794 deprecation of u2f and ledger live. We no longer support setting any other method than the browsers lowest level method for connecting. For chrome webhid is the gold standard, for firefox which doesn't support webhid we use u2f. There were still a number of places in the code that reference the transportType from preferences and migrations were done to change the value for many users when we only need to know what the support for those two protocols are. So firstly it changes the setLedgerTransportPreference to not take an input, but rather just uses the browsers support of navigator.hid to determine whether to use webhid or u2f. When #18794 landed service workers did not have access to webhid, now they do, so this is a viable approach. I also added deprecation messages where appropriate. In a future PR we should go through and remove any usages of the preference. Ideally we'd also set the transport type for the ledger device closer to the bridge, however i'm not familiar with the unlock mechanism of the keyring and trying to do this was causing issues with the mv3 connectivity. ## **Related issues** Fixes #17724 - No longer relevant because background/service workers have access to window.navigator.webhid Fixes #21624 - Connects ledger to offscreen doc ## **Screenshots/Recordings** ## **Manual testing steps** 1. run `yarn start:mv3` 2. reload the extension in your browser. 3. try to add a ledger device. (Remember you must have your device unlocked and the ethereum app open on your ledger 4. Try to use the test dapp to send tx, sign messages, etc. ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [x] 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.
## **Description** Move `FormTextField` js version into deprecated folder with deprecation notice Update import of any production uses for `FormTextField` to the js version Update/create TS version of FormTextField <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Related issues** Fixes: #19120 ## **Manual testing steps** 1. Run storybook 2. [Visit FormTextField](http://localhost:6006/?path=/docs/components-componentlibrary-formtextfield--docs) 3. Test inputs and props ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/MetaMask/metamask-extension/assets/26469696/94f335e5-aa48-49e1-88f7-08d5660a309a <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [X] I've clearly explained what problem this PR is solving and how it is solved. - [X] I've linked related issues - [X] I've included manual testing steps - [X] I've included screenshots/recordings if applicable - [X] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). 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. --------- Co-authored-by: George Marshall <george.marshall@consensys.net>
## **Description** This PR addresses some issues that were identified by @Gudahtt when reviewing the diff for v11.7.3 (#22354), although the comments were put on the v11.7.2 PR, because what is currently 11.7.3 was once 11.7.2: #22336    ## **Manual testing steps** 1. The token testing scenarios should all pass https://github.com/MetaMask/metamask-extension/tree/develop/test/scenarios/4.%20tokens 2. Fiat values for erc20 tokens should be correctly displayed 3. For the scenarios in 1 and 2 related to autodetection and token display, the tests should also pass after switching networks and switching networks multiple times in short succession ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). 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.
|
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
Upon review all checks pass |
|
No issues found with the transaction regression. |
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #22374 +/- ##
===========================================
+ Coverage 68.10% 68.15% +0.06%
===========================================
Files 1083 1081 -2
Lines 42477 42295 -182
Branches 11357 11302 -55
===========================================
- Hits 28925 28826 -99
+ Misses 13552 13469 -83 ☔ View full report in Codecov by Sentry. |
|
@metamaskbot update-policies |
|
No policy changes |
ea8bc7f to
5089265
Compare
5c68509
8dc06d7 to
5c68509
Compare
Description
Update the transaction controller to:
gas.See related core PR.
Related issues
Fixes: #22359
Manual testing steps
Scenario of the error
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist