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