mirror of https://github.com/embarklabs/embark.git
small cleanups
This commit is contained in:
parent
5a842c9b70
commit
e95efbfc54
|
@ -153,6 +153,8 @@ __embarkENS.setProvider = function (config) {
|
||||||
self.registration = config.registration;
|
self.registration = config.registration;
|
||||||
self.env = config.env;
|
self.env = config.env;
|
||||||
EmbarkJS.onReady(() => {
|
EmbarkJS.onReady(() => {
|
||||||
|
self.registration = config.registration;
|
||||||
|
|
||||||
web3.eth.net.getId()
|
web3.eth.net.getId()
|
||||||
.then((id) => {
|
.then((id) => {
|
||||||
const registryAddress = self.registryAddresses[id] || config.registryAddress;
|
const registryAddress = self.registryAddresses[id] || config.registryAddress;
|
||||||
|
|
|
@ -18,27 +18,21 @@ config({
|
||||||
"onDeploy": [
|
"onDeploy": [
|
||||||
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send().then(() => {
|
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send().then(() => {
|
||||||
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send();
|
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send();
|
||||||
Resolver.methods.setAddr('${rootNode}', '${address}').send().then(() => {
|
Resolver.methods.setAddr('${rootNode}', '${address}').send();
|
||||||
global.ensTestReady = true;
|
})`
|
||||||
});
|
|
||||||
});`
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contract("ENS", function () {
|
contract("ENS", function () {
|
||||||
this.timeout(1000);
|
this.timeout(0);
|
||||||
|
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
// Wait for onDeploy to finish
|
// Wait for onDeploy to finish
|
||||||
const wait = setInterval(() => {
|
setTimeout(function () {
|
||||||
if (!global.ensTestReady) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
clearInterval(wait);
|
|
||||||
done();
|
done();
|
||||||
}, 50);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should have registered embark.eth", async function () {
|
it("should have registered embark.eth", async function () {
|
||||||
|
|
Loading…
Reference in New Issue