-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: error handling ux improvements #162
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
21db863
to
19fc48b
Compare
55f85f9
to
686b3ac
Compare
@nvtaveras Here are some issue found during testing:
|
Screen.Recording.2024-12-04.at.12.50.04.mov |
c3f77c8
to
37676a5
Compare
686b3ac
to
3dc2bb1
Compare
51b6fe6
to
0eab54d
Compare
Bug-fix list related to this ticket:
|
99b0868
to
97df6ec
Compare
refactor: cleanup chore: cleanup chore: cleanup refactor: cleanup fix: cleanup
97df6ec
to
a9e1d8d
Compare
1a4936a
to
c75dda1
Compare
…d types, shortened file
6394666
to
5c89313
Compare
…same for 'no valid median' case
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.
Couldn't find functional faults, I would prefer the truncation just done with CSS & the variations managed by CVA but this should be a more uniform change if done.
Within scope, this PR seems fine
{ fromTokenSymbol, toTokenSymbol }: IGetToastErrorOptions = {} | ||
): string { | ||
switch (true) { | ||
case swapErrorMessage.includes(`overflow x1y1`): |
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.
What's the full error message that come from this error? Wondering if there's anything better we could use. Is it different from the one below, can't create fixidity number larger than
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.
Here are the complete error messages regarding entering an too large number in the fields:
swap-out: overflow x1y1 * fixed1 detected
swap-in: can't create fixidity number larger than maxNewFixed()
@Andrew718PLTS once I enter a large number |
Previously, the calculation has not been correctly working when entering >=22 (e.g., 7478773923223123234925 -> 7.479) |
Description
The PR adds some validation and improved messaging. I just added an error message for missing quote in the case of no other error. We could refactor to get the actual error but more often than not missing quote errors are because missing rates so I've just added a message to reflect this
Other changes
Increased the refetch interval of the swap quote by two seconds.
Add debouncing to validation logic to prevent excessive SDK calls and heavy computations on each keystroke
Tested
Swapped and tried to trigger errors on the preview deployment
Related issues
Checklist before requesting a review