-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Implement redesigned gas fee modal #15234
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
Conversation
|
app/components/Views/confirmations/components/UI/bottom-modal/bottom-modal.tsx
Show resolved
Hide resolved
...ts/Views/confirmations/components/modals/gas-fee-modal/hooks/useAdvancedGasFeeOption.test.ts
Outdated
Show resolved
Hide resolved
...confirmations/components/modals/gas-fee-modal/components/gas-limit-input/gas-limit-input.tsx
Outdated
Show resolved
Hide resolved
...confirmations/components/modals/gas-fee-modal/components/gas-limit-input/gas-limit-input.tsx
Outdated
Show resolved
Hide resolved
...rmations/components/modals/gas-fee-modal/components/gas-limit-input/gas-limit-input.test.tsx
Outdated
Show resolved
Hide resolved
...nents/Views/confirmations/components/modals/gas-fee-modal/hooks/useGasPriceEstimateOption.ts
Outdated
Show resolved
Hide resolved
...ons/components/modals/gas-fee-modal/modals/advanced-eip1559-modal/advanced-eip1559-modal.tsx
Outdated
Show resolved
Hide resolved
...ons/components/modals/gas-fee-modal/modals/advanced-eip1559-modal/advanced-eip1559-modal.tsx
Outdated
Show resolved
Hide resolved
...ponents/Views/confirmations/components/rows/transactions/gas-fee-details/gas-fee-details.tsx
Outdated
Show resolved
Hide resolved
...components/modals/gas-fee-modal/modals/advanced-gas-price-modal/advanced-gas-price-modal.tsx
Outdated
Show resolved
Hide resolved
|
…contains gas values for `legacy` transactions (#5821) ## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> This PR aims to add `userFeeLevel` as `dappSuggested` initially when `txParams` contains gas values also for `legacy` transactions. ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> * Issue found while implementing gas modal: MetaMask/metamask-mobile#15234 ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## Checklist - [X] I've updated the test suite for new or updated code as appropriate - [X] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [X] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [X] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
...ents/Views/confirmations/components/modals/advanced-eip1559-modal/advanced-eip1559-modal.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/gas/useGasPriceEstimateOption.ts
Show resolved
Hide resolved
...ponents/Views/confirmations/components/rows/transactions/gas-fee-details/gas-fee-details.tsx
Outdated
Show resolved
Hide resolved
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> <!-- 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? --> This PR aims to add gas modal metrics. Fixes: MetaMask/mobile-planning#2194 N/A <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- [screenshots/recordings] --> <!-- [screenshots/recordings] --> - [X] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] 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.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> <!-- 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? --> This PR aims to implement gas input validations. To see it in action, please see the recordings below. Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4919 N/A <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/222338d4-8bf9-4421-b121-e66dd9a7b2c3 https://github.com/user-attachments/assets/6d7fc75e-34f0-4c80-afc6-153014b24172 - [X] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] 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.
|
|
E2e failures on smoke confirmations are expected: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/023c8e5c-d633-4884-8049-2123ee47e896 They are failing on different reason, explained here: https://consensys.slack.com/archives/C02U025CVU4/p1748480127828199 |
Description
This PR aims to implement redesigned gas fee modal.
It validates all cases below:
✅ - EIP1559 transaction with
dapp-suggested
gas values✅ - EIP1559 transaction with
fee-market
gas estimates✅ - EIP1559 transaction with
gasPrice
estimate✅ - EIP1559 transaction with
legacy
gas estimates - (BSC Only option)✅ - Legacy transaction with
dapp-suggested
gas values✅ - Legacy transaction with
fee-market
gas estimates✅ - Legacy transaction with
gasPrice
estimate✅ - Legacy transaction with
legacy
gas estimates - (BSC Only option)✅ - Wallet initiated with
fee-market
gas estimates (EIP-1559)✅ - Wallet initiated with
legacy
gas estimates (EIP-1559) - (BSC Only option)✅ - Wallet initiated with
gasPrice
estimates (EIP-1559)There are couple recordings added for demonstrate in the recordings section. Manual QA of this component will be done only after
transfer
confirmation is enabled.Following tasks will be handled separately
❌ - Save values for the network - Won't do as team decided
✅ - Metrics implementation
✅ - Advanced gas modal validations
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4831
Manual testing steps
Only possible to test it out via setting FEATURE_FLAG_REDESIGNED_TRANSFER to true
Screenshots/Recordings
Before
After
Wallet initiated EIP1559 transaction
Wallet.initiated.EIP1559.transaction.mp4
DApp initiated EIP1559 transaction
DApp.initiated.EIP1559.transaction.mp4
DApp initiated legacy transaction
DApp.initiated.Legacy.transaction.mp4
DApp initiated EIP1559 without dapp suggestion
DApp.initiated.EIP1559.without.dapp.suggestion.mp4
Pre-merge author checklist
Pre-merge reviewer checklist