1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add 'Enhanced Gas UI' setting to search index (#14206)

This commit is contained in:
ryanml 2022-03-28 07:50:32 -07:00 committed by GitHub
parent 7f8dc260b5
commit 067fd78ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

View File

@ -326,6 +326,13 @@ export function getSettingsRoutes(t) {
route: `${ABOUT_US_ROUTE}#contactus`,
icon: 'fa fa-info-circle',
},
{
tab: t('experimental'),
section: t('enableEIP1559V2'),
description: t('enableEIP1559V2Description'),
route: `${EXPERIMENTAL_ROUTE}#enable-advanced-gas`,
icon: 'fa fa-flask',
},
];
if (process.env.TOKEN_DETECTION_V2) {
settingsRoutesList = [

View File

@ -120,6 +120,10 @@ const t = (key) => {
return 'Token detection';
case 'tokenDetectionToggleDescription':
return 'ConsenSys token API aggregates a list of tokens from various third party token lists. Turning it off will stop detecting new tokens added to your wallet, but will keep the option to search for tokens to import.';
case 'enableEIP1559V2':
return 'Enable Enhanced Gas Fee UI';
case 'enableEIP1559V2Description':
return "We've updated how gas estimation and customization works. Turn on if you'd like to use the new gas experience. Learn more";
case 'enableOpenSeaAPI':
return 'Enable OpenSea API';
case 'enableOpenSeaAPIDescription':
@ -456,6 +460,14 @@ describe('Settings Search Utils', () => {
section: 'Contact us',
tab: 'About',
},
{
tab: 'Experimental',
section: 'Enable Enhanced Gas Fee UI',
description:
"We've updated how gas estimation and customization works. Turn on if you'd like to use the new gas experience. Learn more",
route: `/settings/experimental#enable-advanced-gas`,
icon: 'fa fa-flask',
},
{
/** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */
description:
@ -521,7 +533,7 @@ describe('Settings Search Utils', () => {
});
it('should get good experimental section number', () => {
expect(getSettingsSectionNumber(t, t('experimental'))).toStrictEqual(1);
expect(getSettingsSectionNumber(t, t('experimental'))).toStrictEqual(2);
});
it('should get good about section number', () => {

View File

@ -186,7 +186,7 @@ export default class ExperimentalTab extends PureComponent {
const { eip1559V2Enabled, setEIP1559V2Enabled } = this.props;
return (
<div className="settings-page__content-row">
<div ref={this.settingsRefs[3]} className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{t('enableEIP1559V2')}</span>
<div className="settings-page__content-description">