Skip to content

Commit

Permalink
feat: add input validation input (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: andrei <andrei@andreis-MacBook-Air.local>
  • Loading branch information
AndrewMatsiash and andrei authored Jun 20, 2024
1 parent 3cde209 commit 58ac1a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</p>
<ul class="payout-details">
<li>
<p>Min payout: <b id="stat-min-payouts-value" class="highlight">0.1 coin</b> <b>ALPH</b></p>
<p>Min payout: <b id="stat-min-payouts-value" class="highlight">0.1</b> <b>ALPH</b></p>
<i class="icon edit-icon open-modal-button"></i>
</li>
<li>
Expand Down
4 changes: 2 additions & 2 deletions stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function detectBrowserAndSetInputType() {
function statsApiCall(action) {
return fetch(`${statsApiUrl}${action}`).then((response) => {
if (!response.ok) {
throw new Error('Network response was not ok ' + response.statusText);
throw new Error('Network response was not ok ' + response.statusText + ' status code: ' + response.status);
}
return response.json();
});
Expand Down Expand Up @@ -237,7 +237,7 @@ function drawData(wallet) {
fetchUserValue(wallet)
.then(({ value }) => showMinPayouts(value))
.catch((error) => {
if (error.status === 404) {
if (error.message.includes('404')) {
fetchPoolValue().then((defaultValue) => {
showMinPayouts(defaultValue.value);
});
Expand Down

0 comments on commit 58ac1a1

Please # to comment.