Closed ghost closed 7 years ago
Thanks a lot. For this report, will fix it.
Mh dividing money by money makes no semantic sense though... I see the problem, and if you use Money spend
instead of var spend
, you don't have issue. But yes, this is tricky and should be fixed.
fixed by https://github.com/MetacoSA/NBitcoin/commit/79d83ff112d2f08db25aa7cb35b5c123f17d5f13 thanks a lot, version 4.0.0.18 pushed
Hi,
when using:
var bobInput = Money.Coins(1.1M); var aliceInput = Money.Coins(0.275M); var spend = (bobInput + aliceInput) / 2;
"spend" is falsely calculated due to false boxing/type conversions.
The Money class needs:
Regards martin