diff options
| -rw-r--r-- | routes/payments.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js index 9891c661..9338b3a2 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -99,6 +99,11 @@ export default { (a, b) => ({ ...a, [b.currency]: { + tips: (a[b.currency] ? a[b.currency].tips : 0) + (b.tip || 0), + fiatTips: ( + parseFloat(a[b.currency] ? a[b.currency].fiatTips : 0) + + ((b.tip || 0) * b.rate) / SATS + ).toFixed(2), sats: (a[b.currency] ? a[b.currency].sats : 0) + (b.amount || 0) + |
