desmos-labs / mooncake

The first decentralized social app based on Desmos
MIT License
46 stars 14 forks source link

Block users from posting before the account is confirmed being created on chain #35

Closed kwunyeung closed 4 years ago

kwunyeung commented 4 years ago
## Feature description

It takes time when a new key is being created and receive tokens from the faucet. It will generate errors if the user quickly post message or like before the account not being created.

Implementation proposal

We should either

  1. Block the user from entering the main screen and show a progress animation (a running lion?) right after the key is being created. The app keeps making a query to the chain and see if the address exists. If so, display a button. The user tap on the button and jump to the main screen.

  2. Disable all the buttons by default. The app keeps making a query to the chain and see if the address exists. Enable the buttons if it exists.

It's safer to query the account every time when the app is being loaded. This can also be a local checking to block the users make any posts when the account balance is too low.

RiccardoM commented 4 years ago

To be honest, I think neither both of those options are good to the overall user experience.

The best thing is letting them do whatever they want, and then just check before sending the transactions if the account exists and has enough tokens. Then

This way they user will be able to simply post and like everything he wants, without having to wait long loading screens or having buttons being disabled which could make him think the app is not working properly.