mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-29 20:14:29 +01:00
fix: make lightning-address in profile optional, fixing a bug when confirming comment
This commit is contained in:
@@ -166,7 +166,7 @@ async function signEvent(event: any) {
|
||||
}
|
||||
|
||||
async function confirmPublishingEvent(event: any) {
|
||||
const res = await fetch(CONSTS.apiEndpoint + '/nostr-confirm-event', {
|
||||
await fetch(CONSTS.apiEndpoint + '/nostr-confirm-event', {
|
||||
method: "post",
|
||||
body: JSON.stringify({ event }),
|
||||
credentials: 'include',
|
||||
@@ -174,8 +174,8 @@ async function confirmPublishingEvent(event: any) {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
});
|
||||
const data = await res.json()
|
||||
return data.event;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const schema: yup.SchemaOf<IFormInputs> = yup.object({
|
||||
const res = await fetch(lnurl);
|
||||
if (res.status === 200) return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
@@ -227,6 +227,7 @@ export default function UpdateAboutForm({ data, onClose }: Props) {
|
||||
<p className="text-body5 mt-16 font-medium">
|
||||
Lightning address
|
||||
</p>
|
||||
|
||||
<div className="input-wrapper mt-8 relative">
|
||||
<input
|
||||
|
||||
@@ -239,6 +240,9 @@ export default function UpdateAboutForm({ data, onClose }: Props) {
|
||||
{errors.lightning_address && <p className="input-error">
|
||||
{errors.lightning_address.message}
|
||||
</p>}
|
||||
<p className="text-body6 text-gray-400 mt-8 max-w-[70ch]">
|
||||
Your lightning address is used to send the votes you get on your posts, comments, apps...etc, directly to you.
|
||||
</p>
|
||||
<div className="mt-24 flex gap-16 justify-end">
|
||||
<Button
|
||||
color='gray'
|
||||
|
||||
Reference in New Issue
Block a user