Improve app/daemon development #1753
5 changed files with 21 additions and 17 deletions
|
@ -48,7 +48,7 @@
|
||||||
"formik": "^0.10.4",
|
"formik": "^0.10.4",
|
||||||
"hast-util-sanitize": "^1.1.2",
|
"hast-util-sanitize": "^1.1.2",
|
||||||
"keytar": "^4.2.1",
|
"keytar": "^4.2.1",
|
||||||
"lbry-redux": "lbryio/lbry-redux#341db02c090e0121ff7f5d2e74fa35b06213d858",
|
"lbry-redux": "lbryio/lbry-redux#a0d2d1ac532ade639d39c92f79678ac26e904dfd",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
"mime": "^2.3.1",
|
"mime": "^2.3.1",
|
||||||
"mixpanel-browser": "^2.17.1",
|
"mixpanel-browser": "^2.17.1",
|
||||||
|
|
|
@ -59,16 +59,18 @@ app.on('ready', async () => {
|
||||||
if (!isDaemonRunning) {
|
if (!isDaemonRunning) {
|
||||||
daemon = new Daemon();
|
daemon = new Daemon();
|
||||||
daemon.on('exit', () => {
|
daemon.on('exit', () => {
|
||||||
daemon = null;
|
if (!isDev) {
|
||||||
if (!appState.isQuitting) {
|
daemon = null;
|
||||||
dialog.showErrorBox(
|
if (!appState.isQuitting) {
|
||||||
'Daemon has Exited',
|
dialog.showErrorBox(
|
||||||
'The daemon may have encountered an unexpected error, or another daemon instance is already running. \n\n' +
|
'Daemon has Exited',
|
||||||
'For more information please visit: \n' +
|
'The daemon may have encountered an unexpected error, or another daemon instance is already running. \n\n' +
|
||||||
'https://lbry.io/faq/startup-troubleshooting'
|
'For more information please visit: \n' +
|
||||||
);
|
'https://lbry.io/faq/startup-troubleshooting'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
app.quit();
|
||||||
}
|
}
|
||||||
app.quit();
|
|
||||||
});
|
});
|
||||||
daemon.launch();
|
daemon.launch();
|
||||||
|
|||||||
}
|
}
|
||||||
|
|
|
@ -253,17 +253,19 @@ export function doCheckUpgradeSubscribe() {
|
||||||
export function doCheckDaemonVersion() {
|
export function doCheckDaemonVersion() {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
|
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
|
||||||
if (config.lbrynetDaemonVersion === lbrynetVersion) {
|
// Avoid the incompatible daemon modal if running in dev mode
|
||||||
dispatch({
|
// Lets you run a different daemon than the one specified in package.json
|
||||||
|
if (isDev || config.lbrynetDaemonVersion === lbrynetVersion) {
|
||||||
|
return dispatch({
|
||||||
type: ACTIONS.DAEMON_VERSION_MATCH,
|
type: ACTIONS.DAEMON_VERSION_MATCH,
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.DAEMON_VERSION_MISMATCH,
|
type: ACTIONS.DAEMON_VERSION_MISMATCH,
|
||||||
});
|
});
|
||||||
dispatch(
|
|
||||||
|
return dispatch(
|
||||||
doNotify({
|
doNotify({
|
||||||
id: MODALS.INCOMPATIBLE_DAEMON,
|
id: MODALS.INCOMPATIBLE_DAEMON,
|
||||||
})
|
})
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const validateSendTx = (formValues: DraftTxValues) => {
|
||||||
|
|
||||||
// All we need to check is if the address is valid
|
// All we need to check is if the address is valid
|
||||||
// If values are missing, users wont' be able to submit the form
|
// If values are missing, users wont' be able to submit the form
|
||||||
if (address && !regexAddress.test(address)) {
|
if (!process.env.NO_ADDRESS_VALIDATION && !regexAddress.test(address)) {
|
||||||
errors.address = __('Not a valid LBRY address');
|
errors.address = __('Not a valid LBRY address');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5564,9 +5564,9 @@ lazy-val@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
|
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
|
||||||
|
|
||||||
lbry-redux@lbryio/lbry-redux#341db02c090e0121ff7f5d2e74fa35b06213d858:
|
lbry-redux@lbryio/lbry-redux#a0d2d1ac532ade639d39c92f79678ac26e904dfd:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/341db02c090e0121ff7f5d2e74fa35b06213d858"
|
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/a0d2d1ac532ade639d39c92f79678ac26e904dfd"
|
||||||
dependencies:
|
dependencies:
|
||||||
proxy-polyfill "0.1.6"
|
proxy-polyfill "0.1.6"
|
||||||
reselect "^3.0.0"
|
reselect "^3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue
Template literals might help with formatting here?