disambiguate preimage after payment from hold preimage
This commit is contained in:
parent
e696a9bc82
commit
67ec82b6d9
|
@ -43,7 +43,7 @@ export async function getInvoice (parent, { id }, { me, models, lnd }) {
|
|||
try {
|
||||
if (inv.confirmedAt) {
|
||||
const lnInv = await getInvoiceFromLnd({ id: inv.hash, lnd })
|
||||
inv.preimage = lnInv.secret
|
||||
inv.confirmedPreimage = lnInv.secret
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('error fetching invoice from LND', err)
|
||||
|
|
|
@ -30,7 +30,7 @@ export default gql`
|
|||
lud18Data: JSONObject
|
||||
hmac: String
|
||||
isHeld: Boolean
|
||||
preimage: String
|
||||
confirmedPreimage: String
|
||||
}
|
||||
|
||||
type Withdrawl {
|
||||
|
|
|
@ -40,7 +40,7 @@ export function Invoice ({ invoice, onPayment, info, successVerb }) {
|
|||
}
|
||||
}, [invoice.confirmedAt, invoice.isHeld, invoice.satsReceived])
|
||||
|
||||
const { nostr, comment, lud18Data, bolt11, preimage } = invoice
|
||||
const { nostr, comment, lud18Data, bolt11, confirmedPreimage } = invoice
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -86,7 +86,7 @@ export function Invoice ({ invoice, onPayment, info, successVerb }) {
|
|||
body={<span className='text-muted ms-3'>{comment}</span>}
|
||||
/>
|
||||
</div>}
|
||||
<Bolt11Info bolt11={bolt11} preimage={preimage} />
|
||||
<Bolt11Info bolt11={bolt11} preimage={confirmedPreimage} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue