Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:MetaMask/metamask-extension into…
Browse files Browse the repository at this point in the history
… blockaid_default_announcement
  • Loading branch information
jpuri committed Jan 10, 2024
2 parents 94e45f1 + ee05011 commit caea3ac
Show file tree
Hide file tree
Showing 291 changed files with 7,810 additions and 2,447 deletions.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ workflows:
- test-e2e-chrome-mv3:
requires:
- prep-build-test-mv3
- test-e2e-chrome-vault-decryption:
filters:
branches:
only:
- develop
- /^Version-v(\d+)[.](\d+)[.](\d+)/
requires:
- prep-build
- test-unit-mocha:
requires:
- prep-deps
Expand Down Expand Up @@ -271,6 +279,7 @@ workflows:
- test-e2e-firefox-flask
- test-e2e-chrome-mmi
- test-e2e-chrome-rpc-mmi
- test-e2e-chrome-vault-decryption
- test-storybook
- benchmark:
requires:
Expand Down Expand Up @@ -981,6 +990,21 @@ jobs:
- store_test_results:
path: test/test-results/e2e

test-e2e-chrome-vault-decryption:
executor: node-browsers-large
steps:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run:
name: test:e2e:chrome:vault
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 2 --debug
fi
no_output_timeout: 5m

test-e2e-firefox-flask:
executor: node-browsers-large
parallelism: 16
Expand Down
2 changes: 1 addition & 1 deletion .storybook/3.COLORS.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ We follow a 3 tiered system for color design tokens and css variables.
<div
style={{
textAlign: 'center',
backgroundColor: 'var(--color-background-alternative)',
backgroundColor: 'var(--brand-colors-white-white000)',
padding: 32,
}}
>
Expand Down
31 changes: 13 additions & 18 deletions .storybook/4.SHADOW.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ There are 4 different sizes of shadow in MetaMask
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-text-default)',
}}
>
XS
<span>XS</span>
</div>
<div
style={{
Expand All @@ -42,10 +42,10 @@ There are 4 different sizes of shadow in MetaMask
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-text-default)',
}}
>
SM
<span>SM</span>
</div>
<div
style={{
Expand All @@ -56,10 +56,10 @@ There are 4 different sizes of shadow in MetaMask
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-text-default)',
}}
>
MD
<span>MD</span>
</div>
<div
style={{
Expand All @@ -70,10 +70,10 @@ There are 4 different sizes of shadow in MetaMask
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-text-default)',
}}
>
LG
<span>LG</span>
</div>
</div>

Expand Down Expand Up @@ -106,9 +106,8 @@ As well as the neutral colors for shadow 2 other colors exist that are used for
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-text-default)',
}}
color="default"
>
<span>Default</span>
</div>
Expand All @@ -121,7 +120,6 @@ As well as the neutral colors for shadow 2 other colors exist that are used for
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-primary-inverse)',
}}
>
Expand All @@ -136,7 +134,6 @@ As well as the neutral colors for shadow 2 other colors exist that are used for
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
color: 'var(--color-error-inverse)',
}}
>
Expand Down Expand Up @@ -169,10 +166,10 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--shadow-size-xs) var(--color-shadow-default)',
color: 'var(--color-text-default)',
}}
>
<span>Card</span>
Expand All @@ -183,10 +180,10 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--shadow-size-sm) var(--color-shadow-default)',
color: 'var(--color-text-default)',
}}
>
<span>Dropdown</span>
Expand All @@ -197,10 +194,10 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--shadow-size-md) var(--color-shadow-default)',
color: 'var(--color-text-default)',
}}
>
<span>Toast</span>
Expand All @@ -211,10 +208,10 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--shadow-size-lg) var(--color-shadow-default)',
color: 'var(--color-text-default)',
}}
>
<span>Modal</span>
Expand All @@ -233,7 +230,6 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--component-button-primary-shadow)',
Expand All @@ -249,7 +245,6 @@ Using both size and color tokens, different shadows can be applied to components
display: 'grid',
alignContent: 'center',
justifyContent: 'center',
spanAlign: 'center',
height: 100,
textAlign: 'center',
boxShadow: 'var(--component-button-danger-shadow)',
Expand Down
6 changes: 0 additions & 6 deletions .storybook/manager.js

This file was deleted.

12 changes: 3 additions & 9 deletions .storybook/metamask-storybook-theme.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// .storybook/YourTheme.js

import { create } from '@storybook/theming';

export default create({
base: 'light',
// MetaMask Storybook Theme
export const metamaskStorybookTheme = {
brandTitle: 'MetaMask Storybook',

// Typography
fontBase: 'Euclid Circular B, Roboto, Helvetica, Arial, sans-serif',
fontCode: 'Inconsolata, monospace',
});
};
27 changes: 0 additions & 27 deletions .storybook/preview-head.html

This file was deleted.

38 changes: 24 additions & 14 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Instead, use export const parameters = {}; and export const decorators = []; in your .storybook/preview.js. Addon authors similarly should use such an export in a preview entry file (see Preview entries).
* */
import React, { useEffect, useState } from 'react';
import React, { useEffect } from 'react';
import { action } from '@storybook/addon-actions';
import { Provider } from 'react-redux';
import configureStore from '../ui/store/store';
Expand All @@ -16,8 +16,10 @@ import testData from './test-data.js';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import { setBackgroundConnection } from '../ui/store/background-connection';
import MetaMaskStorybookTheme from './metamask-storybook-theme';
import { addons } from '@storybook/addons';
import { metamaskStorybookTheme } from './metamask-storybook-theme';
import { DocsContainer } from '@storybook/addon-docs';
import { useDarkMode } from 'storybook-dark-mode';
import { themes } from '@storybook/theming';

export const parameters = {
backgrounds: {
Expand All @@ -28,7 +30,23 @@ export const parameters = {
],
},
docs: {
theme: MetaMaskStorybookTheme,
container: (context) => {
const isDark = useDarkMode();

const props = {
...context,
theme: isDark
? { ...themes.dark, ...metamaskStorybookTheme }
: { ...themes.light, ...metamaskStorybookTheme },
'data-theme': isDark ? 'dark' : 'light',
};

return (
<div data-theme={isDark ? 'dark' : 'light'}>
<DocsContainer {...props} />
</div>
);
},
},
options: {
storySort: {
Expand Down Expand Up @@ -81,16 +99,10 @@ const proxiedBackground = new Proxy(
setBackgroundConnection(proxiedBackground);

const metamaskDecorator = (story, context) => {
const [isDark, setDark] = useState(false);
const channel = addons.getChannel();
const isDark = useDarkMode();
const currentLocale = context.globals.locale;
const current = allLocales[currentLocale];

useEffect(() => {
channel.on('DARK_MODE', setDark);
return () => channel.off('DARK_MODE', setDark);
}, [channel, setDark]);

useEffect(() => {
const currentTheme = document.documentElement.getAttribute('data-theme');

Expand Down Expand Up @@ -121,6 +133,4 @@ const metamaskDecorator = (story, context) => {
);
};

export const decorators = [
metamaskDecorator,
];
export const decorators = [metamaskDecorator];
1 change: 1 addition & 0 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const state = {
},
orderedNetworkList: [],
pinnedAccountList: [],
hiddenAccountList: [],
tokenList: {
'0x514910771af9ca656af840dff83e8264ecf986ca': {
address: '0x514910771af9ca656af840dff83e8264ecf986ca',
Expand Down
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest: current file",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"--runInBand",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
],
"version": "0.2.0"
}
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [11.7.3]
### Fixed
- Ensure fiat token balances are displayed on the homescreen [#22295](https://github.com/MetaMask/metamask-extension/pull/22295)

## [11.7.2]
### Fixed
- Fixed the activity list occasionally incorrectly showing transaction statuses as failed, pending or dropped [#22319](https://github.com/MetaMask/metamask-extension/pull/22319)

## [11.7.1]
### Added
- Added mapping to hardcode a mapping of ChainIDs to currency symbols [#22292](https://github.com/MetaMask/metamask-extension/pull/22292)

### Changed
- Updated onboarding flow to ensure user is prompted for password during reminder based backup [#22307](https://github.com/MetaMask/metamask-extension/pull/22297)

### Fixed
- Fixed QR scan functionality when sending a transaction to another contact [#22297](https://github.com/MetaMask/metamask-extension/pull/22297)
- Fixed incorrect warnings when adding a chain from a dapp [#22309](https://github.com/MetaMask/metamask-extension/pull/22309)
- Stopped unnecessary Cryptocompare polling when initialize the UI ([#22326](https://github.com/MetaMask/metamask-extension/pull/22326))

## [11.7.0]
### Added
- Added auto-suggestion for ticker symbols in the network form ([#21843](https://github.com/MetaMask/metamask-extension/pull/21843))
Expand Down Expand Up @@ -4246,7 +4266,10 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
### Uncategorized
- Added the ability to restore accounts from seed words.

[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.7.0...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.7.3...HEAD
[11.7.3]: https://github.com/MetaMask/metamask-extension/compare/v11.7.2...v11.7.3
[11.7.2]: https://github.com/MetaMask/metamask-extension/compare/v11.7.1...v11.7.2
[11.7.1]: https://github.com/MetaMask/metamask-extension/compare/v11.7.0...v11.7.1
[11.7.0]: https://github.com/MetaMask/metamask-extension/compare/v11.6.3...v11.7.0
[11.6.3]: https://github.com/MetaMask/metamask-extension/compare/v11.6.2...v11.6.3
[11.6.2]: https://github.com/MetaMask/metamask-extension/compare/v11.6.1...v11.6.2
Expand Down
Loading

0 comments on commit caea3ac

Please sign in to comment.