mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixes aToken issue on interest accumulation
This commit is contained in:
parent
89ad335912
commit
8c8954ea8e
|
@ -481,9 +481,10 @@ contract AToken is ERC20 {
|
||||||
//the redirected balance of the redirection target by adding the balance increase
|
//the redirected balance of the redirection target by adding the balance increase
|
||||||
address targetOfRedirectionAddress = interestRedirectionAddresses[redirectionAddress];
|
address targetOfRedirectionAddress = interestRedirectionAddresses[redirectionAddress];
|
||||||
|
|
||||||
|
// if the redirection address is also redirecting the interest, we accumulate his balance
|
||||||
|
// and update his chain of redirection
|
||||||
if (targetOfRedirectionAddress != address(0)) {
|
if (targetOfRedirectionAddress != address(0)) {
|
||||||
redirectedBalances[targetOfRedirectionAddress] = redirectedBalances[targetOfRedirectionAddress]
|
cumulateBalanceInternal(targetOfRedirectionAddress);
|
||||||
.add(balanceIncrease);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit RedirectedBalanceUpdated(
|
emit RedirectedBalanceUpdated(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user