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) {
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user