diff --git a/app/utils/generate-random-string.js b/app/utils/generate-random-string.js deleted file mode 100644 index 1c56d4e..0000000 --- a/app/utils/generate-random-string.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow -export const generateRandomString = () => Math.random() - .toString(36) - .substring(2, 15) - + Math.random() - .toString(36) - .substring(2, 15); diff --git a/app/views/console.js b/app/views/console.js index e798d80..c64881a 100644 --- a/app/views/console.js +++ b/app/views/console.js @@ -4,7 +4,7 @@ import React, { Component, Fragment } from 'react'; // eslint-disable-next-line import/no-extraneous-dependencies import { ipcRenderer } from 'electron'; import styled from 'styled-components'; -import { generateRandomString } from '../utils/generate-random-string'; +import uuid from 'uuid/v4'; import { TextComponent } from '../components/text'; import ConsoleSymbol from '../assets/images/console_zcash.png'; @@ -82,7 +82,7 @@ export class ConsoleView extends Component { {log.split('\n').map((item, idx) => ( - + {breakpoints.includes(idx) ?
: null}
diff --git a/config/daemon/zcashd-child-process.js b/config/daemon/zcashd-child-process.js index 2eb23ca..d1ca87c 100644 --- a/config/daemon/zcashd-child-process.js +++ b/config/daemon/zcashd-child-process.js @@ -7,6 +7,7 @@ import processExists from 'process-exists'; import isDev from 'electron-is-dev'; import type { ChildProcess } from 'child_process'; import eres from 'eres'; +import uuid from 'uuid/v4'; /* eslint-disable-next-line import/named */ import { mainWindow } from '../electron'; @@ -16,7 +17,6 @@ import getDaemonName from './get-daemon-name'; import fetchParams from './run-fetch-params'; import log from './logger'; import store from '../electron-store'; -import { generateRandomString } from '../../app/utils/generate-random-string'; const getDaemonOptions = ({ username, password }) => { /* @@ -71,8 +71,8 @@ const runDaemon: () => Promise = () => new Promise(async (resolve password: store.get('rpcpassword'), } : { - username: generateRandomString(), - password: generateRandomString(), + username: uuid(), + password: uuid(), }; if (isDev) log('Rpc Credentials', rpcCredentials);