Skip to content
Snippets Groups Projects

membership history

Merged poka requested to merge enh-membership-status into main
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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).

  • Please register or sign in to reply
  • Hugo Trentesaux approved this merge request

    approved this merge request

  • Hugo Trentesaux changed title from Enh membership status to membership history

    changed title from Enh membership status to membership history

  • poka mentioned in commit dcd14e44

    mentioned in commit dcd14e44

  • merged

  • Please register or sign in to reply
    Loading