synonymdev / beignet

An instant, self-custodial Bitcoin wallet for JS devs.
MIT License
22 stars 6 forks source link

Beignet creates tx with fee bellow Minimal if amout is small #73

Open limpbrains opened 3 months ago

limpbrains commented 3 months ago

When the fees are 4,4,4 and you are trying to create tx with small amount (~700 sats) beignet will reduce tx fee and set it bellow 4. It also do not allow to rase it, because of the "Error: Unable to increase the fee any further. Otherwise, it will exceed half the current sending/output amount." rule.

I think this rule should be ignored, beignet should not create tx with such a small fee, it will not be broadcasted

pwltr commented 3 months ago

Agreed, this rule has been causing issues. If we want to keep the warning maybe we can have a flag (and string) in the result of the fee setting method. Then the UI can decide what to do with the warning.

Also see https://github.com/synonymdev/bitkit/issues/1704

limpbrains commented 2 months ago

Maybe only use this rule if the amount sent is greater than 10000 sats or something?