Skip to content

Commit

Permalink
NEP141: fix same math bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sept-en committed Jun 15, 2022
1 parent e6786a1 commit 261efd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion near-contract-standards/src/fungible_token/core_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl FungibleToken {
let balance = self.internal_unwrap_balance_of(account_id);
if let Some(new_balance) = balance.checked_add(amount) {
self.accounts.insert(account_id, &new_balance);
self.total_supply
self.total_supply = self.total_supply
.checked_add(amount)
.unwrap_or_else(|| env::panic_str(ERR_TOTAL_SUPPLY_OVERFLOW));
} else {
Expand Down

0 comments on commit 261efd0

Please sign in to comment.