Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paying through RPC could be 1 sat lower than the actual payment amount. #314

Open
jplix7k opened this issue Jul 19, 2023 · 3 comments
Open

Comments

@jplix7k
Copy link

jplix7k commented Jul 19, 2023

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.
image

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

@pooler
Copy link
Owner

pooler commented Jul 19, 2023

This repo is not currently maintained. The Litecoin Foundation has been working on a port of a newer version of Electrum.

@jplix7k
Copy link
Author

jplix7k commented Jul 20, 2023

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?

@pooler
Copy link
Owner

pooler commented Jul 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants