Skip to content

Migrate provider configuration to RpcMethodMiddleware #5513

@Gudahtt

Description

@Gudahtt

Description

Migrate the functions setup in the network controller providerConfig to the RpcMethodMiddleware.

This provider configuration will be removed in a future release of the network controller. It is used today to support certain RPC methods. It can be migrated to be alongside the rest of mobile's RPC method handlers, so that mobile is unaffected by this future change to the network controller.

Technical Details

  • Migrate the eth_sendTransaction handler from Engine.js to RpcMethodMiddleware.ts.
  • Remove the getAccounts function, instead using the getAccounts function in RpcMethodMiddleware.ts to meet this need for any RPC method currently relying on this.

Note that once both of these entries are removed from the providerConfig, it will still need to be set to an empty object. The provider config being set triggers the network controller to initialize, so it should not be removed entirely.

Acceptance Criteria

  • The provider configuration is empty.

References

This helps to unblock MetaMask/core#970

Definition of Done

  • Whenever applies, any change unit tested, reviewed(approved) and documented(JSDOC at least)
  • We have changelog entries for any related changes
  • Any changed APIs have comprehensive inline documentation
  • Any changed public APIs are well covered by unit tests
  • Other items
  • If a planning/research ticket, then the plan has been reviewed and approved by at least 1 team members

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions