membership history
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
requested review from @HugoTrentesaux
assigned to @pokapow
assigned to @HugoTrentesaux and unassigned @pokapow
assigned to @pokapow and unassigned @HugoTrentesaux
added 1 commit
- b0dc7d10 - feat: keep history of memberships status changes
162 163 167 } 164 168 165 169 // Process membership renewed 166 170 for (const membershipRenewed of newData.membershipRenewed) { 167 const identity = await this.getIdtyByIndexOrFail(ctx, membershipRenewed.index); 168 const id = identity.id; 169 // membership should exist for renew 170 const membership = await ctx.store.findOneByOrFail(Membership, { id }) 171 171 const { id, index, expire_on, blockNumber } = membershipRenewed; 172 const identity = await this.getIdtyByIndexOrFail(ctx, index); 173 const membership = await ctx.store.findOneOrFail(Membership, { 174 relations: { identity: true }, 175 where: { identity: { index: index } }, 176 }); - Comment on lines +172 to +176
À vérifier, mais comme tu fais "relations: identity", tu pourrait utiliser directement l'identité de la membership sans avoir à la fetch indépendamment (au détail près du cache, c'est possible qu'il faille en priorité utiliser l'identité du cache par exemple si son statut smith est mis à jour dans le cache mais pas dans la db).
mentioned in commit dcd14e44
Please register or sign in to reply