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

Cannot remove transaction block on user if refund fails #119

Open
habbes opened this issue Aug 31, 2020 · 0 comments
Open

Cannot remove transaction block on user if refund fails #119

habbes opened this issue Aug 31, 2020 · 0 comments
Labels
bug Something isn't working p3

Comments

@habbes
Copy link
Member

habbes commented Aug 31, 2020

When a user initiates a refund, their account is blocked from making further transactions. This block is removed when the refund completes successfully. However, if the refund fails, the block is not removed. This means that they cannot retry the refund, nor can they make other transactions.

We should fix this such that the block gets removed when the transaction completes (whether it fails or succeeds).

After analyzing the issue, I concluded that a fix would require the following changes:

  • The transactionCompleted event, which is currently emitted only when the transaction is marked as successfully, should also be emitted also when the transaction is marked as failed (success and failed are both final states of the transaction). This happens in the handleProviderNotification() method of the transaction service.
  • The call toremoveTransactionBlockFomRefund() in Users.handleRefundCompleted() should be made whether the the refund has succeeded or failed. However, the refund count should not be incremented if the transaction has failed.
@habbes habbes added bug Something isn't working p3 labels Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p3
Projects
None yet
Development

No branches or pull requests

1 participant