From 7c0c2550c34b05b46d0f2656b562f618df9cd619 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 11 Jul 2018 10:24:03 +0300 Subject: [PATCH] use buildUrlFromConfig --- lib/modules/ipfs/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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'; } } }