Skip to content

Commit

Permalink
chore(app): hide legacy import when empty and adjust default gpu sett…
Browse files Browse the repository at this point in the history
…ing (#1197)

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

* chore(snyk): update snyk
  • Loading branch information
Maurice Dalderup authored Oct 18, 2019
1 parent 30fd7b3 commit d37f824
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 194 deletions.
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

0 comments on commit d37f824

Please sign in to comment.