mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
Cleanup after TOKEN_DETECTION_V2 flag removal (#15564)
This commit is contained in:
parent
1a8d0c91f0
commit
650eac88a5
@ -5,7 +5,6 @@ SEGMENT_WRITE_KEY=
|
||||
ONBOARDING_V2=
|
||||
SWAPS_USE_DEV_APIS=
|
||||
COLLECTIBLES_V1=
|
||||
TOKEN_DETECTION_V2=
|
||||
|
||||
; Set this to '1' to enable support for Sign-In with Ethereum [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361)
|
||||
SIWE_V1=
|
||||
|
@ -47,7 +47,6 @@ const metamaskrc = {
|
||||
ONBOARDING_V2: process.env.ONBOARDING_V2,
|
||||
COLLECTIBLES_V1: process.env.COLLECTIBLES_V1,
|
||||
PHISHING_WARNING_PAGE_URL: process.env.PHISHING_WARNING_PAGE_URL,
|
||||
TOKEN_DETECTION_V2: process.env.TOKEN_DETECTION_V2,
|
||||
SEGMENT_HOST: process.env.SEGMENT_HOST,
|
||||
SEGMENT_WRITE_KEY: process.env.SEGMENT_WRITE_KEY,
|
||||
SEGMENT_BETA_WRITE_KEY: process.env.SEGMENT_BETA_WRITE_KEY,
|
||||
@ -1114,7 +1113,6 @@ function getEnvironmentVariables({ buildTarget, buildType, version }) {
|
||||
SENTRY_DSN_DEV: metamaskrc.SENTRY_DSN_DEV,
|
||||
SIWE_V1: metamaskrc.SIWE_V1 === '1',
|
||||
SWAPS_USE_DEV_APIS: process.env.SWAPS_USE_DEV_APIS === '1',
|
||||
TOKEN_DETECTION_V2: metamaskrc.TOKEN_DETECTION_V2 === '1',
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -165,10 +165,9 @@ export default class AdvancedTab extends PureComponent {
|
||||
const { t } = this.context;
|
||||
const { showResultMessage, restoreSuccessful } = this.state;
|
||||
|
||||
const settingsRefIndex = process.env.TOKEN_DETECTION_V2 ? 15 : 14;
|
||||
return (
|
||||
<div
|
||||
ref={this.settingsRefs[settingsRefIndex]}
|
||||
ref={this.settingsRefs[15]}
|
||||
className="settings-page__content-row"
|
||||
data-testid="advanced-setting-data-restore"
|
||||
>
|
||||
@ -209,10 +208,9 @@ export default class AdvancedTab extends PureComponent {
|
||||
|
||||
renderUserDataBackup() {
|
||||
const { t } = this.context;
|
||||
const settingsRefIndex = process.env.TOKEN_DETECTION_V2 ? 15 : 13;
|
||||
return (
|
||||
<div
|
||||
ref={this.settingsRefs[settingsRefIndex]}
|
||||
ref={this.settingsRefs[14]}
|
||||
className="settings-page__content-row"
|
||||
data-testid="advanced-setting-data-backup"
|
||||
>
|
||||
|
@ -190,39 +190,4 @@ describe('AdvancedTab Component', () => {
|
||||
toggleButton.first().simulate('toggle');
|
||||
expect(toggleTokenDetection.calledOnce).toStrictEqual(true);
|
||||
});
|
||||
|
||||
/** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */
|
||||
it('should not show token detection toggle', () => {
|
||||
process.env.TOKEN_DETECTION_V2 = false;
|
||||
component = shallow(
|
||||
<AdvancedTab
|
||||
ipfsGateway=""
|
||||
setAutoLockTimeLimit={setAutoLockTimeLimitSpy}
|
||||
setIpfsGateway={() => undefined}
|
||||
setShowFiatConversionOnTestnetsPreference={() => undefined}
|
||||
setThreeBoxSyncingPermission={() => undefined}
|
||||
setShowTestNetworks={toggleTestnet}
|
||||
showTestNetworks={false}
|
||||
threeBoxDisabled
|
||||
threeBoxSyncingAllowed={false}
|
||||
ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F}
|
||||
setLedgerTransportPreference={() => undefined}
|
||||
setDismissSeedBackUpReminder={() => undefined}
|
||||
dismissSeedBackUpReminder={false}
|
||||
useTokenDetection
|
||||
setUseTokenDetection={toggleTokenDetection}
|
||||
userHasALedgerAccount
|
||||
backupUserData={() => undefined}
|
||||
restoreUserData={() => undefined}
|
||||
/>,
|
||||
{
|
||||
context: {
|
||||
trackEvent: () => undefined,
|
||||
t: (s) => `_${s}`,
|
||||
},
|
||||
},
|
||||
);
|
||||
const tokenDetectionText = component.find({ text: 'Token detection' });
|
||||
expect(tokenDetectionText).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user