Skip to content

Commit

Permalink
Use groupDistributionStarted i/o inWaitingPeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
snowteamer committed Sep 20, 2023
1 parent c1ec47a commit f1c40c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions frontend/model/contracts/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -1276,11 +1276,10 @@ sbp('chelonia/defineContract', {
process ({ meta }, { state, getters }) {
const period = getters.periodStampGivenDate(meta.createdDate)
const current = getters.groupSettings?.distributionDate
const inWaitingPeriod = !current || meta.createdDate < current
// Maybe we're updating the distribution date while in the waiting period.
if (inWaitingPeriod && meta.createdDate !== current) {
if (!getters.groupDistributionStarted(meta.createdDate)) {
getters.groupSettings.distributionDate = meta.createdDate
} else if (current !== period) {
} else if (period > current) {
// right before updating to the new distribution period, make sure to update various payment-related group streaks.
updateGroupStreaks({ state, getters })
getters.groupSettings.distributionDate = period
Expand Down
2 changes: 1 addition & 1 deletion frontend/model/contracts/manifests.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifests": {
"gi.contracts/chatroom": "21XWnNW8iGnrFhGVr7Yn2oipnhEMfLSjkKnDUk2tztJTHSP5u2",
"gi.contracts/group": "21XWnNURkAeuFK82edgts73F1zmXqXwsiyd2RFiptS6Z8pV8xF",
"gi.contracts/group": "21XWnNMMpLLm39HuPJuiRkrDSQxZWq6nfmkWSJxUhd1t5paSSX",
"gi.contracts/identity": "21XWnNFMAQ4x2GyiJRUdQjaVLhRYLwag4D5E4gYze2KtboKDXw",
"gi.contracts/mailbox": "21XWnNQGtE5jZa2p8LKL2XS6HPrUf2S4R8nkNcTancSp47U9sK"
}
Expand Down

0 comments on commit f1c40c1

Please sign in to comment.