allow different daemon versions and don't shut down with DAEMON_DEVELOPMENT env variable

This commit is contained in:
Sean Yesmunt 2018-07-11 00:14:50 -04:00
parent e317f573bf
commit e0500eedd9
3 changed files with 20 additions and 16 deletions

View file

@ -59,16 +59,18 @@ app.on('ready', async () => {
if (!isDaemonRunning) {
daemon = new Daemon();
daemon.on('exit', () => {
daemon = null;
if (!appState.isQuitting) {
dialog.showErrorBox(
'Daemon has Exited',
'The daemon may have encountered an unexpected error, or another daemon instance is already running. \n\n' +
'For more information please visit: \n' +
'https://lbry.io/faq/startup-troubleshooting'
);
if (process.env.DAEMON_DEVELOPMENT) {
daemon = null;
if (!appState.isQuitting) {
dialog.showErrorBox(
'Daemon has Exited',
'The daemon may have encountered an unexpected error, or another daemon instance is already running. \n\n' +
'For more information please visit: \n' +
'https://lbry.io/faq/startup-troubleshooting'
);
}
app.quit();
}
app.quit();
});
daemon.launch();
}

View file

@ -253,17 +253,19 @@ export function doCheckUpgradeSubscribe() {
export function doCheckDaemonVersion() {
return dispatch => {
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
if (config.lbrynetDaemonVersion === lbrynetVersion) {
dispatch({
// Avoid the incompatible daemon modal if running in dev mode
// Lets you run a different daemone than the one specificed in package.json
if (isDev || config.lbrynetDaemonVersion === lbrynetVersion) {
return dispatch({
type: ACTIONS.DAEMON_VERSION_MATCH,
});
return;
}
dispatch({
type: ACTIONS.DAEMON_VERSION_MISMATCH,
});
dispatch(
return dispatch(
doNotify({
id: MODALS.INCOMPATIBLE_DAEMON,
})

View file

@ -13,9 +13,9 @@ export const validateSendTx = (formValues: DraftTxValues) => {
// All we need to check is if the address is valid
// If values are missing, users wont' be able to submit the form
if (address && !regexAddress.test(address)) {
errors.address = __('Not a valid LBRY address');
}
// if (address && !regexAddress.test(address)) {
// errors.address = __('Not a valid LBRY address');
// }
return errors;
};