Skip to content

Commit

Permalink
Merge branch 'main' into mikesposito/chore/remove-keyringcontroller-m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
mikesposito committed Nov 5, 2024
2 parents ee4a8e1 + f5ad522 commit f41758f
Show file tree
Hide file tree
Showing 116 changed files with 4,281 additions and 967 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# Note: Please keep this synchronized with the `teams.json` file in the repository root.
# That file is used for some automated workflows, and maps controller to owning team(s).

* @MetaMask/engineering
/.github/ @MetaMask/wallet-framework-engineers

Expand Down Expand Up @@ -69,6 +72,8 @@
/packages/approval-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/assets-controller/package.json @MetaMask/metamask-assets @MetaMask/wallet-framework-engineers
/packages/assets-controller/CHANGELOG.md @MetaMask/metamask-assets @MetaMask/wallet-framework-engineers
/packages/chain-controller/package.json @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
/packages/chain-controller/CHANGELOG.md @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
/packages/ens-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/ens-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/gas-fee-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
Expand All @@ -85,6 +90,8 @@
/packages/notification-controller/CHANGELOG.md @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
/packages/notification-services-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/notification-services-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/phishing-controller/package.json @MetaMask/product-safety @MetaMask/wallet-framework-engineers
/packages/phishing-controller/CHANGELOG.md @MetaMask/product-safety @MetaMask/wallet-framework-engineers
/packages/profile-sync-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/profile-sync-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/queued-request-controller/package.json @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/create-update-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create Update Issues

on:
workflow_call:
secrets:
CORE_CREATE_UPDATE_ISSUES_TOKEN:
description: GitHub token with permission to create issues in both mobile and extension repositories
required: true

jobs:
create-update-issues:
environment: default-branch
runs-on: ubuntu-latest
steps:
- name: Checkout head
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Create Issues
env:
GH_TOKEN: ${{ secrets.CORE_CREATE_UPDATE_ISSUES_TOKEN }}
run: |
IFS=$'\n' read -r -d '' -a tag_array < <(git tag --points-at HEAD && printf '\0')
for tag in "${tag_array[@]}"; do
if [[ "${tag}" == @metamask/* ]] ; then
# Extract package name without the leading '@'
package_name="${tag#@}"
package_name="${package_name%@*}"
# Extract version number
version="${tag##*@}"
# Check if version number ends with .0.0
if [[ $version == *.0.0 ]]; then
# Fetch responsible team from file
teams=$(jq -r --arg key "$package_name" '.[$key]' teams.json)
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams"
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams"
fi
fi
done
shell: bash
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

create-update-issues:
name: Create update issues
needs: [is-release, publish-release]
if: needs.is-release.outputs.IS_RELEASE == 'true'
uses: ./.github/workflows/create-update-issues.yaml
secrets:
CORE_CREATE_UPDATE_ISSUES_TOKEN: ${{ secrets.CORE_CREATE_UPDATE_ISSUES_TOKEN }}

all-jobs-complete:
name: All jobs complete
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions examples/example-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.1",
"@metamask/base-controller": "^7.0.2",
"@metamask/utils": "^10.0.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/controller-utils": "^11.4.0",
"@metamask/controller-utils": "^11.4.2",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "230.0.0",
"version": "239.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down Expand Up @@ -51,14 +51,14 @@
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@metamask/create-release-branch": "^3.0.0",
"@metamask/create-release-branch": "^3.1.0",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/eth-block-tracker": "^11.0.2",
"@metamask/eth-json-rpc-provider": "^4.1.5",
"@metamask/json-rpc-engine": "^10.0.0",
"@metamask/eth-json-rpc-provider": "^4.1.6",
"@metamask/json-rpc-engine": "^10.0.1",
"@metamask/utils": "^10.0.0",
"@ts-bridge/cli": "^0.5.1",
"@types/jest": "^27.4.1",
Expand Down
11 changes: 10 additions & 1 deletion packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [18.2.3]

### Changed

- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
- Bump `@metamask/utils` from `^9.1.0` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))
- 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))

## [18.2.2]

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

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

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[18.2.3]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.2.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.2.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.2.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/accounts-controller",
"version": "18.2.2",
"version": "18.2.3",
"description": "Manages internal accounts",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^7.0.1",
"@metamask/base-controller": "^7.0.2",
"@metamask/eth-snap-keyring": "^4.3.6",
"@metamask/keyring-api": "^8.1.3",
"@metamask/snaps-sdk": "^6.5.0",
Expand All @@ -61,7 +61,7 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^17.3.0",
"@metamask/keyring-controller": "^17.3.1",
"@metamask/snaps-controllers": "^9.7.0",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.1",
"@metamask/controller-utils": "^11.4.0",
"@metamask/base-controller": "^7.0.2",
"@metamask/controller-utils": "^11.4.2",
"@metamask/utils": "^10.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.1"
"@metamask/base-controller": "^7.0.2"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
Expand Down
9 changes: 8 additions & 1 deletion packages/approval-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.1.1]

### Changed

- Bump `@metamask/utils` from `^9.1.0` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))

## [7.1.0]

### Added
Expand Down Expand Up @@ -247,7 +253,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[7.1.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.1.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.0.4]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.0.3]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions packages/approval-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/approval-controller",
"version": "7.1.0",
"version": "7.1.1",
"description": "Manages requests that require user approval",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -47,7 +47,7 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.1",
"@metamask/base-controller": "^7.0.2",
"@metamask/rpc-errors": "^7.0.1",
"@metamask/utils": "^10.0.0",
"nanoid": "^3.1.31"
Expand Down
42 changes: 40 additions & 2 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [42.0.0]

### Added

- 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))

### Changed

- **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))
- **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))
- 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))
- The `TokenDetectionController` now passes a `x-metamask-clientproduct` header when calling the account API. ([#4877](https://github.com/MetaMask/core/pull/4877))

## [41.0.0]

### Changed

- **BREAKING:** Bump `@metamask/network-controller` peer dependency from `^21.0.0` to `^22.0.0` ([#4841](https://github.com/MetaMask/core/pull/4841))
- **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))
- The `input` parameters of the controller's `_executePoll`, `_startPolling`, `onPollingComplete` methods now only accept this new polling input type.
- The `nativeCurrency` property (`string` type) has been removed.
- **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))
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
- Bump `@metamask/controller-utils` from `^11.4.0` to `^11.4.1` ([#4862](https://github.com/MetaMask/core/pull/4862))
- Bump dev dependency `@metamask/approval-controller` from `^7.1.0` to `^7.1.1` ([#4862](https://github.com/MetaMask/core/pull/4862))

## [40.0.0]

### Changed

- **BREAKING:** The CurrencyRateController polling input is now `{ nativeCurrency: string }` instead of a network client ID ([#4839](https://github.com/MetaMask/core/pull/4839))
- **BREAKING:** Bump `@metamask/network-controller` peer dependency to `^22.0.0` ([#4841](https://github.com/MetaMask/core/pull/4841))
- Bump `@metamask/controller-utils` to `^11.4.0` ([#4834](https://github.com/MetaMask/core/pull/4834))
- Bump `@metamask/rpc-errors` to `^7.0.1` ([#4831](https://github.com/MetaMask/core/pull/4831))
- Bump `@metamask/utils` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))

### Fixed

- Update TokenRatesController to not reset market data just after network switch but before loading new market data ([#4832](https://github.com/MetaMask/core/pull/4832))

## [39.0.0]

Expand Down Expand Up @@ -1154,7 +1189,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[42.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[41.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[40.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[39.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[38.3.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[38.2.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
18 changes: 9 additions & 9 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/assets-controllers",
"version": "39.0.0",
"version": "42.0.0",
"description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -53,12 +53,12 @@
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@metamask/abi-utils": "^2.0.3",
"@metamask/base-controller": "^7.0.1",
"@metamask/base-controller": "^7.0.2",
"@metamask/contract-metadata": "^2.4.0",
"@metamask/controller-utils": "^11.4.0",
"@metamask/controller-utils": "^11.4.2",
"@metamask/eth-query": "^4.0.0",
"@metamask/metamask-eth-abis": "^3.1.1",
"@metamask/polling-controller": "^11.0.0",
"@metamask/polling-controller": "^12.0.1",
"@metamask/rpc-errors": "^7.0.1",
"@metamask/utils": "^10.0.0",
"@types/bn.js": "^5.1.5",
Expand All @@ -73,14 +73,14 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@metamask/accounts-controller": "^18.2.2",
"@metamask/approval-controller": "^7.1.0",
"@metamask/accounts-controller": "^18.2.3",
"@metamask/approval-controller": "^7.1.1",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/ethjs-provider-http": "^0.3.0",
"@metamask/keyring-api": "^8.1.3",
"@metamask/keyring-controller": "^17.3.0",
"@metamask/network-controller": "^22.0.0",
"@metamask/preferences-controller": "^13.1.0",
"@metamask/keyring-controller": "^17.3.1",
"@metamask/network-controller": "^22.0.1",
"@metamask/preferences-controller": "^13.2.0",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
Expand Down
Loading

0 comments on commit f41758f

Please sign in to comment.