Skip to content

Commit aa7b725

Browse files
committed
Use network client ID instead of chain ID
1 parent 39e7734 commit aa7b725

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/scripts/migrations/151.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe(`migration #${version}`, () => {
116116
expect(newStorage.data.SelectedNetworkController).toStrictEqual({
117117
domains: {
118118
[METAMASK_DOMAIN]: 'mainnet',
119-
[MOCK_SNAP_ID]: '0xe705',
119+
[MOCK_SNAP_ID]: 'linea-sepolia',
120120
},
121121
});
122122
});
@@ -236,7 +236,7 @@ describe(`migration #${version}`, () => {
236236
expect(newStorage.data.SelectedNetworkController).toStrictEqual({
237237
domains: {
238238
[METAMASK_DOMAIN]: 'mainnet',
239-
[MOCK_SNAP_ID]: '0x1',
239+
[MOCK_SNAP_ID]: 'mainnet',
240240
},
241241
});
242242
});

app/scripts/migrations/151.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ function transformState(state: Record<string, unknown>) {
240240

241241
const currentDomains = selectedNetworkControllerState.domains;
242242
const domains = Object.fromEntries(
243-
updatedSubjects.map((subject) => [subject, currentChainId]),
243+
updatedSubjects.map((subject) => [
244+
subject,
245+
networkControllerState.selectedNetworkClientId,
246+
]),
244247
);
245248

246249
selectedNetworkControllerState.domains = {

0 commit comments

Comments
 (0)