Skip to content

Commit f9958d3

Browse files
committed
log new approval event
1 parent 5ae137d commit f9958d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contracts/main/LiquidityGauge.vy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def claim_rewards(_addr: address = msg.sender, _receiver: address = empty(addres
478478

479479
@external
480480
@nonreentrant('lock')
481-
def transferFrom(_from: address, _to :address, _value: uint256) -> bool:
481+
def transferFrom(_from: address, _to: address, _value: uint256) -> bool:
482482
"""
483483
@notice Transfer tokens from one address to another.
484484
@dev Transferring claims pending reward tokens for the sender and receiver
@@ -488,7 +488,9 @@ def transferFrom(_from: address, _to :address, _value: uint256) -> bool:
488488
"""
489489
_allowance: uint256 = self.allowance[_from][msg.sender]
490490
if _allowance != max_value(uint256):
491-
self.allowance[_from][msg.sender] = _allowance - _value
491+
_new_allowance: uint256 = _allowance - _value
492+
self.allowance[_from][msg.sender] = _new_allowance
493+
log Approval(_from, msg.sender, _new_allowance)
492494

493495
self._transfer(_from, _to, _value)
494496

0 commit comments

Comments
 (0)