Fix deposit push notifications (#1662)

This commit is contained in:
ekzyis 2024-11-28 18:48:08 +01:00 committed by GitHub
parent 5e76ee1844
commit 799a39b75f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -340,10 +340,10 @@ export async function notifyEarner (userId, earnings) {
export async function notifyDeposit (userId, invoice) { export async function notifyDeposit (userId, invoice) {
try { try {
await sendUserNotification(userId, { await sendUserNotification(userId, {
title: `${numWithUnits(msatsToSats(invoice.received_mtokens), { abbreviate: false, unitSingular: 'sat was', unitPlural: 'sats were' })} deposited in your account`, title: `${numWithUnits(msatsToSats(invoice.msatsReceived), { abbreviate: false, unitSingular: 'sat was', unitPlural: 'sats were' })} deposited in your account`,
body: invoice.comment || undefined, body: invoice.comment || undefined,
tag: 'DEPOSIT', tag: 'DEPOSIT',
data: { sats: msatsToSats(invoice.received_mtokens) } data: { sats: msatsToSats(invoice.msatsReceived) }
}) })
} catch (err) { } catch (err) {
console.error(err) console.error(err)