diff --git a/boba_community/turing-captcha-faucet/packages/gate/src/containers/Faucet/Faucet.js b/boba_community/turing-captcha-faucet/packages/gate/src/containers/Faucet/Faucet.js index d126a79bc2..74addc7fea 100644 --- a/boba_community/turing-captcha-faucet/packages/gate/src/containers/Faucet/Faucet.js +++ b/boba_community/turing-captcha-faucet/packages/gate/src/containers/Faucet/Faucet.js @@ -39,19 +39,26 @@ function Faucet() { setLoading(true); const res = await networkService.verifyCAPTCHAImage(value, captchaInfo.uuid, key); if (res.error) { - let error = res?.error?.data?.message; + let error = res?.error?.data?.message + console.log("error:", error) if (error === "execution reverted: Invalid request") { - error = "You reached the request limit. Please come back again after 24 hours!"; + error = "You reached the request limit. Please come back again after 24 hours!" + dispatch(openAlert(error)) + } else if (error === "execution reverted: Invalid key and UUID"){ + error = "You failed the CAPTCHA test. Are you human? Please try again" + dispatch(openError(error)) + } else if (error === "execution reverted: TURING: Server error"){ + error = "Servers are starting from cold boot. Please try again in 15 seconds" + dispatch(openAlert(error)) } - dispatch(openError(error)); - dispatch(getCAPTCHAImage()); - setKey(""); + dispatch(getCAPTCHAImage()) + setKey("") } else { - dispatch(openAlert(`${value === 1 ? "10 test BOBA" : "0.1 test ETH"} was sent to your wallet`)); - dispatch(getCAPTCHAImage()); - setKey(""); + dispatch(openAlert(`${value === 1 ? "10 test BOBA" : "0.1 test ETH"} was sent to your wallet`)) + dispatch(getCAPTCHAImage()) + setKey("") } - setLoading(false); + setLoading(false) }; const hasFunds = account ? accountBalance > 500000000000000 : false; @@ -67,8 +74,7 @@ function Faucet() {
You are limited to one BOBA request and one ETH request every 24 hours, and you must have some Rinkeby ETH in your account to use this faucet. - If you do not - have any Rinkeby ETH, you can get some from{" "} + If you do not have any Rinkeby ETH, you can get some from{" "} Chainlink Faucet,{" "} Rinkeby Authenticated Faucet,{" "}or {" "}RINKEBY FAUCET. @@ -112,7 +118,7 @@ function Faucet() {
{account && !hasFunds ? - This faucet uses Turing, thus you need to have some ETH on your wallet. Bridge some funds from L1 Rinkeby to L2 Boba Rinkeby via our  + Please bridge some funds from L1 Rinkeby to L2 Boba Rinkeby via our  Gateway. : 'Your result will be hashed and compared off-chain through Turing.'}