fix: tail when extending membership

This commit is contained in:
Richard Ramos 2024-08-27 16:38:24 -04:00
parent 8c9f2a77df
commit 76cee4e97b
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760

View File

@ -197,12 +197,13 @@ contract Membership {
tail = mdetails.prev;
}
// Move membership at the end (since it will be the newest)
// Move membership to the end (since it will be the newest)
mdetails.next = 0;
mdetails.prev = tail;
mdetails.expirationDate = newExpirationDate;
memberships[tail].next = idx;
tail = idx;
emit MembershipExtended(idx, newExpirationDate);
}