Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(badger): Be safe when mapping data
Browse files Browse the repository at this point in the history
  • Loading branch information
immasandwich committed Nov 11, 2022
1 parent ba852cd commit e2dceea
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ export class BadgerClaimableRewardsResolver {
async getVaultDefinitions({ network, address }: BadgerClaimableContractPositionBalanceHelperParams) {
const data = await this.getCachedAccumulatedRewardsData(network, address);

const accumulatedRewardsData = data.tokens.map((tokenAddress, index) => ({
const accumulatedRewardsData = (data.tokens ?? []).map((tokenAddress, index) => ({
rewardTokenAddress: tokenAddress.toLowerCase(),
rewardTokenBalanceRaw: data.cumulativeAmounts[index],
}));
Expand Down

0 comments on commit e2dceea

Please sign in to comment.