Skip to content

Commit

Permalink
Merge branch 'reseed-testnet-deployment' of github.com:BeanstalkFarms…
Browse files Browse the repository at this point in the history
…/Beanstalk into reseed-testnet-deployment
  • Loading branch information
Brean0 committed Sep 23, 2024
2 parents 2d07841 + 98cb874 commit 6d645e1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions protocol/contracts/libraries/Minting/LibWellMinting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,18 @@ library LibWellMinting {
uint256 beanIndex
) internal view returns (int256) {
Call memory wellFunction = IWell(well).wellFunction();
return
int256(
IBeanstalkWellFunction(wellFunction.target).calcReserveAtRatioSwap(
reserves,
beanIndex,
ratios,
wellFunction.data
)
).sub(int256(reserves[beanIndex]));
try
IBeanstalkWellFunction(wellFunction.target).calcReserveAtRatioSwap(
reserves,
beanIndex,
ratios,
wellFunction.data
)
returns (uint256 reserveAtRatioSwap) {
return int256(reserveAtRatioSwap).sub(int256(reserves[beanIndex]));
} catch {
return 0;
}
}

/**
Expand Down

0 comments on commit 6d645e1

Please sign in to comment.