Calculate transaction costs with address weight in mind
See original GitHub issueThe option to always add the transaction fee to the invoice should help cover the fees involved in sending the collected funds to an exchange and therefore it would make sense to calculate the amount of fees dependant on the kind of address that the money was sent to (legacy/p2sh/native segwit). However from my test it seems to always calculate the fees based on an kind of optimal case. For example I did two payments in a row: native segwit and legacy and both times it calculated: 0.000039 BTC in fees. I twould have expected to see higher fees for the legacy payment target as it costs more to retrieve those funds.
@kukks added in Mattermost:
[…]The ocde currently assumes each tx is 100 bytes from the looks of it and ignores address weight
onchainMethod.NextNetworkFee = onchainMethod.FeeRate.GetFee(100); // assume price for 100 bytes
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
How about a simple solution:
We allow you to enter the network fee yourself on the store level. If blank, it defaults to the current implementation. ᐧ
On Wed, Apr 24, 2019 at 7:51 PM Markus Petzsch notifications@github.com wrote:
Aye, closing this one then, since there hasn’t been much interest/consensus. Let’s re-open if we see the need. Thanks for helping with the cleanup @bolatovumar and @petzsch.