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

Add final balances parser #398

Merged
merged 8 commits into from Jun 15, 2022
Merged

Add final balances parser #398

merged 8 commits into from Jun 15, 2022

Conversation

LimpidCrypto
Copy link
Contributor

High Level Overview of Change

  • Add and export get_final_balances
  • Add _compute_final_balance
  • Export NormalizedNode
  • Change BalanceChange to ComputedBalance
  • Change BalanceChanges to ComputedBalances
  • Generally renamed some terms (function names and args) that indicate to only deal with balance changes. Now indicating to deal with computed balances.

Context of Change

The #342 PR was splitted. For each exported function (get_balance_changes (already merged #383), get_final_balances, get_previous_balances and get_order_book_changes) there will now be a separate PR to make it easier to review. This PR adds the functionality to parse the final balances from a transaction's metadata (get_final_balances).

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)

Test Plan

I added tests that are testing the same transactions as get_balance_changes.

Copy link
Collaborator

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

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

Small naming changes, but logic looks good to me :)

Copy link
Collaborator

@JST5000 JST5000 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 to me :)

@JST5000 JST5000 merged commit 6bba13c into XRPLF:master Jun 15, 2022
@LimpidCrypto LimpidCrypto mentioned this pull request Jun 16, 2022
5 tasks
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.

None yet

3 participants