How to replace pending transaction in Coinbase wallet (non-custodial, Hodl your own keys). (Cancel Tx and fix stuck pending Tx)

Crypto_Rachel
7 min readJan 11, 2021

--

Coinbase wallet

Ethereum is great, one of my favorite cryptos. However like everything, nothing is perfect. With the explosion of DEX exchanges, gas gwei fees have become very volatile. This can cause a transaction to become stuck in the mempool or dropped all together.

This can be quite a burden especially if trading where time is sensitive. If trading it is best to keep aware of the gas fees, best places to do that is https://etherscan.io/gastracker or https://ethgasstation.info/ .

Just a reminder:
PLEASE MAKE SURE YOU HAVE YOU PASSWORD, SEED PHRASE, and PRIVATE KEYS(IMPORTED ACCOUNTS). This should always be done immediately, and although this has nothing to do with your keys I always feel it is important to note. You can always recover your account if you have your seeds and pks.

Ok, So you have a tx that is stuck, To cancel this transaction you need to actually Replace the transaction. Since wallet transactions are done in order, a transaction with a pending nonce higher than another pending nonce, the higher nonce transaction can not proceed until the transaction with the lower nonce goes through.
So if you have a tx with a low gas rate, any transaction after can’t go through until the first transaction goes through (the one with the lowest nonce).

To replace this transaction you would need to send a tx with the same transaction nonce as the transaction that is pending. ((( Just another note, this will Only work with pending transactions, once the transaction is accepted it is final and can not be changed ))).

First you need to get the nonce of the lowest transaction. So click on the transaction and at the bottom you will see a link “view on block explorer” click that and it will open up to the transaction. From there scroll down to the bottom where it says “click to see more” click that and scroll down till you see the word “Nonce” with a number below it. This is the transactions nonce. Also take note of the GWEI gass fee that was used, as the new tx has to be higher (I highly suggest the High gas fee for any replacement tx.).

So from the main screen (image1) click on the send button and choose Ether as the currency. Then when the it ask you the amount, you will put in .01 cents (USD) or .000000000000000001 (ETH) in for the amount and click next.

It will ask you where to send it next. In the box ^ enter your own address (the one for the wallet you are replacing the tx in). Then click next.

Here come the fun Part. While on the next page (the send page) you will see the tx, you might have to click “details”. When you click that you will see more details about the tx. You will also see a gear (if your version supports). When you click on that it will give you 4 options.

NOTE: Not all versions, have the option to change gas fee and nonce. If you don’t see the gear in the next step you might need to do it in a wallet that allows it.

← Gear :)

Here it gives you the option to change the fees.

now if you click “Custom”

You will see a drop down

← This will give you the ability to change the Gas price (in Gwei), The Gas Limit, and The Nonce.

← Here use Fast gwei price
← You don’t change limit*
← Put in the nonce number of the tx you are trying to Replace. And hit “Confirm”

Now I have done this and it didn’t save the nonce the first time.
I highly suggest that you confirm and check a couple times, it will have you re-enter the data each time. After you confirm, check and re-enter then confirm again you will be able to send the transaction.

Once the replacement Transaction with the Duplicate nonce is processed by the network it will replace the one with the same nonce.

NOTE:
my wallet still showed the pending tx however etherscan was cleared. This is because the wallets cache still has that data. If it doesn’t bother you it won’t affect you or your transactions in the future.
If it does bother you, you would have to clear the data, basically removing the wallet and recovering the wallet from the seed phrase.

PLEASE MAKE SURE YOU HAVE YOU PASSWORD, SEED PHRASE, and PRIVATE KEYS(IMPORTED ACCOUNTS) before logging out or clearing your data from the app. Not doing this will result in a total loss of your wallet and the funds in it.

If you sign out of the wallet it will ask you to confirm that you have your seed phrase backed up, and make you recover the wallet. Or you can go into your settings go to your apps, select the coinbase wallet app, click into the storage area and clear your data.

PLEASE MAKE SURE YOU HAVE YOU PASSWORD, SEED PHRASE, and PRIVATE KEYS(IMPORTED ACCOUNTS) before logging out or clearing your data from the app

*** A Quick Side Note about Gas ***
So Ethereum uses “gas” to pay the miners for their work in confirming the transactions.
This gas will change depending on what you are doing on the network, a standard tx of ether will be 21000,
The math (( gasLimit *(gweiCost * 10⁹) = eth cost )),
Interacting with contracts and tokens will vary greatly depending on what the contract does.

You should Only change the gas Limit if you know what you are doing.

Doing this without knowing what you are doing can cause you to lose money to ETH fees, and it’s unrecoverable. All transactions on the network are final.

My favorite comparison for gass on the network is:
Think of gass on the network, like the gas in a car. Where as the gas limit is the size of the tank (it can hold up to the Block Max Gas), And the gwei price is the Price of the fuel you are buying.
for each transaction you need to drive that car. And you have to buy the gas for the trip. So you fill your tank up with gas that costs you the price (gwei) multiplied by the amount of fuel (GasLimit) needed to get you where your going.
The Higher the price of the gas (gwei) the higher octane 😏 and the faster you will get to your destination. Although you have to go faster that the average traffic (gass average rate).
Now if your gas limit is to low you can get stuck paying for that gas and not getting where your going, ie out of gas error , and you have to start over.
If you put in a higher gas limit it will only use what is needed for the trip, However (BIG However), if you don’t have enough, get lost, or go somewhere your not supposed to you will burn all that gass (i.e. you call a function that you are not allowed to or don’t have something needed ) and it can burn your funds quickly

The wallet will automatically calculate the gas limit, it is usually correct, but it can’t see everything. So it should rarely need to be changed. And you should be very careful when playing with it.

I really hope that this helps anyone that may need it 😊
I wish you the Best in all your crypto 😜

If this has helped and you would like to donate
‘’’
Written by Crypto_Rachel
Ether: 0xecf3abd1a9bd55d06768dde7deef3fd2a48c8e13
BTC: 3CDt2WWoTFryFTa9J65XFVJGmzhVmNr328
Segwit: bc1qklwklunsefl2wxfk8npvfc585uhw2m2wf6nffu
BTC: 1QBdacdaVVpHkuinaAn8LyRZvkzALQLugt
LTC: LUMNv5hc2yN5wXtGCzHAQxuhronMZMrjbT
XMR: 4AXMBRt5oNxKasWcUeGmp2Qzuhh8rb2cgVY3YaVMmTf5Q5TeprXXfaZTt21vsJZyshYacaYm8x86YHBBJaJuHBrDHzL8rmW
‘’’
Blessed Be

--

--

Crypto_Rachel

I am a programmer / technician / engineer / inventor / crypto enthusiast and oh so much more :) Secret to life Hiding in plain sight: Live, Love, Learn, Grow