element-hq / element-hq/element-web
Use recommended asynchronous API for safeStorage
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
https://www.electronjs.org/docs/latest/api/safe-storage says:
> We recommend using the asynchronous API (`encryptStringAsync`/`decryptStringAsync`) over the synchronous API. The async API is non-blocking, supports key rotation, and handles temporary unavailability gracefully. The synchronous API may be deprecated in a future version of Electron.
Currently the sync versions are used. e.g.
https://github.com/element-hq/element-web/blob/21195a2163b7a859782f5c849885e29247ca8f84/apps/desktop/src/store.ts#L126-L149
Contributor guide
Research direction
Start in apps/desktop/src/store.ts around lines 126–149 and compare the current safeStorage calls with Electron’s asynchronous safeStorage API documentation. Trace any callers affected by awaiting the operations, and consider the work done when the sync calls there are replaced without breaking the desktop store’s behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100