SatoshiPortal / lwk-dart

Dart/Flutter bindings for Blockstream's Liquid Wallet Kit
MIT License
8 stars 9 forks source link

Pset building inconsistency #34

Open Saleciani opened 5 months ago

Saleciani commented 5 months ago

Currently, we are able to build a pset with and it will return an error if there are no funds in the wallet.

I do not understand if it is a lwk-dart bug or a a lwk inconsistency.

image image image

But:

We can set the fee to as low as possible and the pset will build, only when trying to publish we will get an error.

I think that the pset building should fail not just when the amount is very close to the maximum limit (so that there is no more amount for the fee) but also when the fee is too low for it to be published.

We should not be able o build a pset with a fee so low that won't be accepted by nodes.

What do you think?

Saleciani commented 5 months ago

Update:

Pset building also returns insufficient funds error when we have

EX: 6000 sats in the wallet

Total fee: 260 sats

Sending amount 5600 sats.

This means that there is outstanding unspendable balance in the wallet 🤔

i5hi commented 5 months ago

yes, i reported this to lwk. we should get a patch soon.

we will also have drain soon.

i5hi commented 5 months ago

i've noticed right now a buffer of around 800 sats is required

Saleciani commented 5 months ago

Is this buffer supposed to be a feature or a bug? Do you know? 😃

i5hi commented 5 months ago

bug :P