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

[WIP] Double transaction when using WETH #118

Open
hesterbruikman opened this issue Jan 17, 2020 · 2 comments
Open

[WIP] Double transaction when using WETH #118

hesterbruikman opened this issue Jan 17, 2020 · 2 comments

Comments

@hesterbruikman
Copy link

Still analyzing issue

Problem

When funding a project with WETH, the desired amount was unintentionally transferred twice.
Seems to have something to do with how WETH transactions are handled in MetaMask. Authorize amount is skipped, also with a fresh address (no prior connection to dapp, different tree). This throws off the step counter. Showing Authorize when selecting ETH, while in fact you are Funding directly, as shown when selecting Amount field.

After the transaction is confirmed by wallet (MM), dapp, doesn't update to Confirmed, but remains in loading state and total pledged amount is not updated.

When refreshing, the pledged amount is updated, the step counter moves back to Fund making it appear as though the funding never took place.

Current behavior

  • After the fund transaction is confirmed, the pledge amount is not updated until the page is reloaded.
  • Reloading the page resets the step counter from Confirmed to Fund, this makes it easy to misconceive the funding to not have been processed.

Expected behavior

After fund transaction is confirmed:

  • The pledge amount is updated without requiring the user to reload the page.
  • The page scrolls down to Connected wallet section and shows the user's most recent pledge amount added in their personal table view. This design lacks a loading state that is to be added first.
    https://www.figma.com/file/DarCEnDHTNmiK1XAjj0IeSY8/Assemble-DApp?node-id=1349%3A378
  • The top of the page as well as the project list view shows an indicator that the user has pledged to this project. (Identifier with 4 states: save, saved, pledged, funded) This requires design

Steps to reproduce

  • Use fresh account that has not authorized transactions (in MM this means a new master key pair)
  • Revoke any past connections in browser (Connections in MM, Permissions in Status)
  • Select Stickermkt Dashboard (project requesting WETH)
  • Select Connect > Button changes to FUND should be AUTHORIZE
  • Select ETH > Button changes to AUTHORIZE AMOUNT Correct
  • Enter amount > Button says FUND Correct
  • Select Fund
  • Sign fund transaction should be AUTHORIZE
  • Wait for transaction to be confirmed
  • Speed up transaction in MM
  • Refresh page
  • Amount pledged is updated, step counter moves to Fund
@3esmit
Copy link
Member

3esmit commented Jan 18, 2020

Can you place the transaction IDs involved?

@hesterbruikman
Copy link
Author

Synced on discord.

Issues results from WETH transaction, which is ETH and doesn't require Approval call.

To fix:

  • The step counter should move to fund immediately when selecting ETH, this now happens only when selecting the Amount field.
  • Then separately, there's updates needed to change the state of the page when funding is confirmed so you after funding you're not returned to the same state as you were prior to funding, making it seem as though nothing happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants