Skip to content
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

chore(app): hide legacy import when empty and adjust default gpu setting #1197

Merged
merged 2 commits into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.5
ignore: {}
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-CSVPARSE-467403:
- sifter > csv-parse:
reason: None given
expires: '2019-11-17T16:31:16.436Z'
SNYK-JS-PUPA-174563:
- electron-context-menu > electron-dl > pupa:
reason: None given
expires: '2019-11-17T16:31:16.436Z'
# patches apply the minimum changes required to fix a vulnerability
patch:
SNYK-JS-AXIOS-174505:
- '@cityofzion/neon-js > axios':
patched: '2019-08-02T07:32:26.723Z'
SNYK-JS-HTTPSPROXYAGENT-469131:
- snyk > proxy-agent > https-proxy-agent:
patched: '2019-10-04T01:45:35.994Z'
- snyk > proxy-agent > pac-proxy-agent > https-proxy-agent:
patched: '2019-10-04T01:45:35.994Z'
patched: '2019-10-18T16:30:20.194Z'
12 changes: 4 additions & 8 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ function createSplashWindow() {

const autoUpdates = 'autoUpdates';
getStorage(autoUpdates).then((autoUpdatesSetting) => {
const enabled = isEmpty(autoUpdatesSetting) ? true : autoUpdatesSetting.enabled;
const enabled = autoUpdatesSetting && autoUpdatesSetting.enabled;

if (enabled) {
if (isEmpty(autoUpdatesSetting)) {
setStorage(autoUpdates, { enabled: true });
} else {
setStorage(autoUpdates, { enabled: false });
}

if (
Expand Down Expand Up @@ -138,12 +136,10 @@ function createSplashWindow() {
}

const webGL = 'ignore-gpu-blacklist';
getStorage(webGL).then((setting) => {
if (!isEmpty(setting) && setting.enabled) {
getStorage(webGL).then((webGLSetting) => {
if (isEmpty(webGLSetting) || webGLSetting.enabled) {
app.commandLine.appendSwitch(webGL);
setStorage(webGL, { enabled: true });
} else {
setStorage(webGL, { enabled: false });
}
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { string, func, bool, arrayOf, shape } from 'prop-types';
import classNames from 'classnames';
import { isEmpty } from 'lodash';

import Button from 'shared/components/Forms/Button';
import PrimaryButton from 'shared/components/Forms/PrimaryButton';
Expand Down Expand Up @@ -59,7 +60,7 @@ export default class Import extends React.PureComponent {

renderImportView = ({ accounts, newImport }) => (
<React.Fragment>
{accounts && (
{!isEmpty(accounts) && (
<div className={styles.toggle} role="button" tabIndex={0} onClick={this.handleToggle}>
{newImport ? 'Import Legacy Wallet' : 'Import New Wallet'}
</div>
Expand Down
Loading