remove expiration when invoice is confirmed

This commit is contained in:
keyan 2023-09-27 12:19:56 -05:00
parent 13926d57da
commit cfb8fa7014
2 changed files with 10 additions and 9 deletions

View File

@ -47,13 +47,14 @@ export function Invoice ({ invoice, onPayment, info, successVerb }) {
description={numWithUnits(invoice.satsRequested, { abbreviate: false })} description={numWithUnits(invoice.satsRequested, { abbreviate: false })}
statusVariant={variant} status={status} statusVariant={variant} status={status}
/> />
{!invoice.confirmedAt &&
<div className='text-muted text-center'> <div className='text-muted text-center'>
<Countdown <Countdown
date={invoice.expiresAt} onComplete={() => { date={invoice.expiresAt} onComplete={() => {
setExpired(true) setExpired(true)
}} }}
/> />
</div> </div>}
{info && <div className='text-muted fst-italic text-center'>{info}</div>} {info && <div className='text-muted fst-italic text-center'>{info}</div>}
<div className='w-100'> <div className='w-100'>
{nostr {nostr

View File

@ -110,12 +110,12 @@ function Detail ({ fact }) {
if (!fact.item) { if (!fact.item) {
let zap let zap
try { try {
zap = JSON.parse(fact.zapMessage) zap = JSON.parse(fact.description)
} catch { } } catch { }
return ( return (
<div className='px-3'> <div className='px-3'>
<Link className={satusClass(fact.status)} href={`/${fact.type}s/${fact.factId}`}> <Link className={satusClass(fact.status)} href={`/${fact.type}s/${fact.factId}`}>
{(zap && <span className='d-block'>nostr zap</span>) || {(zap && <span className='d-block'>nostr zap{zap.content && `: ${zap.content}`}</span>) ||
(fact.description && <span className='d-block'>{fact.description}</span>)} (fact.description && <span className='d-block'>{fact.description}</span>)}
{fact.invoiceComment && <small className='text-muted'>sender says: {fact.invoiceComment}</small>} {fact.invoiceComment && <small className='text-muted'>sender says: {fact.invoiceComment}</small>}
{!fact.invoiceComment && !fact.description && <span className='d-block'>no description</span>} {!fact.invoiceComment && !fact.description && <span className='d-block'>no description</span>}