MetaMask / MetaMask/metamask-extension
Reject tx on component re-render/checking for unsigned tx
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
I am creating a webapp using react and ethers.js that works with metamask. If I call MyContract.MyFunc(xyz, function(error, result){ }); user will see a metamask popup. My code will get a response only if user presses SUBMIT or REJECT. But if the user refreshes the page without pressing either SUBMIT or REJECT, my code will never know the status of this transaction although the user is still able to submit this transaction.
Steps to reproduce:
1. Call a tx and wait for the metamask popup.
2. Refresh page without pressing submit or reject.
3. Submit the transaction.
Proposal:
Reject tx on page refresh/component re-render or add a method to check for unsigned pending transactions.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reproducing the three-step refresh flow with a pending MetaMask transaction, then trace how pending unsigned transactions are tracked across a component re-render. Done means the page either reports the refreshed transaction's status or rejects it on refresh, with behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100