Compare commits

..

No commits in common. "be20500c06480ca0115432b6bb91d3a669e55282" and "df631878e0e586b83e9fd98be1854f2ec59b96d7" have entirely different histories.

2 changed files with 1 additions and 8 deletions

View File

@ -69,14 +69,7 @@ export async function earn ({ name }) {
const notifications = {}
for (const [i, earner] of earners.entries()) {
let earnings = 0
if (i === 0) {
// top earner gets 1m sats
earnings = 1_000_000_000
} else {
// everyone else gets a proportion of the total
earnings = Math.floor(parseFloat(proportions[i - 1] * (sum - 1_000_000_000)))
}
const earnings = Math.floor(parseFloat(proportions[i] * sum))
total += earnings
if (total > sum) {
console.log(name, 'total exceeds sum', total, '>', sum)