Contributor not showing up in toplist #114

Closed
opened 2019-05-03 21:43:40 +00:00 by bumi · 7 comments
bumi commented 2019-05-03 21:43:40 +00:00 (Migrated from github.com)

Currently I am not showing up in the contributor list though I have 7500 kredits earned (and a 298 kredits balance).

I currently do not have any unconfirmed contributions.
This line makes me wonder if contributors without unconfirmed contributions get lost: https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L49

Currently I am not showing up in the contributor list though I have 7500 kredits earned (and a 298 kredits balance). I currently do not have any unconfirmed contributions. This line makes me wonder if contributors without unconfirmed contributions get lost: https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L49
raucao commented 2019-05-03 23:06:38 +00:00 (Migrated from github.com)

Ah yes, that's a logical bug for sure!

Ah yes, that's a logical bug for sure!
bumi commented 2019-05-04 08:45:38 +00:00 (Migrated from github.com)

I am wondering how will we do that when the pagination kicks in...

I am wondering how will we do that when the pagination kicks in...
raucao commented 2019-05-04 08:47:44 +00:00 (Migrated from github.com)

Load more pages if all contributions on page 1 are unconfirmed.

Load more pages if all contributions on page 1 are unconfirmed.
bumi commented 2019-05-04 08:49:33 +00:00 (Migrated from github.com)

as far as I can read the code we calculate the balance from the contributions here? if we paginate the contributions we no longer have all the contributions to calculate the balance.

as far as I can read the code we calculate the balance from the contributions here? if we paginate the contributions we no longer have all the contributions to calculate the balance.
raucao commented 2019-05-04 08:52:02 +00:00 (Migrated from github.com)

No, the balance is from your totalKreditsEarned plus the sum of kredits from unconfirmed contributions. See kredits service for the details.

Edit: this line specifically: https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L58

No, the balance is from your `totalKreditsEarned` plus the sum of kredits from unconfirmed contributions. See kredits service for the details. _Edit:_ this line specifically: https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L58
bumi commented 2019-05-04 08:56:30 +00:00 (Migrated from github.com)

ah, ok. 👍
so we should actually take all contributors from the service and group/count the unconfirmed contributions for those.
and always load all unconfirmed contributions?

ah, ok. :+1: so we should actually take all contributors from the service and group/count the unconfirmed contributions for those. and always load all unconfirmed contributions?
raucao commented 2019-05-04 09:06:17 +00:00 (Migrated from github.com)

We can just load more pages initially, in case kredits.contributionsConfirmed is 0 after loading the first page. In any case, it's a luxury problem to have, because that would be a lot of contributions in the last 7 days (currently more than 200).

The fix here could be adding the diff between contributors in the current output and all contributors to that array, and set the unconfirmed balances to 0 for those.

We can just load more pages initially, in case `kredits.contributionsConfirmed` is 0 after loading the first page. In any case, it's a luxury problem to have, because that would be a lot of contributions in the last 7 days (currently more than 200). The fix here could be adding the diff between contributors in the current output and all contributors to that array, and set the unconfirmed balances to 0 for those.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kredits/kredits-web#114