It’s somewhat unbelievable but I had twelve transactions pending on my Ethereum wallet, with a better part of them pending for two days. This meant I could use the wallet to send funds but I could not receive.
This was caused by the low gas I had decided to use for the first pending transaction. Luckily they were zero value transactions — zero Ethereum was sent.
If you are in a hurry to resolve/cancel these transactions, you can skip to the Let’s Go section of this article. But if you are just as inquisitive as I am, and would love to know why I was able to solve this problem and how I solved it, read on.
What is a Pending Transaction?
A transaction is pending when it has not been recorded. For your transaction to be recorded, you have to pay a service or transaction fee called gas to the miners (computers on the network that maintain the blockchain).
The miners work for profit; they’ll add only transactions that make them most profitable — transactions with high gas costs. I mean who doesn’t want to make a profit. I guess my gas fees were just too low for my transaction to be considered. No hard feelings.
Etherscan is a good platform to monitor the transactions on any address. It tells you if a transaction has been recorded and when it was recorded or if it’s still pending.
What is a Nonce?
This is a number used only once. To prevent double spending — spending the same money twice — Ethereum addresses make use of a nonce. Every address assigns a number to each of its transactions. This number starts from zero for the first transaction on that address and is incremented by one with each subsequent transaction. This means no two transactions can have the same nonce. Each number is used only once on that address — nonce.
And so, what concerns a Pending Transaction and a Nonce?
Simple, since no two transactions can have the same nonce, I created a new transaction that had the same nonce as the pending transaction. This made it replace the pending transaction. For this to be possible, I’ll have to pay a suitable gas fee.
1. Go on Etherscan and enter your address in the search box. You’ll see a list of all your transactions.
2. Select the transaction hash of the last successful transaction and take note of its nonce.
3. You’ll need to find a suitable gas fee, your wallet will handle that for you. Eth-gas-station can also give you a suitable fee to be used.
4. Open your wallet, select Ethereum, and select send.
5. If you intend canceling your transaction, input your address and enter zero as your send amount.
But if you intend to resolve the pending transaction, enter the original address and amount sent in the pending transaction.
Here’s Comes the Good Stuff.
6. Select Advanced and enter the nonce of the last confirmed transaction increased by one, into the nonce space
The settings icon when selected takes you to the advanced options of your transaction on Trust Wallet.
Add one to the nonce of the last confirmed transaction and enter in the nonce space
7. Save and send your transaction.
Your transaction will appear as confirmed in no time, and the pending transaction will be discarded.
To prevent this from ever happening again, always select suitable gas fees for your transactions. Usually, your wallet will give you a suitable fee, but if you are still uncertain, Eth-gas-station will be a good stop. EtherScan will also help you monitor your transaction status. For your confirmed transactions, here’s how you can track them.
You won’t believe it but as at the time of writing this article, I’ve got a pending bitcoin transaction in my wallet, if I do resolve it, I’ll write about it.
Thanks for reading, please do leave comments, questions and reactions.
This post first appeared here on the author’s medium page.