From 5ffcf4942f6c15e4f6b4eef862b1fa05b44c9fd7 Mon Sep 17 00:00:00 2001 From: Jordan Ellis <5522128+dOrgJelli@users.noreply.github.com> Date: Fri, 15 Nov 2019 12:05:21 +0100 Subject: [PATCH] Minor Fix (#392) * fix * initialize needed entities --- src/domain/index.ts | 1 - src/mappings/DAOTracker/mapping.ts | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/domain/index.ts b/src/domain/index.ts index 8512f610..eaba9bd1 100644 --- a/src/domain/index.ts +++ b/src/domain/index.ts @@ -208,7 +208,6 @@ export function handleRegisterScheme(avatar: Address, ); if (isFirstRegister == null) { setContractsInfo(); - setTemplatesInfo(); let dao = daoModule.insertNewDAO(avatar, nativeTokenAddress , nativeReputationAddress); insertToken(hexToAddress(dao.nativeToken), avatar.toHex()); insertReputation( diff --git a/src/mappings/DAOTracker/mapping.ts b/src/mappings/DAOTracker/mapping.ts index 4b075ada..0946a41c 100644 --- a/src/mappings/DAOTracker/mapping.ts +++ b/src/mappings/DAOTracker/mapping.ts @@ -1,5 +1,9 @@ import { Address } from '@graphprotocol/graph-ts'; -import { setBlacklistedDAOs } from '../../contractsInfo'; +import { + setBlacklistedDAOs, + setContractsInfo, + setTemplatesInfo, +} from '../../contractsInfo'; import { DAOTracker, TrackDAO, @@ -22,6 +26,8 @@ export function getDAOTrackerContract(address: Address): DAOTrackerContract { daoTracker.owner = daoTrackerSC.owner(); daoTracker.save(); setBlacklistedDAOs(); + setContractsInfo(); + setTemplatesInfo(); } return daoTracker; } @@ -68,7 +74,7 @@ export function handleTrackDAO(event: TrackDAO): void { let universalController = UControllerOrganization.load(controller.toHex()) != null; - if (universalController) { + if (universalController === false) { missingTemplate = missingTemplate || controllerTemplate == null; }