Skip to content

Commit

Permalink
chore: revert fl changes
Browse files Browse the repository at this point in the history
  • Loading branch information
halaprix committed Nov 15, 2024
1 parent 498c6ad commit 103e7e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/dma-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oasisdex/dma-library",
"version": "0.6.78",
"version": "0.6.79",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ export async function buildAdjustFlashloan(
debtToken: args.debtToken.symbol,
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {

if (dependencies.protocolType === 'Spark') {
// Need to add fees to the swap amount
const fromSwapAmountBeforeFees = swap.fromTokenAmount.plus(preSwapFee)
const receivedAmountAfterSwap = swap.minToTokenAmount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ export async function buildCloseFlashloan(
debtToken: args.debtToken.symbol,
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {

if (dependencies.protocolType === 'Spark') {
// This covers off the situation where debt balances accrue interest
const amountToFlashloan = dependencies.currentPosition.debt.amount.times(
ONE.plus(SAFETY_MARGIN),
Expand Down

0 comments on commit 103e7e2

Please sign in to comment.