-
-
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] UI adjustments #2910
Merged
andrepimenta
merged 15 commits into
feature/eip1559-base-edit-gas-fee-screen
from
feature/eip1559-ui-adjustments
Jul 20, 2021
Merged
[EIP1559] UI adjustments #2910
andrepimenta
merged 15 commits into
feature/eip1559-base-edit-gas-fee-screen
from
feature/eip1559-ui-adjustments
Jul 20, 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
andrepimenta
changed the base branch from
develop
to
feature/eip1559-base-edit-gas-fee-screen
July 16, 2021 19:18
…eip1559-ui-adjustments # Conflicts: # app/util/transactions.js
wachunei
approved these changes
Jul 20, 2021
andrepimenta
added a commit
that referenced
this pull request
Jul 28, 2021
* [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]>
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]>
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
Replaces "," for "." and validates NaN on the range inputs.
Fixes the colors and text for the time estimates.
Fixes the calculation for max priority fee.
Small UI fixes.
Issue
Resolves #2873