From 222027bbfd028a61f92226183e9849cecfbea2a4 Mon Sep 17 00:00:00 2001 From: Mina Nagy Zaki Date: Wed, 14 Aug 2019 17:30:57 +0200 Subject: [PATCH] implement skipEntropyCollection feature flag --- src/ui/registration/containers/entropy.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/registration/containers/entropy.tsx b/src/ui/registration/containers/entropy.tsx index 667da109ca..11473a6486 100644 --- a/src/ui/registration/containers/entropy.tsx +++ b/src/ui/registration/containers/entropy.tsx @@ -1,3 +1,4 @@ +import { skipEntropyCollection } from 'src/config' import React from 'react' import { connect } from 'react-redux' import { registrationActions } from 'src/actions' @@ -58,7 +59,10 @@ export class EntropyContainer extends React.Component { } private updateEntropyProgress = async (): Promise => { - const { entropyProgress } = this.state + let { entropyProgress } = this.state + if (skipEntropyCollection) { + entropyProgress = 1 + } if (entropyProgress >= 1) { this.setState({ sufficientEntropy: true, entropyProgress: 1 }) while (this.entropyGenerator.getProgress() < 1) {