Skip to content

Commit

Permalink
Merge pull request #711 from OasisDEX/kk/fl-fix
Browse files Browse the repository at this point in the history
Kk/fl-fix
  • Loading branch information
halaprix authored Nov 14, 2024
2 parents 4be9981 + 0d2a150 commit 498c6ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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.77",
"version": "0.6.78",
"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 @@ -147,7 +147,7 @@ export async function buildAdjustFlashloan(
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (flashloanProvider !== FlashloanProvider.DssFlash) {
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {
// 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 @@ -106,7 +106,7 @@ export async function buildCloseFlashloan(
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (flashloanProvider !== FlashloanProvider.DssFlash) {
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {
// 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 498c6ad

Please sign in to comment.