From 0f80da0ad87a5dbdf7230f847efb0bd8c1c2f760 Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:01:05 -0400 Subject: [PATCH] removing warning from settings --- .../security-tab/__snapshots__/security-tab.test.js.snap | 5 ----- ui/pages/settings/security-tab/security-tab.component.js | 4 ---- ui/pages/settings/security-tab/security-tab.container.js | 6 +----- ui/pages/settings/security-tab/security-tab.test.js | 2 -- ui/pages/settings/settings-tab/settings-tab.component.js | 4 ---- ui/pages/settings/settings-tab/settings-tab.container.js | 6 +----- 6 files changed, 2 insertions(+), 25 deletions(-) diff --git a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap index dcec71767fe6..0927d04f89cb 100644 --- a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap +++ b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap @@ -83,11 +83,6 @@ exports[`Security Tab should match snapshot 1`] = ` -
- warning -
diff --git a/ui/pages/settings/security-tab/security-tab.component.js b/ui/pages/settings/security-tab/security-tab.component.js index 1fae729d3f31..f9e854ff2465 100644 --- a/ui/pages/settings/security-tab/security-tab.component.js +++ b/ui/pages/settings/security-tab/security-tab.component.js @@ -64,7 +64,6 @@ export default class SecurityTab extends PureComponent { }; static propTypes = { - warning: PropTypes.string, history: PropTypes.object, openSeaEnabled: PropTypes.bool, setOpenSeaEnabled: PropTypes.func, @@ -1131,7 +1130,6 @@ export default class SecurityTab extends PureComponent { render() { const { - warning, petnamesEnabled, dataCollectionForMarketing, setDataCollectionForMarketing, @@ -1144,8 +1142,6 @@ export default class SecurityTab extends PureComponent { {showDataCollectionDisclaimer ? this.renderDataCollectionWarning() : null} - - {warning &&
{warning}
} {this.context.t('security')} diff --git a/ui/pages/settings/security-tab/security-tab.container.js b/ui/pages/settings/security-tab/security-tab.container.js index 224072ef2b10..8a6bf643396b 100644 --- a/ui/pages/settings/security-tab/security-tab.container.js +++ b/ui/pages/settings/security-tab/security-tab.container.js @@ -32,10 +32,7 @@ import { openBasicFunctionalityModal } from '../../../ducks/app/app'; import SecurityTab from './security-tab.component'; const mapStateToProps = (state) => { - const { - appState: { warning }, - metamask, - } = state; + const { metamask } = state; const petnamesEnabled = getPetnamesEnabled(state); @@ -60,7 +57,6 @@ const mapStateToProps = (state) => { const networkConfigurations = getNetworkConfigurationsByChainId(state); return { - warning, incomingTransactionsPreferences, networkConfigurations, participateInMetaMetrics, diff --git a/ui/pages/settings/security-tab/security-tab.test.js b/ui/pages/settings/security-tab/security-tab.test.js index 5e31cfb68c57..a68c762f4152 100644 --- a/ui/pages/settings/security-tab/security-tab.test.js +++ b/ui/pages/settings/security-tab/security-tab.test.js @@ -47,8 +47,6 @@ jest.mock('../../../ducks/app/app.ts', () => { }); describe('Security Tab', () => { - mockState.appState.warning = 'warning'; // This tests an otherwise untested render branch - const mockStore = configureMockStore([thunk])(mockState); function toggleCheckbox(testId, initialState, skipRender = false) { diff --git a/ui/pages/settings/settings-tab/settings-tab.component.js b/ui/pages/settings/settings-tab/settings-tab.component.js index 191bbbc78685..6d56cd9ae10b 100644 --- a/ui/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/pages/settings/settings-tab/settings-tab.component.js @@ -57,7 +57,6 @@ export default class SettingsTab extends PureComponent { static propTypes = { setUseBlockie: PropTypes.func, setCurrentCurrency: PropTypes.func, - warning: PropTypes.string, updateCurrentLocale: PropTypes.func, currentLocale: PropTypes.string, useBlockie: PropTypes.bool, @@ -429,11 +428,8 @@ export default class SettingsTab extends PureComponent { } render() { - const { warning } = this.props; - return (
- {warning ?
{warning}
: null} {this.renderCurrentConversion()} {this.renderShowNativeTokenAsMainBalance()} {this.renderCurrentLocale()} diff --git a/ui/pages/settings/settings-tab/settings-tab.container.js b/ui/pages/settings/settings-tab/settings-tab.container.js index 7de17ffefde4..e6ad25f0df92 100644 --- a/ui/pages/settings/settings-tab/settings-tab.container.js +++ b/ui/pages/settings/settings-tab/settings-tab.container.js @@ -18,10 +18,7 @@ import { getProviderConfig } from '../../../ducks/metamask/metamask'; import SettingsTab from './settings-tab.component'; const mapStateToProps = (state) => { - const { - appState: { warning }, - metamask, - } = state; + const { metamask } = state; const { currentCurrency, useBlockie, currentLocale } = metamask; const { ticker: nativeCurrency } = getProviderConfig(state); const { address: selectedAddress } = getSelectedInternalAccount(state); @@ -31,7 +28,6 @@ const mapStateToProps = (state) => { const tokenList = getTokenList(state); return { - warning, currentLocale, currentCurrency, nativeCurrency,