fix embark ens and embark demo
This commit is contained in:
parent
74cca483b8
commit
f40cf609a8
|
@ -1,4 +1,4 @@
|
||||||
/*global EmbarkJS, web3, lookupAddress, resolveName, registerSubDomain, reverseAddrSuffix*/
|
/*global EmbarkJS, web3, registerSubDomain, namehash*/
|
||||||
|
|
||||||
let __embarkENS = {};
|
let __embarkENS = {};
|
||||||
|
|
||||||
|
@ -133,15 +133,10 @@ __embarkENS.resolverInterface = [
|
||||||
|
|
||||||
const defaultAccountNotSetError = 'web3.eth.defaultAccount not set';
|
const defaultAccountNotSetError = 'web3.eth.defaultAccount not set';
|
||||||
const providerNotSetError = 'ENS provider not set';
|
const providerNotSetError = 'ENS provider not set';
|
||||||
|
const NoDecodeAddrError = 'Error: Couldn\'t decode address from ABI: 0x';
|
||||||
__embarkENS.registryAddresses = {
|
const NoDecodeStringError = 'ERROR: The returned value is not a convertible string: 0x0';
|
||||||
// Mainnet
|
const reverseAddrSuffix = '.addr.reverse';
|
||||||
"1": "0x314159265dd8dbb310642f98f50c066173c1259b",
|
const voidAddress = '0x0000000000000000000000000000000000000000';
|
||||||
// Ropsten
|
|
||||||
"3": "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
|
||||||
// Rinkeby
|
|
||||||
"4": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A"
|
|
||||||
};
|
|
||||||
|
|
||||||
__embarkENS.registryAddresses = {
|
__embarkENS.registryAddresses = {
|
||||||
// Mainnet
|
// 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) {
|
__embarkENS.resolve = function (name, callback) {
|
||||||
callback = callback || function () {};
|
callback = callback || function () {};
|
||||||
if (!this.ens) {
|
if (!this.ens) {
|
||||||
|
@ -272,5 +263,3 @@ __embarkENS.registerSubDomain = function (name, address, callback) {
|
||||||
__embarkENS.isAvailable = function () {
|
__embarkENS.isAvailable = function () {
|
||||||
return Boolean(this._isAvailable);
|
return Boolean(this._isAvailable);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@ class App extends React.Component {
|
||||||
activeKey: 1,
|
activeKey: 1,
|
||||||
whisperEnabled: false,
|
whisperEnabled: false,
|
||||||
storageEnabled: false,
|
storageEnabled: false,
|
||||||
blockchainEnabled: false,
|
blockchainEnabled: false
|
||||||
ensEnabled: false
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue