Skip to content
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

fix: Revert "feat: add privacy mode" #28362

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ export const SENTRY_BACKGROUND_STATE = {
showNativeTokenAsMainBalance: true,
petnamesEnabled: true,
showConfirmationAdvancedDetails: true,
privacyMode: false,
},
useExternalServices: false,
selectedAddress: false,
Expand Down
2 changes: 0 additions & 2 deletions app/scripts/controllers/preferences-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ describe('preferences controller', () => {
expect(controller.state.preferences).toStrictEqual({
autoLockTimeLimit: undefined,
showExtensionInFullSizeView: false,
privacyMode: false,
showFiatInTestnets: false,
showTestNetworks: false,
smartTransactionsOptInStatus: true,
Expand Down Expand Up @@ -766,7 +765,6 @@ describe('preferences controller', () => {
useNativeCurrencyAsPrimaryCurrency: true,
hideZeroBalanceTokens: false,
petnamesEnabled: true,
privacyMode: false,
redesignedConfirmationsEnabled: true,
redesignedTransactionsEnabled: true,
shouldShowAggregatedBalancePopover: true,
Expand Down
2 changes: 0 additions & 2 deletions app/scripts/controllers/preferences-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export type Preferences = {
redesignedTransactionsEnabled: boolean;
featureNotificationsEnabled: boolean;
showMultiRpcModal: boolean;
privacyMode: boolean;
isRedesignedConfirmationsDeveloperEnabled: boolean;
showConfirmationAdvancedDetails: boolean;
tokenSortConfig: {
Expand Down Expand Up @@ -222,7 +221,6 @@ export const getDefaultPreferencesControllerState =
isRedesignedConfirmationsDeveloperEnabled: false,
showConfirmationAdvancedDetails: false,
showMultiRpcModal: false,
privacyMode: false,
shouldShowAggregatedBalancePopover: true, // by default user should see popover;
tokenSortConfig: {
key: 'tokenFiatAmount',
Expand Down
1 change: 0 additions & 1 deletion app/scripts/fixtures/with-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const FIXTURES_PREFERENCES = {
showNftAutodetectModal: false,
isRedesignedConfirmationsDeveloperEnabled: false,
showConfirmationAdvancedDetails: false,
privacyMode: false,
},
featureFlags: {
sendHexData: true,
Expand Down
1 change: 0 additions & 1 deletion test/e2e/fixture-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function onboardingFixture() {
hideZeroBalanceTokens: false,
showExtensionInFullSizeView: false,
showFiatInTestnets: false,
privacyMode: false,
showTestNetworks: false,
smartTransactionsOptInStatus: true,
showNativeTokenAsMainBalance: true,
Expand Down
1 change: 0 additions & 1 deletion test/e2e/tests/metrics/errors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ describe('Sentry errors', function () {
preferences: {
autoLockTimeLimit: true, // Initialized as undefined
showConfirmationAdvancedDetails: true,
privacyMode: false,
},
smartTransactionsState: {
fees: {
Expand Down
106 changes: 0 additions & 106 deletions test/e2e/tests/privacy-mode/privacy-mode.spec.js

This file was deleted.

3 changes: 1 addition & 2 deletions test/integration/data/onboarding-completion-route.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@
"hideZeroBalanceTokens": false,
"petnamesEnabled": true,
"redesignedConfirmationsEnabled": true,
"featureNotificationsEnabled": false,
"privacyMode": false
"featureNotificationsEnabled": false
},
"preventPollingOnNetworkRestart": false,
"previousAppVersion": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ import {
getMultichainIsMainnet,
getMultichainSelectedAccountCachedBalance,
} from '../../../../../selectors/multichain';
import { getPreferences } from '../../../../../selectors';
import { TokenListItem } from '../../../../multichain';
import { useIsOriginalNativeTokenSymbol } from '../../../../../hooks/useIsOriginalNativeTokenSymbol';
import { AssetListProps } from '../asset-list';
import { useNativeTokenBalance } from './use-native-token-balance';
// import { getPreferences } from '../../../../../selectors';

const NativeToken = ({ onClickAsset }: AssetListProps) => {
const nativeCurrency = useSelector(getMultichainNativeCurrency);
const isMainnet = useSelector(getMultichainIsMainnet);
const { chainId, ticker, type, rpcUrl } = useSelector(
getMultichainCurrentNetwork,
);
const { privacyMode } = useSelector(getPreferences);
const isOriginalNativeSymbol = useIsOriginalNativeTokenSymbol(
chainId,
ticker,
Expand Down Expand Up @@ -53,7 +52,6 @@ const NativeToken = ({ onClickAsset }: AssetListProps) => {
isNativeCurrency
isStakeable={isStakeable}
showPercentage
privacyMode={privacyMode}
/>
);
};
Expand Down
5 changes: 1 addition & 4 deletions ui/components/app/assets/token-cell/token-cell.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fireEvent } from '@testing-library/react';
import { useSelector } from 'react-redux';
import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount';
import { getTokenList, getPreferences } from '../../../../selectors';
import { getTokenList } from '../../../../selectors';
import {
getMultichainCurrentChainId,
getMultichainIsEvm,
Expand Down Expand Up @@ -98,9 +98,6 @@ describe('Token Cell', () => {
};
const useSelectorMock = useSelector;
(useSelectorMock as jest.Mock).mockImplementation((selector) => {
if (selector === getPreferences) {
return { privacyMode: false };
}
if (selector === getTokenList) {
return MOCK_GET_TOKEN_LIST;
}
Expand Down
4 changes: 1 addition & 3 deletions ui/components/app/assets/token-cell/token-cell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { getTokenList, getPreferences } from '../../../../selectors';
import { getTokenList } from '../../../../selectors';
import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount';
import { TokenListItem } from '../../../multichain';
import { isEqualCaseInsensitive } from '../../../../../shared/modules/string-utils';
Expand All @@ -23,7 +23,6 @@ export default function TokenCell({
onClick,
}: TokenCellProps) {
const tokenList = useSelector(getTokenList);
const { privacyMode } = useSelector(getPreferences);
const tokenData = Object.values(tokenList).find(
(token) =>
isEqualCaseInsensitive(token.symbol, symbol) &&
Expand Down Expand Up @@ -52,7 +51,6 @@ export default function TokenCell({
isOriginalTokenSymbol={isOriginalTokenSymbol}
address={address}
showPercentage
privacyMode={privacyMode}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ exports[`ConfirmInfoRowCurrency should display in currency passed 1`] = `
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
$82.65
</span>
Expand All @@ -38,7 +37,6 @@ exports[`ConfirmInfoRowCurrency should display value in user preferred currency
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
0.14861879
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ exports[`CurrencyInput Component rendering should disable unit input 1`] = `
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
$0.00
</span>
Expand Down Expand Up @@ -90,7 +89,6 @@ exports[`CurrencyInput Component rendering should render properly with a fiat va
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
0.004327880204275946
</span>
Expand Down Expand Up @@ -185,7 +183,6 @@ exports[`CurrencyInput Component rendering should render properly with an ETH va
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
$231.06
</span>
Expand Down Expand Up @@ -240,7 +237,6 @@ exports[`CurrencyInput Component rendering should render properly without a suff
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
$0.00
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exports[`CancelTransactionGasFee Component should render 1`] = `
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
&lt;0.000001
</span>
Expand All @@ -27,7 +26,6 @@ exports[`CancelTransactionGasFee Component should render 1`] = `
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
&lt;0.000001
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ exports[`UserPreferencedCurrencyDisplay Component rendering should match snapsho
>
<span
class="mm-box mm-text currency-display-component__text mm-text--inherit mm-text--ellipsis mm-box--color-text-default"
data-testid="account-value-and-suffix"
>
0
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
getSelectedAccount,
getShouldHideZeroBalanceTokens,
getTokensMarketData,
getPreferences,
} from '../../../selectors';
import { useAccountTotalFiatBalance } from '../../../hooks/useAccountTotalFiatBalance';
import { AggregatedPercentageOverview } from './aggregated-percentage-overview';
Expand All @@ -23,7 +22,6 @@ jest.mock('../../../ducks/locale/locale', () => ({
jest.mock('../../../selectors', () => ({
getCurrentCurrency: jest.fn(),
getSelectedAccount: jest.fn(),
getPreferences: jest.fn(),
getShouldHideZeroBalanceTokens: jest.fn(),
getTokensMarketData: jest.fn(),
}));
Expand All @@ -34,7 +32,6 @@ jest.mock('../../../hooks/useAccountTotalFiatBalance', () => ({

const mockGetIntlLocale = getIntlLocale as unknown as jest.Mock;
const mockGetCurrentCurrency = getCurrentCurrency as jest.Mock;
const mockGetPreferences = getPreferences as jest.Mock;
const mockGetSelectedAccount = getSelectedAccount as unknown as jest.Mock;
const mockGetShouldHideZeroBalanceTokens =
getShouldHideZeroBalanceTokens as jest.Mock;
Expand Down Expand Up @@ -162,7 +159,6 @@ describe('AggregatedPercentageOverview', () => {
beforeEach(() => {
mockGetIntlLocale.mockReturnValue('en-US');
mockGetCurrentCurrency.mockReturnValue('USD');
mockGetPreferences.mockReturnValue({ privacyMode: false });
mockGetSelectedAccount.mockReturnValue(selectedAccountMock);
mockGetShouldHideZeroBalanceTokens.mockReturnValue(false);
mockGetTokensMarketData.mockReturnValue(marketDataMock);
Expand Down
Loading
Loading