From 3d47629493a1a619f1b7d0eba6954c9d39e91a30 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Tue, 21 May 2024 21:30:00 -0400 Subject: [PATCH] update clrfund with recipient registry address --- subgraph/src/ClrFundMapping.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/subgraph/src/ClrFundMapping.ts b/subgraph/src/ClrFundMapping.ts index 92f408fdd..3e97056c8 100644 --- a/subgraph/src/ClrFundMapping.ts +++ b/subgraph/src/ClrFundMapping.ts @@ -131,12 +131,11 @@ function createOrUpdateClrFund( let recipientRegistryAddress = clrFundContract.recipientRegistry() let recipientRegistryId = recipientRegistryAddress.toHexString() let recipientRegistry = RecipientRegistry.load(recipientRegistryId) - if (recipientRegistry) { - recipientRegistry.clrFund = clrFundId - recipientRegistry.save() - } else { - createRecipientRegistry(recipientRegistryAddress) + if (!recipientRegistry) { + recipientRegistry = createRecipientRegistry(recipientRegistryAddress) } + recipientRegistry.clrFund = clrFundId + recipientRegistry.save() let contributorRegistryAddress = clrFundContract.userRegistry() let contributorRegistryId = contributorRegistryAddress.toHexString()