Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@
"count": 1
}
},
"packages/assets-controller/src/index.ts": {
"no-restricted-syntax": {
"count": 9
}
},
"packages/assets-controllers/jest.environment.js": {
"n/prefer-global/text-decoder": {
"count": 1
Expand Down
6 changes: 6 additions & 0 deletions packages/assets-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]

### Changed

- `TokenDataSource` constructor now takes `(messenger, options)` instead of `(options)`; `messenger` must be the same `AssetsControllerMessenger` used by `AssetsController` so token metadata enrichment can call `PhishingController:bulkScanTokens` ([#8329](https://github.com/MetaMask/core/pull/8329))

- `TokenDataSource` removes tokens flagged malicious by Blockaid (via `PhishingController:bulkScanTokens`) before merging metadata, instead of filtering non-native tokens by a minimum occurrence count ([#8329](https://github.com/MetaMask/core/pull/8329))

## [3.2.1]

### Changed
Expand Down
1 change: 1 addition & 0 deletions packages/assets-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@metamask/network-controller": "^30.0.1",
"@metamask/network-enablement-controller": "^5.0.1",
"@metamask/permission-controller": "^12.3.0",
"@metamask/phishing-controller": "^17.1.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should we also update tsconfig.json and tsconfig.build.json

"@metamask/polling-controller": "^16.0.4",
"@metamask/preferences-controller": "^23.1.0",
"@metamask/snaps-controllers": "^19.0.0",
Expand Down
7 changes: 5 additions & 2 deletions packages/assets-controller/src/AssetsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type {
GetPermissions,
PermissionControllerStateChange,
} from '@metamask/permission-controller';
import { PhishingControllerBulkScanTokensAction } from '@metamask/phishing-controller';
import type { PreferencesControllerStateChangeEvent } from '@metamask/preferences-controller';
import type {
SnapControllerGetRunnableSnapsAction,
Expand Down Expand Up @@ -275,7 +276,9 @@ type AllowedActions =
| SnapControllerHandleRequestAction
| GetPermissions
// BackendWebsocketDataSource
| BackendWebSocketServiceActions;
| BackendWebSocketServiceActions
// PhishingController
| PhishingControllerBulkScanTokensAction;

type AllowedEvents =
// AssetsController
Expand Down Expand Up @@ -737,7 +740,7 @@ export class AssetsController extends BaseController<
onActiveChainsUpdated: this.#onActiveChainsUpdated,
...stakedBalanceDataSourceConfig,
});
this.#tokenDataSource = new TokenDataSource({
this.#tokenDataSource = new TokenDataSource(this.messenger, {
queryApiClient,
getNativeAssetIds: (): string[] => {
const { nativeAssetIdentifiers } = this.messenger.call(
Expand Down
Loading
Loading