aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-05-23 22:46:56 -0700
committerAdam Soltys <[email protected]>2023-05-23 22:46:56 -0700
commitdf1b1711e2f7b437128993a97efc9249f41efc95 (patch)
tree3094d420ec8dc4ba4a52cd565e68f4c0f9854f85
parentf7357de3a0f9e3207572446919d46f82bb71c9b9 (diff)
downloadcoinos-server-df1b1711e2f7b437128993a97efc9249f41efc95.tar.gz
coinos-server-df1b1711e2f7b437128993a97efc9249f41efc95.zip
fix totals
-rw-r--r--routes/payments.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js
index f298379a..6ca9cc60 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -153,6 +153,7 @@ export default {
let totals = payments.reduce(
(a, b) => ({
+ ...a,
[b.currency]: {
sats: (a[b.currency] ? a[b.currency].sats : 0) + b.amount,
fiat: (