mirror of
				https://github.com/Instadapp/dsa-resolvers-deprecated.git
				synced 2024-07-29 22:38:16 +00:00 
			
		
		
		
	Merge pull request #17 from Instadapp/aave-ve-update
add debt tokens in reward calculation
This commit is contained in:
		
						commit
						a2f7d63e4b
					
				|  | @ -270,10 +270,11 @@ contract AaveHelpers is DSMath { | |||
|     } | ||||
| 
 | ||||
|     function getPendingRewards(address[] memory _tokens, address user) internal view returns (uint rewards) { | ||||
|         address[] memory _atokens = new address[](_tokens.length); | ||||
|         uint arrLength = 2 * _tokens.length; | ||||
|         address[] memory _atokens = new address[](arrLength); | ||||
|         AaveProtocolDataProvider aaveData = AaveProtocolDataProvider(getAaveProtocolDataProvider()); | ||||
|         for (uint i = 0; i < _tokens.length; i++) { | ||||
|             (_atokens[i],,) = aaveData.getReserveTokensAddresses(_tokens[i]); | ||||
|             (_atokens[2*i],,_atokens[2*i + 1]) = aaveData.getReserveTokensAddresses(_tokens[i]); | ||||
|         } | ||||
|         rewards = AaveIncentivesInterface(getAaveIncentivesAddress()).getRewardsBalance(_atokens, user); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thrilok kumar
						Thrilok kumar