Skip to content

Commit be5a235

Browse files
authored
Merge branch 'main' into caip-multichain
2 parents da87d65 + 7de0f00 commit be5a235

File tree

95 files changed

+2545
-732
lines changed

Some content is hidden

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

95 files changed

+2545
-732
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Lines starting with '#' are comments.
22
# Each line is a file pattern followed by one or more owners.
33

4+
# Note: Please keep this synchronized with the `teams.json` file in the repository root.
5+
# That file is used for some automated workflows, and maps controller to owning team(s).
6+
47
* @MetaMask/engineering
58
/.github/ @MetaMask/wallet-framework-engineers
69

@@ -87,6 +90,8 @@
8790
/packages/notification-controller/CHANGELOG.md @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
8891
/packages/notification-services-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
8992
/packages/notification-services-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
93+
/packages/phishing-controller/package.json @MetaMask/product-safety @MetaMask/wallet-framework-engineers
94+
/packages/phishing-controller/CHANGELOG.md @MetaMask/product-safety @MetaMask/wallet-framework-engineers
9095
/packages/profile-sync-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
9196
/packages/profile-sync-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
9297
/packages/queued-request-controller/package.json @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Add PR to Project Board - Wallet Framework Team'
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, labeled, review_requested]
7+
8+
jobs:
9+
add-to-project:
10+
name: Add PR to Project Board
11+
runs-on: ubuntu-latest
12+
env:
13+
TEAM_NAME: 'wallet-framework-engineers'
14+
TEAM_LABEL: 'team-wallet-framework'
15+
16+
steps:
17+
- name: Add PR to project board
18+
uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e
19+
if: |
20+
github.event.requested_team.name == env.TEAM_NAME ||
21+
contains(github.event.pull_request.labels.*.name, env.TEAM_LABEL)
22+
with:
23+
project-url: https://github.com/orgs/MetaMask/projects/113
24+
github-token: ${{ secrets.CORE_ADD_PRS_TO_PROJECT }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create Update Issues
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
CORE_CREATE_UPDATE_ISSUES_TOKEN:
7+
description: GitHub token with permission to create issues in both mobile and extension repositories
8+
required: true
9+
10+
jobs:
11+
create-update-issues:
12+
environment: default-branch
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout head
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-tags: true
19+
20+
- name: Create Issues
21+
env:
22+
GH_TOKEN: ${{ secrets.CORE_CREATE_UPDATE_ISSUES_TOKEN }}
23+
run: |
24+
IFS=$'\n' read -r -d '' -a tag_array < <(git tag --points-at HEAD && printf '\0')
25+
26+
for tag in "${tag_array[@]}"; do
27+
if [[ "${tag}" == @metamask/* ]] ; then
28+
# Extract package name without the leading '@'
29+
package_name="${tag#@}"
30+
package_name="${package_name%@*}"
31+
32+
# Extract version number
33+
version="${tag##*@}"
34+
35+
# Check if version number ends with .0.0
36+
if [[ $version == *.0.0 ]]; then
37+
# Fetch responsible team from file
38+
teams=$(jq -r --arg key "$package_name" '.[$key]' teams.json)
39+
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams"
40+
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams"
41+
fi
42+
fi
43+
done
44+
shell: bash

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ jobs:
4848
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4949
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5050

51+
create-update-issues:
52+
name: Create update issues
53+
needs: [is-release, publish-release]
54+
if: needs.is-release.outputs.IS_RELEASE == 'true'
55+
uses: ./.github/workflows/create-update-issues.yaml
56+
secrets:
57+
CORE_CREATE_UPDATE_ISSUES_TOKEN: ${{ secrets.CORE_CREATE_UPDATE_ISSUES_TOKEN }}
58+
5159
all-jobs-complete:
5260
name: All jobs complete
5361
runs-on: ubuntu-latest

examples/example-controllers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"@metamask/auto-changelog": "^3.4.4",
55-
"@metamask/controller-utils": "^11.4.1",
55+
"@metamask/controller-utils": "^11.4.2",
5656
"@types/jest": "^27.4.1",
5757
"deepmerge": "^4.2.2",
5858
"jest": "^27.5.1",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "235.0.0",
3+
"version": "242.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {
@@ -51,7 +51,7 @@
5151
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
5252
"@babel/preset-typescript": "^7.23.3",
5353
"@lavamoat/allow-scripts": "^3.0.4",
54-
"@metamask/create-release-branch": "^3.0.0",
54+
"@metamask/create-release-branch": "^3.1.0",
5555
"@metamask/eslint-config": "^12.2.0",
5656
"@metamask/eslint-config-jest": "^12.1.0",
5757
"@metamask/eslint-config-nodejs": "^12.1.0",

packages/accounts-controller/CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [18.2.3]
11+
12+
### Changed
13+
14+
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
15+
- Bump `@metamask/utils` from `^9.1.0` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))
16+
- Bump dev dependency `@metamask/keyring-controller` from `^17.2.2` to `^17.3.1` ([#4810](https://github.com/MetaMask/core/pull/4810), [#4870](https://github.com/MetaMask/core/pull/4870))
17+
1018
## [18.2.2]
1119

1220
### Changed
@@ -329,7 +337,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
329337

330338
- Initial release ([#1637](https://github.com/MetaMask/core/pull/1637))
331339

332-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.2...HEAD
340+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.3...HEAD
341+
[18.2.3]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.2...@metamask/accounts-controller@18.2.3
333342
[18.2.2]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.1...@metamask/accounts-controller@18.2.2
334343
[18.2.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.0...@metamask/accounts-controller@18.2.1
335344
[18.2.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.1.1...@metamask/accounts-controller@18.2.0

packages/accounts-controller/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/accounts-controller",
3-
"version": "18.2.2",
3+
"version": "18.2.3",
44
"description": "Manages internal accounts",
55
"keywords": [
66
"MetaMask",
@@ -61,7 +61,7 @@
6161
},
6262
"devDependencies": {
6363
"@metamask/auto-changelog": "^3.4.4",
64-
"@metamask/keyring-controller": "^17.3.0",
64+
"@metamask/keyring-controller": "^17.3.1",
6565
"@metamask/snaps-controllers": "^9.7.0",
6666
"@types/jest": "^27.4.1",
6767
"@types/readable-stream": "^2.3.0",

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"dependencies": {
5050
"@metamask/base-controller": "^7.0.2",
51-
"@metamask/controller-utils": "^11.4.1",
51+
"@metamask/controller-utils": "^11.4.2",
5252
"@metamask/utils": "^10.0.0"
5353
},
5454
"devDependencies": {

packages/assets-controllers/CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [42.0.0]
11+
12+
### Added
13+
14+
- Add `resetState` method to `NftController`, `TokensController`, `TokenBalancesController` and `TokenRatesController` to reset the controller's state back to their default state ([#4880](https://github.com/MetaMask/core/pull/4880))
15+
16+
### Changed
17+
18+
- **BREAKING**: A `platform` argument must now be passed to the `TokenDetectionController` constructor, indicating whether the platform is extension or mobile. ([#4877](https://github.com/MetaMask/core/pull/4877))
19+
- **BREAKING**: The `TokenRatesController` now accepts `{chainId: Hex}` as its polling input to `startPolling()` instead of `{networkClientId: NetworkClientId}` ([#4887](https://github.com/MetaMask/core/pull/4887))
20+
- When the `TokenRatesController`'s subscription to `TokensController:stateChange` is fired, token prices are now updated across all chain IDs whose tokens changed, instead of just the current chain. ([#4866](https://github.com/MetaMask/core/pull/4866))
21+
- The `TokenDetectionController` now passes a `x-metamask-clientproduct` header when calling the account API. ([#4877](https://github.com/MetaMask/core/pull/4877))
22+
23+
## [41.0.0]
24+
25+
### Changed
26+
27+
- **BREAKING**: The polling input accepted by `CurrencyRateController` is now an object with a `nativeCurrencies` property that is defined as a `string` array type ([#4852](https://github.com/MetaMask/core/pull/4852))
28+
- The `input` parameters of the controller's `_executePoll`, `_startPolling`, `onPollingComplete` methods now only accept this new polling input type.
29+
- The `nativeCurrency` property (`string` type) has been removed.
30+
- **BREAKING**: `RatesController` now types the `conversionRate` and `usdConversionRate` in its state as `number` instead of `string`, to match what it was actually storing. ([#4852](https://github.com/MetaMask/core/pull/4852))
31+
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
32+
- Bump `@metamask/controller-utils` from `^11.4.0` to `^11.4.1` ([#4862](https://github.com/MetaMask/core/pull/4862))
33+
- Bump dev dependency `@metamask/approval-controller` from `^7.1.0` to `^7.1.1` ([#4862](https://github.com/MetaMask/core/pull/4862))
34+
1035
## [40.0.0]
1136

1237
### Changed
@@ -1164,7 +1189,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11641189
11651190
- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
11661191
1167-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@40.0.0...HEAD
1192+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@42.0.0...HEAD
1193+
[42.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@41.0.0...@metamask/assets-controllers@42.0.0
1194+
[41.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@40.0.0...@metamask/assets-controllers@41.0.0
11681195
[40.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@39.0.0...@metamask/assets-controllers@40.0.0
11691196
[39.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@38.3.0...@metamask/assets-controllers@39.0.0
11701197
[38.3.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@38.2.0...@metamask/assets-controllers@38.3.0

0 commit comments

Comments
 (0)