Skip to content

Commit 5f24278

Browse files
committed
Merge branch 'main' into n3ps/cleanup-permission-details
2 parents 3045e27 + fa3b248 commit 5f24278

File tree

703 files changed

+4233
-5854
lines changed

Some content is hidden

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

703 files changed

+4233
-5854
lines changed

.storybook/preview.js

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import localeList from '../app/_locales/index.json';
1212
import * as allLocales from './locales';
1313
import { I18nProvider, LegacyI18nProvider } from './i18n';
1414
import testData from './test-data.js';
15-
import { MemoryRouter } from 'react-router-dom';
16-
import { CompatRouter, Routes, Route } from 'react-router-dom-v5-compat';
15+
import { MemoryRouter, Routes, Route } from 'react-router-dom';
1716
import { setBackgroundConnection } from '../ui/store/background-connection';
1817
import { metamaskStorybookTheme } from './metamask-storybook-theme';
1918
import { DocsContainer } from '@storybook/addon-docs';
@@ -154,27 +153,25 @@ const metamaskDecorator = (story, context) => {
154153
return (
155154
<Provider store={store}>
156155
<MemoryRouter initialEntries={initialEntries}>
157-
<CompatRouter>
158-
<AlertMetricsProvider
159-
metrics={{
160-
trackAlertActionClicked: () => undefined,
161-
trackAlertRender: () => undefined,
162-
trackInlineAlertClicked: () => undefined,
163-
}}
156+
<AlertMetricsProvider
157+
metrics={{
158+
trackAlertActionClicked: () => undefined,
159+
trackAlertRender: () => undefined,
160+
trackInlineAlertClicked: () => undefined,
161+
}}
162+
>
163+
<I18nProvider
164+
currentLocale={currentLocale}
165+
current={current}
166+
en={allLocales.en}
164167
>
165-
<I18nProvider
166-
currentLocale={currentLocale}
167-
current={current}
168-
en={allLocales.en}
169-
>
170-
<LegacyI18nProvider>
171-
<Routes>
172-
<Route path={path} element={<StoryComponent />} />
173-
</Routes>
174-
</LegacyI18nProvider>
175-
</I18nProvider>
176-
</AlertMetricsProvider>
177-
</CompatRouter>
168+
<LegacyI18nProvider>
169+
<Routes>
170+
<Route path={path} element={<StoryComponent />} />
171+
</Routes>
172+
</LegacyI18nProvider>
173+
</I18nProvider>
174+
</AlertMetricsProvider>
178175
</MemoryRouter>
179176
</Provider>
180177
);

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ npmAuditIgnoreAdvisories:
4646
# Material UI dependencies are planned for removal
4747
- '@material-ui/core (deprecation)'
4848
- '@material-ui/styles (deprecation)'
49+
- '@material-ui/pickers (deprecation)'
4950

5051
# Dependencies brought in by @truffle/decoder that are deprecated:
5152
- 'cids (deprecation)' # via @ensdomains/content-hash

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [13.12.1]
11+
12+
### Fixed
13+
14+
- Adds bounds to currencyRates (#38591)
15+
1016
## [13.12.0]
1117

1218
### Added
@@ -1391,7 +1397,8 @@ authorized by the user.` error until the user fully revoked dapp
13911397
- This changelog was split off with 12.22.0
13921398
- All older changes can be found in [docs/CHANGELOG_older.md](https://github.com/MetaMask/metamask-extension/blob/main/docs/CHANGELOG_older.md)
13931399

1394-
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v13.12.0...HEAD
1400+
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v13.12.1...HEAD
1401+
[13.12.1]: https://github.com/MetaMask/metamask-extension/compare/v13.12.0...v13.12.1
13951402
[13.12.0]: https://github.com/MetaMask/metamask-extension/compare/v13.11.2...v13.12.0
13961403
[13.11.2]: https://github.com/MetaMask/metamask-extension/compare/v13.11.1...v13.11.2
13971404
[13.11.1]: https://github.com/MetaMask/metamask-extension/compare/v13.11.0...v13.11.1

app/_locales/en/messages.json

Lines changed: 7 additions & 9 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: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/background.js

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { finished } from 'readable-stream';
1515
import log from 'loglevel';
1616
import browser from 'webextension-polyfill';
1717
import { isObject, hasProperty } from '@metamask/utils';
18-
import { NotificationServicesController } from '@metamask/notification-services-controller';
1918
import { ExtensionPortStream } from 'extension-port-stream';
2019
import { withResolvers } from '../../shared/lib/promise-with-resolvers';
2120
import { FirstTimeFlowType } from '../../shared/constants/onboarding';
@@ -109,8 +108,6 @@ const lazyListener =
109108

110109
// eslint-disable-next-line @metamask/design-tokens/color-no-hex
111110
const BADGE_COLOR_APPROVAL = '#0376C9';
112-
// eslint-disable-next-line @metamask/design-tokens/color-no-hex
113-
const BADGE_COLOR_NOTIFICATION = '#D73847';
114111
const BADGE_MAX_COUNT = 9;
115112

116113
const inTest = process.env.IN_TEST;
@@ -1455,16 +1452,12 @@ export function setupController(
14551452
*/
14561453
function updateBadge() {
14571454
const pendingApprovalCount = getPendingApprovalCount();
1458-
const unreadNotificationsCount = getUnreadNotificationsCount();
14591455

14601456
let label = '';
1461-
let badgeColor = BADGE_COLOR_APPROVAL;
1457+
const badgeColor = BADGE_COLOR_APPROVAL;
14621458

14631459
if (pendingApprovalCount) {
14641460
label = getBadgeLabel(pendingApprovalCount, BADGE_MAX_COUNT);
1465-
} else if (unreadNotificationsCount > 0) {
1466-
label = getBadgeLabel(unreadNotificationsCount, BADGE_MAX_COUNT);
1467-
badgeColor = BADGE_COLOR_NOTIFICATION;
14681461
}
14691462

14701463
try {
@@ -1495,55 +1488,6 @@ export function setupController(
14951488
}
14961489
}
14971490

1498-
function getUnreadNotificationsCount() {
1499-
try {
1500-
const { isNotificationServicesEnabled, isFeatureAnnouncementsEnabled } =
1501-
controller.notificationServicesController.state;
1502-
1503-
const snapNotificationCount = Object.values(
1504-
controller.notificationServicesController.state
1505-
.metamaskNotificationsList,
1506-
).filter(
1507-
(notification) =>
1508-
notification.type ===
1509-
NotificationServicesController.Constants.TRIGGER_TYPES.SNAP &&
1510-
notification.readDate === null,
1511-
).length;
1512-
1513-
const featureAnnouncementCount = isFeatureAnnouncementsEnabled
1514-
? controller.notificationServicesController.state.metamaskNotificationsList.filter(
1515-
(notification) =>
1516-
!notification.isRead &&
1517-
notification.type ===
1518-
NotificationServicesController.Constants.TRIGGER_TYPES
1519-
.FEATURES_ANNOUNCEMENT,
1520-
).length
1521-
: 0;
1522-
1523-
const walletNotificationCount = isNotificationServicesEnabled
1524-
? controller.notificationServicesController.state.metamaskNotificationsList.filter(
1525-
(notification) =>
1526-
!notification.isRead &&
1527-
notification.type !==
1528-
NotificationServicesController.Constants.TRIGGER_TYPES
1529-
.FEATURES_ANNOUNCEMENT &&
1530-
notification.type !==
1531-
NotificationServicesController.Constants.TRIGGER_TYPES.SNAP,
1532-
).length
1533-
: 0;
1534-
1535-
const unreadNotificationsCount =
1536-
snapNotificationCount +
1537-
featureAnnouncementCount +
1538-
walletNotificationCount;
1539-
1540-
return unreadNotificationsCount;
1541-
} catch (error) {
1542-
console.error('Failed to get unread notifications count:', error);
1543-
return 0;
1544-
}
1545-
}
1546-
15471491
notificationManager.on(
15481492
NOTIFICATION_MANAGER_EVENTS.POPUP_CLOSED,
15491493
({ automaticallyClosed }) => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { migrate, version } from './185';
1+
import { migrate, version } from './183.1';
22

33
const VERSION = version;
4-
const oldVersion = 184;
4+
const oldVersion = 183;
55

66
describe(`migration #${VERSION}`, () => {
77
let mockedCaptureException: jest.Mock;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type VersionedData = {
77
data: Record<string, unknown>;
88
};
99

10-
export const version = 185;
10+
export const version = 183.1;
1111

1212
/**
1313
* This migration rounds conversionRate and usdConversionRate values in CurrencyController

app/scripts/migrations/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ const migrations = [
218218
require('./181'),
219219
require('./182'),
220220
require('./183'),
221+
require('./183.1'),
221222
require('./184'),
222-
require('./185'),
223223
];
224224

225225
export default migrations;

builds.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ buildTypes:
3232
- ALLOW_LOCAL_SNAPS: false
3333
- REQUIRE_SNAPS_ALLOWLIST: true
3434
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
35-
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
35+
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.3.0/index.html
3636
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
3737
- IS_SIDEPANEL: true
3838
- EXTENSION_UX_PNA25: true
@@ -67,7 +67,7 @@ buildTypes:
6767
- ALLOW_LOCAL_SNAPS: false
6868
- REQUIRE_SNAPS_ALLOWLIST: true
6969
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
70-
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
70+
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.3.0/index.html
7171
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
7272
- IS_SIDEPANEL: true
7373
- EXTENSION_UX_PNA25: true
@@ -103,7 +103,7 @@ buildTypes:
103103
- IS_SIDEPANEL: true
104104
- REQUIRE_SNAPS_ALLOWLIST: true
105105
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
106-
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
106+
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.3.0/index.html
107107
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
108108
- EXTENSION_UX_PNA25: true
109109
# for seedless onboarding (social login)
@@ -133,7 +133,7 @@ buildTypes:
133133
- ALLOW_LOCAL_SNAPS: true
134134
- REQUIRE_SNAPS_ALLOWLIST: false
135135
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: false
136-
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
136+
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.3.0/index.html
137137
- SUPPORT_LINK: https://support.metamask.io/
138138
- SUPPORT_REQUEST_LINK: https://support.metamask.io/
139139
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID

0 commit comments

Comments
 (0)