fix ens by using right addres depending on chain and also add isAvailable

This commit is contained in:
Jonathan Rainville 2018-07-11 12:47:15 -04:00 committed by Pascal Precht
parent d0778555d1
commit 6203ad3530
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 13 additions and 0 deletions

View File

@ -408,6 +408,10 @@ EmbarkJS.Names.lookup = function (identifier, callback) {
return this.currentNameSystems.lookup(identifier, callback); return this.currentNameSystems.lookup(identifier, callback);
}; };
EmbarkJS.Names.isAvailable = function () {
return this.currentNameSystems.isAvailable();
};
// To Implement // To Implement

View File

@ -147,6 +147,15 @@ __embarkENS.registryAddresses = {
"4": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A" "4": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A"
}; };
__embarkENS.registryAddresses = {
// Mainnet
"1": "0x314159265dd8dbb310642f98f50c066173c1259b",
// Ropsten
"3": "0x112234455c3a32fd11230c42e7bccd4a84e02010",
// Rinkeby
"4": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A"
};
__embarkENS.setProvider = function (config) { __embarkENS.setProvider = function (config) {
const self = this; const self = this;
const ERROR_MESSAGE = 'ENS is not available in this chain'; const ERROR_MESSAGE = 'ENS is not available in this chain';