Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: circular dependency between dialogs and daemon #1408

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/daemon/consts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = Object.freeze({
STATUS: {
STARTING_STARTED: 1,
STARTING_FINISHED: 2,
STARTING_FAILED: 3,
STOPPING_STARTED: 4,
STOPPING_FINISHED: 5,
STOPPING_FAILED: 6
}
})
10 changes: 1 addition & 9 deletions src/daemon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ const createDaemon = require('./daemon')
const { ipfsNotRunningDialog } = require('../dialogs')
const store = require('../common/store')
const logger = require('../common/logger')

const STATUS = {
STARTING_STARTED: 1,
STARTING_FINISHED: 2,
STARTING_FAILED: 3,
STOPPING_STARTED: 4,
STOPPING_FINISHED: 5,
STOPPING_FAILED: 6
}
const { STATUS } = require('./consts')

module.exports = async function (ctx) {
let ipfsd = null
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/ipfs-not-running.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const i18n = require('i18next')
const dialog = require('./dialog')
const { STATUS } = require('../daemon')
const { STATUS } = require('../daemon/consts')
const logger = require('../common/logger')

module.exports = async function ({ startIpfs }) {
Expand Down