Cross-posted from blinkbitcoin/blink-mobile#3463
Originally reported by @yanascz
Problem
When making an LNURL-pay payment, the successAction field is not persisted with the transaction record. This violates the LUD-09 specification which states:
WALLET should also store successAction data on the transaction record.
Currently, users can only see the successAction content on the payment success screen. If they dismiss it accidentally, the information is lost.
Proposed Backend Changes
This is Part 1 of a cross-stack fix. The mobile app changes (Part 2) are tracked in the original issue.
Changes required:
-
Database schema: Add success_action field to Lightning transaction records
-
GraphQL schema: Add successAction field to Transaction type:
type LnSuccessAction {
tag: String! # "message" | "url" | "aes"
message: String # For message type
url: String # For url type
description: String # For url and aes types
}
type SettlementViaLn {
preImage: String
successAction: LnSuccessAction # NEW
}
-
Transaction processing: Capture successAction from LNURL-pay callback and persist it with the transaction
Notes
- The frontend PR depends on this backend support being deployed first
- Existing transactions won't have successAction (only affects new transactions going forward)
- AES-encrypted successAction also requires the preImage for decryption - ensure preImage is preserved
Context: This was filed as a mobile app issue but requires backend changes first. Cross-posting here so the right folks can work on it!
Problem
When making an LNURL-pay payment, the
successActionfield is not persisted with the transaction record. This violates the LUD-09 specification which states:Currently, users can only see the successAction content on the payment success screen. If they dismiss it accidentally, the information is lost.
Proposed Backend Changes
This is Part 1 of a cross-stack fix. The mobile app changes (Part 2) are tracked in the original issue.
Changes required:
Database schema: Add
success_actionfield to Lightning transaction recordsGraphQL schema: Add
successActionfield toTransactiontype:Transaction processing: Capture successAction from LNURL-pay callback and persist it with the transaction
Notes
Context: This was filed as a mobile app issue but requires backend changes first. Cross-posting here so the right folks can work on it!