Skip to content

Commit

Permalink
fix error in self-ref suite
Browse files Browse the repository at this point in the history
  • Loading branch information
jankjr committed Jun 27, 2023
1 parent 7e22757 commit 31b5841
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ const changeRefPerTok = async (
const rate = await ctx.morphoWrapper.getExchangeRate()
await ctx.morphoWrapper.setExchangeRate(rate.add(rate.mul(percentChange).div(bn('100'))))

{
const lastRound = await ctx.targetPrRefFeed!.latestRoundData()
const nextAnswer = lastRound.answer.add(lastRound.answer.mul(percentChange).div(100))
await ctx.targetPrRefFeed!.updateAnswer(nextAnswer)
}
// {
// const lastRound = await ctx.targetPrRefFeed!.latestRoundData()
// const nextAnswer = lastRound.answer.add(lastRound.answer.mul(percentChange).div(100))
// await ctx.targetPrRefFeed!.updateAnswer(nextAnswer)
// }

{
const lastRound = await ctx.chainlinkFeed.latestRoundData()
const nextAnswer = lastRound.answer.add(lastRound.answer.mul(percentChange).div(100))
await ctx.chainlinkFeed.updateAnswer(nextAnswer)
}
// {
// const lastRound = await ctx.chainlinkFeed.latestRoundData()
// const nextAnswer = lastRound.answer.add(lastRound.answer.mul(percentChange).div(100))
// await ctx.chainlinkFeed.updateAnswer(nextAnswer)
// }
}

// prettier-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const opts = {
itChecksPriceChanges: it,
itHasRevenueHiding: it,
resetFork: getResetFork(FORK_BLOCK),
collateralName: 'MorphoAAVEV2NonFiatCollateral',
collateralName: 'MorphoAAVEV2SelfReferentialCollateral',
chainlinkDefaultAnswer: defaultCollateralOpts.defaultPrice!,
}

Expand Down

0 comments on commit 31b5841

Please sign in to comment.