Skip to content

Commit

Permalink
chore(web): remove proxy status and check
Browse files Browse the repository at this point in the history
  • Loading branch information
dwiekawki committed Jan 21, 2025
1 parent 148061a commit 13373f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
24 changes: 0 additions & 24 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ document.addEventListener("DOMContentLoaded", () => {
const alchemyKeyInput = document.getElementById("alchemy-key");
const initBtn = document.getElementById("init-btn");
const statusSpan = document.getElementById("status");
const proxySpan = document.getElementById("proxy");
const modalOverlay = document.getElementById("modal-overlay");
const infoBtn = document.getElementById("info-btn");
const proxyBtn = document.getElementById("proxy-btn");
let messageId = 1;

const statusIcons = {
Expand Down Expand Up @@ -193,26 +191,6 @@ document.addEventListener("DOMContentLoaded", () => {
});
}

function checkProxy() {
proxySpan.innerText = statusIcons.pending;
timeout(1000, fetch('http://127.0.0.1:3000/check'))
.then(response => response.text())
.then(response => {
console.log('Proxy:', response);
if (response.trim() === 'ready') {
proxySpan.innerText = statusIcons.ready;
} else {
proxySpan.innerText = statusIcons.unknown;
}
})
.catch((e) => {
console.error('Proxy:', e);
proxySpan.innerText = statusIcons.error;
});
}

proxyBtn.addEventListener("click", checkProxy);

modalOverlay.style.display = "flex";
infoBtn.addEventListener("click", () => {
modalOverlay.style.display = "flex";
Expand All @@ -223,6 +201,4 @@ document.addEventListener("DOMContentLoaded", () => {
modalOverlay.style.display = "none";
}
});

checkProxy();
});
2 changes: 0 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<input type="password" id="alchemy-key" placeholder="Enter Alchemy key" value="nLWc0kd1-CBFNJ57gvB_lVcQpSYCGZS1">
<button id="init-btn">Init</button>
<button id="status-btn" class="status-btn">Ready: <span id="status"></span></button>
<button id="proxy-btn" class="status-btn">Proxy: <span id="proxy"></span></button>
<button id="info-btn" class="status-btn">&#9432;</button>
</div>
</div>
Expand All @@ -40,7 +39,6 @@ <h2>Beerus WebAssembly Demo</h2>
<li><a href="https://github.com/eigerco/beerus" target="_blank">Beerus</a> is a light client for <a href="https://www.starknet.io/" target="_blank">Starknet</a></li>
<li>Press ESC or click outside this message to hide it</li>
<li>Click "Info" button to show this message again</li>
<li>Make sure <a href="https://github.com/eigerco/beerus/blob/main/web/etc/proxy/proxy.js" target="_blank">the proxy</a> is listening at localhost:3000</li>
<li>Paste the Alchemy API key</li>
<li>Click "Init" and wait for ✅</li>
<li>Check logs in case of ❌</li>
Expand Down

0 comments on commit 13373f2

Please sign in to comment.