Skip to content

feat: Remove 'Improved signature requests' setting toggle #29819

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

Merged
merged 1 commit into from
Jan 22, 2025
Merged
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
6 changes: 0 additions & 6 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/en_GB/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ export const SENTRY_BACKGROUND_STATE = {
preferences: {
autoLockTimeLimit: true,
hideZeroBalanceTokens: true,
redesignedConfirmationsEnabled: true,
isRedesignedConfirmationsDeveloperEnabled: false,
showExtensionInFullSizeView: true,
showFiatInTestnets: true,
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 @@ -725,7 +725,6 @@ describe('preferences controller', () => {
useNativeCurrencyAsPrimaryCurrency: true,
hideZeroBalanceTokens: false,
petnamesEnabled: true,
redesignedConfirmationsEnabled: true,
shouldShowAggregatedBalancePopover: true,
featureNotificationsEnabled: false,
isRedesignedConfirmationsDeveloperEnabled: false,
Expand Down Expand Up @@ -755,7 +754,6 @@ describe('preferences controller', () => {
hideZeroBalanceTokens: false,
petnamesEnabled: true,
privacyMode: false,
redesignedConfirmationsEnabled: true,
shouldShowAggregatedBalancePopover: true,
featureNotificationsEnabled: false,
isRedesignedConfirmationsDeveloperEnabled: false,
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 @@ -109,7 +109,6 @@ export type Preferences = {
useNativeCurrencyAsPrimaryCurrency: boolean;
hideZeroBalanceTokens: boolean;
petnamesEnabled: boolean;
redesignedConfirmationsEnabled: boolean;
featureNotificationsEnabled: boolean;
showMultiRpcModal: boolean;
privacyMode: boolean;
Expand Down Expand Up @@ -221,7 +220,6 @@ export const getDefaultPreferencesControllerState =
useNativeCurrencyAsPrimaryCurrency: true,
hideZeroBalanceTokens: false,
petnamesEnabled: true,
redesignedConfirmationsEnabled: true,
featureNotificationsEnabled: false,
isRedesignedConfirmationsDeveloperEnabled: false,
showConfirmationAdvancedDetails: false,
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 @@ -7,7 +7,6 @@ export const FIXTURES_PREFERENCES = {
smartTransactionsOptInStatus: true,
useNativeCurrencyAsPrimaryCurrency: true,
petnamesEnabled: true,
redesignedConfirmationsEnabled: true,
featureNotificationsEnabled: true,
showTokenAutodetectModal: false,
showNftAutodetectModal: false,
Expand Down
4 changes: 0 additions & 4 deletions app/scripts/lib/createRPCMethodTrackingMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ function finalizeSignatureFragment(
* that should be tracked for methods rate limited by random sample.
* @param {Function} opts.getAccountType
* @param {Function} opts.getDeviceModel
* @param {Function} opts.isConfirmationRedesignEnabled
* @param {Function} opts.isRedesignedConfirmationsDeveloperEnabled
* @param {RestrictedControllerMessenger} opts.snapAndHardwareMessenger
* @param {number} [opts.globalRateLimitTimeout] - time, in milliseconds, of the sliding
Expand All @@ -214,7 +213,6 @@ export default function createRPCMethodTrackingMiddleware({
globalRateLimitMaxAmount = 10, // max of events in the globalRateLimitTimeout window. pass 0 for no global rate limit
getAccountType,
getDeviceModel,
isConfirmationRedesignEnabled,
isRedesignedConfirmationsDeveloperEnabled,
snapAndHardwareMessenger,
appStateController,
Expand Down Expand Up @@ -320,8 +318,6 @@ export default function createRPCMethodTrackingMiddleware({
if (
shouldUseRedesignForSignatures({
approvalType: MESSAGE_TYPE_TO_APPROVAL_TYPE[method],
isRedesignedSignaturesUserSettingEnabled:
isConfirmationRedesignEnabled(),
isRedesignedConfirmationsDeveloperEnabled:
isRedesignedConfirmationsDeveloperEnabled(),
})
Expand Down
58 changes: 18 additions & 40 deletions app/scripts/lib/createRPCMethodTrackingMiddleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const createHandler = (opts) =>
globalRateLimitMaxAmount: 0,
appStateController,
metaMetricsController,
isConfirmationRedesignEnabled: () => false,
isRedesignedConfirmationsDeveloperEnabled: () => false,
...opts,
});
Expand Down Expand Up @@ -335,6 +334,9 @@ describe('createRPCMethodTrackingMiddleware', () => {
security_alert_reason: BlockaidReason.maliciousDomain,
ppom_eth_call_count: 5,
ppom_eth_getCode_count: 3,
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
],
},
referrer: { url: 'some.dapp' },
uniqueIdentifier: expectedUniqueIdentifier,
Expand Down Expand Up @@ -600,38 +602,6 @@ describe('createRPCMethodTrackingMiddleware', () => {
});
});

it('should track Confirmation Redesign through ui_customizations prop if enabled', async () => {
const req = {
id: MOCK_ID,
method: MESSAGE_TYPE.PERSONAL_SIGN,
origin: 'some.dapp',
};
const res = {
error: null,
};
const { next, executeMiddlewareStack } = getNext();
const handler = createHandler({
isConfirmationRedesignEnabled: () => true,
});

await handler(req, res, next);
await executeMiddlewareStack();

expect(trackEventSpy).toHaveBeenCalledTimes(2);

expect(trackEventSpy.mock.calls[1][0]).toMatchObject({
category: MetaMetricsEventCategory.InpageProvider,
event: MetaMetricsEventName.SignatureApproved,
properties: {
signature_type: MESSAGE_TYPE.PERSONAL_SIGN,
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
],
},
referrer: { url: 'some.dapp' },
});
});

it('should not track Confirmation Redesign through ui_customizations prop if not enabled', async () => {
const req = {
id: MOCK_ID,
Expand Down Expand Up @@ -685,7 +655,10 @@ describe('createRPCMethodTrackingMiddleware', () => {
event: MetaMetricsEventName.SignatureApproved,
properties: {
signature_type: MESSAGE_TYPE.PERSONAL_SIGN,
ui_customizations: [MetaMetricsEventUiCustomization.Siwe],
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
MetaMetricsEventUiCustomization.Siwe,
],
},
referrer: { url: 'some.dapp' },
});
Expand Down Expand Up @@ -745,7 +718,10 @@ describe('createRPCMethodTrackingMiddleware', () => {
event: MetaMetricsEventName.SignatureApproved,
properties: {
signature_type: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA_V4,
ui_customizations: [MetaMetricsEventUiCustomization.Permit],
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
MetaMetricsEventUiCustomization.Permit,
],
eip712_primary_type: 'Permit',
},
referrer: { url: 'some.dapp' },
Expand Down Expand Up @@ -800,7 +776,10 @@ describe('createRPCMethodTrackingMiddleware', () => {
event: MetaMetricsEventName.SignatureApproved,
properties: {
signature_type: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA_V4,
ui_customizations: [MetaMetricsEventUiCustomization.Order],
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
MetaMetricsEventUiCustomization.Order,
],
},
referrer: { url: 'some.dapp' },
});
Expand Down Expand Up @@ -832,13 +811,12 @@ describe('createRPCMethodTrackingMiddleware', () => {
properties: {
signature_type: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA_V4,
eip712_primary_type: 'Unknown',
ui_customizations: [
MetaMetricsEventUiCustomization.RedesignedConfirmation,
],
},
referrer: { url: 'some.dapp' },
});

expect(trackEventSpy.mock.calls[1][0].properties).not.toHaveProperty(
'ui_customizations',
);
});

describe('when request is flagged as safe by security provider', () => {
Expand Down
Loading
Loading