Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stuck at revoke userID #1605

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/walletextension/api/staticOG/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<h2>◠. Obscuro Gateway Demo! ◠.</h2>


<button class="btn btn-primary btn-lg btn-block mb-3" id="join">Join</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="revokeUserID">Revoke UserID</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="join" style="display: none">Join</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="revokeUserID" style="display: none">Revoke UserID</button>
<p id="status"></p>
<table id="accountsTable" border="1">
<thead>
Expand Down
9 changes: 2 additions & 7 deletions tools/walletextension/api/staticOG/javascript.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const eventClick = "click";
const eventDomLoaded = "DOMContentLoaded";
const idJoin = "join";
const idAddAccount = "addAccount";
const idAddAllAccounts = "addAllAccounts";
const idRevokeUserID = "revokeUserID";
const idStatus = "status";
const idAccountsTable = "accountsTable";
Expand Down Expand Up @@ -207,12 +205,9 @@ function checkIfMetamaskIsLoaded() {
if (window.ethereum) {
handleEthereum();
} else {
// TODO: Refactor and change the way we hide and display items on our webpage
document.getElementById(idJoin).style.display = "none";
document.getElementById(idAddAccount).style.display = "none";
document.getElementById(idAddAllAccounts).style.display = "none";
document.getElementById(idRevokeUserID).style.display = "none";
const statusArea = document.getElementById(idStatus);
const table = document.getElementById("accountsTable");
table.style.display = "none";
statusArea.innerText = 'Connecting to Metamask...';
window.addEventListener('ethereum#initialized', handleEthereum, {
once: true,
Expand Down
Loading