diff --git a/src/move-repository-location.js b/src/move-repository-location.js index d674d632a..92f3624b9 100644 --- a/src/move-repository-location.js +++ b/src/move-repository-location.js @@ -6,10 +6,14 @@ const logger = require('./common/logger') const { showDialog, recoverableErrorDialog, selectDirectory } = require('./dialogs') const dock = require('./utils/dock') const { analyticsKeys } = require('./analytics/keys') +const getCtx = require('./context') -module.exports = function ({ stopIpfs, startIpfs }) { +module.exports = function () { dock.run(async () => { logger.info('[move repository] user prompted about effects') + const ctx = getCtx() + const stopIpfs = ctx.getFn('stopIpfs') + const startIpfs = ctx.getFn('startIpfs') const opt = showDialog({ title: i18n.t('moveRepositoryWarnDialog.title'), diff --git a/src/run-gc.js b/src/run-gc.js index afb88990e..d54a1b021 100644 --- a/src/run-gc.js +++ b/src/run-gc.js @@ -4,10 +4,13 @@ const logger = require('./common/logger') const { showDialog, recoverableErrorDialog } = require('./dialogs') const dock = require('./utils/dock') const ipcMainEvents = require('./common/ipc-main-events') +const getCtx = require('./context') module.exports = function runGarbageCollector ({ getIpfsd }) { dock.run(async () => { logger.info('[run gc] alerting user for effects') + const ctx = getCtx() + const getIpfsd = ctx.getFn('getIpfsd') const opt = showDialog({ title: i18n.t('runGarbageCollectorWarning.title'), diff --git a/src/tray.js b/src/tray.js index d3441e98c..07d46adaf 100644 --- a/src/tray.js +++ b/src/tray.js @@ -160,7 +160,7 @@ async function buildMenu () { id: 'runGarbageCollector', label: i18n.t('runGarbageCollector'), // @ts-ignore - click: () => { runGarbageCollector(ctx) }, + click: () => { runGarbageCollector() }, enabled: false }, { type: 'separator' }, @@ -168,7 +168,7 @@ async function buildMenu () { id: 'moveRepositoryLocation', label: i18n.t('moveRepositoryLocation'), // @ts-ignore - click: () => { moveRepositoryLocation(ctx) } + click: () => { moveRepositoryLocation() } }, { id: 'setCustomBinary',