From 59197a178902f229c93ed100c703509475004629 Mon Sep 17 00:00:00 2001 From: nicnacnic Date: Wed, 13 Jul 2022 15:30:49 -0400 Subject: [PATCH] Update donation.js --- graphics/helpers/donation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphics/helpers/donation.js b/graphics/helpers/donation.js index 23044a1..30da2d7 100644 --- a/graphics/helpers/donation.js +++ b/graphics/helpers/donation.js @@ -4,14 +4,14 @@ let countUp; NodeCG.waitForReplicants(data).then(() => { - data.on('change', (newVal) => handleCountUp(newVal.event.total)); + data.on('change', (newVal) => handleCountUp(newVal.event.total, newVal.event.currency)); - function handleCountUp(amount) { + function handleCountUp(amount, currency) { if (!countUp) { countUp = new CountUp('donationTotal', amount, amount, 0, 0.75, { - prefix: '$' + prefix: currency, }); countUp.start(); } else countUp.update(amount); } -}); \ No newline at end of file +});