Skip to content

Commit

Permalink
Merge branch 'develop' into feat/NFT-details-new-design
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri authored Jul 16, 2024
2 parents eba470b + 7b3450a commit 9d75a7f
Show file tree
Hide file tree
Showing 248 changed files with 13,578 additions and 4,715 deletions.
9 changes: 7 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
# those changes on build, release and publishing outcomes.

* @MetaMask/extension-devs
**/snaps/** @MetaMask/snaps-devs
development/ @MetaMask/extension-devs @kumavis
lavamoat/ @MetaMask/extension-devs @MetaMask/supply-chain @MetaMask/snaps-devs

# The offscreen.ts script file that is included in the offscreedocument html
# The offscreen.ts script file that is included in the offscreen document html
# file is responsible, at present, for loading the snaps execution environment
# for MV3. Any changes to this file should require at least one member of the
# snaps development team to review and approve the changes.
Expand Down Expand Up @@ -84,3 +83,9 @@ ui/components/component-library @MetaMask/design-system-engineers
# Slack handle: @accounts-team-devs | Slack channel: #metamask-accounts-team

app/scripts/lib/snap-keyring @MetaMask/accounts-engineers

# Snaps
**/snaps/** @MetaMask/snaps-devs
shared/constants/permissions.ts @MetaMask/snaps-devs
ui/helpers/utils/permission.js @MetaMask/snaps-devs
ui/hooks/useTransactionInsights.js @MetaMask/snaps-devs
20 changes: 20 additions & 0 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run integration tests

on:
push:
branches: [develop, master]
pull_request:
types: [opened,reopened,synchronize]

jobs:
test-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup environment
uses: ./.github/actions/setup-environment

- name: test:integration:coverage
run: yarn test:integration:coverage
44 changes: 32 additions & 12 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
# WARNING! It is currently being investigated how to make this faster
# DO NOT blindly copy this workflow, not noticing the slow down,
# because suddenly our tests will take hours to pass CI.
# Hopefully this comment here will help prevent that.
# https://github.com/MetaMask/metamask-extension/issues/25680

name: Run unit tests

on:
push:
branches: [develop, master]
pull_request:
types: [opened,reopened,synchronize]

jobs:
test-unit-jest:
test-unit:
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup environment
uses: ./.github/actions/setup-environment

- name: test:coverage:jest:dev
run: yarn test:coverage:jest:dev
- name: test:unit:coverage
run: yarn test:unit:coverage --shard=${{ matrix.shard }}/${{ strategy.job-total }}

- name: Rename coverage to shard coverage
run: mv coverage/coverage-final.json coverage/coverage-${{matrix.shard}}.json

- uses: actions/upload-artifact@v4
with:
name: coverage-${{matrix.shard}}
path: coverage/coverage-${{matrix.shard}}.json

report-coverage:
runs-on: ubuntu-latest
needs:
- test-unit
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: test:coverage:jest
run: yarn test:coverage:jest
- name: Download coverage from shards
uses: actions/download-artifact@v4
with:
path: coverage
pattern: coverage-*
merge-multiple: true

- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
8 changes: 5 additions & 3 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
-f content='+1'
env:
COMMENT_ID: ${{ github.event.comment.id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
REPO: ${{ github.repository }}

prepare:
Expand Down Expand Up @@ -146,6 +146,8 @@ jobs:
git config --global user.email '[email protected]'
git commit -am "Update Attributions"
git push
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
- name: Post comment
run: |
if [[ $HAS_CHANGES == 'true' ]]
Expand All @@ -156,7 +158,7 @@ jobs:
fi
env:
HAS_CHANGES: ${{ steps.attributions-changes.outputs.HAS_CHANGES }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}

check-status:
Expand Down Expand Up @@ -192,6 +194,6 @@ jobs:
gh pr comment "${PR_NUMBER}" --body "Attributions update failed. You can [review the logs or retry the attributions update here](${ACTION_RUN_URL})"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
ACTION_RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
3 changes: 3 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ module.exports = {
config.resolve.alias['../../../../store/actions'] = require.resolve(
'../ui/__mocks__/actions.js',
);
config.resolve.alias['../../../../../../store/actions'] = require.resolve(
'../ui/__mocks__/actions.js',
);
config.resolve.fallback = {
child_process: false,
constants: false,
Expand Down
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Integration: current file",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.integration.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
},
{
"type": "node",
"request": "launch",
Expand Down
2,630 changes: 0 additions & 2,630 deletions .yarn/patches/@metamask-gas-fee-controller-npm-15.1.2-db4d2976aa.patch

This file was deleted.

30 changes: 30 additions & 0 deletions .yarn/patches/@metamask-snaps-utils-npm-7.7.0-2cc1f044af.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/dist/chunk-37VHIRUJ.js b/dist/chunk-37VHIRUJ.js
index a909a4ef20305665a07db5c25b4a9ff7eb0a447e..98dd75bf33a9716dc6cca96a38d184645f6ec033 100644
--- a/dist/chunk-37VHIRUJ.js
+++ b/dist/chunk-37VHIRUJ.js
@@ -53,8 +53,8 @@ function assertIsKeyringOrigins(value, ErrorWrapper) {
}
function createOriginRegExp(matcher) {
const escaped = matcher.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
- const regex = escaped.replace(/\*/gu, ".*");
- return RegExp(regex, "u");
+ const regex = escaped.replace(/\\\*/gu, '.*');
+ return RegExp(`${regex}$`, 'u');
}
function checkAllowedOrigin(matcher, origin) {
if (matcher === "*" || matcher === origin) {
diff --git a/dist/chunk-K2OTEZZZ.mjs b/dist/chunk-K2OTEZZZ.mjs
index 15be5da7563a5bdf464d7e9c28ed6f04863e378a..7f38bf328e71c1feb2b8850ba050ce9e55801668 100644
--- a/dist/chunk-K2OTEZZZ.mjs
+++ b/dist/chunk-K2OTEZZZ.mjs
@@ -53,8 +53,8 @@ function assertIsKeyringOrigins(value, ErrorWrapper) {
}
function createOriginRegExp(matcher) {
const escaped = matcher.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
- const regex = escaped.replace(/\*/gu, ".*");
- return RegExp(regex, "u");
+ const regex = escaped.replace(/\\\*/gu, '.*');
+ return RegExp(`${regex}$`, 'u');
}
function checkAllowedOrigin(matcher, origin) {
if (matcher === "*" || matcher === origin) {
20 changes: 19 additions & 1 deletion app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions app/manifest/v2/_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@
"storage",
"unlimitedStorage",
"clipboardWrite",
"http://localhost:8545/",
"https://*.infura.io/",
"https://*.codefi.network/",
"https://*.cx.metamask.io/",
"https://chainid.network/chains.json",
"https://lattice.gridplus.io/*",
"http://*/*",
"https://*/*",
"activeTab",
"webRequest",
"webRequestBlocking",
"*://*.eth/",
"notifications"
],
Expand Down
Loading

0 comments on commit 9d75a7f

Please sign in to comment.