Skip to content

Commit

Permalink
Merge pull request #69 from MAGICGrants/count-static-correctly
Browse files Browse the repository at this point in the history
Correctly count number of donations to static XMR address
  • Loading branch information
Rucknium authored Feb 16, 2024
2 parents 3efbf95 + b77f767 commit 8e658fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/api-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ export async function fetchGetJSONAuthedBTCPay(
})
const dataiter = await responseiter.json();
if (dataiter[1].cryptoCode == 'XMR' && dataiter[1].paymentMethodPaid > 0) {
numdonationsxmr += 1
numdonationsxmr += dataiter[1].payments.length
totaldonationsxmr += Number(dataiter[1].paymentMethodPaid)
totaldonationsinfiatxmr += Number(dataiter[1].paymentMethodPaid) * Number(dataiter[1].rate)
}
if (dataiter[0].cryptoCode == 'BTC' && dataiter[0].paymentMethodPaid > 0) {
numdonationsbtc += 1
numdonationsbtc += dataiter[0].payments.length
totaldonationsbtc += Number(dataiter[0].paymentMethodPaid)
totaldonationsinfiatbtc += Number(dataiter[0].paymentMethodPaid) * Number(dataiter[0].rate)
}
Expand Down

0 comments on commit 8e658fe

Please sign in to comment.