diff --git a/lib/modules/contracts_manager/index.js b/lib/modules/contracts_manager/index.js index 032fca3a..2db14519 100644 --- a/lib/modules/contracts_manager/index.js +++ b/lib/modules/contracts_manager/index.js @@ -64,7 +64,7 @@ class ContractsManager { self.events.emit('contractsState', self.contractsState()); }); - self.events.setCommandHandler("contracts:all", (contractName, cb) => { + self.events.setCommandHandler("contracts:formatted:all", (cb) => { const contracts = self.listContracts().map((contract, index) => ( { className: contract.className, @@ -162,7 +162,7 @@ class ContractsManager { '/embark-api/contracts', (req, res) => { const result = []; - self.events.request('contracts:all', null, (contracts) => { + self.events.request('contracts:formatted:all', (contracts) => { contracts.forEach((contract) => { self.events.request('contracts:contract', contract.className, (c) => ( result.push(Object.assign(contract, c))