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

feat: flexible balance formatting #363

Merged
merged 5 commits into from
Apr 1, 2021

Conversation

Dudleyneedham
Copy link
Member

fixes https://github.com/KILTprotocol/ticket/issues/1187

To make it easier for App developers to work with Balances, we should make our formatKiltBalance more flexible.

Additionally, format it for specific decimal places

How to test:

Added new test to balance utils

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

Copy link
Contributor

@LeonFLK LeonFLK left a comment

Choose a reason for hiding this comment

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

Looks good, just a nitpick and optimisation of formating, without integer safety hazard.

Dudleyneedham and others added 2 commits April 1, 2021 16:41
Co-authored-by: LeonFLK <51441505+LeonFLK@users.noreply.github.com>
@Dudleyneedham Dudleyneedham requested a review from LeonFLK April 1, 2021 14:52
Copy link
Contributor

@LeonFLK LeonFLK left a comment

Choose a reason for hiding this comment

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

LGTM

@Dudleyneedham Dudleyneedham merged commit ff6aa7d into develop Apr 1, 2021
@Dudleyneedham Dudleyneedham deleted the dn-1187-flexi-format-balance branch April 1, 2021 15:13
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.

2 participants