on master help sign in
fix: destructure lodash-es import
commit795e055d92c3b32c334eb606878502efc4e7e627 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateWed 12 Jun 2019, 14:06 (7 years ago) parent4821a29
1 file changed+4−4
src/walletgen/lib/lib.js+4−4
src/walletgen/lib/lib.js+4−4
@@ -1,7 +1,7 @@
11import * as ob from 'urbit-ob';
22import * as kg from 'urbit-key-generation/dist/index';
33import * as more from 'more-entropy';
4−import lodash from 'lodash-es';
4+import { chunk, flatMap, zipWith } from 'lodash-es';
55import {
66 MIN_STAR,
77 MIN_PLANET,
@@ -30,10 +30,10 @@ const makeTicket = point => {
3030
3131 return new Promise((resolve, reject) => {
3232 gen.generate(bits, result => {
33− const chunked = lodash.chunk(result, 2);
33+ const chunked = chunk(result, 2);
3434 const desired = chunked.slice(0, bytes); // only take required entropy
35− const more = lodash.flatMap(desired, arr => arr[0] ^ arr[1]);
36− const entropy = lodash.zipWith(some, more, (x, y) => x ^ y);
35+ const more = flatMap(desired, arr => arr[0] ^ arr[1]);
36+ const entropy = zipWith(some, more, (x, y) => x ^ y);
3737 const buf = Buffer.from(entropy);
3838 const patq = ob.hex2patq(buf.toString('hex'));
3939 resolve(patq);