Skip to content

Commit

Permalink
fix: return early if no data (#3392)
Browse files Browse the repository at this point in the history
* fix: return early if no data

* fix: format

(cherry picked from commit 90f3475)
  • Loading branch information
halaprix authored and piekczyk committed Jan 20, 2024
1 parent a76268b commit c56f7bf
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ export const getAaveV2DsProxyPosition: PortfolioPositionsHandler = async ({ addr
debtToken: 'ETH',
collateralToken: 'STETH',
})

if (!positionHistory || !stEthPosition) {
console.warn(
`summer/portfolio: No AAVE v2 position history or no stEth position for ${address}, proxy:${dsProxyAddress}}`,
)
return {
positions: [],
}
}
if (stEthPosition.collateral.amount.gt(zero)) {
const { commonData, primaryTokenPrice, secondaryTokenPrice } = commonDataMapper({
dpm: {
Expand Down

0 comments on commit c56f7bf

Please sign in to comment.