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

Change default values for bn.format #595

Closed
LuizAsFight opened this issue Nov 12, 2022 · 3 comments · Fixed by #624
Closed

Change default values for bn.format #595

LuizAsFight opened this issue Nov 12, 2022 · 3 comments · Fixed by #624
Assignees

Comments

@LuizAsFight
Copy link
Contributor

Motivation

Current default parameters for bn.format are:

{
  precision: 3,
  minPrecision: 1
}

let's say the user has 0.002313 ETH, format will show: 0.002. Abbreviated.

Which looks good. But normally while using the SDK, the user will need the right value, instead of an abbreviated one.

We should change default parameters to:

{
  precision: DECIMAL_UNITS, // will be 9
  minPrecision: 3
}

Usage example

No response

Possible implementations

No response

@ryuusama09
Copy link

i'd like to work on it ! @LuizAsFight

@LuizAsFight
Copy link
Contributor Author

hi @ryuusama09 , thanks for the interest!

go for it my friend, just make sure to fix tests that will break

@Dhaiwat10
Copy link
Contributor

No work has been done on this one right? Can I pick this one up? @LuizAsFight

@Dhaiwat10 Dhaiwat10 self-assigned this Nov 28, 2022
Dhaiwat10 added a commit that referenced this issue Nov 28, 2022
BREAKING CHANGE: The default config values for the `bn.format` helper functions have been
changed.

Closes: #595
camsjams pushed a commit that referenced this issue Dec 3, 2022
* chore: change default config values for `bn.format`

BREAKING CHANGE: The default config values for the `bn.format` helper functions have been
changed.

Closes: #595

* chore: add changeset

* fix failing tests

* chore: change version bump to minor from patch
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 a pull request may close this issue.

3 participants