# วิธีการยกเลิก pending transaction (ธุรกรรมที่ค้าง) ใน Metamask **Published by:** [The Web3 Explorer: Navigating Crypto and DeFi](https://paragraph.com/@web3explorer/) **Published on:** 2023-04-02 **Categories:** wallet, metamask, ethereum **URL:** https://paragraph.com/@web3explorer/how-to-cancel-pending-ethereum-transaction ## Content ใครที่ใช้งาน Ethereum chain คงต้องเคยเจอเหตุการณ์ที่ transaction ไม่สำเร็จและค้างเติ่งไม่ไปไหน ทำ transaction ต่อไปก็ไม่ได้ เพราะจะไปต่อคิวค้างเต็มไปหมด ซึ่งวิธีการแก้ไม่ยาก แต่ต้องเสีย gas เพิ่มดังนี้ เปิดกระเป๋าเงิน MetaMask และไปที่แท็บ "Activity" หรือเข้าไปดูที่ หน้า wallet ของตัวเองใน Etherscan หา transaction ที่รอดำเนินการอยู่และจดบันทึกหมายเลข nonce สร้าง transaction ใหม่โดยมี nonce เดียวกันกับ transaction ที่รอดำเนินการอยู่ แต่มีค่า gas price สูงกว่า โดยเช็คค่า gas ได้จาก blocknative (ตั้งค่าตามบล็อก 99% Probability และต้องมากกว่าค่า gas เดิม) https://www.blocknative.com/gas-estimator เลือก advanced gas fee เพื่อตั้งค่า gas เอง โดย transaction ที่สร้างใหม่จะเป็นอันเดียวกับที่ค้าง (approve/โอนเหรียญ/mint etc.) หรือใช้วิธีส่งเหรียญ 0 ETH หา address ตัวเองก็ได้ เมื่อส่ง transaction ใหม่แล้ว ให้รอได้รับการยืนยันบนบล็อกเชน เมื่อ transaction ใหม่ได้รับการยืนยันแล้ว มันจะแทนที่ transaction ที่รอดำเนินการอยู่ด้วย nonce เดียวกัน transaction เดิมจะถูกยกเลิก จากนั้นเราก็สามารถทำ transaction ได้ตามปกติ ปล. เปิดการตั้งค่า nonce ที่ metamask โดยเข้าไปที่ Settings > Advanced ## Publication Information - [The Web3 Explorer: Navigating Crypto and DeFi](https://paragraph.com/@web3explorer/): Publication homepage - [All Posts](https://paragraph.com/@web3explorer/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@web3explorer): Subscribe to updates - [Twitter](https://twitter.com/elixer): Follow on Twitter ## Optional - [Collect as NFT](https://paragraph.com/@web3explorer/how-to-cancel-pending-ethereum-transaction): Support the author by collecting this post - [View Collectors](https://paragraph.com/@web3explorer/how-to-cancel-pending-ethereum-transaction/collectors): See who has collected this post