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

Archives - Rank by donation amount #21

Open
joedavison opened this issue Jan 16, 2023 · 0 comments
Open

Archives - Rank by donation amount #21

joedavison opened this issue Jan 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@joedavison
Copy link
Member

joedavison commented Jan 16, 2023

In order to rank archives by donation amount, and be able to do many other things in the future, we need to begin keeping records of Transactions outside of LNbits.

We have a few different kind of transactions in our platform currently. For each kind, next to it is indicated the data that we need to save in the transaction table.

Donations to users for specific archive pages:

  • User Wallet to User Wallet: sender_username, receiver_username, archive_id, amount, datetime
  • External Wallet to User Wallet: sender_identifier, receiver_username, archive_id, amount, datetime

Donations to Bookmark and anonymous donations:

  • User Wallet to Bookmark Wallet: sender_username, [archive_id], amount, datetime
  • External Wallet to Bookmark Wallet: sender_identifier, [archive_id], amount, datetime

The archive_id will need to be passed through from the archive page to the donation page, and further included in the LN invoice in order to reconcile the transaction.

This task involves

  • Creating a new table of Transactions that can hold the data structure indicated above
  • Modifying all of the parts of the code base where transactions are made, to ensure the data is aggregated and inserted into the Transactions table at the time of the transaction
  • Creating a "Rank by donation amount" function that aggregates transaction data for each archive
@leobz leobz added the enhancement New feature or request label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants