Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into sync-master
Browse files Browse the repository at this point in the history
* origin/develop: (227 commits)
  Improve UI + content for price difference notifications (#11145)
  Swaps: Create a new swap (#11124)
  Bump @metamask/controllers from 9.0.0 to 9.1.0 (#11150)
  Capture exception instead of throw error in useTransactionDisplayData (#11153)
  Fixing jest component test output errors (#11139)
  Avoid showing  "Gas price extremely low" warning in advanced tab for testnets (#11111)
  @metamask/auto-changelog@2.0.1 (#11140)
  Migrate to new CurrencyRateController (#11005)
  bump allow scripts (#11134)
  Show Sentry CLI output when uploading artifacts (#11100)
  use etherscan-link customBlockExplorer methods with customNetwork usage tracking (#11017)
  Adding notification for updated seed phrase wording (#11131)
  Bumping package.json
  Fix a condition for checking if a token should be added (#11127)
  Removing support survey notification from What's New (#11118)
  Handling custom token decimal fetch failure due to network error (#10956)
  Hide basic tab in advanced gas modal for speedup and cancel when on testnets (#11115)
  Migrate Sentry settings to environment variables (#11085)
  Update eth-ledger-bridge-keyring to v0.5.0 (#11064)
  fix metaRPCClientFactory id handling (#11116)
  ...
  • Loading branch information
Gudahtt committed May 21, 2021
2 parents e7f8732 + 1a92060 commit 203456d
Show file tree
Hide file tree
Showing 1,342 changed files with 5,855 additions and 5,440 deletions.
35 changes: 33 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ workflows:
- test-lint-lockfile:
requires:
- prep-deps
- test-lint-changelog:
requires:
- prep-deps
- test-e2e-chrome:
requires:
- prep-build-test
Expand Down Expand Up @@ -83,6 +86,7 @@ workflows:
- test-lint
- test-lint-shellcheck
- test-lint-lockfile
- test-lint-changelog
- test-unit
- test-unit-global
- validate-source-maps
Expand Down Expand Up @@ -282,6 +286,33 @@ jobs:
name: lockfile-lint
command: yarn lint:lockfile

test-lint-changelog:
executor: node-browsers
steps:
- checkout
- attach_workspace:
at: .
- when:
condition:
not:
matches:
pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/
value: << pipeline.git.branch >>
steps:
- run:
name: Validate changelog
command: yarn auto-changelog validate
- when:
condition:
matches:
pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/
value: << pipeline.git.branch >>
steps:
- run:
name: Validate release candidate changelog
command: yarn auto-changelog validate --rc


test-deps:
executor: node-browsers
steps:
Expand Down Expand Up @@ -474,7 +505,7 @@ jobs:
at: .
- run:
name: sentry sourcemaps upload
command: yarn sentry:publish
command: SENTRY_ORG=metamask SENTRY_PROJECT=metamask yarn sentry:publish
- run:
name: Create GitHub release
command: |
Expand All @@ -485,7 +516,7 @@ jobs:
steps:
- add_ssh_keys:
fingerprints:
- "5e:a3:2d:35:b6:25:b5:87:b1:41:11:0d:77:50:96:73"
- "3d:49:29:f4:b2:e8:ea:af:d1:32:eb:2a:fc:15:85:d8"
- checkout
- attach_workspace:
at: .
Expand Down
4 changes: 1 addition & 3 deletions .circleci/scripts/release-bump-manifest-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ fi
printf '%s\n' 'Updating the manifest version if needed'

version="${CIRCLE_BRANCH/Version-v/}"
updated_manifest="$(jq ".version = \"$version\"" app/manifest/_base.json)"
printf '%s\n' "$updated_manifest" > app/manifest/_base.json
yarn prettier --write app/manifest/_base.json
yarn version --no-git-tag-version --new-version "${version}"

if [[ -z $(git status --porcelain) ]]
then
Expand Down
14 changes: 12 additions & 2 deletions .circleci/scripts/release-commit-version-bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,19 @@ then
exit 1
fi

if [[ -z "${GITHUB_TOKEN:-}" ]]
then
printf '%s\n' 'GITHUB_TOKEN environment variable must be set'
exit 1
elif [[ -z "${GITHUB_TOKEN_USER:-}" ]]
then
printf '%s\n' 'GITHUB_TOKEN_USER environment variable must be set'
exit 1
fi

printf '%s\n' 'Commit the manifest version and changelog if the manifest has changed'

if git diff --quiet app/manifest/_base.json;
if git diff --quiet package.json;
then
printf '%s\n' 'No manifest changes to commit'
exit 0
Expand All @@ -28,7 +38,7 @@ git \
-c user.name='MetaMask Bot' \
-c user.email='metamaskbot@users.noreply.github.com' \
commit --message "${CIRCLE_BRANCH/-/ }" \
CHANGELOG.md app/manifest/_base.json
CHANGELOG.md package.json

repo_slug="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
git push "https://$GITHUB_TOKEN_USER:$GITHUB_TOKEN@github.com/$repo_slug" "$CIRCLE_BRANCH"
6 changes: 0 additions & 6 deletions .circleci/scripts/release-create-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ then
exit 1
fi

if [[ -z "${GITHUB_TOKEN:-}" ]]
then
printf '%s\n' 'GITHUB_TOKEN environment variable must be set'
exit 1
fi

function install_github_cli ()
{
printf '%s\n' 'Installing hub CLI'
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = {
},
{
files: ['**/*.test.js'],
excludedFiles: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'],
excludedFiles: ['ui/**/*.test.js', 'ui/__mocks__/*.js'],
extends: ['@metamask/eslint-config-mocha'],
rules: {
'mocha/no-setup-in-describe': 'off',
Expand All @@ -125,7 +125,7 @@ module.exports = {
},
},
{
files: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'],
files: ['ui/**/*.test.js', 'ui/__mocks__/*.js'],
extends: ['@metamask/eslint-config-jest'],
rules: {
'jest/no-restricted-matchers': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test-builds
build-artifacts

#ignore css output and sourcemaps
ui/app/css/output/
ui/css/output/

notes.txt

Expand Down
8 changes: 4 additions & 4 deletions .storybook/i18n.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component, createContext, useMemo } from 'react';
import PropTypes from 'prop-types';
import { getMessage } from '../ui/app/helpers/utils/i18n-helper';
import { I18nContext } from '../ui/app/contexts/i18n';
import { getMessage } from '../ui/helpers/utils/i18n-helper';
import { I18nContext } from '../ui/contexts/i18n';

export { I18nContext }
export { I18nContext };

export const I18nProvider = (props) => {
const { currentLocale, current, en } = props
const { currentLocale, current, en } = props;

const t = useMemo(() => {
return (key, ...args) =>
Expand Down
18 changes: 9 additions & 9 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path')
const path = require('path');

const CopyWebpackPlugin = require('copy-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
stories: ['../ui/app/**/*.stories.js'],
stories: ['../ui/**/*.stories.js'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
Expand All @@ -12,7 +12,7 @@ module.exports = {
'./i18n-party-addon/register.js',
],
webpackFinal: async (config) => {
config.module.strictExportPresence = true
config.module.strictExportPresence = true;
config.module.rules.push({
test: /\.scss$/,
loaders: [
Expand All @@ -31,12 +31,12 @@ module.exports = {
sourceMap: true,
implementation: require('sass'),
sassOptions: {
includePaths: ['ui/app/css/'],
includePaths: ['ui/css/'],
},
},
},
],
})
});
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
Expand All @@ -51,7 +51,7 @@ module.exports = {
},
],
}),
)
return config
);
return config;
},
}
};
8 changes: 4 additions & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { addDecorator, addParameters } from '@storybook/react';
import { useGlobals } from '@storybook/api';
import { withKnobs } from '@storybook/addon-knobs';
import { Provider } from 'react-redux';
import configureStore from '../ui/app/store/store';
import '../ui/app/css/index.scss';
import configureStore from '../ui/store/store';
import '../ui/css/index.scss';
import localeList from '../app/_locales/index.json';
import * as allLocales from './locales';
import { I18nProvider, LegacyI18nProvider } from './i18n';
import testData from './test-data.js'
import testData from './test-data.js';

addParameters({
backgrounds: {
Expand Down Expand Up @@ -41,7 +41,7 @@ const styles = {
alignItems: 'center',
};

const store = configureStore(testData)
const store = configureStore(testData);

const metamaskDecorator = (story, context) => {
const currentLocale = context.globals.locale;
Expand Down

0 comments on commit 203456d

Please sign in to comment.