simplify use of callback
This commit is contained in:
parent
df97a6ac00
commit
46a6d391cd
|
@ -136,12 +136,7 @@ class IPFS {
|
|||
blockchainConfig: self.blockchainConfig
|
||||
});
|
||||
self.logger.trace(`Storage module: Launching ipfs process...`);
|
||||
return storageProcessesLauncher.launchProcess('ipfs', (err) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
return storageProcessesLauncher.launchProcess('ipfs', callback);
|
||||
}
|
||||
|
||||
registerUploadCommand() {
|
||||
|
|
|
@ -105,12 +105,7 @@ class Swarm {
|
|||
blockchainConfig: self.blockchainConfig
|
||||
});
|
||||
self.logger.trace(`Storage module: Launching swarm process...`);
|
||||
return storageProcessesLauncher.launchProcess('swarm', (err) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
return storageProcessesLauncher.launchProcess('swarm', callback);
|
||||
}
|
||||
|
||||
registerUploadCommand(cb) {
|
||||
|
|
Loading…
Reference in New Issue