use buildUrlFromConfig

This commit is contained in:
Iuri Matias 2018-07-11 10:24:03 +03:00
parent 054215ce21
commit 7c0c2550c3
1 changed files with 2 additions and 4 deletions

View File

@ -64,14 +64,12 @@ class IPFS {
_getNodeUrl() {
if (this.storageConfig.upload.provider === 'ipfs') {
let {protocol, host, port} = this.storageConfig.upload;
return (protocol || 'http') + '://' + host + ':' + port + '/api/v0/version';
return utils.buildUrlFromConfig(this.storageConfig.upload) + '/api/v0/version';
}
for (let connection of this.storageConfig.dappConnection) {
if (connection.provider === 'ipfs') {
let {protocol, host, port} = connection;
return (protocol || 'http') + '://' + host + ':' + port + '/api/v0/version';
return utils.buildUrlFromConfig(connection) + '/api/v0/version';
}
}
}