mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'feat/80-optimization-addresses-prov-reg' into 'master'
Fixes #80 Closes #80 See merge request aave-tech/protocol-v2!89
This commit is contained in:
commit
bb6b322925
|
@ -36,13 +36,15 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
|
|||
* @return the list of addressesProviders
|
||||
**/
|
||||
function getAddressesProvidersList() external override view returns (address[] memory) {
|
||||
uint256 maxLength = _addressesProvidersList.length;
|
||||
address[] memory addressesProvidersList = _addressesProvidersList;
|
||||
|
||||
uint256 maxLength = addressesProvidersList.length;
|
||||
|
||||
address[] memory activeProviders = new address[](maxLength);
|
||||
|
||||
for (uint256 i = 0; i < _addressesProvidersList.length; i++) {
|
||||
if (_addressesProviders[_addressesProvidersList[i]] > 0) {
|
||||
activeProviders[i] = _addressesProvidersList[i];
|
||||
for (uint256 i = 0; i < maxLength; i++) {
|
||||
if (_addressesProviders[addressesProvidersList[i]] > 0) {
|
||||
activeProviders[i] = addressesProvidersList[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user