mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-23 13:48:49 +00:00
fix duplicated event for all contracts
This commit is contained in:
parent
ccd7a7c3c7
commit
5eaaa63216
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user