Merge branch 'fix/wb-provider-2' into 'master'

Fix getUserWalletBalances of WalletBalanceProvider - 2

See merge request aave-tech/protocol-v2!134
This commit is contained in:
The-3D 2020-11-06 15:27:51 +00:00
commit 58c326e8e4

View File

@ -96,7 +96,7 @@ contract WalletBalanceProvider {
uint256[] memory balances = new uint256[](reservesWithEth.length); uint256[] memory balances = new uint256[](reservesWithEth.length);
for (uint256 j = 0; j < reservesWithEth.length; j++) { for (uint256 j = 0; j < reserves.length; j++) {
ReserveConfiguration.Map memory configuration = pool.getConfiguration(reservesWithEth[j]); ReserveConfiguration.Map memory configuration = pool.getConfiguration(reservesWithEth[j]);
(bool isActive, , , ) = configuration.getFlagsMemory(); (bool isActive, , , ) = configuration.getFlagsMemory();
@ -107,6 +107,7 @@ contract WalletBalanceProvider {
} }
balances[j] = balanceOf(user, reservesWithEth[j]); balances[j] = balanceOf(user, reservesWithEth[j]);
} }
balances[reservesWithEth.length] = balanceOf(user, MOCK_ETH_ADDRESS);
return (reservesWithEth, balances); return (reservesWithEth, balances);
} }