Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
settings.OrbitDataDir + '/ipfs',
settings.OrbitDataDir
)
settings.IpfsDataDir = path.join(settings.IpfsDataDir, '/' + user, '/ipfs')
}
settings.OrbitDataDir = path.join(settings.OrbitDataDir, '/' + user)
this.settings = Object.assign({}, settings)
if (this.isElectron) {
logger.debug('start electron ipfs-daemon')
ipcRenderer.send('ipfs-daemon-start', settings)
} else {
logger.debug('start js-ipfs')
this.ipfs = new IPFS(this.settings)
this.ipfs.on('ready', () => {
// interop tests
// this.ipfs.swarm.connect('/ip4/127.0.0.1/tcp/32333/ws/ipfs/QmZbaYW1gYMRPag1K4ssaCuyJhuBu5tGKvETz7DnGFnykp')
// .then((res) => {
// console.log("swarm.connect to /ip4/127.0.0.1/tcp/32333/ws/ipfs/QmZbaYW1gYMRPag1K4ssaCuyJhuBu5tGKvETz7DnGFnykp", res)
// })
// .catch((err) => {
// console.error("swarm.connect", err)
// })
IpfsDaemonActions.daemonStarted(this.ipfs)
})
this.ipfs.on('error', e => logger.error(e))
}
},
onStop: function () {