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

consolidate split-amount #42

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

ngutech21
Copy link
Contributor

There are two implementations of a split amount function that can be consolidated. The function utils::split_amount() is only used once in nut00::random() and could be replaced by Amount.split(). The only difference of the two implementations is the order in which the amounts occur, but I think this doesn't matter for the one usage in the random() function.

The tests have been moved to the amount module and adopted to the new ordering of the implementation.

@thesimplekid
Copy link
Collaborator

Thank you, good catch think this is left over from when i originally had multiple amount types in the crate but is not needed anymore.

@thesimplekid thesimplekid merged commit d717fc1 into cashubtc:main Nov 8, 2023
17 of 18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants