Skip to content

Commit

Permalink
fix: default emode [skip cypress] (#2124)
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem authored Jul 29, 2024
1 parent 48d9b01 commit ad98a3c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/store/poolSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,19 @@ export const formatEmodes = (reserves: ReserveDataHumanized[]) => {
return acc;
}, {} as Record<number, EmodeCategory>);

// If all reserves have an eMode cateogry other than 0, we need to add the default empty one.
// The UI assumes that there is always an eMode category 0, which is 'none'.
if (!eModes[0]) {
eModes[0] = {
liquidationBonus: 0,
id: 0,
label: '',
liquidationThreshold: 0,
ltv: 0,
priceSource: '0x0000000000000000000000000000000000000000',
assets: [],
};
}

return eModes;
};

2 comments on commit ad98a3c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

Please sign in to comment.