When you submit a transaction on Ethereum, your gas price is a bid to the network to process your transaction sooner. If you submit with a low gas price, you can find your transaction taking a long time to process. For advice on what gas prices will result in a transaction being finalized in a reasonable amount of time, please refer to Etherscan's gas tracker.
Additionally, there are sometimes circumstances where something goes wrong, and a transaction is just stuck, or pending for a very long time.
No matter how you got to this point, there are a few different ways to address it.
Before you take any further action, your first step should be to exit and close your browser completely, reopen it, and log back in to MetaMask. If that doesn't solve the problem, continue with the following:
Speeding up a transaction
In this case, you can try one of the options below:
- Wait until the network is willing to process transactions at this price
- If you haven't done so already, click that button that says Speed Up. This will let you re-submit the same transaction, but with a higher gas fee that should allow the transaction to be processed faster.
Cancelling a transaction - Method 1: In-app cancellation
If you haven't done this already, to cancel the transaction, simply select Cancel, as in the screenshot above. Please note, a cancellation can only be attempted if the transaction is still pending on the network.
Cancelling a transaction - Method 2: Wallet reset
BEFORE ATTEMPTING THIS METHOD, verify in a block explorer whether you have any transactions pending (for instructions, see here). If the transaction IS NOT present on the explorer, it might mean that your MetaMask queue is stuck. Under these circumstances, you can try resetting your wallet.
Cancelling a transaction - Method 3: Custom nonce
1. Enable Custom Nonce in advanced settings of your MetaMask wallet:
2. Send a new transaction. In the new transaction, you can send TO yourself, meaning your MetaMask public address. Then in the nonce set it to the last transaction nonce that is still pending:
and set the gas higher (to what is recommended on https://etherscan.io/gastracker). ETH amount can be left at 0.