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

use deduct_value() instead of delta_token_balance() for subtracting tokens #857

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

qizhou
Copy link
Contributor

@qizhou qizhou commented Mar 25, 2020

deduct_value() will check if there is sufficient balance, and thus using deduct_value() with check() will automatically prevent integer underflow.

@qizhou qizhou requested a review from a team March 25, 2020 06:08
@qizhou qizhou merged commit f37754c into master Mar 25, 2020
@qizhou qizhou deleted the deduct branch March 25, 2020 21:10
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