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

Donation with the same QR won't appear in project donation list #4667

Open
maryjaf opened this issue Sep 3, 2024 · 9 comments
Open

Donation with the same QR won't appear in project donation list #4667

maryjaf opened this issue Sep 3, 2024 · 9 comments
Assignees
Labels
P1 it's a blocker to other tasks or issues. Stellar

Comments

@maryjaf
Copy link
Collaborator

maryjaf commented Sep 3, 2024

The users be able to donate to a project twice with one QR code
In this situation one of these donations is shown in project donations and user donations list

for example these two transaction was made by a QR code and the one of them is shown in project donation table

Transaction ad504d24e7b83b0e22f152b4643361756dcbbee1c4aac0371137b806bf6e6c46

Transaction d02a1bf00da3ffcc344d4700ff2dfadfe3d28bd981a8765565a8fcf27babd305 (it is shown in list of project donation)

cc: @MoeNick

@maryjaf
Copy link
Collaborator Author

maryjaf commented Sep 3, 2024

#4591 (comment)

@Meriem-BM
Copy link
Member

Implementation: After a transaction is detected by the cron job, an additional check is triggered 2 seconds later. This second check searches for any similar transactions that match specific criteria: the same source address, destination address, amount, and (if provided) memo, with a timestamp within 1 minute of the initial transaction. If such a matching transaction is found, a new donation is created.

cc: @maryjaf

@maryjaf
Copy link
Collaborator Author

maryjaf commented Sep 4, 2024

I think this implementation makes some problem
consider this scenario:

  • I tap on donate with a sign user (maryam )on chrome
  • the amount is 0.01
  • I complete donation flow and it is success
  • At the same time I make another donation with not signed user on firefox with same amount
  • I complete this donation flow also
  • in this case I see two record in donation table for maryam user and my donation in firefox is still shown pending

@Meriem-BM

@maryjaf
Copy link
Collaborator Author

maryjaf commented Sep 4, 2024

  • in this case I see two record in donation table for maryam user and my donation in firefox is still shown pending

Two donations are recorded in donation tabel but the user for both of them are shown maryam, but my donation on firefox was with not signed user

@Meriem-BM
Copy link
Member

Got it, this happened because of using same wallet.

@maryjaf
Copy link
Collaborator Author

maryjaf commented Sep 4, 2024

Got it, this happened because of using same wallet.

So another condition should be added to prevent this behavior ?

@maryjaf maryjaf moved this from QA to In Progress in All-Devs Sep 4, 2024
@maryjaf maryjaf added the P1 it's a blocker to other tasks or issues. label Sep 8, 2024
@divine-comedian
Copy link
Contributor

still have some edge cases that needs to find a way - 2 donations with same QR we can add them both, still needs to figure out solution

@divine-comedian divine-comedian moved this from In Progress to Dev Research in All-Devs Sep 23, 2024
@divine-comedian
Copy link
Contributor

@Meriem-BM still needs to do research on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 it's a blocker to other tasks or issues. Stellar
Projects
Status: Dev Research
Development

No branches or pull requests

3 participants