# I'm encountering an issue with MetaMask showing this warning: "This transaction would have cost you extra fees, so we stopped it. Your money is still in your wallet."

**URL:** <https://forum.bnbchain.org/t/im-encountering-an-issue-with-metamask-showing-this-warning-this-transaction-would-have-cost-you-extra-fees-so-we-stopped-it-your-money-is-still-in-your-wallet/3308>\
**Category:** BNB Smart Chain\
**Tags:** evm\
**Created:** [February 20, 2025, 3:01am UTC](https://forum.bnbchain.org/t/im-encountering-an-issue-with-metamask-showing-this-warning-this-transaction-would-have-cost-you-extra-fees-so-we-stopped-it-your-money-is-still-in-your-wallet/3308 "2025-02-20T03:01:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bindok1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.bnbchain.org/bindok1/32/2719_2.png) [@bindok1](https://forum.bnbchain.org/u/bindok1)\
**Post date:** [February 20, 2025, 3:01am UTC](https://forum.bnbchain.org/t/im-encountering-an-issue-with-metamask-showing-this-warning-this-transaction-would-have-cost-you-extra-fees-so-we-stopped-it-your-money-is-still-in-your-wallet/3308/1 "2025-02-20T03:01:37Z")

</div>

Technical Details:

- Using Viem for contract interactions
- BSC Testnet
- Gas Limit: 35,000,000 units (seems too high)
- Max Fee Per Gas: 0.00000001 TBNB

Current Implementation:

```typescript
const gasPrice = await publicClient.getGasPrice();
  
return walletClient.writeContract({
  // ... contract details
  maxFeePerGas: gasPrice,
  maxPriorityFeePerGas: gasPrice / BigInt(2)
});

've tried:

1. Setting custom gas limits
2. Using maxFeePerGas and maxPriorityFeePerGas
3. Letting MetaMask handle gas estimation
How can I properly handle gas estimation to prevent this MetaMask warning?
![Screenshot 2025-02-20 at 09.55.29|690x379](upload://Auem07rP1ek0TBfE5IpHW42MTVm.png)
```

---

<div class="post-metadata">

**Author:** ![blessedux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.bnbchain.org/blessedux/32/2871_2.png) [@blessedux](https://forum.bnbchain.org/u/blessedux)\
**Post date:** [February 23, 2025, 3:41pm UTC](https://forum.bnbchain.org/t/im-encountering-an-issue-with-metamask-showing-this-warning-this-transaction-would-have-cost-you-extra-fees-so-we-stopped-it-your-money-is-still-in-your-wallet/3308/2 "2025-02-23T15:41:21Z")

</div>

Having the same issue here! anybody found the solution?

---

<div class="post-metadata">

**Author:** ![Akhtan81](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.bnbchain.org/akhtan81/32/2986_2.png) [@Akhtan81](https://forum.bnbchain.org/u/Akhtan81)\
**Post date:** [April 20, 2025, 6:39pm UTC](https://forum.bnbchain.org/t/im-encountering-an-issue-with-metamask-showing-this-warning-this-transaction-would-have-cost-you-extra-fees-so-we-stopped-it-your-money-is-still-in-your-wallet/3308/4 "2025-04-20T18:39:46Z")

</div>

> [@blessedux](#):
>
> the same issue here

the same issue. ChatGPT states its problem on MetaMask side
