interface
interface copied to clipboard
Dropped transaction appear as "Pending" in Uniswap UI
Bug Description If a transaction is dropped (by sending another one with more gas and same nonce), Uniswap will keep showing this transaction as "Pending"
Steps to Reproduce
- Using MetaMask, swap any asset using low Gwei
- Speed up transaction in MetaMask
- After new transaction is confirmed, check Uniswap UI. It will keep showing transaction as pending.
Expected Behavior Transaction should appear as "Dropped" instead of "Pending.
Experiencing same.
Potential fix could be:
- keep the account transaction count synced on a per-block basis
- this transaction count may (or may not) just be
eth_getTransactionCount
in the case of smart wallets. we will need to read the nonce for smart contract wallets from the store. - ideally read this transaction count using a contract via multicall (
useSingleContractCall
)
- this transaction count may (or may not) just be
- store the transaction count at the time a transaction is submitted
- if the account transaction count exceeds the transaction nonce, but the transaction has no receipt, we can assume it was dropped (show a question mark, or indicate that it was cancelled, from the transaction status modal)
@moodysalem
- I'm not familiar w/ practical usage of smart contract wallets (and thus implications here) why might
getTransactionCount
not return the correct nonce in that case? - Having trouble finding info on multicall, link me?
I wrote a dumb solution to this, but I initially assumed any tx of the same nonce would be necessarily a case of RBF, but that's not necessarily true. Will think about this more tomorrow.
- I'm not familiar w/ practical usage of smart contract wallets (and thus implications here) why might
getTransactionCount
not return the correct nonce in that case?
I don't know if internal transactions (i.e. messages) are included in eth_getTransactionCount
Having trouble finding info on multicall, link me?
Multicall is here
We use multicall to fetch all contract data, see for example https://github.com/Uniswap/uniswap-interface/blob/master/src/hooks/useCurrentBlockTimestamp.ts
It would be great if we could fetch the transaction count via a contract call (similar to how we detect Argent here)
Bug Description If a transaction is dropped (by sending another one with more gas and same nonce), Uniswap will keep showing this transaction as "Pending"
Steps to Reproduce
- Using MetaMask, swap any asset using low Gwei
- Speed up transaction in MetaMask
- After new transaction is confirmed, check Uniswap UI. It will keep showing transaction as pending.
Expected Behavior Transaction should appear as "Dropped" instead of "Pending.
I am having this same problem. What did you do to solve it?
I am having this same problem. What did you do to solve it?
@yield-farmer-jamie I believe there will be a "reset" button that will reset all pending transactions to zero.
General solution would be using something like the Etherscan API or others (maybe infura logs) to find and display complete Uniswap V2/V1 transaction history
If you monitor the stream of incoming blocks you can check each for a transaction with the nonce in question. Alternatively, on new latest block you can check the user's nonce to see if it is still less than the pending transaction's nonce.
If you monitor the stream of incoming blocks you can check each for a transaction with the nonce in question. Alternatively, on new latest block you can check the user's nonce to see if it is still less than the pending transaction's nonce.
Similar to the previously suggested solution, checking the transaction count of the user. I tried implementing this at one point and ran into subtle issues but it's worth a second try.
General solution would be using something like the Etherscan API or others (maybe infura logs) to find and display complete UniSwap V2/V1 transaction history
This is the suggestion that I would have put forward. Using the Etherscan API would have two big benefits:
- UI could display more detailed logs on pending transactions, duplicate nonces, etc. This would persist even when switching wallets through your client.
- If you clear your MetaMask (or other wallet) logs, you can view the current state of your account.
I don't even think the UniSwap log should necessarily even be limited to just UniSwap transactions.
Ex: I make a UniSwap transaction (nonce=50
), then interact with another DApp (nonce=51
), then go back to UniSwap to add another Tx to the queue (nonce=52
).
If (while) I'm waiting for the transaction to get confirmed, UniSwap currently will only show nonce[50,52]
. This isn't ideal as MetaMask often requires a reset, meaning more work for the user. I will try to use either Etherscan's API or monitoring the blockstream to get an output that looks something like this:
having this same problem. how to solve it?
@tarekskr has this been fixed?
@JFrankfurt apologies, I accidentally closed this. Reopened now.
I'm having this exact issue right now. The Uniswap won't let me approve until the Pending transaction has completed but the hash doesn't exist on Etherscan as I cancelled the transaction in MetaMask. Any solution?
Clear your cache and cookies for uniswap. That fixes it
Revoke the token approval for Uniswap. Everything will start over agin. It worked for me.