mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
remove previous listener (for now)
This commit is contained in:
parent
b7fc3f9054
commit
ce781ab96e
@ -101,9 +101,11 @@ class CodeGenerator {
|
||||
self.buildWeb3JS(cb);
|
||||
});
|
||||
|
||||
this.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
let contract = self.contractsManager.contracts[contractName];
|
||||
self.buildContractJS(contractName, self.generateContractJSON(contractName, contract), cb);
|
||||
this.events.removeListener('code-generator:contract', () => {
|
||||
self.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
let contract = self.contractsManager.contracts[contractName];
|
||||
self.buildContractJS(contractName, self.generateContractJSON(contractName, contract), cb);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -27,8 +27,10 @@ class ContractsManager {
|
||||
});
|
||||
|
||||
const self = this;
|
||||
this.events.setCommandHandler('contracts:list', (cb) => {
|
||||
cb(self.listContracts());
|
||||
this.events.removeListener('contracts:list', () => {
|
||||
self.events.setCommandHandler('contracts:list', (cb) => {
|
||||
cb(self.listContracts());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user