diff --git a/app/components/client/devprogram-scripts.js b/app/components/client/devprogram-scripts.js index 0f2d377..c3a4c18 100644 --- a/app/components/client/devprogram-scripts.js +++ b/app/components/client/devprogram-scripts.js @@ -64,14 +64,17 @@ function syncWithApi(data) { // eslint-disable-line no-unused-vars fetch(`https://api.lbry.com/reward/new?github_token=${code}&reward_type=github_developer&wallet_address=${address}`) .then(response => response.json()) .then(result => { - console.log(result); - switch(true) { case result.error === "this reward is limited to 1 per person": document.querySelector("developer-program").innerHTML = "
You have already claimed this reward. This reward is limited to ONE per person. Your enthusiasm is appreciated.
"; return; + case result.error: + document.querySelector("developer-program").innerHTML = + `${result.error}
`; + return; + case result.success: result = result.data; document.querySelector("developer-program").innerHTML = @@ -81,7 +84,7 @@ function syncWithApi(data) { // eslint-disable-line no-unused-vars default: console.info(data); // eslint-disable-line no-console document.querySelector("developer-program").innerHTML = - "The LBRY API might be down. Please try again later.
"; + "No success or error was received so the LBRY API might be down.
Please try again later.