Skip to content

Commit 63ef130

Browse files
committed
Merge branch 'main' into cryptotavares/improve-get-metamask-accounts-selector-performance
2 parents 448fff9 + 85a714e commit 63ef130

File tree

60 files changed

+1889
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1889
-454
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [13.10.4]
11+
12+
### Fixed
13+
14+
- Signed deep links with empty `sig_params` with extra params as valid (#38142)
15+
- Adds mon as currency to fetch prices (#38261)
16+
- Removes sidepanel from chrome manifest files (#38242)
17+
1018
## [13.10.3]
1119

1220
### Fixed
@@ -1239,7 +1247,8 @@ authorized by the user.` error until the user fully revoked dapp
12391247
- This changelog was split off with 12.22.0
12401248
- All older changes can be found in [docs/CHANGELOG_older.md](https://github.com/MetaMask/metamask-extension/blob/main/docs/CHANGELOG_older.md)
12411249

1242-
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v13.10.3...HEAD
1250+
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v13.10.4...HEAD
1251+
[13.10.4]: https://github.com/MetaMask/metamask-extension/compare/v13.10.3...v13.10.4
12431252
[13.10.3]: https://github.com/MetaMask/metamask-extension/compare/v13.10.2...v13.10.3
12441253
[13.10.2]: https://github.com/MetaMask/metamask-extension/compare/v13.10.1...v13.10.2
12451254
[13.10.1]: https://github.com/MetaMask/metamask-extension/compare/v13.10.0...v13.10.1

app/_locales/en/messages.json

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/en_GB/messages.json

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/ga/messages.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/manifest/v3/_base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
"webRequest",
8989
"offscreen",
9090
"identity",
91-
"sidePanel",
9291
"contextMenus"
9392
],
9493
"sandbox": {

app/manifest/v3/chrome.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,5 @@
1010
"matches": ["http://*/*", "https://*/*"],
1111
"ids": ["*"]
1212
},
13-
"minimum_chrome_version": "115",
14-
"side_panel": {
15-
"default_path": "sidepanel.html"
16-
}
13+
"minimum_chrome_version": "115"
1714
}

app/scripts/controllers/rewards/rewards-data-service.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ describe('RewardsDataService', () => {
525525

526526
expect(result).toEqual(mockLoginResponse);
527527
expect(mockFetch).toHaveBeenCalledWith(
528-
`${REWARDS_API_URL.PRD}/auth/mobile-login`,
528+
`${REWARDS_API_URL.UAT}/auth/mobile-login`,
529529
expect.objectContaining({
530530
method: 'POST',
531531
body: JSON.stringify(mockLoginRequest),
@@ -790,7 +790,7 @@ describe('RewardsDataService', () => {
790790

791791
expect(result).toEqual(mockSeasonStateResponse);
792792
expect(mockFetch).toHaveBeenCalledWith(
793-
`${REWARDS_API_URL.PRD}/seasons/${mockSeasonId}/state`,
793+
`${REWARDS_API_URL.UAT}/seasons/${mockSeasonId}/state`,
794794
{
795795
credentials: 'omit',
796796
method: 'GET',
@@ -1071,7 +1071,7 @@ describe('RewardsDataService', () => {
10711071
// Assert
10721072
expect(result).toEqual(mockOptInStatusResponse);
10731073
expect(mockFetch).toHaveBeenCalledWith(
1074-
`${REWARDS_API_URL.PRD}/public/rewards/ois`,
1074+
`${REWARDS_API_URL.UAT}/public/rewards/ois`,
10751075
expect.objectContaining({
10761076
method: 'POST',
10771077
body: JSON.stringify(mockOptInStatusRequest),
@@ -1392,7 +1392,7 @@ describe('RewardsDataService', () => {
13921392
);
13931393
});
13941394

1395-
it('uses PRD URL for non-production environments', async () => {
1395+
it('uses UAT URL for non-production environments', async () => {
13961396
delete process.env.METAMASK_ENVIRONMENT;
13971397
service = createService();
13981398

@@ -1405,11 +1405,11 @@ describe('RewardsDataService', () => {
14051405
await service.validateReferralCode('TEST');
14061406

14071407
expect(mockFetch).toHaveBeenCalledWith(
1408-
expect.stringContaining(REWARDS_API_URL.PRD),
1408+
expect.stringContaining(REWARDS_API_URL.UAT),
14091409
expect.any(Object),
14101410
);
14111411
expect(mockFetch).toHaveBeenCalledWith(
1412-
`${REWARDS_API_URL.PRD}/referral/validate?code=TEST`,
1412+
`${REWARDS_API_URL.UAT}/referral/validate?code=TEST`,
14131413
expect.any(Object),
14141414
);
14151415
});

app/scripts/controllers/rewards/rewards-data-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class RewardsDataService {
168168
) {
169169
return REWARDS_API_URL.PRD;
170170
}
171-
return REWARDS_API_URL.PRD;
171+
return REWARDS_API_URL.UAT;
172172
}
173173

174174
/**

app/scripts/lib/offscreen-bridge/lattice-offscreen-keyring.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,20 @@ class LatticeKeyringOffscreen extends LatticeKeyring {
2828
super(opts);
2929
}
3030

31-
async _getCreds() {
31+
async _getCreds(): Promise<
32+
| {
33+
deviceID: string;
34+
password: string;
35+
endpoint?: string;
36+
}
37+
| undefined
38+
> {
3239
try {
40+
// If we already have credentials cached
41+
if (this._hasCreds()) {
42+
return undefined;
43+
}
44+
3345
// If we are not aware of what Lattice we should be talking to,
3446
// we need to open a window that lets the user go through the
3547
// pairing or connection process.
@@ -41,7 +53,7 @@ class LatticeKeyringOffscreen extends LatticeKeyring {
4153
const creds = await new Promise<{
4254
deviceID: string;
4355
password: string;
44-
endpoint: string;
56+
endpoint?: string;
4557
}>((resolve, reject) => {
4658
chrome.runtime.sendMessage(
4759
{
@@ -51,15 +63,25 @@ class LatticeKeyringOffscreen extends LatticeKeyring {
5163
},
5264
},
5365
(response) => {
54-
if (response.error) {
66+
if (chrome.runtime.lastError) {
67+
reject(chrome.runtime.lastError);
68+
return;
69+
}
70+
71+
if (response?.error) {
5572
reject(response.error);
73+
return;
5674
}
5775

58-
resolve(response.result);
76+
resolve(response?.result);
5977
},
6078
);
6179
});
6280

81+
if (!creds?.deviceID || !creds?.password) {
82+
throw new Error('Invalid credentials returned from Lattice.');
83+
}
84+
6385
return creds;
6486
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31973
6587
// eslint-disable-next-line @typescript-eslint/no-explicit-any

builds.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ buildTypes:
3434
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
3535
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
3636
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
37-
- IS_SIDEPANEL: true
37+
- IS_SIDEPANEL: false
3838
# for seedless onboarding (social login)
3939
- GOOGLE_PROD_CLIENT_ID
4040
- APPLE_PROD_CLIENT_ID
@@ -68,7 +68,7 @@ buildTypes:
6868
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
6969
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
7070
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
71-
- IS_SIDEPANEL: true
71+
- IS_SIDEPANEL: false
7272
# for seedless onboarding (social login)
7373
- GOOGLE_BETA_CLIENT_ID
7474
- APPLE_BETA_CLIENT_ID
@@ -137,7 +137,7 @@ buildTypes:
137137
- SEGMENT_WRITE_KEY_REF: SEGMENT_FLASK_WRITE_KEY
138138
- ACCOUNT_SNAPS_DIRECTORY_URL: https://metamask.github.io/snaps-directory-staging/main/account-management
139139
- EIP_4337_ENTRYPOINT: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
140-
- IS_SIDEPANEL: true
140+
- IS_SIDEPANEL: false
141141
# for seedless onboarding (social login)
142142
- GOOGLE_FLASK_CLIENT_ID
143143
- APPLE_FLASK_CLIENT_ID

0 commit comments

Comments
 (0)