Skip to content

Commit

Permalink
update clrfund with recipient registry address
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed May 22, 2024
1 parent c71e354 commit 3d47629
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions subgraph/src/ClrFundMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3d47629

Please sign in to comment.