diff --git a/components/notifications.js b/components/notifications.js
index 49164327..a4937c3b 100644
--- a/components/notifications.js
+++ b/components/notifications.js
@@ -501,13 +501,23 @@ function Invoicification ({ n: { invoice, sortTime } }) {
}
function WithdrawlPaid ({ n }) {
- let actionString = n.withdrawl.autoWithdraw ? 'sent to your attached wallet' : 'withdrawn from your account'
+ let amount = n.earnedSats + n.withdrawl.satsFeePaid
+ let actionString = 'withdrawn from your account'
+
+ if (n.withdrawl.autoWithdraw) {
+ actionString = 'sent to your attached wallet'
+ }
+
if (n.withdrawl.forwardedActionType === 'ZAP') {
+ // don't expose receivers to routing fees they aren't paying
+ amount = n.earnedSats
actionString = 'zapped directly to your attached wallet'
}
+
return (
- {numWithUnits(n.earnedSats + n.withdrawl.satsFeePaid, { abbreviate: false, unitSingular: 'sat was ', unitPlural: 'sats were ' })}
+
+ {numWithUnits(amount, { abbreviate: false, unitSingular: 'sat was ', unitPlural: 'sats were ' })}
{actionString}
{timeSince(new Date(n.sortTime))}
{(n.withdrawl.forwardedActionType === 'ZAP' && p2p) ||
diff --git a/worker/paidAction.js b/worker/paidAction.js
index fa000b3a..9b3ecb5a 100644
--- a/worker/paidAction.js
+++ b/worker/paidAction.js
@@ -317,13 +317,11 @@ export async function paidActionForwarded ({ data: { invoiceId, withdrawal, ...a
}, { models, lnd, boss })
if (transitionedInvoice) {
- const { bolt11, msatsPaid, msatsFeePaid } = transitionedInvoice.invoiceForward.withdrawl
- // the amount we paid includes the fee so we need to subtract it to get the amount received
- const received = Number(msatsPaid) - Number(msatsFeePaid)
+ const { bolt11, msatsPaid } = transitionedInvoice.invoiceForward.withdrawl
const logger = walletLogger({ wallet: transitionedInvoice.invoiceForward.wallet, models })
logger.ok(
- `↙ payment received: ${formatSats(msatsToSats(received))}`,
+ `↙ payment received: ${formatSats(msatsToSats(Number(msatsPaid)))}`,
{
bolt11,
preimage: transitionedInvoice.preimage