-
Notifications
You must be signed in to change notification settings - Fork 35
Feature flags setup, and implementation of SKIP_IDENTTITY_CREATION and SKIP_ENTROPY_COLLECTION #1410
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
Feature flags setup, and implementation of SKIP_IDENTTITY_CREATION and SKIP_ENTROPY_COLLECTION #1410
Changes from all commits
ca0d0bb
ef5172a
dbbc118
7d3cca5
3dd3258
9448d62
92ee5ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const env = process.env['NODE_ENV'] || 'development' | ||
const isDev = env === 'development' | ||
// @ts-ignore unused so far | ||
const isTest = env === 'test' | ||
const isTestE2E = env === 'test-e2e' | ||
|
||
export const SKIP_ENTROPY_COLLECTION = isDev || isTestE2E | ||
export const SKIP_IDENTITY_REGISTRATION = isDev || isTestE2E |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { SKIP_ENTROPY_COLLECTION } from 'src/env' | ||
|
||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { registrationActions } from 'src/actions' | ||
|
@@ -10,7 +12,7 @@ import { | |
import { generateSecureRandomBytes } from 'src/lib/util' | ||
import { withErrorScreen } from 'src/actions/modifiers' | ||
import { ThunkDispatch } from 'src/store' | ||
import { AppError, ErrorCode } from '../../../lib/errors' | ||
import { AppError, ErrorCode } from 'src/lib/errors' | ||
import { routeList } from 'src/routeList' | ||
import { StatusBar } from 'react-native' | ||
|
||
|
@@ -58,7 +60,9 @@ export class EntropyContainer extends React.Component<Props, State> { | |
} | ||
|
||
private updateEntropyProgress = async (): Promise<void> => { | ||
const { entropyProgress } = this.state | ||
const entropyProgress = SKIP_ENTROPY_COLLECTION | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its more efficient to move this to state init (line 39), if it has no other implications There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted it to start out as 0 so that you have to at least touch the screen once to get to "100%" 😄 |
||
? 1 | ||
: this.state.entropyProgress | ||
if (entropyProgress >= 1) { | ||
this.setState({ sufficientEntropy: true, entropyProgress: 1 }) | ||
while (this.entropyGenerator.getProgress() < 1) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.