Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Apr 20, 2024
1 parent 2734785 commit adbe464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mappings/identity/events/identityKilled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export async function identityKilled(ctx: CommonContext, block: BlockHeader, ite
},
where: { id: eventData.who },
})
await ctx.store.delete(Registration, { id: eventData.who })
const registration = await ctx.store.findOneByOrFail(Registration, { id: eventData.who })

await ctx.store.remove(registration)

await Promise.all(
identity.sub.map(async (sub) => {
Expand All @@ -43,7 +45,5 @@ export async function identityKilled(ctx: CommonContext, block: BlockHeader, ite
await ctx.store.remove(identity)
}

await ctx.store.delete(Registration, { id: eventData.who })

return undefined
}

0 comments on commit adbe464

Please sign in to comment.