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

Unit denomination and conversion #301

Merged
merged 5 commits into from
Sep 30, 2020
Merged

Unit denomination and conversion #301

merged 5 commits into from
Sep 30, 2020

Conversation

LeonFLK
Copy link
Contributor

@LeonFLK LeonFLK commented Sep 30, 2020

fixes KILTProtocol/ticket#632

Adds Balance.utils.ts to the sdk to handle unit denomination and conversion in a central place instead of our separate components.

How to test:

Create local instance, start demo client and services, add faucet and transfer funds to test if the portrayal of units is correct.

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)

@LeonFLK LeonFLK marked this pull request as draft September 30, 2020 09:16
@LeonFLK LeonFLK marked this pull request as ready for review September 30, 2020 13:05
Copy link
Member

@Dudleyneedham Dudleyneedham left a comment

Choose a reason for hiding this comment

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

LGTM

src/__integrationtests__/utils.ts Show resolved Hide resolved
src/balance/Balance.chain.ts Show resolved Hide resolved
src/balance/Balance.spec.ts Outdated Show resolved Hide resolved
src/balance/Balance.utils.spec.ts Show resolved Hide resolved
src/balance/Balance.utils.ts Show resolved Hide resolved
Copy link
Member

@Dudleyneedham Dudleyneedham left a comment

Choose a reason for hiding this comment

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

LGTM!

src/balance/index.ts Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
@LeonFLK LeonFLK merged commit be43462 into develop Sep 30, 2020
@LeonFLK LeonFLK deleted the lw-632-denominations branch September 30, 2020 14:16
Dudleyneedham pushed a commit that referenced this pull request Sep 30, 2020
* feat: balance utils with conversion and formatting

* feat: balance utils with conversion and formatting

* test: updated formatBalance call and tests

* test: remove deprecated GAS value

* chore: add to index
Dudleyneedham pushed a commit that referenced this pull request Oct 5, 2020
* feat: balance utils with conversion and formatting

* feat: balance utils with conversion and formatting

* test: updated formatBalance call and tests

* test: remove deprecated GAS value

* chore: add to index
Dudleyneedham pushed a commit that referenced this pull request Oct 12, 2020
* feat: balance utils with conversion and formatting

* feat: balance utils with conversion and formatting

* test: updated formatBalance call and tests

* test: remove deprecated GAS value

* chore: add to index
Dudleyneedham pushed a commit that referenced this pull request Oct 12, 2020
* feat: balance utils with conversion and formatting

* feat: balance utils with conversion and formatting

* test: updated formatBalance call and tests

* test: remove deprecated GAS value

* chore: add to index
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