feature: load rpc credentials from store

This commit is contained in:
George Lima 2018-12-07 10:46:03 -03:00
parent fa5540ee1e
commit 3863b800eb
1 changed files with 7 additions and 5 deletions

View File

@ -1,14 +1,16 @@
// @flow
import got from 'got';
/* eslint-disable-next-line */
import isDev from 'electron-is-dev';
import { METHODS, type APIMethods } from './utils';
import store from '../config/electron-store';
// TODO: Fix RPC connect params
const RPC = {
host: 'localhost',
port: 8232,
user: 'george',
password: '123456',
host: '127.0.0.1',
port: isDev ? 18232 : 8232,
user: store.get('rpcuser'),
password: store.get('rpcpassword'),
};
const client = got.extend({