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
1 changed files with 2 additions and 2 deletions

View File

@ -340,10 +340,10 @@ export async function notifyEarner (userId, earnings) {
export async function notifyDeposit (userId, invoice) {
try {
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,
tag: 'DEPOSIT',
data: { sats: msatsToSats(invoice.received_mtokens) }
data: { sats: msatsToSats(invoice.msatsReceived) }
})
} catch (err) {
console.error(err)