Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelbej committed Mar 26, 2020
1 parent 8411a4a commit e651a99
Show file tree
Hide file tree
Showing 9 changed files with 23,297 additions and 15,578 deletions.
18,833 changes: 8,485 additions & 10,348 deletions client/package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"bn.js": "^4.11.8",
"moment": "^2.22.2",
"query-string": "^5.1.1",
"react": "^15.6.2",
"react-dom": "^15.6.2",
"react-router-dom": "^4.2.2",
"react-scripts": "^2.1.8",
"semantic-ui-css": "^2.3.1",
"semantic-ui-react": "^0.74.2",
"unfetch": "^3.0.0"
"bn.js": "^5.1.1",
"moment": "^2.24.0",
"query-string": "^6.11.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "^3.4.1",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.2",
"unfetch": "^4.1.0"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -21,12 +21,12 @@
"eject": "react-scripts eject"
},
"devDependencies": {
"eslint": "5.12.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4"
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0"
},
"browserslist": [
">0.2%",
Expand Down
19,939 changes: 14,763 additions & 5,176 deletions package-lock.json

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,34 @@
"dev:client": "cd client && npm start"
},
"dependencies": {
"bluebird": "^3.5.1",
"bn.js": "^4.11.8",
"cors": "^2.8.4",
"cross-env": "^5.2.0",
"ethereumjs-abi": "^0.6.5",
"express": "^4.16.3",
"lodash": "^4.17.11",
"lru-cache": "^4.1.3",
"morgan": "^1.9.0",
"web3": "^1.0.0-beta.37",
"bn.js": "^5.1.1",
"cors": "^2.8.5",
"cross-env": "^7.0.2",
"ethereumjs-abi": "^0.6.8",
"express": "^4.17.1",
"lodash": "^4.17.15",
"lru-cache": "^5.1.1",
"morgan": "^1.10.0",
"web3": "^1.2.6",
"websocket": "^1.0.26"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/node": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-destructuring": "^7.1.2",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/register": "^7.0.0",
"eslint": "5.12.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-import": "2.16.0",
"ganache-core": "^2.5.3",
"node-fetch": "^2.1.2",
"nodemon": "^1.18.10",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/node": "^7.8.7",
"@babel/plugin-proposal-object-rest-spread": "^7.9.0",
"@babel/plugin-transform-destructuring": "^7.8.8",
"@babel/plugin-transform-modules-commonjs": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/register": "^7.9.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.1",
"ganache-core": "^2.10.2",
"node-fetch": "^2.6.0",
"nodemon": "^2.0.2",
"npm-run-all": "^4.1.5",
"tap-spec": "^5.0.0",
"tape": "^4.9.1"
"tape": "^4.13.2"
}
}
3 changes: 0 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ import express from 'express';
import logger from 'morgan';
import cors from 'cors';
import http from 'http';
import Promise from 'bluebird';
import api from './routes/api';
import { initialize as initializeContracts } from './controllers/Contracts';
import { initialize as initializeEthereum } from './lib/ethereum';

global.Promise = Promise;

export function createApp() {
const app = express();

Expand Down
9 changes: 4 additions & 5 deletions src/controllers/Blocks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Promise from 'bluebird';
import _ from 'lodash';
import { getBlock } from '../lib/ethereum';
import { getTransactionInfo } from './Transactions';
Expand All @@ -12,17 +11,17 @@ export async function getBlockInfo(hash) {
}

export async function listBlocks(start, count) {
const blocks = await Promise.map(
_.range(start, _.max([-1, start - count]), -1),
blk => getBlockInfo(blk),
const end = _.max([-1, start - count]);
const blocks = Promise.all(
_.range(start, end, -1).map(getBlockInfo),
);
return blocks;
}

export async function listBlockTransactions(hash, start, count) {
const block = await getBlockInfo(hash);
const txids = block.transactions.slice(start, start + count);
const txs = await Promise.map(txids, txid => getTransactionInfo(txid));
const txs = Promise.all(txids.map(getTransactionInfo));
return txs;
}

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/Contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function parseFromDirectory(path) {
if (err) {
reject(err);
} else {
await Promise.all(Promise.map(files, file => parseFile(join(path, file))));
await Promise.all(files.map(file => parseFile(join(path, file))));
resolve();
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/controllers/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ export async function getTransactionInfo(txid) {

async function listBlockTransactions(blockId) {
const block = await getBlock(blockId);
return Promise.map(block.transactions, async (txid) => {
return Promise.all(block.transactions.map(async txid => {
const transaction = await getTransaction(txid);
if (transaction) {
const receipt = await getTransactionReceipt(transaction.hash);
const code = transaction.to ? await getCode(transaction.to) : undefined;
return formatTransaction(transaction, receipt, block, code);
}
return undefined;
});
}));
}

export async function listTransactions(start, count) {
const range = _.range(start, _.max([-1, start - count]), -1);
const blockTransactions = await Promise.map(range, listBlockTransactions);
const blockTransactions = await Promise.all(range.map(listBlockTransactions));
return _.filter(_.flatten(blockTransactions), tx => typeof tx !== 'undefined');
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/ethereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getPendingTransactions() {
}

function makeCachedQuery(query, numItems = 50, getKey = k => k) {
const cache = LRU(numItems);
const cache = new LRU(numItems);
return async (key) => {
if (cache.has(key)) {
return cache.get(key);
Expand Down

0 comments on commit e651a99

Please sign in to comment.