Skip to content

Commit

Permalink
revert code change (bad merge?)
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Feb 22, 2021
1 parent f5b0b13 commit 96cbe16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/token/ERC20/extensions/ERC20Burnable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ abstract contract ERC20Burnable is Context, ERC20 {
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
uint256 allowance_ = allowance(account, _msgSender());
require(allowance_ >= amount, "ERC20: burn amount exceeds allowance");
_approve(account, _msgSender(), allowance_ - amount);
uint256 currentAllowance = allowance(account, _msgSender());
require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
_approve(account, _msgSender(), currentAllowance - amount);
_burn(account, amount);
}
}

0 comments on commit 96cbe16

Please sign in to comment.