From 508b37163e7cbf2b02d3402acf0a1bb6207e73e6 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Fri, 27 Jul 2018 14:09:33 +0100 Subject: [PATCH] Simply use promise --- lib/modules/ipfs/embarkjs/name.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/modules/ipfs/embarkjs/name.js b/lib/modules/ipfs/embarkjs/name.js index e477b37f..defc853b 100644 --- a/lib/modules/ipfs/embarkjs/name.js +++ b/lib/modules/ipfs/embarkjs/name.js @@ -21,13 +21,7 @@ __embarkIPFS.register = function(addr, options) { return new Error('No IPFS connection. Please ensure to call Embark.Names.setProvider()'); } - this._ipfsConnection.name.publish("/ipfs/" + addr, options) - .then(res => { - return `https://gateway.ipfs.io/ipns/${res.name}`; - }) - .catch((err) => { - return new Error('Unexpected Error: ' + err); - }); + return this._ipfsConnection.name.publish("/ipfs/" + addr, options); }; __embarkIPFS.lookup = function () {