Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Set minimunm step size
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Sep 28, 2017
1 parent f0ac590 commit 0e47c33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion features/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Feature: Login page
Then I should be logged in
And I should see text "Testnet" in "peer network" element

@ignore
Scenario: should allow to create a new account
Given I'm on login page
When I click "new account button"
Expand Down
5 changes: 1 addition & 4 deletions src/utils/passphrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const leftPadd = (str, pad, length) => {
* Resets previous settings and creates a step with a random length between 1.6% to 3.2%
*/
const init = (rand = Math.random()) => ({
step: (160 + Math.floor(rand * 160)) / 100,
step: Math.max((160 + Math.floor(rand * 160)) / 100, 0.01),
percentage: 0,
seed: emptyByte('00'),
byte: emptyByte(0),
Expand All @@ -50,9 +50,6 @@ const init = (rand = Math.random()) => ({
* @param {Number} percentage
* @param {Number} step
*
* @todo
* - Set minimum value for steps to make sure 100 iterations is enough
*
* @returns {number[]} The input array whose member is pos is set
*/
export const generateSeed = ({ byte, seed, percentage, step } = init(), rand = Math.random()) => {
Expand Down

0 comments on commit 0e47c33

Please sign in to comment.