Paying through RPC could be 1 sat lower than the actual payment amount.
Opened this issue · 3 comments
This is an old bug in electrum code and it got fixed in March this year. Same code is also derived by electrum-ltc.
For example if we set ["address", 0.00033389] in the params of paytomany method via JSONRPC call. It always results in 0.00033388 ltc in transaction. The difference is caused by type casting from Decimal to Int in satoshis function.
(https://github.com/pooler/electrum-ltc/blob/master/electrum_ltc/commands.py#L87)
Reproduce the issue by using unittest.
It is a safe fix but very valuable because payment precision is an important factor for accounting purpose. Could we please include the fix in next version or coming v4.4.5?
Reference:
Issue reported in electrum repo:
spesmilo#8274
Code fix in electrum repo:
spesmilo@7834f6c
This repo is not currently maintained. The Litecoin Foundation has been working on a port of a newer version of Electrum.
Thanks for the prompt reply. Could we confirm we will keep cli/rpc function of Electrum and have the Satoshis function fix in the new Electrum-ltc?
Could we confirm we will keep cli/rpc function of Electrum and have the Satoshis function fix in the new Electrum-ltc?
I would say it's highly likely, but I am not involved with the new port so I really can't say for sure.