Skip to content

Commit

Permalink
Events initialization: add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonesestito committed Jan 13, 2024
1 parent 5ae42f3 commit 70fc7f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions web/js/geth_contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,6 @@ async function geth_withdrawEther(amount) {
let token_sent_event_emitter = null;
let token_received_event_emitter = null;
async function _initTokenEvents() {
console.log("Initializing token events");

if (token_sent_event_emitter !== null) {
token_sent_event_emitter.removeAllListeners('data');
token_sent_event_emitter.removeAllListeners('error');
Expand All @@ -510,6 +508,7 @@ async function _initTokenEvents() {
console.log("Not logged in, skipping token events");
return;
}
console.log("Logged in, subscribing to token events for user", user);

// Subscribe to Transfer events from or to ANYONE
// Anyone is required to make the domain search reactive
Expand Down
2 changes: 1 addition & 1 deletion web/js/geth_domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,6 @@ let domains_received_event_emitter = null;
let domains_listing_event_emitter = null;
let domains_selling_event_emitter = null;
async function _initDomainsEvents() {
console.log('Initializing events for domains');
if (domains_sent_event_emitter !== null) {
domains_sent_event_emitter.removeAllListeners('data');
domains_sent_event_emitter.removeAllListeners('error');
Expand All @@ -1278,6 +1277,7 @@ async function _initDomainsEvents() {
console.log('Not logged in, not subscribing to events for domains');
return;
}
console.log('Initializing events for domains for user', user);

// Subscribe to Transfer events from or to me
const _onEvent = async function(event) {
Expand Down

0 comments on commit 70fc7f0

Please sign in to comment.