Skip to content

Commit

Permalink
fix flashloan
Browse files Browse the repository at this point in the history
  • Loading branch information
Darya Kaviani authored and Darya Kaviani committed Aug 25, 2022
1 parent ebb115f commit 4403c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/state/lp/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const useOpenPositionDeposit = () => {
.times(normFactor)
.times(ethIndexPrice)
.div(INDEX_SCALE)
.minus(vaultCollateralAmt.plus(collateralToMint).minus(collateralToWithdraw))
.minus(vaultCollateralAmt)
const collateralToMintPos = BigNumber.max(collateralToMint, 0)
const flashLoanAmountPos = BigNumber.max(flashLoanAmount, 0)

Expand Down

0 comments on commit 4403c6c

Please sign in to comment.