SharedStake / SharedStake/SharedStake-ui

Fix earn page approve then deposit metamask popups

Open
#53 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Currently you need to first approve your SGT or other tokens for staking then stake them.
Currently we do not wait long enough for the approval tx to succeed, resulting in an error/high gass fee tx popping up in metamask for the deposit.

Ideally we would like to wait a bit more time/for more confirmations so the second tx that gets queued/pops up is likely to result in a success.

The manual work around is to reject the second tx, wait a bit for the first approval to succeed, then try depositing in the earn page again. We want to make this more streamlined.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the earn page's approval and deposit flow, focusing on how the approval transaction is awaited before the deposit transaction is queued. Reproduce the approval-then-deposit sequence in MetaMask and verify that the deposit waits for sufficient confirmation instead of prompting an unsuccessful transaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.