sync supply interest before ValidateBorrow (#798)

This commit is contained in:
Denali Marsh 2021-02-04 17:54:13 +01:00 committed by GitHub
parent 9fa83f0a1e
commit be498c72f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ func (k Keeper) Borrow(ctx sdk.Context, borrower sdk.AccAddress, coins sdk.Coins
k.BeforeBorrowModified(ctx, existingBorrow) k.BeforeBorrowModified(ctx, existingBorrow)
} }
k.SyncSupplyInterest(ctx, borrower)
k.SyncBorrowInterest(ctx, borrower) k.SyncBorrowInterest(ctx, borrower)
// Validate borrow amount within user and protocol limits // Validate borrow amount within user and protocol limits