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

Subtract fee from the change output instead of the first output #50

Open
cygnet3 opened this issue Sep 8, 2024 · 0 comments
Open

Subtract fee from the change output instead of the first output #50

cygnet3 opened this issue Sep 8, 2024 · 0 comments

Comments

@cygnet3
Copy link
Owner

cygnet3 commented Sep 8, 2024

Right now when sending a transaction, we subtract the fee from the very first transaction output.
We should instead remove it from the change output, so we don't confuse users that want to send a specific amount of money to a certain address.

When making this change we should take into account that the change output either might not exist, or may not cover the full fee amount.
In the former case, we should subtract it from the first output after all.
In the latter case, we should probably throw an error. Maybe we should increase the dust threshold to make sure this error occurs rarely.

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

No branches or pull requests

1 participant