MetaMask / MetaMask/metamask-extension

[Bug]: No insufficient funds alert when swapping BTC

Open
#42,749 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

regression-prod-13.31.0 Sev2-normal team-networks type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Describe the bug

When swapping BTC token, there is no insufficient funds alert and swap button is enabled.
Swap is not possible and console error displayed:
Failed to compute non-EVM fees for quote 9da3e8c4-677c-4c73-9fbd-69a5024768d8: o: Validation failed: Failed to build PSBT from template: Insufficient funds: 0.00010726 BTC available of 0.00010985 BTC needed

Expected behavior

Display insufficient funds alert in swap screen, similar to EVM or SOL token

Screenshots/Recordings

https://github.com/user-attachments/assets/29ed2b21-d6ca-489c-a3c7-fd24b72d08e3

Steps to reproduce
  1. Swap the total amount of BTC tokens
  2. Notice swap button is enabled
  3. Click swap button
  4. Notice no transaction is displayed in activity
  5. Notice console error
Error messages or log output
Failed to compute non-EVM fees for quote 9da3e8c4-677c-4c73-9fbd-69a5024768d8: o: Validation failed: Failed to build PSBT from template: Insufficient funds: 0.00010726 BTC available of 0.00010985 BTC needed
Where was this bug found?

Live version (from official store)

Version

13.31.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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the BTC swap screen by swapping the total available amount and inspect the swap flow around the reported insufficient-funds console error. Done means the screen displays an insufficient-funds alert and prevents the swap button from starting an impossible transaction, consistent with EVM or SOL token behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.