-
Notifications
You must be signed in to change notification settings - Fork 984
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: prevent multiple taps on Register button from opening several tx during ENS registration #10391
Conversation
Pull Request Checklist
|
I don't even think the button should be re-enabled until we get a response back. Is there a visual indication that there is work being done at all? |
I'm not 100% sure I know what you mean. When you tap the Register button, a transaction card appears very quickly. I think most users would then proceed to go ahead with the transaction. To get a behavior where the Register button might seem stuck, a user would need to deliberately be quick in tapping the Cancel button in the transaction card and then tap Register again (a Status tester might do that, which is why I mentioned it in Testing notes).
My initial idea was to make it a little state machine with a ClojureScript |
@michaelsbradleyjr can you please rebase it to current develop to have builds in PR? |
5b95237
to
a34131d
Compare
@churik it's been rebased. |
Jenkins Builds
|
Nice work @michaelsbradleyjr! I'll be very happy to see this one fixed. |
98% of end-end tests have passed
Failed tests (2)Click to expand
Passed tests (90)Click to expand |
50% of end-end tests have passed
Failed tests (1)Click to expand
Passed tests (1) |
Looks good to me! Can't reproduce initial issue on iOS and Android (v8). I'm not sure yet why test_can_add_existing_ens e2e test failed but it's false failure. |
a34131d
to
5257bc6
Compare
@Serhy I just now rebased against |
Also, I forgot to sign the commit as part of the rebase... fixing now. |
5257bc6
to
008ddf9
Compare
0% of end-end tests have passed
Failed tests (2)Click to expand
|
… during ENS registration Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
008ddf9
to
5002b4c
Compare
fixes #9566
Summary
To prevent multiple taps from opening several transactions, the
::ens/register-name-pressed
event is debounced (viastatus-im.utils.debounce/dispatch-and-chill
).Review notes
I set the "chill" time to 2 seconds — too long or short? I'm not sure.
Testing notes
If you tap on the Cancel button quickly to do a repeat test of the
dispatch-and-chill
effect, keep in mind the 2 second chill-time must expire before tapping Register again will have an effect.Platforms
Functional
Steps to test
status: ready