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

chore: tx button loading if gas loading #8522

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

0xApotheosis
Copy link
Member

Description

If the gas fee for a swap is loading (including refreshing), the "Sign and Swap" button should also probably be in the loading state.

E.g. this PR:

Screenshot 2025-01-09 at 16 47 04

vs develop:

Screenshot 2025-01-09 at 17 08 46

Issue (if applicable)

Progresses #8118

Risk

Small

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

N/A

Testing

Await gas refresh for a swap (before signing) and confirm that when the gas refreshes the button goes into the loading state.

Engineering

☝️

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

See above.

@0xApotheosis 0xApotheosis requested a review from a team as a code owner January 9, 2025 06:10
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, the do it indeed does! https://jam.dev/c/3e9a3e43-ff43-4601-9e03-a3bf12d2d95d

Only concern I'd have about this guy (which is not one in the end, keep reading) is re: Li.Fi rugs if user sits there for too long and somehow gets rate-limited in the process meaning we can't estimate gas anymore and hence can't click the button anymore but

  1. we shouldn't have to compose our holistic flow around one derp swapper so that's most likely fine
  2. errored state would still be an idle state regardless, after the 3 default retries so button would be enbled still, just rubber ducker myself writing this!

@gomesalexandre gomesalexandre enabled auto-merge (squash) January 9, 2025 07:19
@gomesalexandre gomesalexandre merged commit 16ec134 into develop Jan 9, 2025
3 checks passed
@gomesalexandre gomesalexandre deleted the loading-button-if-gas-loading branch January 9, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants