MetaMask / MetaMask/metamask-extension

[Bug]: Transaction fails when there are insufficient funds for gas

Open
#43,154 1 comment 0 reactions 0 assignees View on GitHub
regression-prod-13.33.0 Sev2-normal team-confirmations type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

When sending ETH from a low balance, the transaction fails with error:

`RPC submit: Nethermind.Blockchain.InvalidBlockException. Transaction at index o failed with error insufficient MaxFeePerGas`

Console error:

Error in smart transaction publish hook, falling back to regular transaction submission Error: Fetch error:{"status":400,"balanceNeededWei":74437641617760,"currentBalanceWei":73102202437173,"error":"not_enough_funds","errorDetails":"'Not enough funds. Balance is only 73102202437173 wei and we need 74437641617760 wei at the very least.'"}

### Expected behavior

No failure

### Screenshots/Recordings

https://github.com/user-attachments/assets/7b6f14b5-9e24-44ab-a4ae-8931679dcd60

Image

### Steps to reproduce

1. Have a small ETH balance, below $1
2. Send ETH
3. Notice transaction fails with error

### Error messages or log output

```shell
Error in smart transaction publish hook, falling back to regular transaction submission Error: Fetch error:{"status":400,"balanceNeededWei":74437641617760,"currentBalanceWei":73102202437173,"error":"not_enough_funds","errorDetails":"'Not enough funds. Balance is only 73102202437173 wei and we need 74437641617760 wei at the very least.'"}
```

### Where was this bug found?

Live version (from official store)

### Version

13.33.0

### Build type

None

### Browser

Chrome

### Operating system

MacOS

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure in the live 13.33.0 build with a low ETH balance, then trace the smart transaction publish hook and its fallback to regular transaction submission. Done means sending ETH with insufficient funds for gas no longer fails with the reported MaxFeePerGas or not_enough_funds error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.