Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Improve error message when BTC tx amount too low  #1984

@zone117x

Description

@zone117x

I'm seeing a weird issue with sending a BTC payment. I have $30 USD in my wallet, about 0.004 BTC, and no matter how much I try and send, I get "Not enough coin to fund fees transaction fees. Fees would be 5824, specified spend is 10". I see this comes from blockstack.js - is this an issue of not having the right UXTO's to put together a TX?

Originally posted by @hstove in #1966 (comment)

Sending small amounts of btc can trigger this error:
https://github.com/blockstack/blockstack.js/blob/b2ade3ca5b0519d330430b9bb3b5125da879496b/src/operations/txbuild.ts#L1174-L1177

const outputAmount = amount - feesToPay
if (outputAmount < DUST_MINIMUM) {
  throw new InvalidAmountError(feesToPay, amount)
}

The error message displayed by the browser is incorrect and confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions