-
Notifications
You must be signed in to change notification settings - Fork 2
handle the response when quote exceeds the pool size #661
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: staging
Are you sure you want to change the base?
handle the response when quote exceeds the pool size #661
Conversation
✅ Deploy Preview for pendulum-pay ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 refactors several UI components to improve their handling of loading states and cleans up unused code. Key changes include the removal of an unused import in the ramp hook, conditional class adjustments in the AssetButton component, and the introduction of a loading prop in the NumericInput and AssetNumericInput components.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
frontend/src/hooks/offramp/useSubmitRamp.ts | Removed an unused constant import and fixed a trailing comma |
frontend/src/components/buttons/AssetButton/index.tsx | Refactored className handling using a helper for conditional classes |
frontend/src/components/NumericInput/index.tsx | Added a new loading prop with updated conditional rendering for spinner |
frontend/src/components/AssetNumericInput/index.tsx | Passed loading prop down to NumericInput and updated prop references |
Comments suppressed due to low confidence (1)
frontend/src/components/buttons/AssetButton/index.tsx:16
- Consider adding an accessible label (e.g., 'aria-label') to the button element in AssetButton to improve screen reader support.
<button
Co-authored-by: Copilot <[email protected]>
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.
I think we should still allow changing the asset when the quote does not load. It could be that for a different output asset, we can get a quote. Otherwise the user would first have to edit their input amount which could be confusing again.
We could also consider adding an error message.
Update the output to visually and textually show that the quote is loaded, even if an error message about exceeding the pool size is returned.