Skip to content

Commit 8f43200

Browse files
committed
fix: compare with min token allowance for emitting events
1 parent 55ad431 commit 8f43200

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/request/tokens/TokenController.sol‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ abstract contract TokenController {
106106
uint128 ptMin = uint128(FixedPointMathLib.min(pt, type(uint128).max));
107107
uint128 ytMin = uint128(FixedPointMathLib.min(yt, type(uint128).max));
108108
from.updateAllowance(spender, ptMin, ytMin);
109-
if (pt != ptAllowance) ControlledToken(ptToken())._emitApproval(from, spender, ptMin.normalize());
110-
if (yt != ytAllowance) ControlledToken(ytToken())._emitApproval(from, spender, ytMin.normalize());
109+
if (ptMin != ptAllowance) ControlledToken(ptToken())._emitApproval(from, spender, ptMin.normalize());
110+
if (ytMin != ytAllowance) ControlledToken(ytToken())._emitApproval(from, spender, ytMin.normalize());
111111
return true;
112112
}
113113
}

0 commit comments

Comments
 (0)