Fix deposit push notifications (#1662)
This commit is contained in:
parent
5e76ee1844
commit
799a39b75f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue