check for reserves, obligations also have a lendingMarket pubkey

This commit is contained in:
jordansexton 2021-06-28 20:58:49 -05:00
parent 9cbb9ddb1c
commit effeeeb867
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ export const useLending = () => {
.filter(item => item !== undefined);
const lendingReserves = accounts
.filter(acc => (acc?.info as Reserve).lendingMarket !== undefined)
.filter(acc => acc?.account && isReserve(acc.account) && (acc.info as Reserve).lendingMarket !== undefined)
.map(acc => acc as ParsedAccount<Reserve>);
const toQuery = [