This commit is contained in:
kiwihodl 2025-04-17 13:40:42 -05:00 committed by austinkelsay
parent ad218d8803
commit da0a877e9b
No known key found for this signature in database
GPG Key ID: 5A763922E5BA08EE
2 changed files with 5 additions and 7 deletions

View File

@ -42,7 +42,7 @@ export function CourseTemplate({ course, showMetaTags = true }) {
useEffect(() => {
if (session?.user?.privkey) {
const privkeyBuffer = Buffer.from(session.user.privkey, "hex");
const privkeyBuffer = Buffer.from(session.user.privkey, 'hex');
setNsec(nip19.nsecEncode(privkeyBuffer));
} else if (session?.user?.pubkey) {
setNpub(nip19.npubEncode(session.user.pubkey));

View File

@ -81,12 +81,10 @@ export default async function handler(req, res) {
},
}
);
res
.status(200)
.json({
pr: response.data.invoice,
verify: `${BACKEND_URL}/api/lightning-address/verify/${slug}/${response.data.payment_hash}`,
});
res.status(200).json({
pr: response.data.invoice,
verify: `${BACKEND_URL}/api/lightning-address/verify/${slug}/${response.data.payment_hash}`,
});
} catch (error) {
console.error(error);
res.status(500).json({ error: 'Failed to generate invoice' });