*Publicidad pagada. No es asesoramiento financiero. RugDoc no se hace responsable de los proyectos aquí expuestos. DYOR y mantente seguro.

How to fix a stuck Metamask transaction

You might have experience with sending a transaction in Metamask, of which the status stayed pending in the activity tab. Whenever this happens, it will block any additional transactions as the transactions are queued. Worry not! In this article we will explain how you can fix this and avoid it in the future.

Matic pending transaction

Activate Nonce Settings in Metamask #

In order to be able to fix the stuck transaction, you have to overwrite it with a new transaction that has a higher gas price. Every transaction has a unique number (nonce) which increases per transaction. As long as the transaction isn’t sent to the blockchain, which basically is the case when it’s stuck, it can be overwritten by sending a new transaction with the same NONCE.

By default this setting is deactivated in Metamask, so let’s activate it by opening the “Menu” (Circle on the right side) and scrolling to “Settings” (Last entry in the list).

Metamask settings

Choose “Advanced” and scroll to “Customize transaction nonce”. Activate this to “ON” and go back to the main Metamask window.

Customize transaction nonce

Get the current Nonce #

After activating the NONCE setting we can start creating the new transaction. First we have to look what NONCE is used in the stuck transaction. We have to choose the first transaction that has been stuck, as we only can overwrite the first one (all other are processed after).

Select the stuck transaction in the “Activity” tab of the main Metamask window.

Select stuck transaction

You can read the Nonce under the “transaction” info. Write down this nonce as we will need this number to create the new transaction.

Transaction nonce

Create a new transaction #

Now that we know the Nonce of the stuck transaction, which we want to overwrite, we can create our new transaction. Open Metamask and copy your own address. You need to send a small amount of the native chain token to yourself (for simplicity).

Copy wallet address

After you’ve copied your address, click on “Send”. This will open up the address book. Paste you own address here, enter a small amount and increase the “Gas Price” to a higher value than the stuck transaction (check the transaction details of the stuck transaction). This is needed as the new transaction must have higher gas in order to overwrite the old one, as higher priced transactions gets processed earlier. After you’ve filled the field you can click on “Next”.

Select token and gas price

Edit the Nonce of the new transaction #

In the next window we can edit the Nonce to the same value like the stuck transaction. Now you can “Confirm” the transaction and watch the stuck transaction disappear.

Set the nonce.

Now you know how you can fix a stuck transaction in Metamask. If it does not work on the first try, repeat the steps and increase the Gas Price, as sometimes the networks are congested. You can avoid stuck transactions by increasing the Gas Price for each transaction, as the value in Metamask is an average Gas Price suggestion which, in case the network is congested, is sometimes not high enough. We hope this helps you the next time you face this issues. Stay safe !

Actualizado el enero 17, 2022
¿Qué sientes respecto a éste artículo?

Dejar una Respuesta

*Publicidad pagada. No es asesoramiento financiero. RugDoc no se hace responsable de los proyectos aquí expuestos. DYOR y mantente seguro.

ES