Skip to content

Commit

Permalink
chore: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotucks committed Dec 3, 2024
1 parent a9bbe59 commit 63c64ec
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/dma-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"format": "prettier --write contracts/**/*.sol tasks/**/*.ts test/**/*.ts scripts/**/*.ts && yarn lint:fix",
"format:check": "prettier --check contracts/**/*.sol tasks/**/*.ts test/**/*.ts scripts/**/*.ts",
"lint:fix": "yarn eslint . --fix --ext .ts",
"lint": "yarn eslint . --ext .ts --max-warnings=0 && prettier --list-different 'contracts/**/*.sol'",
"lint": "yarn eslint . --ext .ts",
"test": "yarn test:unit && yarn test:integration:nocompile && yarn test:e2e:nocompile",
"test:nocompile": "yarn test:unit:nocompile && yarn test:integration:nocompile && yarn test:e2e:nocompile",
"test:e2e": "yarn clean && yarn compile && npx hardhat test --grep E2E",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import { actions } from '@dma-library/actions'

/**
* Creates a reallocate action for the MorphoBlue protocol.
*
*
* @param network - The network on which the action is being executed.
* @param reallocateData - An array of strings containing data for reallocation.
*
*
* If the reallocateData array is empty, the action will be marked as skipped.
* This allows for conditional execution based on the presence of reallocation data.
*
*
* @returns The reallocate action object, which may be skipped if no data is provided.
*/
export function getReallocateToAction(network: Network, reallocateData: string[]) {
const reallocateAction = actions.morphoblue.reallocate(network, {
data: reallocateData,
})
if (reallocateData.length === 0) {
reallocateAction.skipped = true
}
return reallocateAction
const reallocateAction = actions.morphoblue.reallocate(network, {
data: reallocateData,
})
if (reallocateData.length === 0) {
reallocateAction.skipped = true
}
return reallocateAction
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getMorphoBlueAdjustUpOperationDefinition } from '@deploy-configurations/operation-definitions'
import { actions } from '@dma-library/actions'
import { getReallocateToAction } from '../helpers/reallocate'
import { ZERO } from '@dma-common/constants'
import { actions } from '@dma-library/actions'
import { IOperation } from '@dma-library/types'
import {
WithCollateral,
Expand All @@ -17,6 +16,8 @@ import {
import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

import { getReallocateToAction } from '../helpers/reallocate'

export type MorphoBlueAdjustRiskUpArgs = WithMorphoBlueMarket &
WithCollateral &
WithDebtAndBorrow &
Expand Down Expand Up @@ -142,7 +143,7 @@ export const adjustRiskUp: MorphoBlueAdjustUpOperation = async ({
})

return {
calls: [reallocate, takeAFlashLoan,],
calls: [reallocate, takeAFlashLoan],
operationName: getMorphoBlueAdjustUpOperationDefinition(network).name,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@dma-library/types/operations'
import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

import { getReallocateToAction } from '../helpers/reallocate'

export type MorphoBlueOpenOperationArgs = WithMorphoBlueMarket &
Expand Down
1 change: 1 addition & 0 deletions packages/summer-cli/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/**/*.js
/dist
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-adjust.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { RiskRatio, strategies, views } from '@oasisdex/dma-library';
import { RiskRatio, strategies, views } from '@oasisdex/dma-library/src';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-close.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { strategies, views } from '@oasisdex/dma-library';
import { strategies, views } from '@oasisdex/dma-library/src';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-deposit-borrow.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { strategies } from '@oasisdex/dma-library';
import { strategies } from '@oasisdex/dma-library/src/strategies';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-open-multiply.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { RiskRatio, strategies } from '@oasisdex/dma-library';
import { RiskRatio, strategies } from '@oasisdex/dma-library/src';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-open.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { strategies } from '@oasisdex/dma-library';
import { strategies } from '@oasisdex/dma-library/src/strategies';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADDRESSES } from '@oasisdex/addresses';
import { strategies } from '@oasisdex/dma-library';
import { strategies } from '@oasisdex/dma-library/src/strategies';
import { BigNumber } from 'bignumber.js';
import { ethers } from 'ethers';
import * as yup from 'yup';
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/commands/morpho-view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { views } from '@oasisdex/dma-library';
import { views } from '@oasisdex/dma-library/src/views';
import { BigNumber } from 'bignumber.js';
import * as yup from 'yup';

Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/logic/common/set-allowance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Address } from '@deploy-configurations/types/address';
import ERC20 from '@oasisdex/abis/external/tokens/IERC20.json';
import { IERC20 } from '@oasisdex/abis/types/ethers-contracts/tokens/IERC20';
import { IERC20 } from '@oasisdex/abis/types/ethers-contracts';
import { Contract, ethers } from 'ethers';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/summer-cli/src/logic/common/swap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SwapData } from '@oasisdex/dma-library';
import { SwapData } from '@oasisdex/dma-library/src/types';
import { BigNumber } from 'bignumber.js';

function formatOneInchSwapUrl(
Expand Down

0 comments on commit 63c64ec

Please sign in to comment.