Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Dec 28, 2023
1 parent 8ee73bd commit 849e759
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ <h5>Stealth Meta-Address</h5>
// await this.syncAccounts(provider, devMode);
// }
// if (!devMode) {
// await this.processData(provider);
await this.processData(provider);
// }
this.sync.section = null;
this.sync.halt = false;
Expand Down Expand Up @@ -1832,9 +1832,29 @@ <h5>Stealth Meta-Address</h5>
}
console.log(moment().format("HH:mm:ss") + " syncAccounts END");
},

async processData(provider) {
console.log(moment().format("HH:mm:ss") + " processData BEGIN");
console.log(moment().format("HH:mm:ss") + " processData - events: " + JSON.stringify(this.events));
console.log(moment().format("HH:mm:ss") + " processData - addresses: " + JSON.stringify(this.addresses));
const events = this.events[this.chainId] || {};
const addresses = this.addresses[this.chainId] || {};
for (const blockNumber of Object.keys(events).sort((a, b) => { return a - b })) {
for (const logIndex of Object.keys(events[blockNumber]).sort((a, b) => { return a - b })) {
const eventData = events[blockNumber][logIndex];
console.log(blockNumber + "." + logIndex + " " + eventData.stealthAddress + " " + eventData.ephemeralPubKey);
for (const [address, accountData] of Object.entries(addresses)) {
for (const [stealthMetaAddress, stealthMetaAddressData] of Object.entries(accountData.stealthMetaAddresses)) {
console.log(" Checking " + address.substring(0, 20) + " " + stealthMetaAddress.substring(0, 30));
}
}
}
}

console.log(moment().format("HH:mm:ss") + " processData END");
},

async processDataOld(provider) {
console.log(moment().format("HH:mm:ss") + " processDataOld BEGIN");
const accounts = this.accounts;
const events = this.events[this.chainId] || {};
for (const blockNumber of Object.keys(events).sort((a, b) => { return a - b })) {
Expand Down Expand Up @@ -1883,7 +1903,7 @@ <h5>Stealth Meta-Address</h5>
}
Vue.set(this.accounts[this.chainId], contract, account);
} else {
console.log(moment().format("HH:mm:ss") + " processData - account: " + contract + " not found");
console.log(moment().format("HH:mm:ss") + " processDataOld - account: " + contract + " not found");
}
}
}
Expand Down Expand Up @@ -1922,7 +1942,7 @@ <h5>Stealth Meta-Address</h5>
Vue.set(this, 'accounts', accounts);
}
this.forceRefresh++; // UI refresh workaround
console.log(moment().format("HH:mm:ss") + " processData END");
console.log(moment().format("HH:mm:ss") + " processDataOld END");
},

customTypeUpdated(address, type) {
Expand Down

0 comments on commit 849e759

Please sign in to comment.