status-im / ens-usernames

DApp to register usernames for Status Network
MIT License
19 stars 11 forks source link

Confirmation screen is shown for success even i did not registered username #12

Closed asemiankevich closed 5 years ago

asemiankevich commented 6 years ago

I see the confirmation screen in the following cases:

  1. when i want to register name and tap register with transaction it is shown at the background for a second before blue transaction screen is loaded

  2. when transaction to register the name is failed

  3. when i close transaction screen

Also the domain is shown as registered when it is actually free https://github.com/status-im/ens-usernames/issues/10

So actually it is shown right when i tap the register with transaction no matter of the txn outcome

image

bgits commented 6 years ago

This is an optimistic update as the would be delay from the time the user signs the transaction to it being confirmed. Perhaps some UX idea's here.

denis-sharypin commented 6 years ago

@asemiankevich @bgits

1.when I want to register name and tap register with the transaction it is shown at the background for a second before blue transaction screen is loaded

This screen should not be visible at this moment

  1. when transaction to register the name is failed

That's tricky. It's not a success screen of getting your domain. Can we know that transaction is failed and show Status of it here @bgits ?

  1. when i close transaction screen

If user closes transaction screen she should get back to the screen where a transaction was initiated. I assume in this case it is

screenshot 2018-09-14 16 43 48
bgits commented 6 years ago

Regarding point 1. the confirmation window is triggered by the status wallet or some other wallet like metamask, at this point we don't know if it's signed and submitted or not signed. This requires some research to determine if this particular state can be determined in web3.

The short way we check for a failure triggers false positives, such as a transaction not mined after 50 seconds would be a failure, I think there are more robust solutions we can experiment with such as polling or subscribing to events may not be battery friendly on mobile.

If the user submits a transaction to register why would it show them that the domain is available? I would think this is the time to show the confirmation screen?

bgits commented 5 years ago

updated in PR: https://github.com/status-im/ens-usernames/pull/64/files