bug: show notice on NIP5 orders

This commit is contained in:
Kieran 2023-01-23 18:17:07 +00:00
parent cb4309ab90
commit 168083f880
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 9 additions and 2 deletions

View File

@ -38,7 +38,8 @@ export interface LNURLTipProps {
svc?: string,
show?: boolean,
invoice?: string, // shortcut to invoice qr tab
title?: string
title?: string,
notice?: string
}
export default function LNURLTip(props: LNURLTipProps) {
@ -208,6 +209,7 @@ export default function LNURLTip(props: LNURLTipProps) {
return (
<>
<div className="invoice">
{props.notice && <b className="error">{props.notice}</b>}
<QrCode data={pr} link={`lightning:${pr}`} />
<div className="actions">
{pr && (

View File

@ -177,7 +177,12 @@ export default function Nip5Service(props: Nip05ServiceProps) {
{availabilityResponse?.available === false && !registerStatus && <div className="flex">
<b className="error">Not available: {mapError(availabilityResponse.why!, availabilityResponse.reasonTag || null)}</b>
</div>}
<LNURLTip invoice={registerResponse?.invoice} show={showInvoice} onClose={() => setShowInvoice(false)} title={`Buying ${handle}@${domain}`} />
<LNURLTip
invoice={registerResponse?.invoice}
show={showInvoice}
onClose={() => setShowInvoice(false)}
title={`Buying ${handle}@${domain}`}
notice="DO NOT CLOSE THIS POPUP OR YOUR ORDER WILL GET STUCK"/>
{registerStatus?.paid && <div className="flex f-col">
<h4>Order Paid!</h4>
<p>Your new NIP-05 handle is: <code>{handle}@{domain}</code></p>