Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log hooks #46

Merged
merged 1 commit into from
Oct 18, 2018
Merged

log hooks #46

merged 1 commit into from
Oct 18, 2018

Conversation

willscott
Copy link
Contributor

fix #38

Copy link
Contributor

@armaniferrante armaniferrante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm just an optional suggestion

let keymanager = this.keyManager;
let boundEvent = c._decodeEventABI;
c._decodeEventABI = function (data) {
if (data.logIndex == 0 && data.topics &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to put these into constants and a method just so its obvious to readers whats going on here.

Suggested change
if (data.logIndex == 0 && data.topics &&
if (is_confidential_longterm_public_key(data))

And put the h256 and log index into a constant, e.g.,

function is_confidential_longterm_public_key(data) {
  return data.logIndex == LONGTERM_PUBLIC_KEY_INDEX && data.topics &&  LONGTERM_PUBLIC_KEY_TOPIC == data.topics[0];
}

@willscott willscott merged commit ef38f66 into master Oct 18, 2018
@willscott willscott deleted the willscott/feature/logs branch October 18, 2018 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decrypt logs from filters in web3c.js
2 participants