Fix nip05 claim

This commit is contained in:
austinkelsay 2024-10-05 18:53:18 -05:00
parent 89f8c69289
commit f9a2647d10

View File

@ -39,7 +39,7 @@ const Nip05Form = ({ visible, onHide }) => {
} else {
response = await axios.post(`/api/users/${session.user.id}/nip05`, { pubkey, name: lowercaseName });
}
if (existingNip05 && response.status === 201) {
if (!existingNip05 && response.status === 201) {
showToast('success', 'NIP-05 Claimed', 'Your NIP-05 has been claimed');
update();
onHide();
@ -48,6 +48,7 @@ const Nip05Form = ({ visible, onHide }) => {
update();
onHide();
} else {
console.log("RESPONSE", response);
showToast('error', 'Error updating NIP-05', response.data.error);
}
} catch (error) {