diff --git a/ui/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js index 121f29e7c52c..0c5af3d6c38f 100644 --- a/ui/pages/settings/info-tab/info-tab.component.js +++ b/ui/pages/settings/info-tab/info-tab.component.js @@ -28,6 +28,10 @@ import { } from '../../../../shared/lib/ui-utils'; export default class InfoTab extends PureComponent { + static propTypes = { + remoteFeatureFlags: PropTypes.array, + }; + state = { version: process.env.METAMASK_VERSION, }; @@ -53,6 +57,13 @@ export default class InfoTab extends PureComponent { componentDidMount() { const { t } = this.context; handleSettingsRefs(t, t('about'), this.settingsRefs); + if (this.props.remoteFeatureFlags.length > 0) { + // eslint-disable-next-line no-console + console.log( + 'Feature flag fetched successfully', + this.props.remoteFeatureFlags, + ); + } } renderInfoLinks() { diff --git a/ui/pages/settings/info-tab/info-tab.test.tsx b/ui/pages/settings/info-tab/info-tab.test.tsx index b25be3f8ed5e..03270069e71b 100644 --- a/ui/pages/settings/info-tab/info-tab.test.tsx +++ b/ui/pages/settings/info-tab/info-tab.test.tsx @@ -7,7 +7,9 @@ describe('InfoTab', () => { let getByText: (text: string) => HTMLElement; beforeEach(() => { - const renderResult = renderWithProvider(); + const renderResult = renderWithProvider( + , + ); getByText = renderResult.getByText; }); diff --git a/ui/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js index 6cd630245819..bf41d5087808 100644 --- a/ui/pages/settings/settings.component.js +++ b/ui/pages/settings/settings.component.js @@ -71,6 +71,7 @@ class SettingsPage extends PureComponent { pathnameI18nKey: PropTypes.string, toggleNetworkMenu: PropTypes.func.isRequired, useExternalServices: PropTypes.bool, + remoteFeatureFlags: PropTypes.array, }; static contextTypes = { @@ -382,7 +383,13 @@ class SettingsPage extends PureComponent { /> )} /> - + ( + + )} + /> { const { metamask: { currencyRates }, } = state; - + const remoteFeatureFlags = getRemoteFeatureFlags(state); const conversionDate = currencyRates[ticker]?.conversionDate; const pathNameTail = pathname.match(/[^/]+$/u)[0]; @@ -113,6 +114,7 @@ const mapStateToProps = (state, ownProps) => { isPopup, mostRecentOverviewPage: getMostRecentOverviewPage(state), pathnameI18nKey, + remoteFeatureFlags, useExternalServices, }; }; diff --git a/yarn.lock b/yarn.lock index 59e0b7cef98d..56c308e10f4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6301,12 +6301,12 @@ __metadata: "@metamask/remote-feature-flag-controller@file:../core/packages/remote-feature-flag-controller::locator=metamask-crx%40workspace%3A.": version: 0.0.0 - resolution: "@metamask/remote-feature-flag-controller@file:../core/packages/remote-feature-flag-controller#../core/packages/remote-feature-flag-controller::hash=fceb11&locator=metamask-crx%40workspace%3A." + resolution: "@metamask/remote-feature-flag-controller@file:../core/packages/remote-feature-flag-controller#../core/packages/remote-feature-flag-controller::hash=d194c6&locator=metamask-crx%40workspace%3A." dependencies: "@metamask/base-controller": "npm:^7.0.2" "@metamask/utils": "npm:^10.0.0" cockatiel: "npm:^3.1.2" - checksum: 10/4cdf15ef3c2aafc3c9d9d7a224d1af72c7c06535b5d1227d509ccef9d8c240211a97b7e021f957b630473937c1107097017b7c660456c1bde1f95055ff3524b6 + checksum: 10/869c51ff53622acc9fa039a0911523acdaea44144de85113532e3e47e3e4754becd1789002a78a4bbfcf404479e85ab4a38e76bc811af2a76da882cbede009a9 languageName: node linkType: hard