Skip to content

Commit 9ffb8ee

Browse files
committed
fix: clean up leftover ERC-4337 test/lint/changelog issues
- Remove obsolete SnapKeyring tests for prepareUserOperation, patchUserOperation, and signUserOperation, which no longer exist on the class and referenced the removed EthUserOperation type. - Fix prettier formatting left over in eth-keyring-v1-adapter files. - Reorder keyring-sdk changelog's Removed/Changed sections to match the Keep a Changelog category order enforced by auto-changelog.
1 parent a477de7 commit 9ffb8ee

4 files changed

Lines changed: 6 additions & 48 deletions

File tree

packages/keyring-sdk/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Add keyring state migration framework ([#505](https://github.com/MetaMask/accounts/pull/505))
1313
- Use `createMigrations().add(...)` to build a chain of versioned migration steps, and `.apply(state)` to migrate the internal state of keyrings
1414

15+
### Changed
16+
17+
- Bump `@metamask/keyring-api` from `^23.2.0` to `^23.5.0` ([#569](https://github.com/MetaMask/accounts/pull/569), [#583](https://github.com/MetaMask/accounts/pull/583), [#587](https://github.com/MetaMask/accounts/pull/587))
18+
1519
### Removed
1620

1721
- **BREAKING:** Removed ERC-4337 (account abstraction) support ([#588](https://github.com/MetaMask/accounts/pull/588))
1822
- Removed `Eth4337Keyring` type from exports.
1923
- Removed `prepareUserOperation`, `patchUserOperation`, and `signUserOperation` methods from `EthKeyringV1Adapter` and the `BaseEthKeyring` type.
2024

21-
### Changed
22-
23-
- Bump `@metamask/keyring-api` from `^23.2.0` to `^23.5.0` ([#569](https://github.com/MetaMask/accounts/pull/569), [#583](https://github.com/MetaMask/accounts/pull/583), [#587](https://github.com/MetaMask/accounts/pull/587))
24-
2525
## [2.2.0]
2626

2727
### Added

packages/keyring-sdk/src/v2/eth/eth-keyring-v1-adapter.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import type { TypedTransaction, TypedTxData } from '@ethereumjs/tx';
22
import { TransactionFactory } from '@ethereumjs/tx';
33
import { SignTypedDataVersion } from '@metamask/eth-sig-util';
44
import { EthAccountType, EthMethod, EthScope } from '@metamask/keyring-api';
5-
import type {
6-
KeyringAccount,
7-
KeyringRequest,
8-
} from '@metamask/keyring-api';
5+
import type { KeyringAccount, KeyringRequest } from '@metamask/keyring-api';
96
import {
107
AccountExportType,
118
KeyringType,
@@ -556,5 +553,4 @@ describe('EthKeyringV1Adapter', () => {
556553
adapter.signMessage(ACCOUNT_ADDRESS as Hex, '0xdeadbeef'),
557554
).rejects.toThrow('Expected a value of type');
558555
});
559-
560556
});

packages/keyring-sdk/src/v2/eth/eth-keyring-v1-adapter.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import {
77
EthBytesStruct,
88
EthMethod,
99
} from '@metamask/keyring-api';
10-
import type {
11-
KeyringAccount,
12-
KeyringRequest,
13-
} from '@metamask/keyring-api';
10+
import type { KeyringAccount, KeyringRequest } from '@metamask/keyring-api';
1411
import type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';
1512
import {
1613
AccountExportType,

packages/keyring-snap-bridge/src/SnapKeyring.test.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,40 +3478,5 @@ describe('SnapKeyring', () => {
34783478
).rejects.toThrow(`Snap '${v2SnapId}' does not support v1 signing`);
34793479
});
34803480

3481-
it('prepareUserOperation throws for a v2 snap', async () => {
3482-
await expect(
3483-
v2Keyring.prepareUserOperation(
3484-
ethEoaAccount1.address,
3485-
[],
3486-
executionContext,
3487-
),
3488-
).rejects.toThrow(
3489-
`Snap '${v2SnapId}' does not support v1 prepareUserOperation`,
3490-
);
3491-
});
3492-
3493-
it('patchUserOperation throws for a v2 snap', async () => {
3494-
await expect(
3495-
v2Keyring.patchUserOperation(
3496-
ethEoaAccount1.address,
3497-
{} as EthUserOperation,
3498-
executionContext,
3499-
),
3500-
).rejects.toThrow(
3501-
`Snap '${v2SnapId}' does not support v1 patchUserOperation`,
3502-
);
3503-
});
3504-
3505-
it('signUserOperation throws for a v2 snap', async () => {
3506-
await expect(
3507-
v2Keyring.signUserOperation(
3508-
ethEoaAccount1.address,
3509-
{} as EthUserOperation,
3510-
executionContext,
3511-
),
3512-
).rejects.toThrow(
3513-
`Snap '${v2SnapId}' does not support v1 signUserOperation`,
3514-
);
3515-
});
35163481
});
35173482
});

0 commit comments

Comments
 (0)