Skip to content

Commit

Permalink
fix: match signature request and message params ID (#5102)
Browse files Browse the repository at this point in the history
## Explanation

Ensure the signature request `id` and message params `metamaskId` use
the same value so that legacy code using only the message params can
locate the associated signature request.

## References

## Changelog

### `@metamask/signature-controller`

- **FIXED**: Use same value for signature request `id` and message
params `metamaskId`.

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
  • Loading branch information
matthewwalsh0 authored and PatrykLucka committed Jan 13, 2025
1 parent 8bbcc60 commit 123e36a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('SignatureController', () => {

normalizePersonalMessageParamsMock.mockImplementation((params) => params);
normalizeTypedMessageParamsMock.mockImplementation((params) => params);
uuidV1Mock.mockReturnValue(ID_MOCK);
uuidV1Mock.mockReturnValueOnce(ID_MOCK);
});

describe('unapprovedPersonalMessagesCount', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-controller/src/SignatureController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ export class SignatureController extends BaseController<

const metadata = {
chainId,
id: random(),
id,
messageParams: finalMessageParams,
networkClientId,
securityAlertResponse,
Expand Down

0 comments on commit 123e36a

Please sign in to comment.