From f9a2647d102ce3aacb5fd545bdbc69f37925ba96 Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Sat, 5 Oct 2024 18:53:18 -0500 Subject: [PATCH] Fix nip05 claim --- src/components/profile/subscription/Nip05Form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/profile/subscription/Nip05Form.js b/src/components/profile/subscription/Nip05Form.js index 187ebad..a9bf6ae 100644 --- a/src/components/profile/subscription/Nip05Form.js +++ b/src/components/profile/subscription/Nip05Form.js @@ -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) {