Skip to content

Commit

Permalink
removing warning from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
NiranjanaBinoy committed Oct 21, 2024
1 parent 4eaeb68 commit 0f80da0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ exports[`Security Tab should match snapshot 1`] = `
</label>
</div>
</div>
<div
class="settings-tab__error"
>
warning
</div>
<span
class="settings-page__security-tab-sub-header__bold"
>
Expand Down
4 changes: 0 additions & 4 deletions ui/pages/settings/security-tab/security-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export default class SecurityTab extends PureComponent {
};

static propTypes = {
warning: PropTypes.string,
history: PropTypes.object,
openSeaEnabled: PropTypes.bool,
setOpenSeaEnabled: PropTypes.func,
Expand Down Expand Up @@ -1131,7 +1130,6 @@ export default class SecurityTab extends PureComponent {

render() {
const {
warning,
petnamesEnabled,
dataCollectionForMarketing,
setDataCollectionForMarketing,
Expand All @@ -1144,8 +1142,6 @@ export default class SecurityTab extends PureComponent {
{showDataCollectionDisclaimer
? this.renderDataCollectionWarning()
: null}

{warning && <div className="settings-tab__error">{warning}</div>}
<span className="settings-page__security-tab-sub-header__bold">
{this.context.t('security')}
</span>
Expand Down
6 changes: 1 addition & 5 deletions ui/pages/settings/security-tab/security-tab.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -60,7 +57,6 @@ const mapStateToProps = (state) => {
const networkConfigurations = getNetworkConfigurationsByChainId(state);

return {
warning,
incomingTransactionsPreferences,
networkConfigurations,
participateInMetaMetrics,
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/settings/security-tab/security-tab.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions ui/pages/settings/settings-tab/settings-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -429,11 +428,8 @@ export default class SettingsTab extends PureComponent {
}

render() {
const { warning } = this.props;

return (
<div className="settings-page__body">
{warning ? <div className="settings-tab__error">{warning}</div> : null}
{this.renderCurrentConversion()}
{this.renderShowNativeTokenAsMainBalance()}
{this.renderCurrentLocale()}
Expand Down
6 changes: 1 addition & 5 deletions ui/pages/settings/settings-tab/settings-tab.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -31,7 +28,6 @@ const mapStateToProps = (state) => {
const tokenList = getTokenList(state);

return {
warning,
currentLocale,
currentCurrency,
nativeCurrency,
Expand Down

0 comments on commit 0f80da0

Please sign in to comment.