poanetwork / token-wizard

(Discontinued) TokenWizard is an DApp to create and manage crowdsale and token contracts using a simple UI
MIT License
384 stars 215 forks source link

(Bug) Step4: Transaction is generated after each page refreshing #1113

Closed dennis00010011b closed 5 years ago

dennis00010011b commented 6 years ago

Steps:

  1. Start creating any crowdsale and fill out the forms with valid parameters until you reach Step 4. Use any network.
    1. Refresh the page in Step 4 and confirm popup.
    2. Observe count of transaction in Nifty wallet

Expected result:

Actual result:

If you are reporting a problem with Token Wizard, please include the following information:

Which network did you use? (Mainnet, Kovan, Rinkeby, etc.)

any

If you were able to create it, what is the URL of your crowdsale?

n/a

Do you have screenshots showing the problem?

44465497-9b2e0600-a5d2-11e8-9ae0-9501917a73be

Do you see errors in the dev console? If yes, please include a screenshot

No


fernandomg commented 5 years ago

I need confirmation for the approach that I'll be taking on this issue, as at some point it will require the user interaction.

Each step of the deployment process has a list of actions, to make it the most grained possible this can be divided into 4 different actions:

  1. Step Waiting to be Processed
  2. Transaction Sent and Pending of being signed (this is the user did not confirmed the tx in the wallet yet)
  3. Transaction Pending of being mined (txHash generated in this step)
  4. Transaction Mined

If I treat each one of those actions as a flag, TW will require user interaction for the step .2. In this case, the TW can prompt the user to cancel the current Tx pending of approval in the wallet and hit a Continue button, which will trigger the step to be re-sent.

For the step .3 there'll TW will track the pending transaction by its transactionHash, and will continue without the user noticing it. Maybe, in this step, we can prompt the user with a message or highlight the step for the tx pending of being mined.

@dennis00010011b @vbaranov thoghts?

vbaranov commented 5 years ago

I agree, that 2. step cannot be resolved without interaction with a user. I support prompting in this case.

As for the statuses of tx life cycle, maybe we could show 1-3 statuses to a user by means of labels for every current pending tx, like this (I do not pretend to exact styles, but something like this):

2018-09-20 13 26 18 2018-09-20 13 27 40 2018-09-20 13 34 03

Thereby, a user will see what is the current status of pending tx. So, in case of refreshing at 3. step he/she will see again tx is pending of being mined... (without prompting) and after inclusion tx to the block, we move to the next tx. @fernandomg @dennis00010011b - it is open for discussion.