-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[EIP1559] Base for Edit Gas Fee screen #2798
Merged
andrepimenta
merged 53 commits into
develop
from
feature/eip1559-base-edit-gas-fee-screen
Jul 28, 2021
Merged
[EIP1559] Base for Edit Gas Fee screen #2798
andrepimenta
merged 53 commits into
develop
from
feature/eip1559-base-edit-gas-fee-screen
Jul 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add Range Input component and advanced options to the screen * Forgot translation for 1 string * add useCallback to functions and props description * Check limits * Add optional chaining * Add tests
* Initial design * Added warning and learn more * Fix margins
* Add Range Input component and advanced options to the screen * Forgot translation for 1 string * add useCallback to functions and props description * Check limits * Add optional chaining * Add tests
* Initial design * Added warning and learn more * Fix margins
rickycodes
force-pushed
the
feature/eip1559-base-edit-gas-fee-screen
branch
from
June 29, 2021 18:00
5ffa183
to
c15b4f8
Compare
…thub.com/MetaMask/metamask-mobile into feature/eip1559-base-edit-gas-fee-screen # Conflicts: # locales/languages/en.json
* add controller from disk * First swing * Receiving props working * Add test * update tgz * idk * update maxFeePerGas * cleanup * update tgz * fix * update tgz * update tgz * update controller * Add todos Co-authored-by: andrepimenta <[email protected]>
* add controller from disk * First swing * Initial UI - hardcoded values * Receiving props working * Add test * update tgz * conversions like extension * advancing with calculations * idk * Conversions finished * Pass params to summary UI * Show edit gas fee modal * Finished sending gas values to components * Design fixes * update maxFeePerGas * cleanup * update tgz * fix * update tgz * Time estimates working * update tgz * Gas limit working * Fix refreshing values when on the edit screen * Update props descriptions and unit tests * update controller * Add todo Co-authored-by: Ricky Miller <[email protected]>
…UI (#2870) * Legacy gas mainnet working * eth_gasPrice working * Prepare transaction * Dapp transaction UI working * ERC20 dapp transaction ui working * Approve UI working * Fix dapp transcation screen * Fix styles * Prepare dapp transaction * Approve tokens prepare transaction * [EIP1559] validations (#2879) * Range input validations and low/high * Using bignumber * Send flow validations * Approve allowance errors * Validate on confirm * Show warning dapp suggested gas * Validate dapp transaction * Remove console log * Add tests * Add last test * Add props description and refactor compute gas estimates * Fix merge typo * Convert to string and add new controller * Update controller, eip transactions working * Dapp suggested EIP1559 gas * Move nonce to its own component and add some tests * Ignore eip1559 gas suggestion when on legacy networks * Update copy * Fix selected gas temp * Update tests * Fix approve * Remove console.log * Set gas limit if transaction does not have one already * Export calculateEIP1559Times & ignoreOptions and recommend label * Update tests * warningMinimumEstimateOption & suggestedEstimateOption * Update tests * Fix feedback * [EIP1559] Add SwapsController and gas edit modal (#2892) * Fix swaps-controller Co-authored-by: Pedro Pablo Aste Kompen <[email protected]>
* Legacy gas mainnet working * eth_gasPrice working * Prepare transaction * Dapp transaction UI working * ERC20 dapp transaction ui working * Approve UI working * Fix dapp transcation screen * Fix styles * Prepare dapp transaction * Approve tokens prepare transaction * [EIP1559] validations (#2879) * Range input validations and low/high * Using bignumber * Send flow validations * Approve allowance errors * Validate on confirm * Show warning dapp suggested gas * Validate dapp transaction * Remove console log * Add tests * Add last test * Add props description and refactor compute gas estimates * Fix merge typo * Convert to string and add new controller * Update controller, eip transactions working * Dapp suggested EIP1559 gas * Move nonce to its own component and add some tests * Ignore eip1559 gas suggestion when on legacy networks * Update copy * Fix selected gas temp * Update tests * Fix approve * Remove console.log * Set gas limit if transaction does not have one already * Export calculateEIP1559Times & ignoreOptions and recommend label * Update tests * warningMinimumEstimateOption & suggestedEstimateOption * Update tests * Initial update animations * Send flow update animation working * Animation working on token allowance * Updating animation working on dapp transactions * Start loading work * Loading finished * Update tests * Add props description * Add props description * Update yarn and podfile lock * Add missing package * Animation values variables * Update last snap * Fix typo * Improving animationTime variable * Fix Skeleton component * Replace canAnimate with animateOnChange * Update test * Fix going back to default gas limit * Use transaction.gas * Use fixed web3-provider-engine * Bump web3-provider-engine * Try new yarn lock * Fix style eip1559 transaction summary * Update snapshot * [EIP1559] Feature/UI gas speedup cancel (#2904) * Gas speed up and cancel UI * Legacy work * Revert engine change * Fix hex * Turn parse gas for speed up and cancel into function
# Conflicts: # app/components/Nav/Main/MainNavigator.js # app/components/Nav/Main/__snapshots__/index.test.js.snap # app/components/UI/TransactionReview/index.js # app/components/Views/SendFlow/Confirm/index.js # app/core/Engine.js # ios/Podfile.lock # package.json # yarn.lock
* Transaction history ui changes * Move logic to external function and validate speed up and cancel * Update packages * MULTIPLIER_HEX * Global MULTIPLIER_HEX * Use max gas to calculate insufficient gas
* Transaction history ui changes * Move logic to external function and validate speed up and cancel * Update packages * MULTIPLIER_HEX * Global MULTIPLIER_HEX * Use max gas to calculate insufficient gas * Use TransactionReviewEIP1559 on legacy too * Fix times * Put on swaps * Max priority fee should be max priority fee times gas limit * Update tests * Replace , with . and make sure it is a number * Update test
* Replace , with . and make sure it is a number * Add analytics * Update network_name * Update tests * use ...analyticsParams instead of (analyticsParams || {})
* Use isEIP1559Transaction from controllers * don't import from @metamask/controllers/dist/util
* Accepts component as error or warning * useMemo and fix conversion strings * Update tests
* Move hardcoded strings to locales * Move time params to variable * Update tests
* Add fadeAnimationView * Animation working * Concatenate gas fees for valueToWatch * Add value to watch concatenation * Update proptype for error * Add swaps-controller v5 and fix shine on slider button * Remove hardcoded values and use 15s interval for GasFeeController polling * Remove interval for GasFeeController * Update test Co-authored-by: andrepimenta <[email protected]>
* Fix max functionality * Fix disable * Remove unused props * No need for gasEstimateType on state
ibrahimtaveras00
approved these changes
Jul 24, 2021
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.
QA Passed 👍🏽
Closed
wachunei
approved these changes
Jul 26, 2021
* Polyfill gas price * Check if data exists * Remove eth_estimateGas
…mbers with a lot of decimal places
* Override gas values on gasEstimateType change * Add gasEstimateType change case for custom gas on swaps * Remove console log Co-authored-by: Pedro Pablo Aste Kompen <[email protected]>
# Conflicts: # app/components/UI/Swaps/QuotesView.js # app/components/Views/ApproveView/Approve/index.js # app/core/Engine.js # package.json # yarn.lock
rickycodes
added a commit
that referenced
this pull request
Jan 31, 2022
* [EIP1559] Base for Edit Gas Fee screen * Adding padding to the entire screen * [EIP1559] Feature/eip1559 UI component range input (#2803) * Add Range Input component and advanced options to the screen * Forgot translation for 1 string * add useCallback to functions and props description * Check limits * Add optional chaining * Add tests * [EIP1559] Horizontal Selector (#2815) * [EIP1559] Edit gas fee screen header and button UI (#2818) * Initial design * Added warning and learn more * Fix margins * [EIP1559] Base for Edit Gas Fee screen * Adding padding to the entire screen * [EIP1559] Feature/eip1559 UI component range input (#2803) * Add Range Input component and advanced options to the screen * Forgot translation for 1 string * add useCallback to functions and props description * Check limits * Add optional chaining * Add tests * [EIP1559] Horizontal Selector (#2815) * [EIP1559] Edit gas fee screen header and button UI (#2818) * Initial design * Added warning and learn more * Fix margins * Feature/eip1559 base edit gas fee screen add controller (#2841) * add controller from disk * First swing * Receiving props working * Add test * update tgz * idk * update maxFeePerGas * cleanup * update tgz * fix * update tgz * update tgz * update controller * Add todos Co-authored-by: andrepimenta <[email protected]> * Feature/eip1559 connect EIP1559 Gas Controller values to UI (#2856) * add controller from disk * First swing * Initial UI - hardcoded values * Receiving props working * Add test * update tgz * conversions like extension * advancing with calculations * idk * Conversions finished * Pass params to summary UI * Show edit gas fee modal * Finished sending gas values to components * Design fixes * update maxFeePerGas * cleanup * update tgz * fix * update tgz * Time estimates working * update tgz * Gas limit working * Fix refreshing values when on the edit screen * Update props descriptions and unit tests * update controller * Add todo Co-authored-by: Ricky Miller <[email protected]> * Upgrade to `@metamask/controllers` v12 (#2875) * [EIP1559] Use MetaSwap gas-api (#2880) * [EIP 1559] Send flow Legacy UI & dapp transaction UI & approve token UI (#2870) * Legacy gas mainnet working * eth_gasPrice working * Prepare transaction * Dapp transaction UI working * ERC20 dapp transaction ui working * Approve UI working * Fix dapp transcation screen * Fix styles * Prepare dapp transaction * Approve tokens prepare transaction * [EIP1559] validations (#2879) * Range input validations and low/high * Using bignumber * Send flow validations * Approve allowance errors * Validate on confirm * Show warning dapp suggested gas * Validate dapp transaction * Remove console log * Add tests * Add last test * Add props description and refactor compute gas estimates * Fix merge typo * Convert to string and add new controller * Update controller, eip transactions working * Dapp suggested EIP1559 gas * Move nonce to its own component and add some tests * Ignore eip1559 gas suggestion when on legacy networks * Update copy * Fix selected gas temp * Update tests * Fix approve * Remove console.log * Set gas limit if transaction does not have one already * Export calculateEIP1559Times & ignoreOptions and recommend label * Update tests * warningMinimumEstimateOption & suggestedEstimateOption * Update tests * Fix feedback * [EIP1559] Add SwapsController and gas edit modal (#2892) * Fix swaps-controller Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> * [EIP1559] loading and update animations (#2898) * Legacy gas mainnet working * eth_gasPrice working * Prepare transaction * Dapp transaction UI working * ERC20 dapp transaction ui working * Approve UI working * Fix dapp transcation screen * Fix styles * Prepare dapp transaction * Approve tokens prepare transaction * [EIP1559] validations (#2879) * Range input validations and low/high * Using bignumber * Send flow validations * Approve allowance errors * Validate on confirm * Show warning dapp suggested gas * Validate dapp transaction * Remove console log * Add tests * Add last test * Add props description and refactor compute gas estimates * Fix merge typo * Convert to string and add new controller * Update controller, eip transactions working * Dapp suggested EIP1559 gas * Move nonce to its own component and add some tests * Ignore eip1559 gas suggestion when on legacy networks * Update copy * Fix selected gas temp * Update tests * Fix approve * Remove console.log * Set gas limit if transaction does not have one already * Export calculateEIP1559Times & ignoreOptions and recommend label * Update tests * warningMinimumEstimateOption & suggestedEstimateOption * Update tests * Initial update animations * Send flow update animation working * Animation working on token allowance * Updating animation working on dapp transactions * Start loading work * Loading finished * Update tests * Add props description * Add props description * Update yarn and podfile lock * Add missing package * Animation values variables * Update last snap * Fix typo * Improving animationTime variable * Fix Skeleton component * Replace canAnimate with animateOnChange * Update test * Fix going back to default gas limit * Use transaction.gas * Use fixed web3-provider-engine * Bump web3-provider-engine * Try new yarn lock * Fix style eip1559 transaction summary * Update snapshot * [EIP1559] Feature/UI gas speedup cancel (#2904) * Gas speed up and cancel UI * Legacy work * Revert engine change * Fix hex * Turn parse gas for speed up and cancel into function * Fixes * [EIP1559] Transaction history UI (#2908) * Transaction history ui changes * Move logic to external function and validate speed up and cancel * Update packages * MULTIPLIER_HEX * Global MULTIPLIER_HEX * Use max gas to calculate insufficient gas * [EIP1559] UI adjustments (#2910) * Transaction history ui changes * Move logic to external function and validate speed up and cancel * Update packages * MULTIPLIER_HEX * Global MULTIPLIER_HEX * Use max gas to calculate insufficient gas * Use TransactionReviewEIP1559 on legacy too * Fix times * Put on swaps * Max priority fee should be max priority fee times gas limit * Update tests * Replace , with . and make sure it is a number * Update test * [EIP1559] Analytics (#2916) * Replace , with . and make sure it is a number * Add analytics * Update network_name * Update tests * use ...analyticsParams instead of (analyticsParams || {}) * Use isEIP1559Transaction from controllers (#2918) * Use isEIP1559Transaction from controllers * don't import from @metamask/controllers/dist/util * [EIP1559] Accept component as error or warning (#2920) * Accepts component as error or warning * useMemo and fix conversion strings * Update tests * [EIP1559] Locales (#2922) * Move hardcoded strings to locales * Move time params to variable * Update tests * [EIP1559] Swaps gas calculations (#2905) * Add swaps-controller custom dependency * [EIP1559] adjust UI from QA (#2928) * fix What are gas fees modal * time estimate info modal & fix large modals * Update tests * Use propagateSwipe * Remove empty style * Hot fix estimatedGasLimitHex calculations * [EIP1559] Constants (#2930) * Init constants * Move shallowEqual to utils * Fix ui design * Update test * Update tests * [EIP1559] Swaps UI (#2932) * Add fadeAnimationView * Animation working * Concatenate gas fees for valueToWatch * Add value to watch concatenation * Update proptype for error * Add swaps-controller v5 and fix shine on slider button * Remove hardcoded values and use 15s interval for GasFeeController polling * Remove interval for GasFeeController * Update test Co-authored-by: andrepimenta <[email protected]> * [EIP1559 ]Fix max functionality (#2933) * Fix max functionality * Fix disable * Remove unused props * No need for gasEstimateType on state * Fix transfer tokens * Fix gas limit ERC20 * Fix small devices * Min gas and typo * Fix alert * Remove link for Learn more about gas fees * Update tests * [EIP1559] Polyfill gas price (#2937) * Polyfill gas price * Check if data exists * Remove eth_estimateGas * Update controller to fix the decimal issue and fix UI for handling numbers with a lot of decimal places * [EIP1559] Override gas values on gas estimate type change (#2940) * Override gas values on gasEstimateType change * Add gasEstimateType change case for custom gas on swaps * Remove console log Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> * Fix merge typo * Fix error when accessing overallValueOfQuote * Add new controller. TODO: Use the prod one once it's released Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> Co-authored-by: ricky <[email protected]>
EtherWizard33
added a commit
that referenced
this pull request
Jul 31, 2024
This PR introduces a constant that checks an environment variable. This variable will serve as a feature flag to toggle the multichain feature on and off. ### Purpose: Enable or disable the multichain feature during development and testing. ### Next Steps: Once the multichain development is completed and tested, we will search for the feature flag and remove it, along with any code that has been replaced by the new feature. Closes [#2798](MetaMask/MetaMask-planning#2798) <!-- 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. --> ## **Description** <!-- 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: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **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** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
7 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 18, 2024
## **Description** * '@ethersproject/abi' - Can be cleaned from package.json since it's only used by dependencies ![image](https://github.com/user-attachments/assets/587575bf-8829-4854-8cc5-cc8b0c525fd6) * @react-native-picker/picker - There is no usage for a picker anymore in the mobile app ([Introduced here](#3776)) ![image](https://github.com/user-attachments/assets/8e283096-2d84-44a1-b8f7-fc1bc933af93) * @rnhooks/keyboard - There is no usage for @rnhooks/keyboard ([introduced here](#1994)) ![image](https://github.com/user-attachments/assets/9a3164e1-38dd-40e8-bfc9-92f1cf1cae30) * asyncstorage-down - there is no usage of asyncstorage-down ([introduced here] This one was added back, but most likely isn't needed and we need to think about replacing `react-native-level-fs` and use only one file system library * dnode - there is no usage of dnode ([introduced here](#2798)) ![image](https://github.com/user-attachments/assets/deb346d7-8de3-4681-831f-5aa8bdcf2924)## **Related issues** ![image](https://github.com/user-attachments/assets/04336975-6bea-4f17-96b7-91c942ed4100)Fixes: * obs-store - There is no usage of obs-store anymoer (introruced [here](#1236)) ![image](https://github.com/user-attachments/assets/da362f05-2c71-4628-9c94-2134bac48c18) ![image](https://github.com/user-attachments/assets/37af9c8c-566e-41d0-9501-5503aa8ab648) * react-native-flash-message - there is no usage anymore ([introduced here](#447)) ![image](https://github.com/user-attachments/assets/5e76cad3-b675-4139-8884-6464a2a54115) ![image](https://github.com/user-attachments/assets/155d0283-bcff-43b2-8913-a16b440c2efc) * react-native-redash - there is no usage anymore (react-native-redash) ![image](https://github.com/user-attachments/assets/62037135-ec89-42f2-9476-9db95b0144b3) ![image](https://github.com/user-attachments/assets/9da3f797-9f43-49a8-be91-f4860299158c) ## **Manual testing steps** 1. Go to this page... 2. 3. ## **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 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 - [ ] 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. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is the base for Edit Gas Fee screen for all the eip1559 UI work. All PRs should branch out of this one and merge to this one.
QA
Figma: https://www.figma.com/file/NXvUKcZ0Ocu1GPcT7VxRMx/1559---Gas-Controls
Copy: https://docs.google.com/document/d/1qcANOD_E4uvRWcimSCAHmQHJyuPSrHBaiyjryU-7cJk/edit
Description
EIP1559 functionalities to QA include:
Networks to test:
Things to test:
Things to check: