diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/socket.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/socket.ts b/src/lib/socket.ts index b87cc165..b28b1060 100644 --- a/src/lib/socket.ts +++ b/src/lib/socket.ts @@ -57,7 +57,12 @@ export const messages = (data) => ({ pathname.includes("/receive") || pathname.includes("/invoice") ) { - if (!get(navigating)) goto(`/invoice/${iid}`); + // `paid=<amount>` marks this as a payment that arrived just now, and + // carries the amount of THIS payment. A reusable bolt12 offer needs + // both: its `received` is a lifetime total, so the invoice layout + // can't tell a live payment from an old one, and the success screen + // would otherwise show the accumulated figure. + if (!get(navigating)) goto(`/invoice/${iid}?paid=${amount}`); } else success(`${confirmed ? "Received" : "Detected"} ⚡️${s(amount)}!`); } }, |
