Skip to content

Commit bb1f415

Browse files
authored
chore: bump @metamask/profile-sync-controller to ^28.0.0 (MetaMask#27320)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR bumps `@metamask/profile-sync-controller` to version `^28.0.0`. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** no manual testing steps ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Dependency bump plus type-level changes around `AuthenticationController:getBearerToken` could cause compile/runtime integration issues if other controllers/messengers still reference the old action type. Smoke-test logic now parses SRP identifiers from JWTs, which could change expectations for identity-related tests. > > **Overview** > Bumps `@metamask/profile-sync-controller` to `^28.0.0` (updates `yarn.lock` accordingly). > > Updates several controller messenger type definitions to use the renamed `AuthenticationControllerGetBearerTokenAction` type (replacing the prior `AuthenticationControllerGetBearerToken` alias). > > Adjusts identity smoke-test helpers to derive the SRP E2E identifier by decoding the JWT from the `Authorization` header via `AuthenticationController.Mocks.getE2EIdentifierFromJwt`, instead of using a static fallback string. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2c4a09f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 2513c6f commit bb1f415

6 files changed

Lines changed: 36 additions & 8 deletions

File tree

app/controllers/perps/types/messenger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type PerpsControllerAllowedActions =
3333
| TransactionControllerAddTransactionAction
3434
| RemoteFeatureFlagControllerGetStateAction
3535
| AccountTreeControllerGetAccountsFromSelectedAccountGroupAction
36-
| AuthenticationController.AuthenticationControllerGetBearerToken;
36+
| AuthenticationController.AuthenticationControllerGetBearerTokenAction;
3737

3838
/**
3939
* Events from other controllers that PerpsController is allowed to subscribe to.

app/core/Engine/messengers/assets-controller/assets-controller-messenger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function getAssetsControllerInitMessenger(
152152
) {
153153
const messenger = new Messenger<
154154
'AssetsControllerInit',
155-
| AuthenticationController.AuthenticationControllerGetBearerToken
155+
| AuthenticationController.AuthenticationControllerGetBearerTokenAction
156156
| PreferencesControllerGetStateAction
157157
| RemoteFeatureFlagControllerGetStateAction
158158
| AnalyticsControllerActions,

app/core/Engine/messengers/core-backend/backend-websocket-service-messenger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function getBackendWebSocketServiceInitMessenger(
5454
const messenger = new Messenger<
5555
'BackendWebSocketServiceInit',
5656
| RemoteFeatureFlagControllerGetStateAction
57-
| AuthenticationController.AuthenticationControllerGetBearerToken,
57+
| AuthenticationController.AuthenticationControllerGetBearerTokenAction,
5858
never,
5959
RootMessenger
6060
>({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
"@metamask/preferences-controller": "^21.0.0",
271271
"@metamask/preinstalled-example-snap": "^0.7.2",
272272
"@metamask/profile-metrics-controller": "^2.0.0",
273-
"@metamask/profile-sync-controller": "^27.1.0",
273+
"@metamask/profile-sync-controller": "^28.0.0",
274274
"@metamask/ramps-controller": "^10.2.0",
275275
"@metamask/react-native-acm": "^1.0.1",
276276
"@metamask/react-native-actionsheet": "2.4.2",

tests/smoke/identity/utils/helpers.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { MOCK_SRP_E2E_IDENTIFIER_BASE_KEY } from './mocks';
22
import { USER_STORAGE_FEATURE_NAMES } from '@metamask/profile-sync-controller/sdk';
3+
import { AuthenticationController } from '@metamask/profile-sync-controller';
34
import {
45
UserStorageMockttpController,
56
UserStorageMockttpControllerEvents,
67
AsEnum,
78
} from './user-storage/userStorageMockttpController';
89
import { USER_STORAGE_GROUPS_FEATURE_KEY } from '@metamask/account-tree-controller';
910

11+
const { getE2EIdentifierFromJwt } = AuthenticationController.Mocks;
12+
1013
export interface UserStorageAccount {
1114
/**
1215
* The Version 'v' of the User Storage.
@@ -38,10 +41,11 @@ export const getSrpIdentifierFromHeaders = (
3841
headers: Record<string, unknown>,
3942
) => {
4043
const authHeader = headers.authorization;
41-
return (
44+
const token =
4245
authHeader?.toString()?.split(' ')[1] ||
43-
`${MOCK_SRP_E2E_IDENTIFIER_BASE_KEY}_1`
44-
);
46+
`${MOCK_SRP_E2E_IDENTIFIER_BASE_KEY}_1`;
47+
48+
return getE2EIdentifierFromJwt(token);
4549
};
4650

4751
export const arrangeTestUtils = (

yarn.lock

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9479,6 +9479,30 @@ __metadata:
94799479
languageName: node
94809480
linkType: hard
94819481

9482+
"@metamask/profile-sync-controller@npm:^28.0.0":
9483+
version: 28.0.0
9484+
resolution: "@metamask/profile-sync-controller@npm:28.0.0"
9485+
dependencies:
9486+
"@metamask/address-book-controller": "npm:^7.0.1"
9487+
"@metamask/base-controller": "npm:^9.0.0"
9488+
"@metamask/keyring-controller": "npm:^25.1.0"
9489+
"@metamask/messenger": "npm:^0.3.0"
9490+
"@metamask/snaps-controllers": "npm:^17.2.0"
9491+
"@metamask/snaps-sdk": "npm:^10.3.0"
9492+
"@metamask/snaps-utils": "npm:^11.7.0"
9493+
"@metamask/utils": "npm:^11.9.0"
9494+
"@noble/ciphers": "npm:^1.3.0"
9495+
"@noble/hashes": "npm:^1.8.0"
9496+
immer: "npm:^9.0.6"
9497+
loglevel: "npm:^1.8.1"
9498+
siwe: "npm:^2.3.2"
9499+
peerDependencies:
9500+
"@metamask/providers": ^22.0.0
9501+
webextension-polyfill: ^0.10.0 || ^0.11.0 || ^0.12.0
9502+
checksum: 10/008f66cea003cbf4d6d8b827daf7e943ff2b1ef9ec7bcbc749a8a57860c410d44e624149a8400e82034055ffcd2a74a760a633592b558188916dfe360b1287df
9503+
languageName: node
9504+
linkType: hard
9505+
94829506
"@metamask/providers@npm:^18.3.1":
94839507
version: 18.3.1
94849508
resolution: "@metamask/providers@npm:18.3.1"
@@ -35545,7 +35569,7 @@ __metadata:
3554535569
"@metamask/preferences-controller": "npm:^21.0.0"
3554635570
"@metamask/preinstalled-example-snap": "npm:^0.7.2"
3554735571
"@metamask/profile-metrics-controller": "npm:^2.0.0"
35548-
"@metamask/profile-sync-controller": "npm:^27.1.0"
35572+
"@metamask/profile-sync-controller": "npm:^28.0.0"
3554935573
"@metamask/providers": "npm:^18.3.1"
3555035574
"@metamask/ramps-controller": "npm:^10.2.0"
3555135575
"@metamask/react-native-acm": "npm:^1.0.1"

0 commit comments

Comments
 (0)