feat: add comment support for Lightning payments in BTCPay and Strike services

- Enhanced the sendPaymentWithAddress method in BTCPayService and StrikeService to accept an optional comment parameter.
- Updated resolveLightningAddress to include the comment in the callback URL if supported by the LNURL-pay endpoint.
- Modified PaymentService to construct a descriptive comment for Lightning invoices, improving clarity for users.

These changes enhance the payment experience by allowing users to include contextual information with their transactions.
This commit is contained in:
Dorian
2026-02-14 13:02:42 +00:00
parent e774d20821
commit 11d289d793
8 changed files with 135 additions and 35 deletions

View File

@@ -20,17 +20,18 @@ function isConnectionError(error: any): boolean {
/** Build a mock Nostr user with filmmaker profile + subscription */
function buildMockNostrUser(pubkey: string) {
const mockUserId = 'mock-nostr-user-' + pubkey.slice(0, 8)
const shortPub = pubkey.slice(0, 8)
return {
id: mockUserId,
email: `${pubkey.slice(0, 8)}@nostr.local`,
legalName: 'Nostr User',
email: `${shortPub}@nostr.local`,
legalName: `npub...${pubkey.slice(-6)}`,
nostrPubkey: pubkey,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
filmmaker: {
id: 'mock-filmmaker-' + pubkey.slice(0, 8),
id: 'mock-filmmaker-' + shortPub,
userId: mockUserId,
professionalName: 'Nostr Filmmaker',
professionalName: `npub...${pubkey.slice(-6)}`,
bio: 'Independent filmmaker and content creator.',
},
subscriptions: [{