Skip to content

Commit

Permalink
Merge pull request #30 from fireblocks/snyk-vulnerabilities-fix
Browse files Browse the repository at this point in the history
Snyk OSS Vulnerabilities
  • Loading branch information
YoavBZ authored May 1, 2023
2 parents 1966a0e + bba2a86 commit 13a419f
Show file tree
Hide file tree
Showing 12 changed files with 16,670 additions and 2,678 deletions.
2 changes: 1 addition & 1 deletion examples/aave-example/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fireblocks DeFi SDK - Uniswap Example
# Fireblocks DeFi SDK - Aave Example

This example demonstrates interaction with Aave, a decentralized lending platform, using Fireblocks DeFi SDK.

Expand Down
1,118 changes: 320 additions & 798 deletions examples/aave-example/package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions examples/aave-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"ethers": "^5.5.1",
"ethers": "^5.7.2",
"fireblocks-defi-sdk": "file:../..",
"fireblocks-sdk": "^1.5.11",
"inquirer": "^7.3.3"
}
}
6,685 changes: 5,328 additions & 1,357 deletions examples/basic-example/package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions examples/basic-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"fireblocks-defi-sdk": "^1.1.0",
"fireblocks-sdk": "^1.5.11"
"fireblocks-defi-sdk": "file:../.."
}
}
5,358 changes: 5,334 additions & 24 deletions examples/nft-example/package-lock.json

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions examples/nft-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
"name": "nft-example",
"version": "1.0.0",
"description": "This example using nft Fireblocks objects",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc -p ./tsconfig.json",
"start:erc721": "npm run build && node dist/examples/nft-example/erc721.js",
"start:erc1155": "npm run build && node dist/examples/nft-example/erc1155.js",
"start:custom": "npm run build && node dist/examples/nft-example/custom-token.js"
"start:erc721": "npm run build && node dist/erc721.js",
"start:erc1155": "npm run build && node dist/erc1155.js",
"start:custom": "npm run build && node dist/custom-token.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"node-fetch": "^2.6.7",
"fireblocks-defi-sdk": "file:../.."
}
}
4 changes: 2 additions & 2 deletions examples/uniswap-example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as fs from "fs";
import { abi as uniswapRouterV2ABI } from '@uniswap/v2-periphery/build/IUniswapV2Router02.json';
import { formatEther, parseEther } from "ethers/lib/utils";
import * as inquirer from "inquirer";

const chain = Chain[process.env.ETH_CHAIN || "ROPSTEN"];
const chainId = ChainId[process.env.ETH_CHAIN || "ROPSTEN"];
const provider = ethers.getDefaultProvider(chain);
Expand All @@ -25,7 +25,7 @@ async function swapEthToDai(bridge: EthersBridge, amountInEth: string, recipient

const weth = WETH[chainId];
const pair = await Fetcher.fetchPairData(dai, weth);

const route = new Route([pair], ETHER)
const amountIn = parseEther(amountInEth).toString();
const trade = new Trade(route, CurrencyAmount.ether(amountIn), TradeType.EXACT_INPUT);
Expand Down
Loading

0 comments on commit 13a419f

Please sign in to comment.