CounterpartyXCP / counterwallet

Counterparty web wallet
https://counterwallet.io
147 stars 163 forks source link

on send dialog, "Max" transaction size (at least with BTC) is (at least sometimes) off by a bit (i.e. 0.0001) #379

Open robby-d opened 10 years ago

robby-d commented 10 years ago

e.g. you choose Max, then send the transaction, and you're left with 0.0001 in your account

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3979422-on-send-dialog-max-transaction-size-at-least-with-btc-is-at-least-sometimes-off-by-a-bit-i-e-0-0001?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github).
ouziel-slama commented 10 years ago

Another bug I'am not able to reproduce.. Can you please provide me an example of tx_hash where this bug occurs ?

ghost commented 8 years ago

Still happening.

unsystemizer commented 7 years ago

Still happening, but now with a twist - see https://github.com/CounterpartyXCP/counterparty-lib/issues/935

It seems it calculates the maximum amount too simplistically.

Can we replace Max with a "Set your own Tx Fee amount(which would accept up to 10,000 satoshis) and then calculate Max as(Balance - CustomTxFee)`?

Or calculate the maximum properly, but that seems harder since the fee info is wrong to begin with. I wonder if this problem may be caused by the fixed tx fee setting that prevents CW to calculate the proper transaction fee.

unsystemizer commented 7 years ago

I was able to send BTC from Joe's wallet: I used debug tools to find the required amount and then set that tx fee in the wallet. This can't work on Counterwallet as the error never appears in debug Console.

bitcore-lib-v0.13.5-patched.min.js:5 Uncaught rmessage: "Fee is too small: expected more than 8000 but got 2000 Use Transaction#uncheckedSerialize if you want to skip security checks. See http://bitcore.io/guide/transaction.html#Serialization for more info."stack: "Fee is too small: expected more than 8000 but got 2000↵

The reason it's not readily reproduceable is that it probably requires a specific set of UTXOs.