Skip to content
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

Fix flickery modal #3122

Closed
wants to merge 1 commit into from
Closed

Fix flickery modal #3122

wants to merge 1 commit into from

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Sep 7, 2023

Summary

Attempt to solve the flickery modal. Not working yet, but some progress on the cause.

I believe this hook returns showSurplus true/false/null if we start to get errors getting the USD estimation, or if the USD changes so we change from showing to not showing.

I believe we should only calculate it once, and we shouln't recompute the surplus in real time to prevent this issues:

export function useGetSurplusData(order: Order | ParsedOrder | undefined): Output {

I managed to reproduce by adding a random number and returning randomly true/false/null in

See video:

Screen.Recording.2023-09-07.at.18.12.44.mov

@vercel
Copy link

vercel bot commented Sep 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview Sep 7, 2023 6:08pm

🌃 Cosmos ↗︎

@shoom3301
Copy link
Collaborator

#3121

@anxolin is the problem still reproducible in this branch?

@alfetopito alfetopito changed the base branch from develop to release/1.47.0 September 8, 2023 10:37
@alfetopito
Copy link
Collaborator

Errrr.... now I got this instead of the surplus modal
image

@alfetopito
Copy link
Collaborator

That was on goerli.
Same thing on gnosis chain

image

Base automatically changed from release/1.47.0 to main September 8, 2023 14:42
@anxolin
Copy link
Contributor Author

anxolin commented Sep 8, 2023

I will close this one. If your PR don't fix the issue i will re-open it back

@anxolin anxolin closed this Sep 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
@alfetopito alfetopito deleted the fix-flickery-modal branch September 11, 2023 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants