From 206d33eaa631cf147d7cfb0ebb95a5cf91e35cdb Mon Sep 17 00:00:00 2001 From: andyk Date: Fri, 6 Nov 2020 18:23:18 +0300 Subject: [PATCH] fix getUserWalletBalances of WalletBalanceProvider - 2 --- contracts/misc/WalletBalanceProvider.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/misc/WalletBalanceProvider.sol b/contracts/misc/WalletBalanceProvider.sol index 9153e3c6..bb165624 100644 --- a/contracts/misc/WalletBalanceProvider.sol +++ b/contracts/misc/WalletBalanceProvider.sol @@ -96,7 +96,7 @@ contract WalletBalanceProvider { 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]); (bool isActive, , , ) = configuration.getFlagsMemory(); @@ -107,6 +107,7 @@ contract WalletBalanceProvider { } balances[j] = balanceOf(user, reservesWithEth[j]); } + balances[reservesWithEth.length] = balanceOf(user, MOCK_ETH_ADDRESS); return (reservesWithEth, balances); }