Optimize TX fees & Pay DERO fees only one time #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the changes and the related issue.
When you create a TX with more than one transfer, you pay the total TX fees for each transfer which is too much.
The fix here try to determine how much total fees should be paid and set it in the first entry.
For example, transfer with ring size 4, only 0.00060 DERO to pay:

Type of change
Please select the right one.
Which part is impacted ?
Checklist:
License
Im am contributing & releasing the code under DERO Research License (which can be found here).