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

Update Dependencies #155

Merged
merged 4 commits into from
Jun 12, 2019
Merged
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
25,087 changes: 11,219 additions & 13,868 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 19 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
"node": "11.0.0"
},
"dependencies": {
"@ledgerhq/hw-app-eth": "^4.35.0",
"@ledgerhq/hw-transport-u2f": "^4.35.0",
"@ledgerhq/hw-app-eth": "^4.61.0",
"@ledgerhq/hw-transport-u2f": "^4.61.0",
"PaperCollateralRenderer": "github:urbit/PaperCollateralRenderer",
"azimuth-js": "^0.14.0",
"azimuth-solidity": "^1.2.0",
"babel-polyfill": "^6.26.0",
"bip32": "^1.0.2",
"bip39": "^2.5.0",
"bn.js": "^4.11.8",
Expand All @@ -37,9 +36,10 @@
"prop-types": "^15.6.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "^2.1.1",
"react-scripts": "3.0.1",
"secp256k1": "^3.5.2",
"sigil-js": "github:urbit/sigil-js#f7f29c5",
"source-map-explorer": "^2.0.0",
"trezor-connect": "^7.0.1",
"urbit-key-generation": "^0.16.0",
"urbit-ob": "^3.1.0",
Expand All @@ -62,7 +62,8 @@
"lint": "prettier src/**/*.js",
"lint:check": "prettier -c 'src/**/*.js'",
"lint:fix": "prettier --write 'src/**/*.js'",
"precommit": "npm-run-all lint:check"
"precommit": "npm-run-all lint:check",
"analyze": "source-map-explorer 'build/static/js/*.js'"
},
"devDependencies": {
"eslint-plugin-prettier": "^3.1.0",
Expand All @@ -73,10 +74,17 @@
"serve": "10.1.1",
"truffle": "4.1.11"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
"browserslist": {
"production": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
2 changes: 0 additions & 2 deletions src/Root.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'babel-polyfill'; // required for @ledgerhq/hw-transport-u2f

import React from 'react';
import { get } from 'lodash';

Expand Down
9 changes: 5 additions & 4 deletions src/bridge/components/PointList.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import React from 'react';
import * as lodash from 'lodash';
import { chunk } from 'lodash';

import { Row } from './Base';
import RenderedPoint from './RenderedPoint';

const PointList = props => {
const { setPointCursor, routeHandler, points, loading } = props;
const chunks = lodash.chunk(points, 3);
const chunks = chunk(points, 3);

return points.length === 0 ? (
<p>{loading ? 'Loading...' : 'No points to display'}</p>
) : (
lodash.map(chunks, (chunk, idx) => (
chunks.map((chunk, idx) => (
<Row key={`render-row-${idx}`}>
{lodash.map(chunk, point => (
{chunk.map(point => (
<RenderedPoint
key={point}
setPointCursor={setPointCursor}
Expand Down
4 changes: 2 additions & 2 deletions src/bridge/lib/wallet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as bip32 from 'bip32';
import * as bip39 from 'bip39';
import keccak from 'keccak';
import * as lodash from 'lodash';
import { reduce } from 'lodash';
import Maybe from 'folktale/maybe';
import * as secp256k1 from 'secp256k1';
import * as ob from 'urbit-ob';
Expand Down Expand Up @@ -75,7 +75,7 @@ const toChecksumAddress = address => {
const addr = stripHexPrefix(address).toLowerCase();
const hash = keccak256(addr).toString('hex');

return lodash.reduce(
return reduce(
addr,
(acc, char, idx) =>
parseInt(hash[idx], 16) >= 8 ? acc + char.toUpperCase() : acc + char,
Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'babel-polyfill'; // required for @ledgerhq/hw-transport-u2f

import React from 'react';
import ReactDOM from 'react-dom';

Expand Down
4 changes: 2 additions & 2 deletions src/walletgen/Walletgen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import * as lodash from 'lodash';
import { find } from 'lodash';

import Header from './components/Header';
import Footer from './components/Footer';
Expand Down Expand Up @@ -67,7 +67,7 @@ class Walletgen extends React.Component {

router = path => {
const route = key => {
const { Component } = lodash.find(ROUTES, { path: key });
const { Component } = find(ROUTES, { path: key });
const globals = {
setGlobalState: this.setGlobalState,
...this.state,
Expand Down
8 changes: 4 additions & 4 deletions src/walletgen/lib/lib.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as ob from 'urbit-ob';
import * as kg from 'urbit-key-generation/dist/index';
import * as more from 'more-entropy';
import lodash from 'lodash';
import { chunk, flatMap, zipWith } from 'lodash';
import {
MIN_STAR,
MIN_PLANET,
Expand Down Expand Up @@ -30,10 +30,10 @@ const makeTicket = point => {

return new Promise((resolve, reject) => {
gen.generate(bits, result => {
const chunked = lodash.chunk(result, 2);
const chunked = chunk(result, 2);
const desired = chunked.slice(0, bytes); // only take required entropy
const more = lodash.flatMap(desired, arr => arr[0] ^ arr[1]);
const entropy = lodash.zipWith(some, more, (x, y) => x ^ y);
const more = flatMap(desired, arr => arr[0] ^ arr[1]);
const entropy = zipWith(some, more, (x, y) => x ^ y);
const buf = Buffer.from(entropy);
const patq = ob.hex2patq(buf.toString('hex'));
resolve(patq);
Expand Down
14 changes: 7 additions & 7 deletions src/walletgen/views/Download.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import saveAs from 'file-saver';
import * as lodash from 'lodash';
import { get } from 'lodash';
import JSZip from 'jszip';

import Button from '../components/Button';
Expand All @@ -18,13 +18,13 @@ class Download extends React.Component {

const urbit_registration = Object.entries(wallets).reduce(
(acc, [k, v]) => {
const owner = lodash.get(v, 'ownership.keys.address', '');
const owner = get(v, 'ownership.keys.address', '');
const transfer = '';
const spawn = lodash.get(v, 'spawn.keys.address', '');
const manage = lodash.get(v, 'management.keys.address', '');
const voting = lodash.get(v, 'voting.keys.address', '');
const auth = lodash.get(v, 'network.keys.auth.public', '');
const crypt = lodash.get(v, 'network.keys.crypt.public', '');
const spawn = get(v, 'spawn.keys.address', '');
const manage = get(v, 'management.keys.address', '');
const voting = get(v, 'voting.keys.address', '');
const auth = get(v, 'network.keys.auth.public', '');
const crypt = get(v, 'network.keys.crypt.public', '');
return {
...acc,
[k]: [owner, transfer, spawn, manage, voting, auth, crypt],
Expand Down