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

Checked arithmetic for Amount types #1078

Merged
merged 4 commits into from
Feb 7, 2023
Merged

Conversation

james-chf
Copy link
Contributor

@james-chf james-chf commented Jan 24, 2023

Closes #748 (though perhaps a new issue should be opened to audit and switch to using these new checked methods, where we are currently using methods which may overflow/underflow)

Small PR to add the remaining Amount::checked_add method + some tests. This functionality is needed now for #1076 (and some other places as well).

@james-chf
Copy link
Contributor Author

pls update wasm

@james-chf james-chf marked this pull request as ready for review January 24, 2023 16:47
@juped juped merged commit 1ac7e7b into main Feb 7, 2023
@juped juped deleted the james/mainline/checked-amounts branch February 7, 2023 01:49
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.

Add methods for checked additions/subtractions of Amounts
2 participants