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

Fix onboarding bignumber usage #1000

Merged
merged 5 commits into from Sep 10, 2019

Conversation

@facuspagnuolo
Copy link
Member

commented Sep 10, 2019

This PR includes

  • Fix BN maths for the templates instantiation to make sure we always work with BN instances
  • Fix templates code links
  • Fix NotificationsInfoBox prop types linting error

@facuspagnuolo facuspagnuolo requested review from bpierre and sohkai Sep 10, 2019

@auto-assign auto-assign bot requested a review from AquiGorka Sep 10, 2019

@bpierre
Copy link
Member

left a comment

LGTM

@izqui

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

#1000 🔥🎉🦅

@@ -80,13 +80,17 @@ export default {
const { domain, tokens, voting } = data
const { tokenName, tokenSymbol, members } = tokens
const baseStake = new BN(10).pow(new BN(18))
const stakes = members.map(([_, stake]) => baseStake.muln(stake).toString())
const stakes = members.map(([_, stake]) =>
baseStake.mul(new BN(stake)).toString()

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 10, 2019

Member

@facuspagnuolo We should make sure to pass stake back from the Tokens page as a string (new BN() will fail if the number is too big).

@sohkai
Copy link
Member

left a comment

1️⃣🙆‍♀🙆‍♂️👌

@now now bot temporarily deployed to staging Sep 10, 2019 Inactive

@now now bot had a problem deploying to staging Sep 10, 2019 Failure

@sohkai sohkai merged commit 7831186 into master Sep 10, 2019

8 of 9 checks passed

build build
Details
install install
Details
lint lint
Details
now Deployment has failed
Details
License Compliance All checks passed.
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@sohkai sohkai deleted the fix_onboarding_bignumber_usage branch Sep 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.