diff --git a/api/paidAction/receive.js b/api/paidAction/receive.js index 51945a85..cd31df0e 100644 --- a/api/paidAction/receive.js +++ b/api/paidAction/receive.js @@ -54,24 +54,6 @@ export async function describe ({ description }, { me, cost, paymentMethod, sybi return description ?? `SN: ${me?.name ?? ''} receives ${numWithUnits(msatsToSats(cost - fee))}` } -export async function onPaid ({ invoice }, { tx }) { - if (!invoice) { - throw new Error('invoice is required') - } - - // P2P lnurlp does not need to update the user's balance - if (invoice?.invoiceForward) return - - await tx.user.update({ - where: { id: invoice.userId }, - data: { - mcredits: { - increment: invoice.msatsReceived - } - } - }) -} - export async function nonCriticalSideEffects ({ invoice }, { models }) { await notifyDeposit(invoice.userId, invoice) await models.$executeRaw`