From ccb0d2f39a0c1cbcdba98036c5e50156548e976b Mon Sep 17 00:00:00 2001 From: 0xdavinchee <0xdavinchee@gmail.com> Date: Thu, 28 Mar 2024 10:43:20 +0200 Subject: [PATCH] fix null from/to for flowNFTs (#1919) --- packages/subgraph/src/mappings/flowNFT.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/subgraph/src/mappings/flowNFT.ts b/packages/subgraph/src/mappings/flowNFT.ts index 2124988e1e..af232c8485 100644 --- a/packages/subgraph/src/mappings/flowNFT.ts +++ b/packages/subgraph/src/mappings/flowNFT.ts @@ -10,6 +10,7 @@ import { MetadataUpdateEvent, TransferEvent, } from "../../generated/schema"; +import { getOrInitAccount } from "../mappingHelpers"; import { BIG_INT_ONE, createEventID, initializeEventEntity } from "../utils"; export function handleApproval(event: Approval): void { @@ -51,6 +52,9 @@ export function handleTransfer(event: Transfer): void { ev.token = event.address; ev.save(); + + getOrInitAccount(event.params.to, event.block); + getOrInitAccount(event.params.from, event.block); } export function handleMetadataUpdate(event: MetadataUpdate): void {