Skip to content

Commit

Permalink
Deleted unnecessary variable in enforcer
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzel98 committed Feb 21, 2025
1 parent 8c446f8 commit 1d2212b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/enforcers/NativeTokenStreamingEnforcer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ contract NativeTokenStreamingEnforcer is CaveatEnforcer {
)
private
{
(, uint256 value,) = _executionCallData.decodeSingle();
(, uint256 value_,) = _executionCallData.decodeSingle();

(uint256 initialAmount_, uint256 maxAmount_, uint256 amountPerSecond_, uint256 startTime_) = getTermsInfo(_terms);

Expand All @@ -161,11 +161,9 @@ contract NativeTokenStreamingEnforcer is CaveatEnforcer {
allowance.startTime = startTime_;
}

uint256 transferAmount_ = value;
require(value_ <= _getAvailableAmount(allowance), "NativeTokenStreamingEnforcer:allowance-exceeded");

require(transferAmount_ <= _getAvailableAmount(allowance), "NativeTokenStreamingEnforcer:allowance-exceeded");

allowance.spent += transferAmount_;
allowance.spent += value_;

emit IncreasedSpentMap(
msg.sender,
Expand Down

0 comments on commit 1d2212b

Please sign in to comment.