From 0f8c3a68b423c1aa433fbc3efb76cdb6f12a730a Mon Sep 17 00:00:00 2001 From: Arzumify Date: Tue, 30 Jul 2024 15:37:37 +0100 Subject: [PATCH] Report stampts being spent correctly --- static/js/signup.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/js/signup.js b/static/js/signup.js index 2dc15a6..615a4e3 100644 --- a/static/js/signup.js +++ b/static/js/signup.js @@ -151,14 +151,15 @@ signupButton.addEventListener("click", () => { await new Promise(r => setTimeout(r, 200)) window.location.href = "/app/" } else if (response.status === 409) { - statusBox.innerText = "Username already taken!" + if (responseData["error"] === "Stamp already spent" { + statusBox.innerText = "Pure bad luck... your PoW challenge was accepted, but someone else used the same PoW challenge as you. Please try again. (error: Stamp already spent)" + } else { + statusBox.innerText = "Username already taken!" + } showElements(true) } else if (response.status === 429) { statusBox.innerText = "Please don't sign up to new accounts that quickly. If you are using a VPN, please turn it off!" showElements(true) - } else if (response.status === 409) { - statusBox.innerText = "Pure bad luck... your PoW challenge was accepted, but someone else used the same PoW challenge as you. Please try again. (error: " + responseData["error"] + ")" - showElements(true) } else if (response.status === 500) { statusBox.innerText = responseData["error"] showElements(true)