Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

TypeError: Cannot read property 'rewardTokenPriceEth' of undefined #252

@gtotradingpartners

Description

@gtotradingpartners

Hi Team,

We are trying to run the sample mentioned in the Aave-js-SDK (https://aave.notion.site/Aave-Js-SDK-82d56e5190b940539cc301d8b9d16b02#e03f49d55b6f4618b9a57fbcc35f88a0)

We are getting error,

TypeError: Cannot read property 'rewardTokenPriceEth' of undefined
    at computeUserReserveData$1 (/home/Downloads/Archive/node_modules/@aave/protocol-js/dist/protocol-js.cjs.development.js:641:78)
    at /home/Downloads/Archive/node_modules/@aave/protocol-js/dist/protocol-js.cjs.development.js:702:31
    at Array.map (<anonymous>)
    at computeRawUserSummaryData$1 (/home/Downloads/Archive/node_modules/@aave/protocol-js/dist/protocol-js.cjs.development.js:693:42)
    at Object.formatUserSummaryData$1 [as formatUserSummaryData] (/home/Downloads/Archive/node_modules/@aave/protocol-js/dist/protocol-js.cjs.development.js:752:18)
    at /home/Downloads/Archive/new_try.js:120:22

The actual code we tried (Excluding the functions),

(async ()=>{ 
  let userAddress = "0x........"
  const poolReservesData = (await getPoolReserveData()).reserves;
  const rawUserReserves = (await getUserReserveData(userAddress)).userReserves;
  let userSummary = v2.formatUserSummaryData(poolReservesData, rawUserReserves, userAddress.toLowerCase(), 
  Math.floor(Date.now()/ 1000))
  console.log(userSummary)
})();

Could you please help on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions