lint(import): remove default exports
This commit is contained in:
parent
50227aea1d
commit
2efab1bb12
|
@ -42,7 +42,4 @@ workflows:
|
|||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- test:
|
||||
filters:
|
||||
branches:
|
||||
only: develop
|
||||
- test
|
||||
|
|
|
@ -11,13 +11,12 @@ import theme, { GlobalStyle } from './theme';
|
|||
|
||||
const store = configureStore({});
|
||||
|
||||
export default () => (
|
||||
export const App = () => (
|
||||
<ThemeProvider theme={theme}>
|
||||
<Fragment>
|
||||
<GlobalStyle />
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
{/* $FlowFixMe */}
|
||||
<Router />
|
||||
</ConnectedRouter>
|
||||
</Provider>
|
||||
|
|
|
@ -9,14 +9,13 @@ import ClickOutside from 'react-click-outside';
|
|||
|
||||
import { TextComponent } from './text';
|
||||
|
||||
import truncateAddress from '../utils/truncate-address';
|
||||
import { truncateAddress } from '../utils/truncate-address';
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const MenuWrapper = styled.div`
|
||||
background-image: ${props => `linear-gradient(to right, ${darken(
|
||||
0.05,
|
||||
props.theme.colors.activeItem,
|
||||
)}, ${props.theme.colors.activeItem})`};
|
||||
background-image: ${props => `linear-gradient(to right, ${darken(0.05, props.theme.colors.activeItem)}, ${
|
||||
props.theme.colors.activeItem
|
||||
})`};
|
||||
border-radius: ${props => props.theme.boxBorderRadius};
|
||||
margin-left: -10px;
|
||||
max-width: 400px;
|
||||
|
@ -56,7 +55,7 @@ const MenuItem = styled.button`
|
|||
|
||||
const OptionItem = styled(MenuItem)`
|
||||
&:hover {
|
||||
background-color: #F9D114;
|
||||
background-color: #f9d114;
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -100,9 +99,7 @@ export class DropdownComponent extends Component<Props, State> {
|
|||
} = this.props;
|
||||
|
||||
const body = [
|
||||
<ClickOutside
|
||||
onClickOutside={() => this.setState(() => ({ isOpen: false }))}
|
||||
>
|
||||
<ClickOutside onClickOutside={() => this.setState(() => ({ isOpen: false }))}>
|
||||
<MenuWrapper>
|
||||
{label && (
|
||||
<MenuItem disabled isGroupLabel>
|
||||
|
@ -126,10 +123,7 @@ export class DropdownComponent extends Component<Props, State> {
|
|||
tipSize={7}
|
||||
body={body}
|
||||
>
|
||||
{renderTrigger(
|
||||
() => this.setState(state => ({ isOpen: !state.isOpen })),
|
||||
isOpen,
|
||||
)}
|
||||
{renderTrigger(() => this.setState(state => ({ isOpen: !state.isOpen })), isOpen)}
|
||||
</PopoverWithStyle>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ import { ColumnComponent } from './column';
|
|||
|
||||
import theme from '../theme';
|
||||
|
||||
import formatNumber from '../utils/format-number';
|
||||
import truncateAddress from '../utils/truncate-address';
|
||||
import { formatNumber } from '../utils/format-number';
|
||||
import { truncateAddress } from '../utils/truncate-address';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: 460px;
|
||||
|
|
|
@ -14,8 +14,8 @@ import { TransactionDetailsComponent } from './transaction-details';
|
|||
|
||||
import theme from '../theme';
|
||||
|
||||
import formatNumber from '../utils/format-number';
|
||||
import truncateAddress from '../utils/truncate-address';
|
||||
import { formatNumber } from '../utils/format-number';
|
||||
import { truncateAddress } from '../utils/truncate-address';
|
||||
|
||||
const Wrapper = styled(RowComponent)`
|
||||
background-color: ${props => props.theme.colors.cardBackgroundColor};
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ColumnComponent } from './column';
|
|||
import { Button } from './button';
|
||||
import { QRCode } from './qrcode';
|
||||
|
||||
import truncateAddress from '../utils/truncate-address';
|
||||
import { truncateAddress } from '../utils/truncate-address';
|
||||
|
||||
import eyeIcon from '../assets/images/eye.png';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import styled from 'styled-components';
|
|||
import { TextComponent } from './text';
|
||||
import { RowComponent } from './row';
|
||||
|
||||
import formatNumber from '../utils/format-number';
|
||||
import { formatNumber } from '../utils/format-number';
|
||||
|
||||
import theme from '../theme';
|
||||
|
||||
|
@ -53,16 +53,10 @@ type Props = {
|
|||
};
|
||||
|
||||
export const WalletSummaryComponent = ({
|
||||
total,
|
||||
shielded,
|
||||
transparent,
|
||||
zecPrice,
|
||||
total, shielded, transparent, zecPrice,
|
||||
}: Props) => (
|
||||
<Wrapper>
|
||||
<AllAddresses
|
||||
value='ALL ADDRESSES'
|
||||
isBold
|
||||
/>
|
||||
<AllAddresses value='ALL ADDRESSES' isBold />
|
||||
<ValueBox>
|
||||
<TextComponent
|
||||
size={theme.fontSize.medium * 2.5}
|
||||
|
@ -76,34 +70,22 @@ export const WalletSummaryComponent = ({
|
|||
</ValueBox>
|
||||
<RowComponent>
|
||||
<ValueBox>
|
||||
<ShieldedValue
|
||||
value='● SHIELDED'
|
||||
isBold
|
||||
size={theme.fontSize.small}
|
||||
/>
|
||||
<ShieldedValue value='● SHIELDED' isBold size={theme.fontSize.small} />
|
||||
<TextComponent
|
||||
value={`ZEC ${formatNumber({ value: shielded })}`}
|
||||
isBold
|
||||
size={theme.fontSize.medium}
|
||||
/>
|
||||
<USDValue
|
||||
value={`USD $${formatNumber({ value: shielded * zecPrice })}`}
|
||||
/>
|
||||
<USDValue value={`USD $${formatNumber({ value: shielded * zecPrice })}`} />
|
||||
</ValueBox>
|
||||
<ValueBox>
|
||||
<Label
|
||||
value='● TRANSPARENT'
|
||||
isBold
|
||||
size={theme.fontSize.small}
|
||||
/>
|
||||
<Label value='● TRANSPARENT' isBold size={theme.fontSize.small} />
|
||||
<TextComponent
|
||||
value={`ZEC ${formatNumber({ value: transparent })}`}
|
||||
isBold
|
||||
size={theme.fontSize.medium}
|
||||
/>
|
||||
<USDValue
|
||||
value={`USD $${formatNumber({ value: transparent * zecPrice })}`}
|
||||
/>
|
||||
<USDValue value={`USD $${formatNumber({ value: transparent * zecPrice })}`} />
|
||||
</ValueBox>
|
||||
</RowComponent>
|
||||
</Wrapper>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
|
||||
export default {
|
||||
export const FEES = {
|
||||
LOW: 0.001,
|
||||
MEDIUM: 0.005,
|
||||
HIGH: 0.009,
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
loadWalletSummarySuccess,
|
||||
loadWalletSummaryError,
|
||||
} from '../redux/modules/wallet';
|
||||
import sortBy from '../utils/sort-by';
|
||||
import { sortBy } from '../utils/sort-by';
|
||||
|
||||
import type { AppState } from '../types/app-state';
|
||||
import type { Dispatch } from '../types/redux';
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
validateAddressError,
|
||||
} from '../redux/modules/send';
|
||||
|
||||
import filterObjectNullKeys from '../utils/filter-object-null-keys';
|
||||
import { filterObjectNullKeys } from '../utils/filter-object-null-keys';
|
||||
|
||||
import type { AppState } from '../types/app-state';
|
||||
import type { Dispatch } from '../types/redux';
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
import rpc from '../../services/api';
|
||||
import store from '../../config/electron-store';
|
||||
|
||||
import sortBy from '../utils/sort-by';
|
||||
import { sortBy } from '../utils/sort-by';
|
||||
|
||||
import type { AppState } from '../types/app-state';
|
||||
import type { Dispatch } from '../types/redux';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import App from './app';
|
||||
import { App } from './app';
|
||||
|
||||
const el = document.getElementById('root');
|
||||
ReactDOM.render(<App />, el);
|
||||
|
|
|
@ -4,13 +4,13 @@ import { createStore, applyMiddleware, compose } from 'redux';
|
|||
import { routerMiddleware } from 'connected-react-router';
|
||||
import { createHashHistory } from 'history';
|
||||
import thunk from 'redux-thunk';
|
||||
import type { RouterHistory } from 'react-router-dom';
|
||||
|
||||
import { createRootReducer } from './modules/reducer';
|
||||
|
||||
export const history = createHashHistory();
|
||||
export const history: RouterHistory = createHashHistory();
|
||||
|
||||
const shouldEnableDevTools = (process.env.NODE_ENV !== 'production'
|
||||
|| process.env.NODE_ENV !== 'staging')
|
||||
const shouldEnableDevTools = (process.env.NODE_ENV !== 'production' || process.env.NODE_ENV !== 'staging')
|
||||
&& window.devToolsExtension;
|
||||
|
||||
export const configureStore = (initialState: Object) => {
|
||||
|
|
|
@ -5,11 +5,7 @@ import type { Action } from '../../types/redux';
|
|||
export const LOAD_ADDRESSES_SUCCESS = 'LOAD_ADDRESSES_SUCCESS';
|
||||
export const LOAD_ADDRESSES_ERROR = 'LOAD_ADDRESSES_ERROR';
|
||||
|
||||
export const loadAddressesSuccess = ({
|
||||
addresses,
|
||||
}: {
|
||||
addresses: string[],
|
||||
}) => ({
|
||||
export const loadAddressesSuccess = ({ addresses }: { addresses: string[] }) => ({
|
||||
type: LOAD_ADDRESSES_SUCCESS,
|
||||
payload: {
|
||||
addresses,
|
||||
|
@ -31,6 +27,7 @@ const initialState: State = {
|
|||
error: null,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line
|
||||
export default (state: State = initialState, action: Action) => {
|
||||
switch (action.type) {
|
||||
case LOAD_ADDRESSES_SUCCESS:
|
||||
|
|
|
@ -14,11 +14,7 @@ export const sendTransaction = () => ({
|
|||
payload: {},
|
||||
});
|
||||
|
||||
export const sendTransactionSuccess = ({
|
||||
operationId,
|
||||
}: {
|
||||
operationId: string,
|
||||
}) => ({
|
||||
export const sendTransactionSuccess = ({ operationId }: { operationId: string }) => ({
|
||||
type: SEND_TRANSACTION_SUCCESS,
|
||||
payload: {
|
||||
operationId,
|
||||
|
@ -71,7 +67,7 @@ const initialState: State = {
|
|||
isToAddressValid: false,
|
||||
zecPrice: 0,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line
|
||||
export default (state: State = initialState, action: Action): State => {
|
||||
switch (action.type) {
|
||||
case SEND_TRANSACTION:
|
||||
|
|
|
@ -46,7 +46,7 @@ const initialState = {
|
|||
error: null,
|
||||
isLoading: false,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line
|
||||
export default (state: State = initialState, action: Action) => {
|
||||
switch (action.type) {
|
||||
case LOAD_TRANSACTIONS:
|
||||
|
|
|
@ -65,7 +65,7 @@ const initialState = {
|
|||
addresses: [],
|
||||
transactions: [],
|
||||
};
|
||||
|
||||
// eslint-disable-next-line
|
||||
export default (state: State = initialState, action: Action) => {
|
||||
switch (action.type) {
|
||||
case LOAD_WALLET_SUMMARY:
|
||||
|
|
|
@ -105,4 +105,5 @@ export const DoczWrapper = ({ children }) => (
|
|||
</ThemeProvider>
|
||||
);
|
||||
|
||||
// eslint-disable-next-line
|
||||
export default appTheme;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
export default (obj: Object) => Object.keys(obj).reduce((acc, cur) => {
|
||||
export const filterObjectNullKeys = (obj: Object) => Object.keys(obj).reduce((acc, cur) => {
|
||||
if (obj[cur] === null || obj[cur] === undefined || obj[cur] === '') {
|
||||
return acc;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
// @flow
|
||||
|
||||
export default ({ value, append = '' }: { value: number, append?: string }) => `${append}${(value || 0).toLocaleString()}`;
|
||||
export const formatNumber = ({ value, append = '' }: { value: number, append?: string }) => `${append}${(value || 0).toLocaleString()}`;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// @flow
|
||||
|
||||
export default () => Math.random()
|
||||
export const generateRandomString = () => Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15)
|
||||
+ Math.random()
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
// eslint-disable-next-line
|
||||
import electron from 'electron';
|
||||
|
||||
export default (url: string) => electron.shell.openExternal(url);
|
||||
export const openExternal = (url: string) => electron.shell.openExternal(url);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// @flow
|
||||
/* eslint-disable max-len */
|
||||
// $FlowFixMe
|
||||
export default <T>(field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1));
|
||||
export const sortBy = <T>(field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1));
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// @flow
|
||||
|
||||
export default (address: string = '') => `${address.substr(0, 20)}...${address.substr(
|
||||
address.length - 10,
|
||||
address.length,
|
||||
)}`;
|
||||
export const truncateAddress = (address: string = '') => `${address.substr(0, 20)}...${address.substr(address.length - 10, address.length)}`;
|
||||
|
|
|
@ -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 { generateRandomString } from '../utils/generate-random-string';
|
||||
import { TextComponent } from '../components/text';
|
||||
|
||||
import ConsoleSymbol from '../assets/images/console_zcash.png';
|
||||
|
|
|
@ -4,7 +4,7 @@ import styled, { keyframes } from 'styled-components';
|
|||
import { BigNumber } from 'bignumber.js';
|
||||
import { Transition, animated } from 'react-spring';
|
||||
|
||||
import FEES from '../constants/fees';
|
||||
import { FEES } from '../constants/fees';
|
||||
|
||||
import { InputLabelComponent } from '../components/input-label';
|
||||
import { InputComponent } from '../components/input';
|
||||
|
@ -16,7 +16,7 @@ import { Divider } from '../components/divider';
|
|||
import { Button } from '../components/button';
|
||||
import { ConfirmDialogComponent } from '../components/confirm-dialog';
|
||||
|
||||
import formatNumber from '../utils/format-number';
|
||||
import { formatNumber } from '../utils/format-number';
|
||||
|
||||
import type { SendTransactionInput } from '../containers/send';
|
||||
import type { State as SendState } from '../redux/modules/send';
|
||||
|
@ -246,8 +246,7 @@ export class SendView extends PureComponent<Props, State> {
|
|||
|
||||
if (field === 'to') {
|
||||
// eslint-disable-next-line max-len
|
||||
this.setState(() => ({ [field]: value }),
|
||||
() => validateAddress({ address: value }));
|
||||
this.setState(() => ({ [field]: value }), () => validateAddress({ address: value }));
|
||||
} else {
|
||||
this.setState(() => ({ [field]: value }));
|
||||
}
|
||||
|
@ -323,18 +322,12 @@ export class SendView extends PureComponent<Props, State> {
|
|||
return isToAddressValid ? (
|
||||
<RowComponent alignItems='center'>
|
||||
<ValidateStatusIcon src={ValidIcon} />
|
||||
<ItemLabel
|
||||
value='VALID'
|
||||
color={theme.colors.transactionReceived}
|
||||
/>
|
||||
<ItemLabel value='VALID' color={theme.colors.transactionReceived} />
|
||||
</RowComponent>
|
||||
) : (
|
||||
<RowComponent alignItems='center'>
|
||||
<ValidateStatusIcon src={InvalidIcon} />
|
||||
<ItemLabel
|
||||
value='INVALID'
|
||||
color={theme.colors.transactionSent}
|
||||
/>
|
||||
<ItemLabel value='INVALID' color={theme.colors.transactionSent} />
|
||||
</RowComponent>
|
||||
);
|
||||
};
|
||||
|
@ -365,14 +358,8 @@ export class SendView extends PureComponent<Props, State> {
|
|||
|
||||
if (operationId) {
|
||||
return (
|
||||
<ColumnComponent
|
||||
width='100%'
|
||||
id='send-success-wrapper'
|
||||
>
|
||||
<TextComponent
|
||||
value={`Transaction ID: ${operationId}`}
|
||||
align='center'
|
||||
/>
|
||||
<ColumnComponent width='100%' id='send-success-wrapper'>
|
||||
<TextComponent value={`Transaction ID: ${operationId}`} align='center' />
|
||||
<button
|
||||
type='button'
|
||||
onClick={() => {
|
||||
|
@ -494,25 +481,23 @@ export class SendView extends PureComponent<Props, State> {
|
|||
id='send-show-additional-options-button'
|
||||
onClick={() => this.setState(state => ({
|
||||
showFee: !state.showFee,
|
||||
}))}
|
||||
}))
|
||||
}
|
||||
>
|
||||
<SeeMoreIcon
|
||||
src={MenuIcon}
|
||||
alt='Show more icon'
|
||||
/>
|
||||
<TextComponent
|
||||
value={`${showFee ? 'Hide' : 'Show'} Additional Options`}
|
||||
/>
|
||||
<SeeMoreIcon src={MenuIcon} alt='Show more icon' />
|
||||
<TextComponent value={`${showFee ? 'Hide' : 'Show'} Additional Options`} />
|
||||
</ShowFeeButton>
|
||||
<RevealsMain>
|
||||
<Transition
|
||||
native
|
||||
items={showFee}
|
||||
enter={[{
|
||||
height: 'auto',
|
||||
opacity: 1,
|
||||
overflow: 'visible',
|
||||
}]}
|
||||
enter={[
|
||||
{
|
||||
height: 'auto',
|
||||
opacity: 1,
|
||||
overflow: 'visible',
|
||||
},
|
||||
]}
|
||||
leave={{ height: 0, opacity: 0 }}
|
||||
from={{
|
||||
position: 'absolute',
|
||||
|
@ -521,40 +506,39 @@ export class SendView extends PureComponent<Props, State> {
|
|||
height: 0,
|
||||
}}
|
||||
>
|
||||
{show => show && (props => (
|
||||
<animated.div style={props}>
|
||||
<FeeWrapper id='send-fee-wrapper'>
|
||||
<RowComponent
|
||||
alignItems='flex-end'
|
||||
justifyContent='space-between'
|
||||
>
|
||||
<ColumnComponent width='74%'>
|
||||
<InputLabelComponent value='Fee' />
|
||||
<InputComponent
|
||||
type='number'
|
||||
onChange={this.handleChange('fee')}
|
||||
value={String(fee)}
|
||||
disabled={feeType !== FEES.CUSTOM}
|
||||
bgColor={theme.colors.blackTwo}
|
||||
name='fee'
|
||||
/>
|
||||
</ColumnComponent>
|
||||
<ColumnComponent width='25%'>
|
||||
<SelectComponent
|
||||
placement='top'
|
||||
value={String(feeType)}
|
||||
bgColor={theme.colors.blackTwo}
|
||||
onChange={this.handleChangeFeeType}
|
||||
options={Object.keys(FEES).map(cur => ({
|
||||
label: cur.toLowerCase(),
|
||||
value: String(FEES[cur]),
|
||||
}))}
|
||||
/>
|
||||
</ColumnComponent>
|
||||
</RowComponent>
|
||||
</FeeWrapper>
|
||||
</animated.div>
|
||||
))}
|
||||
{show => show
|
||||
&& (props => (
|
||||
<animated.div style={props}>
|
||||
<FeeWrapper id='send-fee-wrapper'>
|
||||
<RowComponent alignItems='flex-end' justifyContent='space-between'>
|
||||
<ColumnComponent width='74%'>
|
||||
<InputLabelComponent value='Fee' />
|
||||
<InputComponent
|
||||
type='number'
|
||||
onChange={this.handleChange('fee')}
|
||||
value={String(fee)}
|
||||
disabled={feeType !== FEES.CUSTOM}
|
||||
bgColor={theme.colors.blackTwo}
|
||||
name='fee'
|
||||
/>
|
||||
</ColumnComponent>
|
||||
<ColumnComponent width='25%'>
|
||||
<SelectComponent
|
||||
placement='top'
|
||||
value={String(feeType)}
|
||||
bgColor={theme.colors.blackTwo}
|
||||
onChange={this.handleChangeFeeType}
|
||||
options={Object.keys(FEES).map(cur => ({
|
||||
label: cur.toLowerCase(),
|
||||
value: String(FEES[cur]),
|
||||
}))}
|
||||
/>
|
||||
</ColumnComponent>
|
||||
</RowComponent>
|
||||
</FeeWrapper>
|
||||
</animated.div>
|
||||
))
|
||||
}
|
||||
</Transition>
|
||||
</RevealsMain>
|
||||
{feeType === FEES.CUSTOM && (
|
||||
|
@ -602,10 +586,7 @@ export class SendView extends PureComponent<Props, State> {
|
|||
</ModalContent>
|
||||
)}
|
||||
</ConfirmDialogComponent>
|
||||
<FormButton
|
||||
label='Cancel'
|
||||
variant='secondary'
|
||||
/>
|
||||
<FormButton label='Cancel' variant='secondary' />
|
||||
</SendWrapper>
|
||||
</RowComponent>
|
||||
);
|
||||
|
|
|
@ -16,7 +16,7 @@ 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';
|
||||
import { generateRandomString } from '../../app/utils/generate-random-string';
|
||||
|
||||
const getDaemonOptions = ({ username, password }) => {
|
||||
/*
|
||||
|
@ -38,20 +38,14 @@ const getDaemonOptions = ({ username, password }) => {
|
|||
'-testnet',
|
||||
'-addnode=testnet.z.cash',
|
||||
];
|
||||
return isDev
|
||||
? defaultOptions.concat(['-testnet', '-addnode=testnet.z.cash'])
|
||||
: defaultOptions;
|
||||
return isDev ? defaultOptions.concat(['-testnet', '-addnode=testnet.z.cash']) : defaultOptions;
|
||||
};
|
||||
|
||||
let resolved = false;
|
||||
|
||||
// eslint-disable-next-line
|
||||
const runDaemon: () => Promise<?ChildProcess> = () => new Promise(async (resolve, reject) => {
|
||||
const processName = path.join(
|
||||
getBinariesPath(),
|
||||
getOsFolder(),
|
||||
getDaemonName(),
|
||||
);
|
||||
const processName = path.join(getBinariesPath(), getOsFolder(), getDaemonName());
|
||||
|
||||
const [err] = await eres(fetchParams());
|
||||
|
||||
|
@ -88,13 +82,9 @@ const runDaemon: () => Promise<?ChildProcess> = () => new Promise(async (resolve
|
|||
store.set('rpcpassword', rpcCredentials.password);
|
||||
}
|
||||
|
||||
const childProcess = cp.spawn(
|
||||
processName,
|
||||
getDaemonOptions(rpcCredentials),
|
||||
{
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
},
|
||||
);
|
||||
const childProcess = cp.spawn(processName, getDaemonOptions(rpcCredentials), {
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
});
|
||||
|
||||
childProcess.stdout.on('data', (data) => {
|
||||
if (mainWindow && mainWindow.webContents) mainWindow.webContents.send('zcashd-log', data.toString());
|
||||
|
|
Loading…
Reference in New Issue