diff --git a/lib/index.js b/lib/index.js index 56b70e71f..d22b4622f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -425,7 +425,7 @@ class Embark { if(!options.ensDomain) { return callback(null, hash); } - engine.plugins.emitAndRunActionsForEvent("storage:ens:associate", + engine.plugins.request("storage:ens:associate", {name: options.ensDomain, storageHash: hash}, (err) => { if (err) { return callback(err); diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index c9835c244..3e11c7246 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -22,7 +22,7 @@ class ENS { registerEvents() { this.embark.registerActionForEvent("contracts:deploy:afterAll", this.setProviderAndRegisterDomains.bind(this)); - this.embark.registerActionForEvent("storage:ens:associate", this.associateStorageToEns.bind(this)); + this.embark.setCommandHandler("storage:ens:associate", this.associateStorageToEns.bind(this)); } setProviderAndRegisterDomains(cb) {