From f40cf609a867f4f07f17d56ad3463e8b0bd15635 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 23 Oct 2018 11:39:14 -0400 Subject: [PATCH] fix embark ens and embark demo --- lib/modules/ens/embarkjs.js | 21 +++++---------------- templates/demo/app/dapp.js | 3 +-- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/lib/modules/ens/embarkjs.js b/lib/modules/ens/embarkjs.js index 5bd0c454a..251115755 100644 --- a/lib/modules/ens/embarkjs.js +++ b/lib/modules/ens/embarkjs.js @@ -1,4 +1,4 @@ -/*global EmbarkJS, web3, lookupAddress, resolveName, registerSubDomain, reverseAddrSuffix*/ +/*global EmbarkJS, web3, registerSubDomain, namehash*/ let __embarkENS = {}; @@ -133,15 +133,10 @@ __embarkENS.resolverInterface = [ const defaultAccountNotSetError = 'web3.eth.defaultAccount not set'; const providerNotSetError = 'ENS provider not set'; - -__embarkENS.registryAddresses = { - // Mainnet - "1": "0x314159265dd8dbb310642f98f50c066173c1259b", - // Ropsten - "3": "0x112234455c3a32fd11230c42e7bccd4a84e02010", - // Rinkeby - "4": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A" -}; +const NoDecodeAddrError = 'Error: Couldn\'t decode address from ABI: 0x'; +const NoDecodeStringError = 'ERROR: The returned value is not a convertible string: 0x0'; +const reverseAddrSuffix = '.addr.reverse'; +const voidAddress = '0x0000000000000000000000000000000000000000'; __embarkENS.registryAddresses = { // Mainnet @@ -176,10 +171,6 @@ __embarkENS.setProvider = function (config) { }); }; -const createResolverContract = function (address, callback) { - callback(null, new EmbarkJS.Contract({abi: __embarkENS.resolverInterface, address})); -}; - __embarkENS.resolve = function (name, callback) { callback = callback || function () {}; if (!this.ens) { @@ -272,5 +263,3 @@ __embarkENS.registerSubDomain = function (name, address, callback) { __embarkENS.isAvailable = function () { return Boolean(this._isAvailable); }; - - diff --git a/templates/demo/app/dapp.js b/templates/demo/app/dapp.js index c44d840bf..999e40550 100644 --- a/templates/demo/app/dapp.js +++ b/templates/demo/app/dapp.js @@ -22,8 +22,7 @@ class App extends React.Component { activeKey: 1, whisperEnabled: false, storageEnabled: false, - blockchainEnabled: false, - ensEnabled: false + blockchainEnabled: false }; }