@@ -16,14 +16,16 @@ import {
17const SEED_LENGTH_BYTES = SEED_ENTROPY_BITS / 8;
17const SEED_LENGTH_BYTES = SEED_ENTROPY_BITS / 8;
19+const getEntropyBits = point =>
21+ ? GALAXY_ENTROPY_BITS
24+ : PLANET_ENTROPY_BITS;
19// returns a promise for a ticket string
26// returns a promise for a ticket string
20export const makeTicket = point => {
27export const makeTicket = point => {
21− const bits =
28+ const bits = getEntropyBits(point);
23− ? GALAXY_ENTROPY_BITS
26− : PLANET_ENTROPY_BITS;
28 const bytes = bits / 8;
30 const bytes = bits / 8;
29 const some = new Uint8Array(bytes);
31 const some = new Uint8Array(bytes);
@@ -46,12 +48,7 @@ export const makeTicket = point => {
48export const makeDeterministicTicket = (point, seed) => {
50export const makeDeterministicTicket = (point, seed) => {
49− const bits =
51+ const bits = getEntropyBits(point);
51− ? GALAXY_ENTROPY_BITS
54− : PLANET_ENTROPY_BITS;
56 const bytes = bits / 8;
53 const bytes = bits / 8;