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

Common Validator utils #181

Merged
merged 17 commits into from
Aug 8, 2019
Merged

Common Validator utils #181

merged 17 commits into from
Aug 8, 2019

Conversation

rzadp
Copy link
Contributor

@rzadp rzadp commented Aug 6, 2019

Moved to commons:

  • parseValidatorEvent and processValidatorsEvents
    • with tests
  • getValidatorList
  • getPastEvents and getDeployedAtBlock
    • moved as well because they are called from getValidatorList

event.returnValues.validator = address
}
}
export const getValidatorList = async (address, eth) => commonGetValidatorList(address, eth, { logger: console })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The getValidatorList and getPastEvents functions are left here (instead of removing it and importing from commons everywhere), because it is mocked here:

https://github.com/poanetwork/tokenbridge/blob/055a444faea09797bbe9b4dc1a29a2b514e9cd23/ui/src/stores/__tests__/HomeStore.test.js#L28-L36

And I failed to mock importing these from commons in HomeStore and ForeignStore

@rzadp rzadp changed the title [WIP] Common getValidatorList Common Validator utils Aug 7, 2019
@rzadp rzadp marked this pull request as ready for review August 7, 2019 11:52
@rzadp rzadp requested review from akolotov and patitonar August 7, 2019 11:52
commons/utils.js Outdated Show resolved Hide resolved
commons/utils.js Outdated Show resolved Hide resolved
commons/utils.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@akolotov akolotov left a comment

Choose a reason for hiding this comment

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

Please do not merge without @patitonar's approval

@rzadp rzadp merged commit c865198 into master Aug 8, 2019
@rzadp rzadp deleted the validator branch August 8, 2019 13:27
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.

Introduce bridge-commons
3 participants