Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Commit

Permalink
Members are inactive if they have 0 shares
Browse files Browse the repository at this point in the history
  • Loading branch information
rhlsthrm committed May 18, 2019
1 parent d6c36d8 commit 68bb10b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/moloch-subgraph/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export function handleProcessProposal(event: ProcessProposal): void {
export function handleRagequit(event: Ragequit): void {
let member = Member.load(event.params.memberAddress.toHex())
member.shares = member.shares.minus(event.params.sharesToBurn)
// TODO: delete member
if(member.shares.equals(new BigInt(0))) {
member.isActive = false
}
member.save()
}

Expand Down

0 comments on commit 68bb10b

Please sign in to comment.