Skip to content

Commit

Permalink
fix: id not zero based
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem committed Oct 23, 2024
1 parent 179a026 commit 194a809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/math-utils/src/formatters/emode/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export function getReservesEModes(
return eModes.reduce<ReserveEMode[]>((acc, eMode) => {
const { borrowableBitmap, collateralBitmap } = eMode.eMode;
const borrowingEnabled =
borrowableBitmap[borrowableBitmap.length - reserveId] === '1';
borrowableBitmap[borrowableBitmap.length - reserveId - 1] === '1';
const collateralEnabled =
collateralBitmap[collateralBitmap.length - reserveId] === '1';
collateralBitmap[collateralBitmap.length - reserveId - 1] === '1';
if (borrowingEnabled || collateralEnabled) {
acc.push({
id: eMode.id,
Expand Down

0 comments on commit 194a809

Please sign in to comment.