vulpemventures / marina

Liquid Wallet browser extension
MIT License
37 stars 19 forks source link

Bad fee estimation on multiple assets tx #473

Open bordalix opened 1 year ago

bordalix commented 1 year ago

How to replicate:

{
    "error": "sendrawtransaction RPC error: {\"code\":-26,\"message\":\"min relay fee not met, 216 < 272\"}",
    "id": 75711,
    "jsonrpc": "2.0"
}
bordalix commented 1 year ago

I guess the problem exists because fee estimation is made before adding the LBTC utxos and inputs to pay the fee and respective change outputs:

https://github.com/vulpemventures/marina/blob/8e6c90c9d797bba206e788e951cc7dd2b8ed1aee/src/domain/pset.ts#L243-L298