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

Submit button in the Tunnel should be disabled if allowance hasn't been loaded #878

Open
gndelia opened this issue Feb 18, 2025 · 0 comments · May be fixed by #927
Open

Submit button in the Tunnel should be disabled if allowance hasn't been loaded #878

gndelia opened this issue Feb 18, 2025 · 0 comments · May be fixed by #927
Labels
bug Something isn't working Tunnel Related to the Tunnel app

Comments

@gndelia
Copy link
Contributor

gndelia commented Feb 18, 2025

For ERC20 tokens, allowance must be checked before tunneling and staking. Before that happens, the submit button can't be enabled, because the code doesn't know if it should request approval or not.

When the user selects a token, the tunnel form loads the allowance. However, while that happens, the submit button is enabled, allowing the user to submit. Generally, this is not a problem, because the allowance data loads fairly quickly. However, if the RPCs are slow, as it's been happening lately, the user could potentially submit the form without the allowance info being loaded, which could cause an error (as it will skip the approve step).

We should check the allowance and disable the submit button until this information is loaded, (perhaps showing a "..." indicating that the info is being loaded).

This is already fixed on the Stake page, but it needs to be applied on the Tunnel.

@gndelia gndelia added bug Something isn't working Tunnel Related to the Tunnel app labels Feb 18, 2025
@qgatssdev qgatssdev linked a pull request Feb 27, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Tunnel Related to the Tunnel app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant