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

Balance record #2

Open
ighormartins opened this issue Feb 23, 2016 · 1 comment
Open

Balance record #2

ighormartins opened this issue Feb 23, 2016 · 1 comment

Comments

@ighormartins
Copy link
Member

Every time a transfer occurs, it should not only save the value of the transfer, but the balance of the user before the transfer is commited.
In order for that to work, each exchange of tokens between two users, will end up being two transfers record, one for each user. Which isn't wrong, since both accounts were updated.

This will enable us to see our balance after each operation, just like we do in normal bank accounts.
With that feature, we will be able to easily see any user balance at any given point in time, which can lead to a nice "Race" feature in the frontend, showing not only whose in front in the leadboard, but the representation of how he did end up there, compared to other users

@ricardolobo
Copy link
Member

I guess this is a implementation detail from the previous version. Please elaborate by giving an example of the database structure of the previous implementation you are alluding.

ricardolobo added a commit that referenced this issue Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants