diff --git a/lib/modules/ipfs/index.js b/lib/modules/ipfs/index.js index c0781b917..190888d8d 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -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'; } } }