From 42f46e427f39390ff34bb1cc19e0fc02f213f68d Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 31 Jul 2018 10:08:49 -0400 Subject: [PATCH] remove duplicated register --- lib/modules/ens/embarkjs.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/lib/modules/ens/embarkjs.js b/lib/modules/ens/embarkjs.js index 92d16f930..cac082295 100644 --- a/lib/modules/ens/embarkjs.js +++ b/lib/modules/ens/embarkjs.js @@ -226,29 +226,6 @@ __embarkENS.lookup = function (address, callback) { }); }; -__embarkENS.registerSubDomain = function (name, address, callback) { - callback = callback || function () {}; - - const resolveAddr = address || '0x0000000000000000000000000000000000000000'; - const toSend = this.registrar.methods.register(web3.utils.sha3(name), web3.eth.defaultAccount, resolveAddr); - - toSend.estimateGas().then(gasEstimated => { - return toSend.send({gas: gasEstimated + 1000}).then(transaction => { - if (transaction.status !== "0x1" && transaction.status !== "0x01" && transaction.status !== true) { - console.warn('Failed transaction', transaction); - return callback('Failed to register. Check gas cost.'); - } - callback(null, transaction); - }).catch(err => { - callback('Failed to register with error: ' + (err.message || err)); - console.error(err); - }); - }).catch(err => { - callback("Register would error. Is it already registered? Do you have token balance? Is Allowance set? " + (err.message || err)); - console.error(err); - }); -}; - __embarkENS.registerSubDomain = function (name, address, callback) { callback = callback || function () {};