From 5be483a2ad87a1b3a6bfa5a1ff6b6a62cef57b64 Mon Sep 17 00:00:00 2001 From: Matthias Geihs Date: Thu, 26 Nov 2026 12:06:52 +0100 Subject: [PATCH 1/2] refactor(keyring-eth-money-mpc): call check-key-share with GET Co-authored-by: Cursor --- packages/keyring-eth-money-mpc/CHANGELOG.md | 5 +++++ packages/keyring-eth-money-mpc/src/cloud.test.ts | 8 ++++++++ packages/keyring-eth-money-mpc/src/cloud.ts | 3 +-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/keyring-eth-money-mpc/CHANGELOG.md b/packages/keyring-eth-money-mpc/CHANGELOG.md index 2f6f23b53..5e7cc86c9 100644 --- a/packages/keyring-eth-money-mpc/CHANGELOG.md +++ b/packages/keyring-eth-money-mpc/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Call `check-key-share` with `GET` instead of `POST` + - Requires an MPC backend that serves `GET /v1/check-key-share`. + ### Removed - **BREAKING:** Remove the `isMfaRequired` option, so the backend alone decides whether a signature requires MFA ([#703](https://github.com/MetaMask/accounts/pull/703)) diff --git a/packages/keyring-eth-money-mpc/src/cloud.test.ts b/packages/keyring-eth-money-mpc/src/cloud.test.ts index ff55a51d7..f9b75abf8 100644 --- a/packages/keyring-eth-money-mpc/src/cloud.test.ts +++ b/packages/keyring-eth-money-mpc/src/cloud.test.ts @@ -452,6 +452,14 @@ describe('cloud helpers', () => { latestBackupEpoch: 2, activeEpoch: 1, }); + + expect(fetchSpy).toHaveBeenCalledWith( + 'https://cloud.example/check-key-share', + expect.objectContaining({ + method: 'GET', + headers: { Authorization: 'Bearer token-1' }, + }), + ); }); it('rejects key share epoch metadata with the wrong shape', async () => { diff --git a/packages/keyring-eth-money-mpc/src/cloud.ts b/packages/keyring-eth-money-mpc/src/cloud.ts index 18eb00134..3e7c1ae60 100644 --- a/packages/keyring-eth-money-mpc/src/cloud.ts +++ b/packages/keyring-eth-money-mpc/src/cloud.ts @@ -412,10 +412,9 @@ export async function checkKeyShare(opts: { token: string; }): Promise { return readStruct( - await postJson( + await getJson( `${opts.baseURL}/check-key-share`, opts.token, - {}, 'Failed to check key share', ), CheckKeyShareResponseStruct, From ce2387d11afd7da0be6ee9af1a93d26b3b7f1028 Mon Sep 17 00:00:00 2001 From: Matthias Geihs Date: Thu, 26 Nov 2026 12:08:05 +0100 Subject: [PATCH 2/2] chore: add PR number to changelog Co-authored-by: Cursor --- packages/keyring-eth-money-mpc/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/keyring-eth-money-mpc/CHANGELOG.md b/packages/keyring-eth-money-mpc/CHANGELOG.md index 5e7cc86c9..b37ff90e9 100644 --- a/packages/keyring-eth-money-mpc/CHANGELOG.md +++ b/packages/keyring-eth-money-mpc/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Call `check-key-share` with `GET` instead of `POST` +- Call `check-key-share` with `GET` instead of `POST` ([#717](https://github.com/MetaMask/accounts/pull/717)) - Requires an MPC backend that serves `GET /v1/check-key-share`. ### Removed