Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed payment not shown after entering a new period #1739

Closed
snowteamer opened this issue Sep 24, 2023 · 3 comments
Closed

Completed payment not shown after entering a new period #1739

snowteamer opened this issue Sep 24, 2023 · 3 comments
Assignees
Labels
App:Frontend Kind:Bug Note:Contracts Issues involving modifications to contracts

Comments

@snowteamer
Copy link
Collaborator

snowteamer commented Sep 24, 2023

Problem

Payments completed in the previous distribution period sometimes disappear from the Completed tab in the Payments page. Other payments are not affected.

Steps to reproduce:

  1. Create a $1000 group with u1 and invite u2

  2. u1 income details pledging $100, u2 making $800

  3. Enter the first distribution period by running:

    await sbp('gi.actions/group/forceDistributionDate', { contractID: sbp('state/vuex/state').currentGroupId })

  4. Wait until the promise is resolved. Note that at this point, getters.groupPeriodPayments only holds an entry for the waiting period. It doesn't have an entry for the new current period yet.

  5. Record a full payment as u1 to u2. It should show up in the Completed tab.

  6. Now getters.groupPeriodPayments has two entries, one for the waiting period and one for the current period. That's a bit confusing.

  7. Run forceDistributionDate again. The payment disappears from the Completed Tab.

Solution

Fix it!

@snowteamer snowteamer changed the title Completed Payment not shown after entering a new period Completed payments not shown after entering a new period Sep 24, 2023
@snowteamer snowteamer changed the title Completed payments not shown after entering a new period Completed payment not shown after entering a new period Sep 24, 2023
@Silver-IT Silver-IT self-assigned this Oct 15, 2023
@taoeffect taoeffect added Kind:Bug App:Frontend Note:Contracts Issues involving modifications to contracts labels Oct 17, 2023
@Silver-IT
Copy link
Member

@snowteamer, having tested this on my side in the latest master branch, the completed payments are not disappeared in the Completed tab after running the 'gi.actions/group/forceDistributionDate' sbp function in console.

Also I don't have any opinion about having two entries in getters.groupPeriodPayments in step 6. Because the payment periods are now in the DLL(Doubly Linked List), and no constant payment period we are using. And also forceDistributionDate function is only available in development mode.

@snowteamer , I need your reply.

cc: @taoeffect

@snowteamer
Copy link
Collaborator Author

@Silver-IT The disappearing payment bug might have been fixed in PR #1691, where I updated some methods in PaymentsMixin.js. This would explain why it didn't show up in your tests

@taoeffect
Copy link
Member

Closing as this seems to have been fixed. Feel free to re-open if it hasn't!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Bug Note:Contracts Issues involving modifications to contracts
Projects
None yet
Development

No branches or pull requests

3 participants