npv2k1 / web3-todo-app

Avoid using console in code that runs on browser JS-0002
Bug risk
Major
9 occurrences in this check
Avoid using console in code that runs on the browser
20  else if (window.web3) {
21    // Use Mist/MetaMask's provider.
22    const web3 = window.web3;
23    console.log("Injected web3 detected.", window.web3);24    return web3;
25  }
26  // Fallback to localhost; use dev console port by default...
Avoid using console in code that runs on the browser
27  else {
28    const provider = new Web3.providers.HttpProvider("http://127.0.0.1:9545");
29    const web3 = new Web3(provider);
30    console.log("No web3 instance injected, using Local web3.");31    return web3;
32  }
33};
Avoid using console in code that runs on the browser
 67    });
 68    sentTx.on("error", (err: string) => {
 69      // do something on transaction error
 70      console.log("err", err); 71    });
 72
 73  }
Avoid using console in code that runs on the browser
 63    );
 64    sentTx.on("receipt", (receipt: string) => {
 65      // do something when receipt comes back
 66      console.log("receipt :>> ", receipt); 67    });
 68    sentTx.on("error", (err: string) => {
 69      // do something on transaction error
Avoid using console in code that runs on the browser
 57      tx,
 58      "e2db7f744b597e76fd2dcaa1fe9946f7fa3a8b86248a8c669af477dbc67aef01"
 59    );
 60    console.log({ signPromise }); 61    const sentTx = web3.eth.sendSignedTransaction(
 62      signPromise.raw || signPromise.rawTransaction
 63    );
Avoid using console in code that runs on the browser
 77   
 78    const getTasks = async () => {
 79      const taskCount = await todoList.methods.taskCount().call();
 80      console.log("taskCount", taskCount); 81      const promises = [];
 82      for (let i = 1; i <= parseInt(taskCount); i++) {
 83        const task = todoList.methods.tasks(i).call();
Avoid using console in code that runs on the browser
 85      }
 86      Promise.all(promises).then((tasks) => {
 87        setTasks(tasks);
 88        console.log(tasks); 89        setLoading(false);
 90      });
 91    };
Avoid using console in code that runs on the browser
108      // subscription.on("connected", (nr) => console.log(nr));
109      if (accounts.length > 0) {
110        const account = accounts[0];
111        console.log(account);112        setAccount(account);
113      } else {
114        console.log("Account not found");
Avoid using console in code that runs on the browser
111        console.log(account);
112        setAccount(account);
113      } else {
114        console.log("Account not found");115      }
116      setTodoList(
117        new web3.eth.Contract(