In the case that your transaction is stuck in a "pending" state or you have an extremely high nonce, you will need to clear activity and nonce data in your MetaMask. This will cause it to update the nonce and transaction history from the network. Your funds and keys are safe during this process.
To reset your MetaMask account, follow these steps:
- Click the account icon on the top-right corner of MetaMask.
- Click "Settings".
- Click "Advanced".
- Scroll down and click “Clear activity tab data”.