mirror of https://github.com/embarklabs/embark.git
use buildUrlFromConfig
This commit is contained in:
parent
054215ce21
commit
7c0c2550c3
|
@ -64,14 +64,12 @@ class IPFS {
|
||||||
|
|
||||||
_getNodeUrl() {
|
_getNodeUrl() {
|
||||||
if (this.storageConfig.upload.provider === 'ipfs') {
|
if (this.storageConfig.upload.provider === 'ipfs') {
|
||||||
let {protocol, host, port} = this.storageConfig.upload;
|
return utils.buildUrlFromConfig(this.storageConfig.upload) + '/api/v0/version';
|
||||||
return (protocol || 'http') + '://' + host + ':' + port + '/api/v0/version';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let connection of this.storageConfig.dappConnection) {
|
for (let connection of this.storageConfig.dappConnection) {
|
||||||
if (connection.provider === 'ipfs') {
|
if (connection.provider === 'ipfs') {
|
||||||
let {protocol, host, port} = connection;
|
return utils.buildUrlFromConfig(connection) + '/api/v0/version';
|
||||||
return (protocol || 'http') + '://' + host + ':' + port + '/api/v0/version';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue