From 34db5ba2017f1bddf44f124c334f799cb684daac Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Tue, 3 Sep 2024 19:21:41 +0330 Subject: [PATCH] Fixed saved user id capitalization --- src/controllers/projectVerificationAttestation.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/controllers/projectVerificationAttestation.ts b/src/controllers/projectVerificationAttestation.ts index 29f44c0..dfe5c9f 100644 --- a/src/controllers/projectVerificationAttestation.ts +++ b/src/controllers/projectVerificationAttestation.ts @@ -5,7 +5,7 @@ import { getAttestationData, removeDuplicateProjectAttestations, } from "./utils/easHelper"; -import { AttestorOrganisation, ProjectAttestation } from "../model"; +import { ProjectAttestation } from "../model"; import { getAttestor, getOrCreateAttestorOrganisation, @@ -18,12 +18,10 @@ export const handleProjectAttestation = async ( ctx: DataHandlerContext, log: Log ): Promise => { - const { - uid, - schema: schemaUid, - attestor: issuer, - recipient, - } = EASContract.events.Attested.decode(log); + const attestedEvent = EASContract.events.Attested.decode(log); + + const { uid, schema: schemaUid, recipient } = attestedEvent; + const issuer = attestedEvent.attestor.toLowerCase(); const { decodedData, refUID } = await getAttestationData( ctx,