Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Dependencies): Updated NPM packages to fix security alerts #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,32 @@
"test": "export NODE_ENV=test && mocha --timeout 10000 \"test/**/*.test.{js,ts}\" -r ts-node/register/transpile-only"
},
"dependencies": {
"@types/node-fetch": "^2.5.7",
"@uniswap/sdk": "^3.0.3-beta.1",
"@uniswap/sdk": "^3.0.3",
"@uniswap/v2-core": "^1.0.1",
"@uniswap/v2-periphery": "^1.1.0-beta.0",
"debug": "^4.1.1",
"debug": "4.3.1",
"dotenv": "^8.2.0",
"lodash": "^4.17.20",
"lodash": "^4.17.21",
"node-fetch": "^2.6.1",
"web3": "^1.2.11",
"web3-eth-contract": "^1.2.11"
"web3": "^1.3.5",
"web3-eth-contract": "^1.3.5"
},
"devDependencies": {
"@types/node-fetch": "^2.5.10",
"@types/chai": "^4.2.12",
"@types/debug": "^4.1.5",
"@types/lodash": "^4.14.161",
"@types/lodash": "^4.14.168",
"@types/mocha": "^8.0.3",
"@types/node": "^14.6.4",
"@types/sinon": "^9.0.5",
"@types/sinon-chai": "^3.2.4",
"@types/web3": "^1.2.2",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"chai": "^4.2.0",
"eslint": "^7.8.1",
"eslint-plugin-import": "^2.22.0",
"ethereum-waffle": "^3.1.0",
"ethers": "^5.0.12",
"ethereum-waffle": "^3.3.0",
"ethers": "^5.1.0",
"mocha": "^8.1.3",
"nodemon": "^2.0.4",
"sinon": "^9.0.3",
Expand Down
5 changes: 1 addition & 4 deletions src/providers/uniswap-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ export class UniSwapProvider extends Dependency {
.mul(toBN(Number(config.percentSlippage) * 10000))
.div(toBN(10000));

const inTheMoney =
order.orderType === OrderType.LIMIT
? resultingTokens && toBN(resultingTokens).gte(toBN(order.amountOutExpected).add(slippage))
: resultingTokens && toBN(resultingTokens).lte(toBN(order.amountOutExpected).add(slippage));
const inTheMoney = resultingTokens && toBN(resultingTokens).gte(toBN(order.amountOutExpected).add(slippage));

if (inTheMoney) {
log(
Expand Down
Loading