Skip to content

Commit

Permalink
Merge branch 'main' into fix/ignore-tokens-state-selected-network
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb authored Dec 17, 2024
2 parents 437a006 + 99cd1a2 commit 6b9ebbe
Show file tree
Hide file tree
Showing 89 changed files with 2,807 additions and 1,640 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
/packages/announcement-controller/CHANGELOG.md @MetaMask/wallet-ux @MetaMask/wallet-framework-engineers
/packages/approval-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/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/assets-controllers/package.json @MetaMask/metamask-assets @MetaMask/wallet-framework-engineers
/packages/assets-controllers/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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-update-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
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"
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams, client-controller-update"
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams, client-controller-update"
fi
fi
done
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "264.0.0",
"version": "272.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down
13 changes: 12 additions & 1 deletion packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [20.0.2]

### Changed

- Use new `@metamask/keyring-internal-api@^1.0.0` ([#4695](https://github.com/MetaMask/core/pull/4695))
- This package has been split out from the Keyring API.
- Bump `@metamask/keyring-api` from `^10.1.0` to `^12.0.0` ([#4695](https://github.com/MetaMask/core/pull/4695))
- Bump `@metamask/eth-snap-keyring` from `^5.0.1` to `^7.0.0` ([#4695](https://github.com/MetaMask/core/pull/4695))
- ESM/CommonJS support.

## [20.0.1]

### Fixed
Expand Down Expand Up @@ -368,7 +378,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]
[20.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[20.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[20.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
9 changes: 5 additions & 4 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": "20.0.1",
"version": "20.0.2",
"description": "Manages internal accounts",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -49,8 +49,9 @@
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^7.0.2",
"@metamask/eth-snap-keyring": "^5.0.1",
"@metamask/keyring-api": "^10.1.0",
"@metamask/eth-snap-keyring": "^7.0.0",
"@metamask/keyring-api": "^12.0.0",
"@metamask/keyring-internal-api": "^1.0.0",
"@metamask/snaps-sdk": "^6.7.0",
"@metamask/snaps-utils": "^8.3.0",
"@metamask/utils": "^10.0.0",
Expand All @@ -61,7 +62,7 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^19.0.1",
"@metamask/keyring-controller": "^19.0.2",
"@metamask/providers": "^18.1.1",
"@metamask/snaps-controllers": "^9.10.0",
"@types/jest": "^27.4.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/accounts-controller/src/AccountsController.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ControllerMessenger } from '@metamask/base-controller';
import type {
InternalAccount,
InternalAccountType,
} from '@metamask/keyring-api';
import {
BtcAccountType,
BtcMethod,
EthAccountType,
BtcMethod,
EthMethod,
} from '@metamask/keyring-api';
import { KeyringTypes } from '@metamask/keyring-controller';
import type {
InternalAccount,
InternalAccountType,
} from '@metamask/keyring-internal-api';
import type { SnapControllerState } from '@metamask/snaps-controllers';
import { SnapStatus } from '@metamask/snaps-utils';
import type { CaipChainId } from '@metamask/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/src/AccountsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
} from '@metamask/base-controller';
import { BaseController } from '@metamask/base-controller';
import { SnapKeyring } from '@metamask/eth-snap-keyring';
import type { InternalAccount } from '@metamask/keyring-api';
import {
EthAccountType,
EthMethod,
Expand All @@ -19,6 +18,7 @@ import type {
KeyringControllerGetAccountsAction,
KeyringControllerStateChangeEvent,
} from '@metamask/keyring-controller';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type {
SnapControllerState,
SnapStateChange,
Expand Down
10 changes: 5 additions & 5 deletions packages/accounts-controller/src/tests/mocks.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type {
InternalAccount,
InternalAccountType,
} from '@metamask/keyring-api';
import {
BtcAccountType,
BtcMethod,
EthAccountType,
BtcMethod,
EthMethod,
} from '@metamask/keyring-api';
import { KeyringTypes } from '@metamask/keyring-controller';
import type {
InternalAccount,
InternalAccountType,
} from '@metamask/keyring-internal-api';
import { v4 } from 'uuid';

export const createMockInternalAccount = ({
Expand Down
2 changes: 1 addition & 1 deletion packages/approval-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@metamask/base-controller": "^7.0.2",
"@metamask/rpc-errors": "^7.0.1",
"@metamask/utils": "^10.0.0",
"nanoid": "^3.1.31"
"nanoid": "^3.3.8"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
Expand Down
12 changes: 11 additions & 1 deletion packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [45.1.2]

### Changed

- Remove use of `@metamask/keyring-api` ([#4695](https://github.com/MetaMask/core/pull/4695))
- `@metamask/providers` and `webextension-polyfill` peer dependencies are no longer required.
- Use new `@metamask/keyring-internal-api@^1.0.0` ([#4695](https://github.com/MetaMask/core/pull/4695))
- This package has been split out from the Keyring API. Its types are compatible with the `@metamask/keyring-api` package used previously.

## [45.1.1]

### Changed
Expand Down Expand Up @@ -1291,7 +1300,8 @@ 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]
[45.1.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[45.1.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[45.1.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[45.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
10 changes: 5 additions & 5 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": "45.1.1",
"version": "45.1.2",
"description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -75,13 +75,13 @@
},
"devDependencies": {
"@babel/runtime": "^7.23.9",
"@metamask/accounts-controller": "^20.0.1",
"@metamask/accounts-controller": "^20.0.2",
"@metamask/approval-controller": "^7.1.1",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/ethjs-provider-http": "^0.3.0",
"@metamask/keyring-api": "^10.1.0",
"@metamask/keyring-controller": "^19.0.1",
"@metamask/network-controller": "^22.1.0",
"@metamask/keyring-controller": "^19.0.2",
"@metamask/keyring-internal-api": "^1.0.0",
"@metamask/network-controller": "^22.1.1",
"@metamask/preferences-controller": "^15.0.1",
"@metamask/providers": "^18.1.1",
"@types/jest": "^27.4.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ControllerMessenger } from '@metamask/base-controller';
import { query, toChecksumHexAddress } from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import {
type NetworkClientId,
type NetworkClientConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/NftController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
NFT_API_BASE_URL,
InfuraNetworkType,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type {
NetworkClientConfiguration,
NetworkClientId,
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/NftController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
NFT_API_BASE_URL,
NFT_API_VERSION,
} from '@metamask/controller-utils';
import { type InternalAccount } from '@metamask/keyring-api';
import { type InternalAccount } from '@metamask/keyring-internal-api';
import type {
NetworkClientId,
NetworkControllerGetNetworkClientByIdAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
convertHexToDecimal,
InfuraNetworkType,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { KeyringControllerState } from '@metamask/keyring-controller';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import {
getDefaultNetworkControllerState,
RpcEndpointType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
toChecksumHexAddress,
toHex,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type {
NetworkClientConfiguration,
NetworkClientId,
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/TokenRatesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
FALL_BACK_VS_CURRENCY,
toHex,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type {
NetworkControllerGetNetworkClientByIdAction,
NetworkControllerGetStateAction,
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/TokensController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
convertHexToDecimal,
InfuraNetworkType,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type {
NetworkClientConfiguration,
NetworkClientId,
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/TokensController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
isValidHexAddress,
safelyExecute,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import { abiERC721 } from '@metamask/metamask-eth-abis';
import type {
NetworkClientId,
Expand Down
9 changes: 9 additions & 0 deletions packages/base-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Rename `ControllerMessenger` to `Messenger` ([#5050](https://github.com/MetaMask/core/pull/5050))
- `ControllerMessenger` has been renamed to `Messenger`
- `RestrictedControllerMessengerConstraint` has been renamed to `RestrictedMessengerConstraint`
- `RestrictedControllerMessenger` has been renamed to `RestrictedMessenger`
- The `RestrictedMessenger` constructor parameter `controllerMessenger` has been renamed to `messenger`, though the old name is still accepted
- The old names remain exported as deprecated aliases of the new names, so this is not a breaking change.

## [7.0.2]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/base-controller/src/BaseControllerV1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
countControllerStateMetadata,
getCountMessenger,
} from './BaseControllerV2.test';
import { ControllerMessenger } from './ControllerMessenger';
import { ControllerMessenger } from './Messenger';

const STATE = { name: 'foo' };
const CONFIG = { disabled: true };
Expand Down
4 changes: 2 additions & 2 deletions packages/base-controller/src/BaseControllerV2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
getPersistentState,
isBaseController,
} from './BaseControllerV2';
import { ControllerMessenger } from './ControllerMessenger';
import type { RestrictedControllerMessenger } from './RestrictedControllerMessenger';
import { ControllerMessenger } from './Messenger';
import type { RestrictedControllerMessenger } from './RestrictedMessenger';

export const countControllerName = 'CountController';

Expand Down
4 changes: 2 additions & 2 deletions packages/base-controller/src/BaseControllerV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import type {
BaseControllerV1Instance,
StateConstraint as StateConstraintV1,
} from './BaseControllerV1';
import type { ActionConstraint, EventConstraint } from './ControllerMessenger';
import type { ActionConstraint, EventConstraint } from './Messenger';
import type {
RestrictedControllerMessenger,
RestrictedControllerMessengerConstraint,
} from './RestrictedControllerMessenger';
} from './RestrictedMessenger';

enablePatches();

Expand Down
Loading

0 comments on commit 6b9ebbe

Please sign in to comment.