Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
be2a698
release: Bump main version to 13.6.0 (#36552)
metamaskbot Oct 3, 2025
a5f1c84
chore: update tar-fs to 2.1.4 (#36560)
shane-t Oct 3, 2025
171b668
chore: fix audit failure `tar-fs` (#36562)
seaona Oct 3, 2025
19b7975
feat: yarn webpack --lavamoat (#34913)
itsyoboieltr Oct 3, 2025
621846e
fix: restore institutional snap entrypoint cp-13.5.0 (#36345)
shane-t Oct 3, 2025
c9deaf4
refactor: Refactor multichain router to use modular init pattern (#36…
Mrtenz Oct 3, 2025
79d71cd
feat: send controller patches to UI (#36059)
matthewwalsh0 Oct 3, 2025
af40d79
fix: preferences controller merging cp-13.5.0 (#36553)
n3ps Oct 3, 2025
4fa909c
chore: add deprecation notices to component library components (#36548)
georgewrmarshall Oct 3, 2025
3e36726
chore: remove deprecated IconColor.iconAlternativeSoft (#36538)
georgewrmarshall Oct 3, 2025
886e461
fix(sign off list): remove legacy list of teams (#36555)
gauthierpetetin Oct 4, 2025
f7f5a9b
fix: UI review updates (#36523)
smgv Oct 6, 2025
fca75c3
feat: add shield id to support url (#36495)
tuna1207 Oct 7, 2025
645f609
fix: shield allowed tokens approve amount (#36494)
tuna1207 Oct 7, 2025
b0624c9
fix: error message displayed while sending tokens to a contract addre…
jpuri Oct 7, 2025
6f2c4c3
test: fix flaky test `Multichain API Calling wallet_invokeMethod` (#3…
seaona Oct 7, 2025
0c92e77
test: fix flaky test `Speed Up and Cancel Transaction Tests Speed up …
seaona Oct 7, 2025
140a3e0
fix: cp-13.5.0 in code to check send flag (#36529)
jpuri Oct 7, 2025
553316b
chore: Remove `imagemin` (#36563)
FrederikBolding Oct 7, 2025
530e799
chore: Bump `@metamask/multichain-api-middleware` to `1.2.0` (#36434)
jiexi Oct 7, 2025
293c9a6
chore: Bump Snaps packages (#36613)
FrederikBolding Oct 7, 2025
0b0a2e0
fix: cp-13.5.0 bump assets controllers to v78.0.0 to add account api …
salimtb Oct 7, 2025
4fe7bae
fix: cp-13.5.0 prevent wrongly format balance from being passed (#36612)
bergarces Oct 7, 2025
7773e52
feat: Implement gator token transfer page (#36207)
V00D00-child Oct 7, 2025
3b1342a
fix(release pr approval): add more explicit name for the job (#36624)
gauthierpetetin Oct 7, 2025
ed2279d
fix: cp-13.5.0 updates the default pair constant to contain the corre…
ghgoodreau Oct 7, 2025
ed02ac2
fix: lavamoat patch (#36628)
itsyoboieltr Oct 7, 2025
b958a4c
chore: remove deprecated BackgroundColor.backgroundAlternativeSoft (#…
georgewrmarshall Oct 7, 2025
f09608d
chore: update margin bottom for carousel (#36579)
georgewrmarshall Oct 7, 2025
db2a011
chore: New Crowdin translations by Github Action (#35249)
metamaskbot Oct 8, 2025
862f471
feat: Add shield subscription token approval confirmation (#36576)
pedronfigueiredo Oct 8, 2025
0ffb8bf
fix: fixed SRP syncs cp-13.5.0 (#36582)
lwin-kyaw Oct 8, 2025
24cb12e
fix: remove conditional Swap/Bridge routing cp-13.5.0 (#36638)
micaelae Oct 8, 2025
f833b8f
feat: shield handle crypto payment failure (#36610)
tuna1207 Oct 8, 2025
d97146f
refactor: Refactor more controllers/services to use modular init patt…
Mrtenz Oct 8, 2025
99ff801
feat: shield claim form (#35790)
lionellbriones Oct 8, 2025
bd6b0bf
Merge origin/main into stable-sync
gauthierpetetin Oct 8, 2025
8902fc9
feat: charts dynamically update percentage (#36664)
juanmigdr Oct 8, 2025
97f809e
docs(changelog): linting issues
gauthierpetetin Oct 8, 2025
86c45df
release: sync stable to main for version 13.4.1 (#36674)
gauthierpetetin Oct 8, 2025
7b431a2
fix: cp-13.5.0 add infura base (#36675)
salimtb Oct 8, 2025
6a3a059
feat: enable bitcoin bip44 (#36510)
aganglada Oct 8, 2025
5774311
test: clean up confirmations integration tests (#36516)
cryptotavares Oct 8, 2025
1c7b7c1
feat: SWAPS-2835 bitcoin swaps (#35597)
ghgoodreau Oct 8, 2025
0cc90b9
Merge origin/main into stable-sync
gauthierpetetin Oct 9, 2025
eddd074
docs(changelog): linting issues
gauthierpetetin Oct 9, 2025
7d628e6
test: add `snap-simple-keyring-site` as a local server and remove liv…
seaona Oct 9, 2025
fed7efe
chore: adding e2e for new send implementation (#36626)
jpuri Oct 9, 2025
56cad09
refactor: Refactor remaining confirmation-related controllers to use …
Mrtenz Oct 9, 2025
bee6ceb
fix: fix e2e broken by new send implementation (#36656)
jpuri Oct 9, 2025
c1c03ef
test: adding send e2e for ERC20 token (#36683)
jpuri Oct 9, 2025
f09c615
fix: add back cross_origin_opener_policy (#36500)
Akaryatrh Oct 9, 2025
6c4a630
release: sync stable to main for version 13.4.2 (#36711)
gauthierpetetin Oct 9, 2025
1157852
feat: Transaction shield coverage footer (#36677)
pedronfigueiredo Oct 9, 2025
f4aae4b
fix: Prevent opening nickname modal for accounts (#36723)
OGPoyraz Oct 9, 2025
b71ba59
feat: Enable BTC sending in redesigned send flow (#36719)
OGPoyraz Oct 9, 2025
c50627c
feat: add labels for btc assets (#36574)
bergarces Oct 9, 2025
236f1da
fix: change notification feature flag to use rollout variants (#36724)
Prithpal-Sooriya Oct 9, 2025
84f47fc
feat: Add account watch and snap account options to multichain (#36717)
david0xd Oct 9, 2025
8453e5e
ci: GitHub Actions time usage optimizations (#36629)
MajorLift Oct 9, 2025
bd0b488
fix(action): require changelog entry even if the PR description doesn…
gauthierpetetin Oct 10, 2025
d073679
fix(pr template): Use latest version of release pr template (#36743)
gauthierpetetin Oct 10, 2025
fb36f01
fix: use subscription pricing for subscription confirmation (#36672)
tuna1207 Oct 10, 2025
4ea05f4
feat: shield context (#36588)
lwin-kyaw Oct 10, 2025
cc03511
refactor: Clean up more controller initialisation logic (#36665)
Mrtenz Oct 10, 2025
99383ae
feat: update bitcoin snap version (#36753)
orestiseth Oct 10, 2025
d11dc4b
fix: remove show incoming transactions from preferences controller (#…
cryptotavares Oct 10, 2025
16083a7
fix: flaky test `Confirmation Redesign Contract Interaction Transacti…
seaona Oct 10, 2025
40c5a93
fix: flaky test `lockdown the background environment is locked down `…
seaona Oct 10, 2025
220b8c6
MCRM-8: Updated add-team-label worklow to use topology.json (#36731)
XxdpavelxX Oct 10, 2025
6a4ff8d
fix: cp-13.5.0 filter activity tab correctly (#36773)
bergarces Oct 10, 2025
7846af3
fix: Revert changes from "ci: GitHub Actions time usage optimizations…
MajorLift Oct 10, 2025
f5ced4f
fix: use template for dollar amount on locale (#36741)
lionellbriones Oct 10, 2025
0576b30
fix: non-evm networks not showing on first install (#36755)
bergarces Oct 10, 2025
2e62ff4
feat: auto turn on security settings (#36343)
lionellbriones Oct 10, 2025
8bdd1e1
feat: path based blocking (#36634)
imblue-dabadee Oct 10, 2025
90c141d
feat: file uploader (#35779)
lionellbriones Oct 10, 2025
197219d
feat: bump @metamask/notification-services-controller (#36633)
Prithpal-Sooriya Oct 10, 2025
eaad2da
feat: add lukso network (#36620)
khanti42 Oct 10, 2025
4b8aabd
fix: cp-13.5.0 improve token tabs perf and move polling to parent com…
salimtb Oct 10, 2025
318bc93
feat: new toast (#36408)
lionellbriones Oct 11, 2025
e8afa7b
fix: subscription polling and shield init (#36779)
lwin-kyaw Oct 13, 2025
49cc847
chore: Bump ens-resolver-snap to `v1.0` (#36774)
GuillaumeRx Oct 13, 2025
32d8ce0
fix: bump `@metamask/account-tree-controller` to `v1.4.2` cp-13.5.0 (…
mathieuartu Oct 13, 2025
7795aac
feat: patched shieldcontroller (#36809)
lwin-kyaw Oct 13, 2025
e1958ff
fix: shield coverage text style (#36810)
tuna1207 Oct 13, 2025
b1257bd
test: add `snap-account-abstraction-keyring-site` as a local server a…
seaona Oct 13, 2025
521b212
fix: Properly resolve ENS content hashes (#36812)
FrederikBolding Oct 13, 2025
7f6ba73
chore: update `CODEOWNERS.md` with `@metamask/wallet-integrations` te…
adonesky1 Oct 13, 2025
51a0c6a
feat: add funds modal (#36592)
lionellbriones Oct 13, 2025
96e96b5
feat: bitcoin activity list updates and general followups (#36645)
ghgoodreau Oct 13, 2025
f8de282
chore: Bump bridge and bridge status controller v50.0.0 (#36820)
dan437 Oct 14, 2025
84ad46d
fix: show Solana destination assets when swapping cp-13.5.0 (#36830)
micaelae Oct 14, 2025
b1cee4f
fix: Remove flask code fences for the snap accounts link (#36770)
david0xd Oct 14, 2025
d51fe94
fix: fix hideZeroBalance setting for asset list (#36821)
sahar-fehri Oct 14, 2025
62380ce
test: remove Swap live requests from the allowlist (#36822)
seaona Oct 14, 2025
57670a3
feat: Add support for gas sponsorship on extension (#34905)
pedronfigueiredo Oct 14, 2025
c402448
feat: shield subscription error state toasts (#36718)
lionellbriones Oct 14, 2025
f35e29d
feat(STX-169): test transaction-controller init for automatic gas fee…
rarquevaux Oct 14, 2025
a8023a3
fix: Replace eye icon with hover interaction to hide balances (#36543)
amandaye0h Oct 14, 2025
915febb
test: skip flaky phishing detection tests on Firefox (#36858)
imblue-dabadee Oct 14, 2025
1e64fdd
fix: recipient modal stays visible when switching from EVM to non-evm…
micaelae Oct 14, 2025
aed49b1
fix: cp-13.5.0 Send functionality related fixes (#36831)
jpuri Oct 15, 2025
0278bd4
fix: flaky test `Account syncing - Unsupported Account types does not…
seaona Oct 15, 2025
3f84662
feat: update formatPeriodDuration for new durations (#36706)
mj-kiwi Oct 15, 2025
343d656
perf: add `SnapKeyring.setSelectedAccounts` support - cp-13.5.0 (#36715)
ccharly Oct 15, 2025
63736ba
fix: Tighten publishHook logic and move it to the confirmations domai…
pedronfigueiredo Oct 15, 2025
d361af9
feat: shield subscription eligibility and submit user events (#36835)
lwin-kyaw Oct 15, 2025
2254c45
fix(snaps): cp-13.5.0 Write a custom number input for `SnapUIInput` (…
GuillaumeRx Oct 15, 2025
951fc7d
fix: Adjust Sentry release name for proper semantic versioning (#36816)
FrederikBolding Oct 15, 2025
bfe99e4
fix: now consider non-EVM account names for group names - cp-13.5.0 (…
ccharly Oct 15, 2025
4159650
fix: add missing logic from connect page to multichain connect page c…
AugmentedMode Oct 15, 2025
5d4bd7d
feat: integrate api for submit claims (#36815)
lionellbriones Oct 15, 2025
775d0b5
fix: cp-13.5.0 Fix send flow metrics (#36878)
OGPoyraz Oct 15, 2025
3e55943
chore: Resolve `@metamask/eth-block-tracker` to `12.2.1` (#36869)
jiexi Oct 15, 2025
7e9990d
chore: Update activity list codeowners (#36786)
pedronfigueiredo Oct 15, 2025
d94dca1
fix: empty select RPC modal (#36876)
n3ps Oct 15, 2025
b4c631d
feat(i18n): Added Irish translation (#36088)
aindriu80 Oct 15, 2025
7b06301
feat: add `build-experimental` code fence (#36873)
hmalik88 Oct 15, 2025
db4c164
chore: remove deprecated Dialog component (#36870)
georgewrmarshall Oct 15, 2025
048cc13
Merge origin/main into stable-sync
gauthierpetetin Oct 16, 2025
782e9ce
docs(changelog): linting issues
gauthierpetetin Oct 16, 2025
7f423c4
chore: bump `@metamask/smart-transactions-controller` (#36167)
mikesposito Oct 16, 2025
c8eab32
feat: Shield: Add origin to sentinel URL (#36901)
matthiasgeihs Oct 16, 2025
f6fd98d
chore: remove unused searchable-item-list components (#36868)
georgewrmarshall Oct 16, 2025
743b315
fix: cp-13.5.0 Fix account icons in send flow (#36877)
OGPoyraz Oct 16, 2025
50f3f0f
release: sync stable to main for version 13.4.3 (#36914)
gauthierpetetin Oct 16, 2025
ed02e92
fix: Sponsored transaction by normalising calldata handling (#36902)
pedronfigueiredo Oct 16, 2025
2ec9507
feat: add option show loader when status is not yet available (#36888)
lionellbriones Oct 16, 2025
8b3af8d
fix: do not block the UI after importing a new SRP (#36882)
mathieuartu Oct 16, 2025
b19a4e4
fix(script): delete unused generate-rc-commits.js script (#36814)
gauthierpetetin Oct 16, 2025
86b8c62
feat: add plasma network logo and native token logo (#36456)
wantedsystem Oct 16, 2025
281f7b7
test: Migrate MMQA-722 Simulation details (#36598)
LeVinhGithub Oct 16, 2025
2be8ec5
fix: multichain support on dapp connected site popover cp-13.5.0 (#36…
PatrykLucka Oct 16, 2025
24b4506
fix: fix duplicate token import from search (#36727)
sahar-fehri Oct 16, 2025
eca2a3c
chore: use stable empty references (#36910)
n3ps Oct 16, 2025
1371d2d
feat: control btc provider state via remote feature flag (#36676)
fabiobozzo Oct 16, 2025
afd15d3
Merge origin/main into stable-sync
gauthierpetetin Oct 16, 2025
f898063
feat(core-backend): add AccountActivity and Websocket for TokenBalanc…
Kriys94 Oct 16, 2025
0422c4c
release: sync stable to main for version 13.5.0 (#36932)
gauthierpetetin Oct 17, 2025
388595d
Update Attributions
metamaskbot Oct 17, 2025
8299e26
fix: cp-13.6.0 Missing env var errors in `validate-lavamoat-policies`…
MajorLift Oct 17, 2025
388448c
fix: cp-13.6.0 errors in `validate-lavamoat-policies` related to envi…
MajorLift Oct 17, 2025
189db3e
release: release/13.6.0-Changelog (#36937)
metamaskbot Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ignores:
#

- '@lavamoat/snow'
- '@lavamoat/webpack'
- '@lavamoat/allow-scripts'
- '@babel/runtime'
- '@fortawesome/fontawesome-free'
Expand All @@ -27,6 +28,8 @@ ignores:
- '@metamask/test-dapp'
- '@metamask/test-dapp-multichain'
- '@metamask/test-dapp-solana'
- '@metamask/snap-simple-keyring-site'
- '@metamask/snap-account-abstraction-keyring-site'
- '@metamask/design-tokens' # Only imported in index.css
- '@tsconfig/node22' # required dynamically by TS, used in tsconfig.json
- '@sentry/cli' # invoked as `sentry-cli`
Expand Down
34 changes: 26 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ app/scripts/constants/snaps.ts @MetaMask/core-platform
ui/components/app/metamask-template-renderer @MetaMask/confirmations @MetaMask/core-platform

# Core Extension UX
ui/components/app/whats-new-popup @MetaMask/core-extension-ux
ui/css @MetaMask/core-extension-ux
ui/pages/home @MetaMask/core-extension-ux
ui/pages/core @MetaMask/core-extension-ux
ui/components/multichain/ @MetaMask/core-extension-ux
ui/components/app/whats-new-popup @MetaMask/core-extension-ux
ui/css @MetaMask/core-extension-ux
ui/pages/home @MetaMask/core-extension-ux
ui/pages/core @MetaMask/core-extension-ux
ui/components/multichain/ @MetaMask/core-extension-ux
ui/components/app/transaction-list @MetaMask/core-extension-ux
ui/components/app/transaction-list-item-details @MetaMask/core-extension-ux
ui/components/app/transaction-list-item @MetaMask/core-extension-ux

# Co-owned by accounts and core-extension-ux
ui/components/multichain/multi-srp/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
Expand Down Expand Up @@ -149,6 +152,21 @@ test/e2e/helpers.js @MetaMask/qa
test/e2e/mock-e2e-allowlist.js @MetaMask/qa
test/e2e/mock-e2e.js @MetaMask/qa

# Wallet API Platform - Page Load Benchmark
test/e2e/page-objects/benchmark @MetaMask/wallet-api-platform-engineers
test/e2e/playwright/benchmark @MetaMask/wallet-api-platform-engineers
# Wallet Integrations
app/scripts/lib/rpc-method-middleware @MetaMask/wallet-integrations
shared/lib/caip25-caveat-merger.ts @MetaMask/wallet-integrations
test/e2e/page-objects/benchmark @MetaMask/wallet-integrations
test/e2e/playwright/benchmark @MetaMask/wallet-integrations
test/e2e/flask/multichain-api @MetaMask/wallet-integrations
# TODO CONSOLIDATE THE MIDDLEWARE BELOW INTO THE RPC-METHOD-MIDDLEWARE FOLDER
app/scripts/lib/createRPCMethodTrackingMiddleware.js @MetaMask/wallet-integrations
app/scripts/lib/createMetamaskMiddleware.js @MetaMask/wallet-integrations
app/scripts/lib/createOnboardingMiddleware.js @MetaMask/wallet-integrations
app/scripts/lib/createMetaRPCHandler.js @MetaMask/wallet-integrations
app/scripts/lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware.ts @MetaMask/wallet-integrations
app/scripts/lib/createHyperliquidReferralMiddleware.ts @MetaMask/wallet-integrations
app/scripts/lib/metaRPCClientFactory.ts @MetaMask/wallet-integrations
app/scripts/lib/middleware/ @MetaMask/wallet-integrations
app/scripts/lib/createOriginThrottlingMiddleware.ts @MetaMask/wallet-integrations
app/scripts/lib/createMainFrameOriginMiddleware.ts @MetaMask/wallet-integrations
app/scripts/lib/createTracingMiddleware.ts @MetaMask/wallet-integrations
32 changes: 16 additions & 16 deletions .github/scripts/check-template-and-add-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,29 +183,29 @@ async function main(): Promise<void> {
}

} else if (labelable.type === LabelableType.PullRequest) {
// Check changelog entry for all PRs (regardless of template match)
const hasNoChangelogLabel = labelable.labels?.some(
(label) => label.name === "no-changelog"
);

// Require changelog entry
if (hasNoChangelogLabel) {
console.log(`PR ${labelable.number} has "no-changelog" label. Skipping changelog entry check.`);
} else if (!hasChangelogEntry(labelable.body)) {
const errorMessage = `PR is missing a valid "CHANGELOG entry:" line.`;
console.log(errorMessage);

core.setFailed(errorMessage);
process.exit(1);
}

if (templateType === TemplateType.PullRequest) {
console.log("PR matches 'pull-request-template.md' template.");
await removeLabelFromLabelableIfPresent(
octokit,
labelable,
invalidPullRequestTemplateLabel,
);

// Skip changelog check if PR has "no-changelog" label
const hasNoChangelogLabel = labelable.labels?.some(
(label) => label.name === "no-changelog"
);

// Require changelog entry
if (hasNoChangelogLabel) {
console.log(`PR ${labelable.number} has "no-changelog" label. Skipping changelog entry check.`);
} else if (!hasChangelogEntry(labelable.body)) {
const errorMessage = `PR is missing a valid "CHANGELOG entry:" line.`;
console.log(errorMessage);

core.setFailed(errorMessage);
process.exit(1);
}
} else {
const errorMessage = `PR body does not match template ('pull-request-template.md').\n\nMake sure PR's body includes all section titles.\n\nSections titles are listed here: https://github.com/MetaMask/metamask-extension/blob/main/.github/scripts/shared/template.ts#L40-L47`;
console.log(errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
test-suite-name: test-e2e-chrome-webpack
build-artifact: build-test-webpack
build-command: yarn build:test:webpack
test-command: yarn test:e2e:chrome:webpack
test-command: yarn test:e2e:chrome
matrix-index: ${{ matrix.index }}
matrix-total: ${{ strategy.job-total }}

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/e2e-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
matrix-index: ${{ matrix.index }}
matrix-total: ${{ strategy.job-total }}

test-e2e-firefox-webpack:
uses: ./.github/workflows/run-e2e.yml
if: ${{ github.event_name != 'merge_group' }}
secrets:
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
strategy:
fail-fast: ${{ github.event_name == 'merge_group' }}
matrix:
index:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
with:
test-suite-name: test-e2e-firefox-webpack
build-artifact: build-test-webpack
build-command: yarn build:test:webpack
test-command: yarn test:e2e:firefox
matrix-index: ${{ matrix.index }}
matrix-total: ${{ strategy.job-total }}

test-e2e-firefox-flask:
uses: ./.github/workflows/run-e2e.yml
strategy:
Expand All @@ -44,6 +62,7 @@ jobs:
test-e2e-firefox-report:
needs:
- test-e2e-firefox-browserify
- test-e2e-firefox-webpack
- test-e2e-firefox-flask
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ jobs:
needs:
- needs-e2e
- build-test-mv2-browserify
- build-test-webpack
- build-test-flask-mv2-browserify
if: ${{ needs.needs-e2e.outputs.needs-e2e == 'true' }}
uses: ./.github/workflows/e2e-firefox.yml
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/update-lavamoat-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,43 @@ jobs:
path: lavamoat/browserify/${{ matrix.build-type }}
key: cache-${{ matrix.build-type }}-${{ needs.prepare.outputs.COMMIT_SHA }}

update-lavamoat-webpack-policy:
name: Update LavaMoat webpack policy
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- prepare
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}

- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
skip-allow-scripts: true
use-yarn-hydrate: true

- name: Update LavaMoat webpack policy
run: yarn webpack --env production --no-cache --generatePolicy
env:
INFURA_PROD_PROJECT_ID: 00000000000
SEGMENT_PROD_WRITE_KEY: 00000000000
GOOGLE_PROD_CLIENT_ID: 00000000000
APPLE_PROD_CLIENT_ID: 00000000000

- name: Cache webpack policy
uses: actions/cache/save@v4
with:
path: lavamoat/webpack
key: cache-webpack-${{ needs.prepare.outputs.COMMIT_SHA }}

commit-updated-policies:
name: Commit the updated LavaMoat policies
runs-on: ubuntu-latest
Expand All @@ -169,6 +206,7 @@ jobs:
- is-fork-pull-request
- update-lavamoat-build-policy
- update-lavamoat-webapp-policy
- update-lavamoat-webpack-policy
# Ensure forks don't get access to the LavaMoat update token
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
steps:
Expand Down Expand Up @@ -226,6 +264,13 @@ jobs:
key: cache-experimental-${{ needs.prepare.outputs.COMMIT_SHA }}
fail-on-cache-miss: true

- name: Restore webpack policy
uses: actions/cache/restore@v4
with:
path: lavamoat/webpack
key: cache-webpack-${{ needs.prepare.outputs.COMMIT_SHA }}
fail-on-cache-miss: true

- name: Check whether there are policy changes
id: policy-changes
run: |
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/validate-lavamoat-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,30 @@ jobs:
echo "::error::Working tree dirty."
exit 1
fi

validate-lavamoat-policy-webpack:
name: Validate LavaMoat webpack policy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
skip-allow-scripts: true
use-yarn-hydrate: true

- name: Validate LavaMoat webpack policy
run: yarn webpack --env production --no-cache --generatePolicy
env:
INFURA_PROD_PROJECT_ID: 00000000000
SEGMENT_PROD_WRITE_KEY: 00000000000
GOOGLE_PROD_CLIENT_ID: 00000000000
APPLE_PROD_CLIENT_ID: 00000000000

- name: Check working tree
run: |
if ! git diff --exit-code; then
echo "::error::Working tree dirty."
exit 1
fi
4 changes: 4 additions & 0 deletions .metamaskrc.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ SEEDLESS_ONBOARDING_ENABLED='false'
; Set this to `true` to enable Metamask Shield
METAMASK_SHIELD_ENABLED='false'

; Backend WebSocket URL
; Uses production API endpoint by default (same as builds.yml)
;MM_BACKEND_WEBSOCKET_URL='wss://gateway.api.cx.metamask.io/v1'

; These variables are required for OAuth Service
GOOGLE_CLIENT_ID=
APPLE_CLIENT_ID=
Expand Down
1 change: 1 addition & 0 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,7 @@ const state = {
networkConnectionBanner: {
status: 'unknown',
},
coverageResults: {},
},
appState: {
isAccountMenuOpen: false,
Expand Down
48 changes: 0 additions & 48 deletions .yarn/patches/lavamoat-core-npm-16.2.2-e361ff1f8a.patch

This file was deleted.

18 changes: 18 additions & 0 deletions .yarn/patches/lavamoat-core-npm-16.7.1-9dcb956c6f.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/loadPolicy.js b/src/loadPolicy.js
index 0aa4f83d083bcf18db9cf69df45a4c52154af4fe..b481194d929070dc653b2a61295c5b9cfde5e129 100644
--- a/src/loadPolicy.js
+++ b/src/loadPolicy.js
@@ -104,10 +104,9 @@ async function loadPolicyAndApplyOverrides({

const finalPolicy = mergePolicy(policy, policyOverride)

- // TODO: Only write if merge results in changes.
- // Would have to make a deep equal check on whole policy, which is a waste of time.
- // mergePolicy() should be able to do it in one pass.
- await fs.writeFile(policyPath, jsonStringifySortedPolicy(finalPolicy))
+ // Skip policy write step to prevent intermittent build failures
+ // The extension validates the policy in a separate step, we don't need it
+ // to be written to disk here.

return finalPolicy
}
Loading
Loading