-
Notifications
You must be signed in to change notification settings - Fork 45
chore: return proper promises #1581
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…into chore/interval-await
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses the removal of floating promises (void expressions) throughout the codebase by implementing proper error handling. The main changes include:
- Creates a new
errorFallbackutility function for centralized error handling - Removes
voidoperators from promise calls and adds.catch(errorFallback)instead - Updates function signatures to properly return
Promise<void>where needed - Applies throttling to frequently-called functions using a new
useThrottlehook - Refactors some Promise handling to use
Promise.all()for better performance - Simplifies conditional rendering patterns
- Minor CI workflow improvements
Reviewed Changes
Copilot reviewed 129 out of 130 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
packages/curve-ui-kit/src/utils/error.util.ts |
New error handler utility with ignored error patterns |
packages/curve-ui-kit/src/utils/timers.ts |
Adds useThrottle hook for throttling callbacks |
packages/curve-ui-kit/src/themes/design/0_primitives.ts |
Renames FormDebounce to FormThrottle with updated timing |
packages/curve-ui-kit/src/hooks/useLocalStorage.ts |
Adds shouldShowErrors helper function |
packages/curve-ui-kit/src/hooks/useDebounce.ts |
Updates default timing constant reference |
| Multiple store files | Replace void with .catch(errorFallback) pattern |
| Multiple component files | Update function signatures and add error handling |
.github/workflows/ci.yaml |
Improves artifact naming and configuration |
setFormValuesto make sure they aren't called too often