Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: patch for assets controller v11.0.1 #8881

Merged
merged 10 commits into from
Mar 14, 2024
Merged
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
12 changes: 10 additions & 2 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
chainId: networkController.state.providerConfig.chainId,
Expand All @@ -425,6 +426,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
// @ts-expect-error TODO: Resolve/patch mismatch between base-controller versions. Before: never, never. Now: string, string, which expects 3rd and 4th args to be informed for restrictedControllerMessengers
Expand Down Expand Up @@ -469,6 +471,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
onTokenListStateChange: (listener) =>
Expand Down Expand Up @@ -501,6 +504,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
// @ts-expect-error TODO: Resolve/patch mismatch between base-controller versions. Before: never, never. Now: string, string, which expects 3rd and 4th args to be informed for restrictedControllerMessengers
Expand Down Expand Up @@ -927,6 +931,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
onTokenListStateChange: (listener) =>
Expand All @@ -950,6 +955,7 @@ class Engine {
},
getTokensState: () => tokensController.state,
getTokenListState: () => tokenListController.state,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
getNetworkState: () => networkController.state,
getPreferencesState: () => preferencesController.state,
getBalancesInSingleCall:
Expand All @@ -964,6 +970,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
chainId: networkController.state.providerConfig.chainId,
Expand Down Expand Up @@ -992,6 +999,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
listener,
),
onPreferencesStateChange: (listener) =>
Expand All @@ -1007,7 +1015,7 @@ class Engine {
blockTracker:
networkController.getProviderAndBlockTracker().blockTracker,
getGasFeeEstimates: () => gasFeeController.fetchGasFeeEstimates(),
// @ts-expect-error network controller will be updated on this PR: https://github.com/MetaMask/metamask-mobile/pull/8812 and this type error will be addressed
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
// This is not a blocker because gas fee controller does not need ticker to be defined
getNetworkState: () => networkController.state,
getSelectedAddress: () => preferencesController.state.selectedAddress,
Expand Down Expand Up @@ -1036,7 +1044,7 @@ class Engine {
onNetworkStateChange: (listener) =>
this.controllerMessenger.subscribe(
AppConstants.NETWORK_STATE_CHANGE_EVENT,
// @ts-expect-error network controller will be updated on this PR: https://github.com/MetaMask/metamask-mobile/pull/8812 and this type error will be addressed
// @ts-expect-error network controller will be updated to v12 and have this missmatch verison fixed
// This is not a blocker because gas fee controller does not need ticker to be defined
listener,
),
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"tough-cookie": "4.1.3",
"crypto-js": "4.2.0",
"axios": "1.6.0",
"@metamask/assets-controllers/babel-runtime/regenerator-runtime": "^0.13.8",
"react-native-ble-plx": "3.1.1"
},
"dependencies": {
Expand All @@ -139,7 +138,7 @@
"@ledgerhq/react-native-hw-transport-ble": "^6.29.5",
"@metamask/address-book-controller": "^3.0.0",
"@metamask/approval-controller": "3.5.0",
"@metamask/assets-controllers": "^10.0.0",
"@metamask/assets-controllers": "11.0.1",
"@metamask/base-controller": "^4.1.1",
"@metamask/composable-controller": "^3.0.0",
"@metamask/contract-metadata": "^2.1.0",
Expand Down
Loading
Loading