Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Refactor threshold calculation and publication of @polkadot/util v0.2 #799

Merged
merged 8 commits into from May 25, 2020

Conversation

Tbaut
Copy link
Collaborator

@Tbaut Tbaut commented May 20, 2020

On step toward #783

  • adds getFailingThreshold (this is basically the inverse of getPassingThreshold)
  • refactor to support the new/correct way of calculating a threshold.
  • adds tests

edit: for tests I double checked my findings with this tool

@niklabh
Copy link
Contributor

niklabh commented May 22, 2020

npm test script should be modified for jest. I am getting error when running jest in front-end:

● Test suite failed to run

Cannot find module 'src/global/networkConstants' from 'formatBnBalance.ts'

util/src/getThresholds.ts Outdated Show resolved Hide resolved
Co-authored-by: Nikhil Ranjan <niklabh811@gmail.com>
@Tbaut
Copy link
Collaborator Author

Tbaut commented May 22, 2020

Not sure I understand what you mean, I couldn't reproduce. This PR doesn't touch anything in front-end.
Can you make sure to pull the latest and try again?

@Tbaut Tbaut requested a review from niklabh May 22, 2020 12:20
@niklabh
Copy link
Contributor

niklabh commented May 22, 2020

Not sure I understand what you mean, I couldn't reproduce. This PR doesn't touch anything in front-end.
Can you make sure to pull the latest and try again?

Ah yes its in utils. Test working fine

Copy link
Contributor

@niklabh niklabh left a comment

Choose a reason for hiding this comment

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

Working good. Thanks for all the tests.

@Tbaut Tbaut merged commit f12295a into master May 25, 2020
@Tbaut Tbaut deleted the tbaut-update-getThreshold branch May 25, 2020 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants