Commit d237d87
authored
chore: Increase UI<=>background RPC timeout (#38561)
## **Description**
The timeout for the `getState` call from the UI to the background has
been increased from 10s to 16s. This increase may be enough to allow
state to load on some slower machines where the wallet state is
especially large, and at the very least if we don't see a change in
error rates, we'll still learn something from this change.
[](https://codespaces.new/MetaMask/metamask-extension/pull/38561?quickstart=1)
## **Changelog**
CHANGELOG entry: Increase timeout for UI calls to background from 10s to
16s, potentially preventing UI crash on very slow devices.
## **Related issues**
This change is a compainion to #38322, which increased a different
related timeout for the same reason.
## **Manual testing steps**
I am not sure how to best test this specific timeout. The change is
simply enough that I don't think it strictly needs manual testing
though.
## **Screenshots/Recordings**
N/A
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Increase `getState` UI↔background RPC timeout from 10s to 16s and
inline the new timeout constant.
>
> - **RPC client (`app/scripts/lib/metaRPCClientFactory.ts`)**
> - Increase `getState` request timeout from 10s to 16s using
`SIXTEEN_SECONDS_AS_MILLISECONDS` in `send`.
> - Remove use of `TEN_SECONDS_IN_MILLISECONDS` import.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4fdc720. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 9d483dd commit d237d87
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | | - | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
0 commit comments