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

Fully remove eth_sign #4319

Merged
merged 11 commits into from
May 30, 2024
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
1 change: 0 additions & 1 deletion packages/controller-utils/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export enum ApprovalType {
ConnectAccounts = 'connect_accounts',
EthDecrypt = 'eth_decrypt',
EthGetEncryptionPublicKey = 'eth_getEncryptionPublicKey',
EthSign = 'eth_sign',
EthSignTypedData = 'eth_signTypedData',
PersonalSign = 'personal_sign',
ResultError = 'result_error',
Expand Down
12 changes: 6 additions & 6 deletions packages/logging-controller/src/LoggingController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ describe('LoggingController', () => {
await unrestricted.call('LoggingController:add', {
type: LogType.EthSignLog,
data: {
signingMethod: SigningMethod.EthSign,
signingMethod: SigningMethod.PersonalSign,
stage: SigningStage.Proposed,
signingData: '0x0000000000000',
signingData: 'hello',
},
}),
).toBeUndefined();
Expand All @@ -97,9 +97,9 @@ describe('LoggingController', () => {
log: expect.objectContaining({
type: LogType.EthSignLog,
data: {
signingMethod: SigningMethod.EthSign,
signingMethod: SigningMethod.PersonalSign,
stage: SigningStage.Proposed,
signingData: '0x0000000000000',
signingData: 'hello',
},
}),
});
Expand Down Expand Up @@ -167,9 +167,9 @@ describe('LoggingController', () => {
await unrestricted.call('LoggingController:add', {
type: LogType.EthSignLog,
data: {
signingMethod: SigningMethod.EthSign,
signingMethod: SigningMethod.PersonalSign,
stage: SigningStage.Proposed,
signingData: '0x0000000000000',
signingData: 'Heya',
},
}),
).toBeUndefined();
Expand Down
1 change: 0 additions & 1 deletion packages/logging-controller/src/logTypes/EthSignLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { LogType } from './LogType';
* An enum of the signing method types that we are interested in logging.
*/
export enum SigningMethod {
EthSign = 'eth_sign',
PersonalSign = 'personal_sign',
EthSignTypedData = 'eth_signTypedData',
EthSignTypedDataV3 = 'eth_signTypedData_v3',
Expand Down
2 changes: 1 addition & 1 deletion packages/message-manager/src/AbstractMessageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface AbstractMessage {
}

/**
* @type MessageParams
* @type AbstractMessageParams
*
* Represents the parameters to pass to the signing method once the signature request is approved.
* @property from - Address from which the message is processed
Expand Down
156 changes: 0 additions & 156 deletions packages/message-manager/src/MessageManager.test.ts

This file was deleted.

128 changes: 0 additions & 128 deletions packages/message-manager/src/MessageManager.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/message-manager/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './AbstractMessageManager';
export * from './MessageManager';
export * from './PersonalMessageManager';
export * from './TypedMessageManager';
export * from './EncryptionPublicKeyManager';
Expand Down
7 changes: 2 additions & 5 deletions packages/message-manager/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { validate } from 'jsonschema';

import type { DecryptMessageParams } from './DecryptMessageManager';
import type { EncryptionPublicKeyParams } from './EncryptionPublicKeyManager';
import type { MessageParams } from './MessageManager';
import type { PersonalMessageParams } from './PersonalMessageManager';
import type { TypedMessageParams } from './TypedMessageManager';

Expand Down Expand Up @@ -48,14 +47,12 @@ export function normalizeMessageData(data: string) {
}

/**
* Validates a PersonalMessageParams and MessageParams objects for required properties and throws in
* Validates a PersonalMessageParams objects for required properties and throws in
* the event of any validation error.
*
* @param messageData - PersonalMessageParams object to validate.
*/
export function validateSignMessageData(
messageData: PersonalMessageParams | MessageParams,
) {
export function validateSignMessageData(messageData: PersonalMessageParams) {
const { from, data } = messageData;
validateAddress(from, 'from');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export function testsForProviderType(providerType: ProviderType) {

{ name: 'eth_sendRawTransaction', numberOfParameters: 1 },
{ name: 'eth_sendTransaction', numberOfParameters: 1 },
{ name: 'eth_sign', numberOfParameters: 2 },

{ name: 'eth_createAccessList', numberOfParameters: 2 },
{ name: 'eth_getLogs', numberOfParameters: 1 },
{ name: 'eth_getProof', numberOfParameters: 3 },
Expand Down
Loading
Loading