From 5ae42f3449f6fe6c9558017e8c4f720acd24a412 Mon Sep 17 00:00:00 2001 From: Simone Sestito Date: Sat, 13 Jan 2024 12:50:13 +0100 Subject: [PATCH] Fix JS contract initalization if user is logged out --- web/js/geth_contract.js | 6 ------ web/js/geth_domains.js | 6 ------ 2 files changed, 12 deletions(-) diff --git a/web/js/geth_contract.js b/web/js/geth_contract.js index 9355cdf..4df5a86 100644 --- a/web/js/geth_contract.js +++ b/web/js/geth_contract.js @@ -432,13 +432,7 @@ const abi = [ async function _initializeGethContract() { const web3 = getWeb3(); const user = await getCurrentUser(); - - if (user === null) { - return; - } - const contract = new web3.eth.Contract(abi, geth_contract_address); - return [contract, user]; } diff --git a/web/js/geth_domains.js b/web/js/geth_domains.js index 66da0b4..105554c 100644 --- a/web/js/geth_domains.js +++ b/web/js/geth_domains.js @@ -1073,13 +1073,7 @@ const geth_domains_abi = [ async function _initializeGethDomainsContract() { const web3 = getWeb3(); const user = await getCurrentUser(); - - if (user === null) { - return; - } - const contract = new web3.eth.Contract(geth_domains_abi, geth_domains_address); - return [contract, user]; }