@@ -72,8 +72,8 @@ contract ERC20StreamingEnforcer is CaveatEnforcer {
7272 view
7373 returns (uint256 availableAmount_ )
7474 {
75- StreamingAllowance storage allowance = streamingAllowances[_delegationManager][_delegationHash];
76- availableAmount_ = _getAvailableAmount (allowance );
75+ StreamingAllowance storage allowance_ = streamingAllowances[_delegationManager][_delegationHash];
76+ availableAmount_ = _getAvailableAmount (allowance_ );
7777 }
7878
7979 /**
@@ -169,20 +169,20 @@ contract ERC20StreamingEnforcer is CaveatEnforcer {
169169
170170 require (bytes4 (callData_[0 :4 ]) == IERC20 .transfer.selector , "ERC20StreamingEnforcer:invalid-method " );
171171
172- StreamingAllowance storage allowance = streamingAllowances[msg .sender ][_delegationHash];
173- if (allowance .spent == 0 ) {
172+ StreamingAllowance storage allowance_ = streamingAllowances[msg .sender ][_delegationHash];
173+ if (allowance_ .spent == 0 ) {
174174 // First use of this delegation
175- allowance .initialAmount = initialAmount_;
176- allowance .maxAmount = maxAmount_;
177- allowance .amountPerSecond = amountPerSecond_;
178- allowance .startTime = startTime_;
175+ allowance_ .initialAmount = initialAmount_;
176+ allowance_ .maxAmount = maxAmount_;
177+ allowance_ .amountPerSecond = amountPerSecond_;
178+ allowance_ .startTime = startTime_;
179179 }
180180
181181 uint256 transferAmount_ = uint256 (bytes32 (callData_[36 :68 ]));
182182
183- require (transferAmount_ <= _getAvailableAmount (allowance ), "ERC20StreamingEnforcer:allowance-exceeded " );
183+ require (transferAmount_ <= _getAvailableAmount (allowance_ ), "ERC20StreamingEnforcer:allowance-exceeded " );
184184
185- allowance .spent += transferAmount_;
185+ allowance_ .spent += transferAmount_;
186186
187187 emit IncreasedSpentMap (
188188 msg .sender ,
@@ -193,7 +193,7 @@ contract ERC20StreamingEnforcer is CaveatEnforcer {
193193 maxAmount_,
194194 amountPerSecond_,
195195 startTime_,
196- allowance .spent,
196+ allowance_ .spent,
197197 block .timestamp
198198 );
199199 }
0 commit comments