Skip to content

Commit

Permalink
Fix PPOMController outdated base-controller and missing `stateCha…
Browse files Browse the repository at this point in the history
…nge` event
  • Loading branch information
MajorLift committed Jul 23, 2024
1 parent a26b658 commit 202e843
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 10 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ class Engine {
messenger: this.controllerMessenger.getRestricted({
name: 'TransactionController',
allowedActions: [`${approvalController.name}:addRequest`],
allowedEvents: [],
}),
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
Expand Down Expand Up @@ -1452,6 +1453,7 @@ class Engine {
'KeyringController:stateChange',
'NetworkController:stateChange',
'PermissionController:stateChange',
'PPOMController:stateChange',
'PreferencesController:stateChange',
'SignatureController:stateChange',
'SnapController:stateChange',
Expand All @@ -1469,7 +1471,6 @@ class Engine {
'NftController:stateChange', // BaseControllerV1, has `messagingSystem` but as private field, messenger defined without `stateChange` event type
'NotificationServicesController:stateChange', // BaseControllerV2, messenger defined without `stateChange` event type
'PhishingController:stateChange', // BaseControllerV2, messenger defined without `stateChange` event type
'PPOMController:stateChange', // BaseControllerV2, messenger defined without `stateChange` event type
'SnapsRegistry:stateChange', // BaseControllerV2, messenger defined without `stateChange` event type
'TokenBalancesController:stateChange', // BaseControllerV2, `TokenBalancesControllerState` import error
'TransactionController:stateChange', // BaseControllerV1, has `messagingSystem` but as private field, messenger defined without `stateChange` event type
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"@metamask/permission-controller": "^9.0.0",
"@metamask/phishing-controller": "^9.0.0",
"@metamask/post-message-stream": "^8.0.0",
"@metamask/ppom-validator": "0.32.0",
"@metamask/ppom-validator": "github:MetaMask/ppom-validator#head=bump-base-controller-to-6.0.2-expose-build",
"@metamask/preferences-controller": "^11.0.0",
"@metamask/profile-sync-controller": "^0.1.3",
"@metamask/react-native-actionsheet": "2.4.2",
Expand Down
64 changes: 56 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5799,7 +5799,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/eth-block-tracker@npm:^9.0.2":
"@metamask/eth-block-tracker@npm:^9.0.2, @metamask/eth-block-tracker@npm:^9.0.3":
version: 9.0.3
resolution: "@metamask/eth-block-tracker@npm:9.0.3"
dependencies:
Expand Down Expand Up @@ -5929,6 +5929,19 @@ __metadata:
languageName: node
linkType: hard

"@metamask/eth-json-rpc-provider@npm:^4.1.0":
version: 4.1.1
resolution: "@metamask/eth-json-rpc-provider@npm:4.1.1"
dependencies:
"@metamask/json-rpc-engine": ^9.0.1
"@metamask/rpc-errors": ^6.3.1
"@metamask/safe-event-emitter": ^3.0.0
"@metamask/utils": ^9.0.0
uuid: ^8.3.2
checksum: a429d9511f33a62eb5f2f2f82f26d30a2a8f27d48aa3c8819d6ba03c2c0eef0e7eee7894a0899dd9af4b7d7f3e2092c25304bb34ab6e8d0daffee717f4109b5c
languageName: node
linkType: hard

"@metamask/eth-ledger-bridge-keyring@npm:^4.1.0":
version: 4.1.0
resolution: "@metamask/eth-ledger-bridge-keyring@npm:4.1.0"
Expand Down Expand Up @@ -6223,6 +6236,17 @@ __metadata:
languageName: node
linkType: hard

"@metamask/json-rpc-engine@npm:^9.0.1":
version: 9.0.2
resolution: "@metamask/json-rpc-engine@npm:9.0.2"
dependencies:
"@metamask/rpc-errors": ^6.3.1
"@metamask/safe-event-emitter": ^3.0.0
"@metamask/utils": ^9.1.0
checksum: 4c852c9f30d05706ee497a2aca3ef6df12aabcff4a71a7426a27d95829f20cf2ff45c774eb9d95224bf16c9555a8cd7e44dccaea1bd44eda4dc43bf298885272
languageName: node
linkType: hard

"@metamask/json-rpc-middleware-stream@npm:^7.0.1":
version: 7.0.1
resolution: "@metamask/json-rpc-middleware-stream@npm:7.0.1"
Expand Down Expand Up @@ -6426,7 +6450,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/network-controller@npm:^17.0.0, @metamask/network-controller@npm:^17.1.0":
"@metamask/network-controller@npm:^17.1.0":
version: 17.2.1
resolution: "@metamask/network-controller@npm:17.2.1"
dependencies:
Expand Down Expand Up @@ -6492,6 +6516,29 @@ __metadata:
languageName: node
linkType: hard

"@metamask/network-controller@npm:^20.0.0":
version: 20.0.0
resolution: "@metamask/network-controller@npm:20.0.0"
dependencies:
"@metamask/base-controller": ^6.0.0
"@metamask/controller-utils": ^11.0.0
"@metamask/eth-block-tracker": ^9.0.3
"@metamask/eth-json-rpc-infura": ^9.1.0
"@metamask/eth-json-rpc-middleware": ^12.1.1
"@metamask/eth-json-rpc-provider": ^4.1.0
"@metamask/eth-query": ^4.0.0
"@metamask/json-rpc-engine": ^9.0.0
"@metamask/rpc-errors": ^6.2.1
"@metamask/swappable-obj-proxy": ^2.2.0
"@metamask/utils": ^8.3.0
async-mutex: ^0.5.0
immer: ^9.0.6
loglevel: ^1.8.1
uuid: ^8.3.2
checksum: 27a4b669655d4566045de5489d9bc8fee8454f2e74ddc844c0c978a5af6b821c0bdf020b9b649db32f07a298006c021e33e6d29ccf64a6f6301a8e80de21000c
languageName: node
linkType: hard

"@metamask/nonce-tracker@npm:^5.0.0":
version: 5.0.0
resolution: "@metamask/nonce-tracker@npm:5.0.0"
Expand Down Expand Up @@ -6701,20 +6748,21 @@ __metadata:
languageName: node
linkType: hard

"@metamask/ppom-validator@npm:0.32.0":
"@metamask/ppom-validator@github:MetaMask/ppom-validator#head=bump-base-controller-to-6.0.2-expose-build":
version: 0.32.0
resolution: "@metamask/ppom-validator@npm:0.32.0"
resolution: "@metamask/ppom-validator@https://github.com/MetaMask/ppom-validator.git#commit=144597888c989322c41db9e9a5b3de05d0033882"
dependencies:
"@metamask/base-controller": ^3.0.0
"@metamask/base-controller": ^6.0.2
"@metamask/controller-utils": ^8.0.1
"@metamask/network-controller": ^17.0.0
"@metamask/network-controller": ^20.0.0
"@metamask/rpc-errors": ^6.3.1
"@metamask/utils": ^8.3.0
await-semaphore: ^0.1.3
crypto-js: ^4.2.0
elliptic: ^6.5.4
eslint-plugin-n: ^16.6.2
json-rpc-random-id: ^1.0.1
checksum: 697eac141f8816c6cff52b942ff57ff7f3880be3d83082cdbc2ba360629d497c2b3903e0cf3c14b89e030c9dcf4e4dca692ce0f100756a79765204e301180c0a
checksum: 69538423b69702f0281f7773e76dd19ef4d78c9740dddb22fac2cf39acafc089c5959527eae5da5c2221e6466965ae596af7bfb37f45e30c8d28ea4f0529543e
languageName: node
linkType: hard

Expand Down Expand Up @@ -29573,7 +29621,7 @@ __metadata:
"@metamask/permission-controller": ^9.0.0
"@metamask/phishing-controller": ^9.0.0
"@metamask/post-message-stream": ^8.0.0
"@metamask/ppom-validator": 0.32.0
"@metamask/ppom-validator": "github:MetaMask/ppom-validator#head=bump-base-controller-to-6.0.2-expose-build"
"@metamask/preferences-controller": ^11.0.0
"@metamask/profile-sync-controller": ^0.1.3
"@metamask/providers": ^13.1.0
Expand Down

0 comments on commit 202e843

Please sign in to comment.