Wrap requests issued by `RpcService` with a timeout
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 413
- Forks
- 308
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 253
Description
If the UI calls an action that issues a request and relies on the result to display something to the user, but the request never resolves, then the UI will never be updated, and the user will never know. This is partially mitigated on the extension because browsers have a default request timeout, but this timeout is quite long and is therefore fairly useless for our needs.
We should wrap requests in `RpcService` so that they throw an error if they do not resolve after 5 seconds (and make the timeout duration configurable).
Also see https://github.com/MetaMask/core/issues/4499.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate RpcService and trace how it issues requests, then review the related core issue #4499 for context. Define tests around rejection after five seconds and a configurable timeout; done means unresolved requests fail predictably without changing successful responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100