Skip to content

Commit

Permalink
feat: add a button to connect unauthenticated a/cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennievon committed Nov 3, 2023
1 parent 6053cdc commit 350a18b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/walletextension/api/staticOG/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,18 @@ async function populateAccountsTable(document, tableBody, userID) {
const statusCell = document.createElement("td");

let x = await accountIsAuthenticated(account, userID);
if (x == true) {

if (x === true) {
statusCell.textContent = "\u2705";
} else {
statusCell.textContent = "\u274C";
const connectButton = document.createElement("button");
connectButton.textContent = "Connect";
connectButton.style.cursor = "pointer";
connectButton.addEventListener("click", async (event) => {
event.preventDefault();
await authenticateAccountWithObscuroGateway(ethereum, account, userID);
});
statusCell.appendChild(connectButton);
}

const copyIcon = document.createElement("img");
Expand Down

0 comments on commit 350a18b

Please sign in to comment.