Compare commits
No commits in common. "be20500c06480ca0115432b6bb91d3a669e55282" and "df631878e0e586b83e9fd98be1854f2ec59b96d7" have entirely different histories.
be20500c06
...
df631878e0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user